pub fn encode_opt_in_to_crsn_script_function(
    crsn_size: u64
) -> TransactionPayload
Expand description

Summary

Publishes a CRSN resource under account and opts the account in to concurrent transaction processing. Upon successful execution of this script, all further transactions sent from this account will be ordered and processed according to DIP-168.

Technical Description

This publishes a CRSN::CRSN resource under account with crsn_size number of slots. All slots will be initialized to the empty (unused) state, and the CRSN resource’s min_nonce field will be set to the transaction’s sequence number + 1.

Parameters

NameTypeDescription
accountsignerThe signer of the sending account of the transaction.
crsn_sizeu64The the number of slots the published CRSN will have.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::INVALID_STATECRSN::EHAS_CRSNA CRSN::CRSN resource was already published under account.
Errors::INVALID_ARGUMENTCRSN::EZERO_SIZE_CRSNThe crsn_size was zero.