According to this, web3 should contain the function soliditySha3. It can take an object (JSON), serialize it, and use the result as input to Keccak256. According to the documentation, the arguments are ABI converted and tightly packed before being hashed. How do I get this function using Nethereum?


Will calculate the sha3 of given input parameters in the same way solidity would. This means arguments will be ABI converted and tightly packed before being hashed.

  • 1
    Hi. I tried to get this question to the guy that developed netethereum. He may know the answer and help us. Let´s wait. tks Dec 11, 2018 at 12:26

1 Answer 1


Using the GitHub master branch of Nethereum (this is not available yet in nuget), you are able to do the following:

Automatically guessing the types, as per web3js.

var abiEncode = new ABIEncode();
var result = abiEncode.GetSha3ABIEncodedPacked(234564535,
                "0xfff23243".HexToByteArray(), true, -10);

Or using specific types:

var result =
                    new ABIValue("string", "Hello!%"), new ABIValue("int8", -23),
                    new ABIValue("address", "0x85F43D8a49eeB85d32Cf465507DD71d507100C1d"));
  • This is excellent. Thank you. Do you have any idea when it will be available in nuget? Dec 12, 2018 at 23:06
  • Next week should be out, finishing other things. I am fixing the CI build so you should be able to grab the bits from there too, if you are in a hurry. Dec 13, 2018 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.