0

Whenever I try to estimateGas from a ERC1155Order I got a transaction revert, using Polygon Mumbai with Alchemy.

let sellOrder = new ERC1155Order({
    direction: TradeDirection.SellNFT,
    maker: alice.address,
    taker: bob.address,
    expiry: expirationTimeTS,
    nonce: 11,
    erc20Token: WETHAddress,
    erc20TokenAmount: 1, 
    fees: [],
    erc1155Token: ERC1155Address, 
    erc1155TokenId: "22897246053033895809978563905910150239444766161035846617439399460178038358017",
    erc1155TokenProperties: [],
    erc1155TokenAmount: 1,
    chainId: 80001,
});

const contractWrappers = new ContractWrappers(provider, {chainId: 80001});
let zeroEx = contractWrappers.exchangeProxy;
let txValidate = await zeroEx.getERC1155OrderHash(sellOrder).estimateGasAsync({ from: bob.address });

At alchemy I got this payload:

{
  "method": "eth_estimateGas",
  "params": [
    {
      "data": "0x1de3a7ac00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000329f61caefea1df01c60d7d0eafd9cdae91c853c00000000000000000000000004ebdfca9c91d299dcb312d23e58ac0cdeef418e000000000000000000000000000000000000000000000000000000006384e91000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c3c9283d3e44854697cd22d3faa240cfb032889000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000088b48f654c30e99bc2e4a1559b4dcf1ad93fa656329f61caefea1df01c60d7d0eafd9cdae91c853c0000000000000e0000000001000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
      "to": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
      "from": "0x04ebdfca9c91d299dcb312d23e58ac0cdeef418e"
    }
  ],
  "id": 42,
  "jsonrpc": "2.0"
}

And the response:

{
  "jsonrpc": "2.0",
  "id": 42,
  "error": {
    "code": 3,
    "message": "execution reverted",
    "data": "0x734e6e1c1de3a7ac00000000000000000000000000000000000000000000000000000000"
  }
}

1 Answer 1

1

The revert error you're receiving is a "NotImplementedError." I don't think ERC1155Orders has been or will ever be deployed to Polygon Mumbai. Ropsten is the preferred testnet for 0x contracts.

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.