ERC-3643 预编译合约

证券型代币原生支持,实现 ERC-3643 标准的转账、铸造、销毁、白名单和冻结功能,Gas 成本比以太坊智能合约降低 66 倍

💡 ERC-3643 是专为现实世界资产设计的证券型代币标准,支持合规转让、发行人控制、角色权限管理。

预编译合约列表

地址功能输入输出Gas
0x0200ERC3643 转账from + to + amount32 bytes 成功标志3,000
0x0201ERC3643 铸造to + amount32 bytes 成功标志5,000
0x0202ERC3643 销毁from + amount32 bytes 成功标志5,000
0x0203余额查询address32 bytes 余额1,000
0x0204白名单管理address + add/remove32 bytes 成功标志2,000
0x0205冻结管理address + freeze/unfreeze32 bytes 成功标志2,000

Solidity 调用示例

interface IERC3643Transfer {
    function transfer(address from, address to, uint256 amount) external returns (bool);
}
function compliantTransfer(address to, uint256 amount) external {
    bool success = IERC3643Transfer(0x0200).transfer(msg.sender, to, amount);
    require(success, "Transfer failed - compliance check");
}

文件位置

pkg/evm/erc3643_precompiled.go - 约 250 行