Skip to main content

transaction

Call Signature

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

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

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:586

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.