I've read the post How to get decrypted transaction data in quorum?

I followed the api document and got the result by calling eth_getQuorumPayload

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0", "method":"eth_getQuorumPayload", "params":["0x0904cbd975e6fd2444c6f029e951be0af68cf60af603070a561b46d683d754a08a0986c842b7d9468cc2be05c9e7afcab972ea3034ac48aaebb032629e6970cf"], "id":67}'



How to decode "0x60fe47b10000000000000000000000000000000000000000000000000000000000000010" into a readable string? I set the 'storedData' in private contract to 16, so I got '0x10' in the last byte in result, is it right? What does the first few bytes '0x60fe47b1' mean?

  • 0x60fe47b1 might be the four bytes of hash function abi (which ethereum do). For example: function add(uint256) { /*...*/ } the function identifier is: 0x1003e2d2 (web3.sha3("add(uint256)") 0x1003e2d21e48445eba32f76cea1db2f704e754da30edaf8608ddc0f67abca5d0)
    – Peter Lai
    May 13 '19 at 9:53

When you perform a call like contract.set(0x10, ....), this is encoded into a payload like "0x60fe47b10000000000000000000000000000000000000000000000000000000000000010". Where "0x60fe47b1" is the keccak256 encoded value of the method signature, and the rest of the data is the passed parameters (I can't recall atm how the parameters are encoded).

So, when you call getQuorumPayload(), it is returning that payload from the transaction manager.

There's a good article on the encoding here: How to decipher a smart contract method call

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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