Solidity Interface & Canonical Declaration
function execTransaction(address to, uint256 value, bytes calldata data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address payable refundReceiver, bytes memory signatures) external payable returns (bool success)
在收集齐满足阈值要求的全部所有者多签签名后,执行目标多签交易与资金划转。
理论基础执行 Gas: 75,000 ~ 280,000 gas
返回值类型: bool
Calldata 调用数据 ABI 编码布局账本
| Calldata Offset | Type | Parameter Name | Semantic Role |
|---|---|---|---|
| 0x00 ~ 0x03 (4B) | bytes4 | Method ID (msg.sig) | execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes) 的 4 字节函数选择器 |
| 0x04 ~ 0x23 (32B) | address | to | 目标执行地址 |
| 0x24 ~ 0x43 (32B) | uint256 | value | 随交易发送的以太坊金额 |
| 0x44 ~ 0x63 (32B) | bytes | data | 调用的数据 payload |
| 0x64 ~ 0x83 (32B) | uint8 | operation | 调用类型(0 为 Call,1 为 DelegateCall) |
| 0x84 ~ 0xa3 (32B) | uint256 | safeTxGas | 专用于多签执行的 Gas 配额 |
| 0xa4 ~ 0xc3 (32B) | uint256 | baseGas | 基础 Gas 补偿 |
| 0xc4 ~ 0xe3 (32B) | uint256 | gasPrice | 退费 Gas 价格 |
| 0xe4 ~ 0x103 (32B) | address | gasToken | 支付手续费的代币地址 |
| 0x104 ~ 0x123 (32B) | address | refundReceiver | 手续费补偿接收账户 |
| 0x124 ~ 0x143 (32B) | bytes | signatures | 拼接紧凑的多签所有者 ECDSA 签名序列 |
Keccak-256 密码学哈希推导链
标准 ASCII 签名字符串: execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)
完整 256 位 Keccak 哈希: 0x6a761202de7c35c7e1ec7400f298161946f2c5e94981ea3013d935de1cb971bd
截取前 4 字节 (Big-Endian): 0x6a761202
EVM 运行时调度器汇编代码特征 (Dispatcher Opcodes)
// 1. Load the first 32 bytes of transaction calldata
[0x0000] PUSH1 0x00
[0x0002] CALLDATALOAD
// 2. Right-shift by 224 bits (0xe0) to isolate the 4-byte selector
[0x0003] PUSH1 0xe0
[0x0005] SHR
// 3. Match against target selector 0x6a761202 and branch
[0x0006] DUP1
[0x0007] PUSH4 0x6a761202
[0x000c] EQ
[0x000d] PUSH2 0x0050
[0x0010] JUMPI // Jump to implementation if matched