0

I have this in Solidity

function getOrder(
        bool _orderType,
        bytes32 _id
    )
        public
        view
        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() ?

0

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
2

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.