execTransaction method
Future<SafeContractEncodedCall>
execTransaction({
- required ETHAddress to,
- BigInt? value,
- List<
int> ? data, - SafeContractExecutionOpration operation = SafeContractExecutionOpration.call,
- BigInt? safeTxGas,
- BigInt? baseGas,
- BigInt? gasPrice,
- ETHAddress? gasToken,
- ETHAddress? refundReceiver,
- required List<
int> signatures,
override
"stateMutability": "payable", Parameters:
to: Destination address of the Safe transaction.value: Native token value of the Safe transaction.data: Data payload of the Safe transaction.operation: Operation type of the Safe transaction.safeTxGas: Gas that should be used for the Safe transaction.baseGas: Base gas costs that are independent of the transaction execution.gasPrice: Gas price that should be used for the payment calculation.gasToken: Token address (or 0 for the native token) that is used for the payment.refundReceiver: Address of the receiver of the gas payment (or 0 fortx.origin).signatures: Signature data for the executed transaction.
Implementation
@override
Future<SafeContractEncodedCall> execTransaction({
required ETHAddress to,
BigInt? value,
List<int>? data,
SafeContractExecutionOpration operation =
SafeContractExecutionOpration.call,
BigInt? safeTxGas,
BigInt? baseGas,
BigInt? gasPrice,
ETHAddress? gasToken,
ETHAddress? refundReceiver,
required List<int> signatures,
}) 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,
signatures,
];
return encodeTransactionCall(
functionName: SafeContractFunction.execTransaction,
params: params,
);
}