estimateSafeTransaction
Estimates the safeTxGas for a given Safe multi-signature transaction.
Usage
_16import { SafeMultisigTransactionEstimate } from '@safe-global/api-kit'_16import { apiKit } from './setup.ts'_16_16const safeAddress = '0x...'_16_16const safeTransaction: SafeMultisigTransactionEstimate = {_16 to: '0x...',_16 value: '0',_16 data: '0x',_16 operation: 0 // Optional_16}_16_16const estimateTx = await apiKit.estimateSafeTransaction(_16 safeAddress,_16 safeTransaction_16)
Returns
Promise<SafeMultisigTransactionEstimateResponse>
The safeTxGas for the given Safe transaction.
Parameters
safeAddress
- Type:
string
The Safe address.
_10const estimateTx = await apiKit.estimateSafeTransaction(_10 '0x...',_10 {_10 to: '0x...',_10 value: '0',_10 data: '0x'_10 }_10)
safeTransaction.to
- Type:
string
The transaction recipient of the Safe transaction to estimate.
_10const estimateTx = await apiKit.estimateSafeTransaction(_10 '0x...',_10 {_10 to: '0x...',_10 value: '0',_10 data: '0x'_10 }_10)
safeTransaction.value
- Type:
string
The value of the Safe transaction to estimate.
_10const estimateTx = await apiKit.estimateSafeTransaction(_10 '0x...',_10 {_10 to: '0x...',_10 value: '0',_10 data: '0x'_10 }_10)
safeTransaction.data
- Type:
string
The data of the Safe transaction to estimate.
_10const estimateTx = await apiKit.estimateSafeTransaction(_10 '0x...',_10 {_10 to: '0x...',_10 value: '0',_10 data: '0x'_10 }_10)
safeTransaction.operation
(Optional)
- Type:
OperationType
The operation of the Safe transaction to estimate.
_10const estimateTx = await apiKit.estimateSafeTransaction(_10 '0x...',_10 {_10 to: '0x...',_10 value: '0',_10 data: '0x',_10 operation: 0_10 }_10)