品牌广告设计制作公司网站源码c 鲜花店网站建设
选择器冲突
智能合约中,函数选择器(selector)是函数签名的哈希的前4个字节。例如mint(address account)的选择器为bytes4(keccak256("mint(address)")),也就是0x6a627842. 
由于函数选择器仅有4个字节,范围很小,因此两个不同的函数可能会有相同的选择器,例如下面两个函数:
// 选择器冲突的例子
contract Foo {function burn(uint256) external {}function collate_propagate_storage(bytes16) external {}
} 
两个不同的函数,但是得到了相同的函数选择器。
contract Foo {bytes4 public selector1 = bytes4(keccak256("burn(uint256)"));bytes4 public selector2 = bytes4(keccak256("collate_propagate_storage(bytes16)"));// function burn(uint256) external {}// function collate_propagate_storage(bytes16) external {}
} 

示例中,
