I have this in Solidity

function getOrder(
        bool _orderType,
        bytes32 _id
        returns (
            address maker,
            uint have,
            uint want,
            bytes32 prevID,
            bytes32 nextID

I want to find what will return in block 1. I use this

myContract.methods.getOrder().call(undefined, 1)

What parameter should I pass into getOreder() ?

1 Answer 1


As the first parameters, you should pass either true or false.

As the second parameter, you should pass:

  • Web3.fromAscii("someID") if you're using web3.js v0.x
  • Web3.utils.asciiToHex("someID") if you're using web3.js v1.x

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.