how to submit multi move call like this transaction block HcZsQNduXmw6ZqNkMmp3HJVj3y6TDJypzPt5sKfjsCvx
Hello there!
What you referenced is a grouping of multiple transactions that are executed as one transaction block. To develop and execute a transaction block which can consist of one or more moveCalls you can use the @mysten/sui
SDK.
For example, the reference you shared does something like this:
const tx = new Transaction();
// Create an array to temporarily keep objects that mine function returns
let objArray = [];
loop X times {
let returnedObject = tx.moveCall({
target: `${PACKAGE_ID}::fomo::mine`,
arguments: [ ... ],
});
objArray.push(returnedObject);
}
// Then you can transfer them all to an address
tx.transferObjects(objArray, address); // or you can handle each one differently
// ... do other things
// finally, sign and execute the whole transaction block as one
await suiClient.signAndExecuteTransaction({
signer,
transaction: tx, // here is where you add the transaction block
...
});
Please reference our official documentation for more examples and guidance: