approveTransactionHash
Approves on-chain a Safe transaction hash with the connected signer.
Usage
_33import {_33 MetaTransactionData,_33 OperationType,_33 TransactionOptions_33} from '@safe-global/types-kit'_33import { protocolKit } from './setup.ts'_33_33const transactions: MetaTransactionData[] = [{_33 to: '0x...',_33 value: '123',_33 data: '0x',_33 operation: OperationType.Call // Optional_33}]_33const safeTransaction = await protocolKit.createTransaction({_33 transactions_33})_33const safeTransactionHash = await protocolKit.getTransactionHash(_33 safeTransaction_33)_33_33const options: TransactionOptions = {_33 from: '0x...', // Optional_33 gasLimit: '123', // Optional_33 gasPrice: '123', // Optional_33 maxFeePerGas: '123', // Optional_33 maxPriorityFeePerGas: '123', // Optional_33 nonce: 123 // Optional_33}_33_33const txResponse = await protocolKit.approveTransactionHash(_33 safeTransactionHash,_33 options // Optional_33)
Parameters
safeTransactionHash
- Type:
string
The Safe transaction hash to approve.
_10const transactionResponse = await protocolKit.approveTransactionHash(_10 '0x...'_10)
options.from
(Optional)
- Type:
string
The address of the transaction sender.
_10const transactionResponse = await protocolKit.approveTransactionHash(_10 '0x...',_10 options: {_10 from: '0x...'_10 }_10)
options.gasLimit
(Optional)
- Type:
number | string | bigint
The maximum amount of gas the transaction can use.
_10const transactionResponse = await protocolKit.approveTransactionHash(_10 '0x...',_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 transactionResponse = await protocolKit.approveTransactionHash(_10 '0x...',_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 transactionResponse = await protocolKit.approveTransactionHash(_10 '0x...',_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 transactionResponse = await protocolKit.approveTransactionHash(_10 '0x...',_10 options: {_10 maxPriorityFeePerGas: '123'_10 }_10)
options.nonce
(Optional)
- Type:
number
The nonce of the transaction.
_10const transactionResponse = await protocolKit.approveTransactionHash(_10 '0x...',_10 options: {_10 nonce: 123_10 }_10)
Returns
Promise<TransactionResult>
The Safe transaction response.