Skip to main content
Version: 2.15.0

transaction

Call Signature​

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

Defined in: lib/mina/v1/transaction.ts:712

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​

() => Promise<void>

Returns​

TransactionPromise<false, false>

A transaction that can subsequently be submitted to the chain.

Call Signature​

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

Defined in: lib/mina/v1/transaction.ts:716

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​

f​

() => Promise<void>

Returns​

TransactionPromise<false, false>

A transaction that can subsequently be submitted to the chain.