diff options
author | chriseth <chris@ethereum.org> | 2017-09-13 23:16:45 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-11-30 00:08:44 +0800 |
commit | 98c38108e8ce01888ee4dbf98a332aa5ba41f722 (patch) | |
tree | f358ce8456893ae0b26b9e048c3657641e0a25c7 /test/ExecutionFramework.h | |
parent | bdc1ff8ec71bdf96e0706c951dd92def3aee4aa2 (diff) | |
download | dexon-solidity-98c38108e8ce01888ee4dbf98a332aa5ba41f722.tar.gz dexon-solidity-98c38108e8ce01888ee4dbf98a332aa5ba41f722.tar.zst dexon-solidity-98c38108e8ce01888ee4dbf98a332aa5ba41f722.zip |
Decoder tests.
Diffstat (limited to 'test/ExecutionFramework.h')
-rw-r--r-- | test/ExecutionFramework.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/ExecutionFramework.h b/test/ExecutionFramework.h index 2c61c0a6..8aa99473 100644 --- a/test/ExecutionFramework.h +++ b/test/ExecutionFramework.h @@ -84,14 +84,24 @@ public: return callFallbackWithValue(0); } - template <class... Args> - bytes const& callContractFunctionWithValue(std::string _sig, u256 const& _value, Args const&... _arguments) + bytes const& callContractFunctionWithValueNoEncoding(std::string _sig, u256 const& _value, bytes const& _arguments) { FixedHash<4> hash(dev::keccak256(_sig)); - sendMessage(hash.asBytes() + encodeArgs(_arguments...), false, _value); + sendMessage(hash.asBytes() + _arguments, false, _value); return m_output; } + bytes const& callContractFunctionNoEncoding(std::string _sig, bytes const& _arguments) + { + return callContractFunctionWithValueNoEncoding(_sig, 0, _arguments); + } + + template <class... Args> + bytes const& callContractFunctionWithValue(std::string _sig, u256 const& _value, Args const&... _arguments) + { + return callContractFunctionWithValueNoEncoding(_sig, _value, encodeArgs(_arguments...)); + } + template <class... Args> bytes const& callContractFunction(std::string _sig, Args const&... _arguments) { |