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
+2 -4
View File
@@ -31,8 +31,7 @@
#include <liblangutil/EVMVersion.h>
#include <libsolutil/FixedHash.h>
#include <libsolutil/Keccak256.h>
#include <libsolutil/FunctionSelector.h>
#include <libsolutil/ErrorCodes.h>
#include <functional>
@@ -108,8 +107,7 @@ public:
bytes const& callContractFunctionWithValueNoEncoding(std::string _sig, u256 const& _value, bytes const& _arguments)
{
util::FixedHash<4> hash(util::keccak256(_sig));
sendMessage(hash.asBytes() + _arguments, false, _value);
sendMessage(util::selectorFromSignatureH32(_sig).asBytes() + _arguments, false, _value);
return m_output;
}