Improve FunctionSelector helpers

This commit is contained in:
Alex Beregszaszi
2022-09-27 17:58:32 +02:00
parent 311b2054af
commit 725253551e
23 changed files with 106 additions and 50 deletions
+1 -1
View File
@@ -591,7 +591,7 @@ BOOST_AUTO_TEST_CASE(revoke_addOwner)
BOOST_REQUIRE(callContractFunction("changeRequirement(uint256)", u256(3)) == encodeArgs());
// add a new owner
h160 deployer = m_sender;
h256 opHash = util::keccak256(FixedHash<4>(util::keccak256("addOwner(address)")).asBytes() + h256(0x33).asBytes());
h256 opHash = util::keccak256(util::selectorFromSignatureH32("addOwner(address)").asBytes() + h256(0x33).asBytes());
BOOST_REQUIRE(callContractFunction("addOwner(address)", h160(0x33)) == encodeArgs());
BOOST_REQUIRE(callContractFunction("isOwner(address)", h160(0x33)) == encodeArgs(false));
m_sender = account(0);