storeTransaction function

void Function(Builder builder) storeTransaction(
  1. Transaction src
)

Implementation

void Function(Builder builder) storeTransaction(Transaction src) {
  return (Builder builder) {
    builder.storeUint(BigInt.from(0x07), 4);
    builder.storeUint(src.address, 256);
    builder.storeUint(src.lt, 64);
    builder.storeUint(src.prevTransactionHash, 256);
    builder.storeUint(src.prevTransactionLt, 64);
    builder.storeUint(BigInt.from(src.now), 32);
    builder.storeUint(BigInt.from(src.outMessagesCount), 15);
    builder.store(storeAccountStatus(src.oldStatus));
    builder.store(storeAccountStatus(src.endStatus));

    var msgBuilder = beginCell();
    if (src.inMessage != null) {
      msgBuilder.storeBit(1);
      msgBuilder.storeRef(beginCell().store(storeMessage(src.inMessage!)));
    } else {
      msgBuilder.storeBit(0);
    }
    msgBuilder.storeDictionary(src.outMessages);
    builder.storeRef(msgBuilder);

    builder.store(storeCurrencyCollection(src.totalFees));
    builder.storeRef(beginCell().store(storeHashUpdate(src.stateUpdate)));
    builder.storeRef(
        beginCell().store(storeTransactionDescription(src.description)));
  };
}