Skip to main content

transaction

transaction(sender, f)

transaction(sender: FeePayerSpec, f: () => Promise<void>): TransactionPromise<false, false>

Construct a smart contract transaction. Within the callback passed to this function, you can call into the methods of smart contracts.

let tx = await Mina.transaction(sender, async () => {
await myZkapp.update();
await someOtherZkapp.someOtherMethod();
});

Parameters

sender: FeePayerSpec

f

Returns

TransactionPromise\<false, false>

A transaction that can subsequently be submitted to the chain.

Source

lib/mina/transaction.ts:563

transaction(f)

transaction(f: () => Promise<void>): TransactionPromise<false, false>

Parameters

f

Returns

TransactionPromise\<false, false>

Source

lib/mina/transaction.ts:567