Signer: the account that signs the transactionActions: the set of actions to be performed (see below)Receiver: the account on which to perform the actions
PublicKey: the public key used to sign the transaction (so the network can verify the signature)Nonce: a number that is incremented for each transaction sent by theSignerBlockHash: the hash of a recent block, to limit the time-validity of the transaction
About nonce values:
- When adding a key, the
nonceis automatically assigned - particularly, it is given the valueblock height * 10^6- so the value in theADD_KEYaction is ignored - A transaction is accepted only if the
noncevalue is in the range of:[(current_nonce_of_access_key + 1) .. (block_height * 10^6)] - Once a transaction is accepted, the access key’s
nonceis set to thenoncevalue of the included transaction
Actions
Each transaction can have one or multiple Actions, which are the actual operations to be performed on theReceiver account. There are different types of actions that can be performed:
- Core Actions
- Account Management
- Advanced Actions
FunctionCall
FunctionCall
Invoke a function on a contract (optionally attaching NEAR to the call)Learn more
Transfer
Transfer
Transfer tokens to another accountLearn more
DeployContract
DeployContract
Deploy a contract in the accountLearn more
Example: Bundled Actions
For example,bob.near can bundle the following actions in a single transaction:
- Create the account
contract.bob.near - Transfer 5 NEAR to
contract.bob.near - Deploy a contract in
contract.bob.near - Call the function
initincontract.bob.near
Actions are executed in the order they are specified in the transaction. If any of the actions fails, the transaction is discarded and none of the actions take effect.