I've been trying to fill an order with a signer and a fixed taker.
When not defining the taker, fillLimitOrder()
gets executed without problem.
But when specifying my taker in my order, I instantly get execution reverted.
Here's my code:
const order = new LimitOrder({
makerToken: contractWrappers.contractAddresses.etherToken,
takerToken: contractWrappers.contractAddresses.zrxToken,
makerAmount: "1",
takerAmount: "100000000000000000000",
maker: account,
taker: RECEIVER, // When defining taker here, the transaction gets reverted
sender: NULL_ADDRESS,
expiry: getFutureExpiryInSeconds(),
salt: Date.now().toString(),
chainId: CHAIN_ID,
verifyingContract: contractWrappers.contractAddresses.exchangeProxy
});
const supportedProvider = new MetamaskSubprovider(
ethereum
);
const signature = await order.getSignatureWithProviderAsync(
supportedProvider,
SignatureType.EIP712
);
const txHash = await contractWrappers.exchangeProxy // Filling the order here
.fillLimitOrder(order, signature, takerAssetFillAmount)
.awaitTransactionSuccessAsync({from: account})
.catch((err) => console.error(err));
Thanks for your input!