0x7ff36ab5
swapExactETHForTokens(uint256,address[],address,uint256)
以太坊 4 字节函数选择器 0x7ff36ab5 (swapExactETHForTokens(uint256,address[],address,uint256)) 详细规范。归属标准:Uniswap V2,分类:Automated Market Maker。提供 Solidity 接口代码、返回值类型、执行 Gas 估算与 Keccak-256 原生推导。
Solidity 接口声明
function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) external payable returns (uint256[] memory amounts)
参数 ABI 编码与偏移量规范
| # | 参数类型 | Calldata 偏移量 | 编码规则 |
|---|---|---|---|
| 1 | uint256 | 0x04 + 00 | ABI 32 字节字对齐补零 |
| 2 | address[] | 0x04 + 20 | ABI 32 字节字对齐补零 |
| 3 | address | 0x04 + 40 | ABI 32 字节字对齐补零 |
| 4 | uint256 | 0x04 + 60 | ABI 32 字节字对齐补零 |
执行度量与 Keccak-256 原生推导
返回值类型: uint256[]
基准 Gas 预估: 95,000 ~ 160,000 gas
Keccak-256 (swapExactETHForTokens(uint256,address[],address,uint256)):
0x7ff36ab5759d6a6f3666c17e7dae0b66684a53581fd3cada68e6fd19d01f9b11