diff options
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) { |