getTransactionHash method
Future<List<int> >
getTransactionHash({
- required ETHAddress to,
- BigInt? value,
- List<
int> ? data, - SafeContractExecutionOpration operation = SafeContractExecutionOpration.call,
- BigInt? safeTxGas,
- BigInt? baseGas,
- BigInt? gasPrice,
- ETHAddress? gasToken,
- ETHAddress? refundReceiver,
- required BigInt nonce,
- required EthereumProvider provider,
override
"stateMutability": "view", Returns the transaction hash that must be signed by the Safe owners. Parameters:
to: Destination address of the Safe transaction.value: Amount of native tokens (e.g., ETH) to send with the transaction.data: Data payload of the Safe transaction.operation: Type of operation:safeTxGas: Gas limit to be used for executing the Safe transaction.baseGas: Base gas cost independent of transaction execution (e.g., base transaction fee, signature verification, refund payment).gasPrice: Gas price used for refund or payment calculation.gasToken: Address of the token used to pay for gas (0x0for native token such as ETH).refundReceiver: Address to receive gas payment refund (0x0meanstx.origin).nonce: Nonce of the Safe transaction.
Implementation
@override
Future<List<int>> getTransactionHash({
required ETHAddress to,
BigInt? value,
List<int>? data,
SafeContractExecutionOpration operation =
SafeContractExecutionOpration.call,
BigInt? safeTxGas,
BigInt? baseGas,
BigInt? gasPrice,
ETHAddress? gasToken,
ETHAddress? refundReceiver,
required BigInt nonce,
required EthereumProvider provider,
}) async {
final List<Object> params = [
to,
value ?? BigInt.zero,
data ?? <int>[],
operation.value,
safeTxGas ?? BigInt.zero,
baseGas ?? BigInt.zero,
gasPrice ?? BigInt.zero,
gasToken ?? ETHAddress.zero,
refundReceiver ?? ETHAddress.zero,
nonce,
];
return queryContract<List<int>>(
functionName: SafeContractFunction.getTransactionHash,
params: params,
provider: provider,
);
}