Change encoding to address-funid and add "function" as ABI type.

This commit is contained in:
chriseth
2016-11-16 14:37:19 +01:00
parent a8e7ed37a1
commit ec31d08775
8 changed files with 33 additions and 21 deletions
+3 -3
View File
@@ -7703,8 +7703,8 @@ BOOST_AUTO_TEST_CASE(receive_external_function_type)
compileAndRun(sourceCode, 0, "C");
BOOST_CHECK(callContractFunction(
"f(bytes24)",
FixedHash<4>(dev::keccak256("g()")).asBytes() + m_contractAddress.asBytes() + bytes(32 - 4 - 20, 0)
"f(function)",
m_contractAddress.asBytes() + FixedHash<4>(dev::keccak256("g()")).asBytes() + bytes(32 - 4 - 20, 0)
) == encodeArgs(u256(7)));
}
@@ -7722,7 +7722,7 @@ BOOST_AUTO_TEST_CASE(return_external_function_type)
compileAndRun(sourceCode, 0, "C");
BOOST_CHECK(
callContractFunction("f()") ==
FixedHash<4>(dev::keccak256("g()")).asBytes() + m_contractAddress.asBytes() + bytes(32 - 4 - 20, 0)
m_contractAddress.asBytes() + FixedHash<4>(dev::keccak256("g()")).asBytes() + bytes(32 - 4 - 20, 0)
);
}