Skip to main content
In this part of the tutorial, we’ll dig into how transaction arguments are built, how to request a signature according to the arguments from the smart contract, and how to broadcast the signed transaction into the network.

Building transaction arguments

Now that we’ve set up the account and derived the public key, it’s time to build the transaction arguments. For a transaction to be valid, we must attach both a nonce and a recent_block_hash - these values ensure that the transaction is unique and prevent replay attacks. Let’s fetch nonce first:
And recent_block_hash, now it’s your turn:
Now that we have everything needed, let’s build transaction arguments:

Requesting signature from Smart Contract

After building transaction arguments, the next step is to request a signature from the smart contract.

Broadcasting the transaction

With the signature in hand, we are now ready to send it to the network!

Final Thoughts

With that, we’ve successfully completed the full journey of acting on behalf of another Near account securely and transferred to yourself 0.1 NEAR from a controllable account. By following this process, you now have a solid understanding of how to manage external accounts on Near using Multi-Party Computation (MPC).