opensea-js icon indicating copy to clipboard operation
opensea-js copied to clipboard

FulfillOrder Quietly Terminating

Open ANG3L0 opened this issue 5 years ago • 6 comments

Hi, I'm just trying to buy something from myself between wallets on mainnet.

I have the following:

const my_buy_order = await seaport.api.getOrder({
  asset_contract_address: contract_addr,
  token_id: token_id,
  is_english: false,
  side: OrderSide.Sell
})

I can see the order just fine, but when I try to fulfill it:

const buy_txnhash = await seaport.fulfillOrder(
  { accountAddress: OWNER_ADDRESS,
    order: my_buy_order,
    recipientAddress: OWNER_ADDRESS,
  })

I just get "Sell order is valid: true" and the program quits silently.

When I unroll the code, line by line, I think it ends up dying silently in debugging.ts, line 77 where this is used:

client.wyvernExchange.ordersCanMatch_.callAsync([buy.exchange, buy.maker, buy.taker, buy.feeRecipient, buy.target, buy.staticTarget, buy.paymentToken, sell.exchange, sell.maker, sell.taker, sell.feeRecipient, sell.target, sell.staticTarget, sell.paymentToken], [buy.makerRelayerFee, buy.takerRelayerFee, buy.makerProtocolFee, buy.takerProtocolFee, buy.basePrice, buy.extra, buy.listingTime, buy.expirationTime, buy.salt, sell.makerRelayerFee, sell.takerRelayerFee, sell.makerProtocolFee, sell.takerProtocolFee, sell.basePrice, sell.extra, sell.listingTime, sell.expirationTime, sell.salt], [buy.feeMethod, buy.side, buy.saleKind, buy.howToCall, sell.feeMethod, sell.side, sell.saleKind, sell.howToCall], buy.calldata, sell.calldata, buy.replacementPattern, sell.replacementPattern, buy.staticExtradata, sell.staticExtradata, { from: accountAddress })

If I comment out that line and make the code go further, it errors out in the following like with "execution reverted..."

await seaport._wyvernProtocolReadOnly.wyvernExchange.atomicMatch_.estimateGasAsync(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9], args[10], txnData)

Not sure why these wyvern calls are killed and not sure if I'm missing something to prevent these transactions from going thru.

ANG3L0 avatar Sep 20 '21 19:09 ANG3L0

Did you ever find a solution to this? I'm having the same problem. I am using node 8.11.4 and "web3-provider-engine": "^16.0.3"

overfocus avatar Oct 10 '21 21:10 overfocus

I was able to get around this using truffle wallet instead of the example subproviders.

ANG3L0 avatar Oct 12 '21 01:10 ANG3L0

@ANG3L0 can you share example for same, i am stuck at same place.

cycorax12 avatar Oct 24 '21 08:10 cycorax12

I was able to get around this using truffle wallet instead of the example subproviders.

Can you share an example?

emorling avatar Dec 04 '21 15:12 emorling

This solution worked for me: https://github.com/ProjectOpenSea/opensea-js/issues/108#issuecomment-846286953

emorling avatar Dec 04 '21 22:12 emorling

Please ensure you are using the latest version of the SDK and Node. Changing the wallet to @truffle/hdwallet-provider and setting the Chain Id should work. Also the solution @emorling is valid! https://github.com/ProjectOpenSea/opensea-js/issues/108#issuecomment-846286953

esteban-OpenSea avatar Apr 18 '22 23:04 esteban-OpenSea