Closed jinsley8 closed 1 year ago
If you manually provide a high gas limit to the transaction, and force the transaction to go through and fail, I can help debug if you can provide the reverted tx hash
@johnrjj thank you!
I've tried all different configs for fillSignedOrder
and can't get past this Metamask error. Everything is good up until this point.
I tried using the useFeeData
hook from the wagmi
package to get gasPrices too.
I also tried undefined
instead of swapSdk.exchangeContract.address
which I saw in one of the nft-swap-sdk
tests but that didn't help either.
import { useFeeData } from 'wagmi';
const { data: FeeData } = useFeeData();
const gasFees = await FeeData?.formatted;
const fillTx = await swapSdk.fillSignedOrder(normalizedOrder, swapSdk.exchangeContract.address, {
// gasPrice: gasFees?.gasPrice,
// maxPriorityFee: gasFees?.maxFeePerGas,
// maxFee: gasFees?.maxPriorityFeePerGas,
gasLimit: '5000000000',
// HACK(johnnrjj) - Rinkeby still has protocol fees, so we give it a little bit of ETH so its happy.
// value: ethers.utils.parseEther('0.001'),
});
gasFees: gasFees = {
gasPrice: "82895985947"
maxFeePerGas: "106339282574"
maxPriorityFeePerGas: "1500000000"
}
I'm stumped on what I can try next even if it doesn't work to make gasLimit
extremely high.
Could it be an issue with the original signedOrder even though verifying it works? or an issue with approvals?
I have WETH and MATIC in both accounts I'm testing so I don't think it's an issue with not enough funds for gas.
Also, after I accept setApprovalForAll()
for an NFT contract via approveTokenOrNftByAsset
:
I check the token's approval with loadApprovalStatus
and it returns:
{
contractApproved: true,
tokenIdApproved: false
}
Does anyone know if tokenIdApproved
ever has to be set to true here?
Could it have something to do with EIP1559 transaction fees?
https://wiki.polygon.technology/docs/develop/eip1559-transactions/how-to-send-eip1559-transactions/
TransactionOverrides
interface does include this info though:
https://github.com/trader-xyz/nft-swap-sdk/blob/8b3c3ebfa868cbbb1beb59f49521b956faed0201/src/sdk/common/types.ts#L42-L51
Closing, this seems to be just a configuration error when building order.
Hi,
I'm working with V3 on Polygon and getting a Metamask internal error when using
fillSignedOrder
.Before filling I verify the order signature is correct and that it passes.
Does anyone know what could be causing the following issue when using
fillSignedOrder
results in: