executeTransaction
Executes a Safe transaction.
Usage
_30import {_30 MetaTransactionData,_30 OperationType,_30 TransactionOptions_30} from '@safe-global/types-kit'_30import { protocolKit } from './setup.ts'_30_30const transactions: MetaTransactionData[] = [{_30 to: '0x...',_30 value: '123',_30 data: '0x',_30 operation: OperationType.Call // Optional_30}]_30const safeTransaction = await protocolKit.createTransaction({_30 transactions_30})_30_30const options: TransactionOptions = {_30 from: '0x...', // Optional_30 gasLimit: '123', // Optional_30 gasPrice: '123', // Optional_30 maxFeePerGas: '123', // Optional_30 maxPriorityFeePerGas: '123', // Optional_30 nonce: 123 // Optional_30}_30_30const txResponse = await protocolKit.executeTransaction(_30 safeTransaction,_30 options // Optional_30)
Parameters
safeTransaction
The Safe transaction.
_10const txResponse = await protocolKit.executeTransaction(_10 safeTransaction_10)
options.from
(Optional)
- Type:
string
The address of the transaction sender.
_10const txResponse = await protocolKit.executeTransaction(_10 safeTransaction,_10 options: {_10 from: '0x...'_10 }_10)
options.gasLimit
(Optional)
- Type:
number | string | bigint
The maximum amount of gas the transaction can use.
_10const txResponse = await protocolKit.executeTransaction(_10 safeTransaction,_10 options: {_10 gasLimit: '123'_10 }_10)
options.gasPrice
(Optional)
- Type:
number | string
The price in wei that the sender is willing to pay for each unit of gas.
_10const txResponse = await protocolKit.executeTransaction(_10 safeTransaction,_10 options: {_10 gasPrice: '123'_10 }_10)
options.maxFeePerGas
(Optional)
- Type:
number | string
The maximum fee per gas the sender is willing to pay.
_10const txResponse = await protocolKit.executeTransaction(_10 safeTransaction,_10 options: {_10 maxFeePerGas: '123'_10 }_10)
options.maxPriorityFeePerGas
(Optional)
- Type:
number | string
The maximum priority fee per gas the sender is willing to pay.
_10const txResponse = await protocolKit.executeTransaction(_10 safeTransaction,_10 options: {_10 maxPriorityFeePerGas: '123'_10 }_10)
options.nonce
(Optional)
- Type:
number
The nonce of the transaction.
_10const txResponse = await protocolKit.executeTransaction(_10 safeTransaction,_10 options: {_10 nonce: 123_10 }_10)
Returns
Promise<TransactionResult>
The Safe transaction to execute.