Skip to content

Commit

Permalink
Merge pull request #753 from lungern-tech/main
Browse files Browse the repository at this point in the history
S02选择器碰撞示例代码与solidity不一致
  • Loading branch information
AmazingAng authored Oct 19, 2024
2 parents 6a0370a + f8b3a08 commit 5d3cccf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S02_SelectorClash/SelectorClash.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ contract SelectorClash {
solved = true;
}

function executeCrossChainTx(bytes memory _method, bytes memory _bytes) public returns(bool success){
(success, ) = address(this).call(abi.encodePacked(bytes4(keccak256(abi.encodePacked(_method, "(bytes,bytes,uint64)"))), abi.encode(_bytes)));
function executeCrossChainTx(bytes memory _method, bytes memory _bytes, bytes memory _bytes1, uint64 _num) public returns(bool success){
(success, ) = address(this).call(abi.encodePacked(bytes4(keccak256(abi.encodePacked(_method, "(bytes,bytes,uint64)"))), abi.encode(_bytes, _bytes1, _num)));
}

function secretSlector() external pure returns(bytes4){
Expand Down

0 comments on commit 5d3cccf

Please sign in to comment.