Replies: 1 comment 2 replies
-
it seems like it is getting an |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
An error occurred while calling createOffer(), so an offer cannot be created.
It seems like an error occurs while decoding something in the 'ethers' library. How do I resolve it?
My code, error message, and package.json contents are as follows.
I need your help!
===[ CODE ]===================================================================
export const MY_WALLET_PRIVATE_KEY = [MY PRIVATE KEY];
export const OPENSEA_API_KEY = [MY OPENSEA API KEY];
const provider = new ethers.JsonRpcProvider(
"https://rpc.ankr.com/klaytn_testnet"
// "https://api.baobab.klaytn.net:8651"
// "https://mainnet.infura.io"
// "https://api.opensea.io"
// "https://public-en-baobab.klaytn.net"
// "testnets-api.opensea.io"
);
const walletWithProvider = new ethers.Wallet(MY_WALLET_PRIVATE_KEY, provider);
const openseaSDK = new OpenSeaSDK(walletWithProvider, {
chain: Chain.Klaytn,
apiKey: OPENSEA_API_KEY,
});
const accountAddress = [MY WALLET ADDRESS];
const { tokenId, tokenAddress } = {
tokenAddress: 0x1160f426cef229f3f6778fa0aa5569dc13fb8114,
tokenId: "1",
tokenStandard: TokenStandard.ERC721,
};
const startAmount = "0.2";
const offer = await openseaSDK.createOffer({
asset: {
tokenId,
tokenAddress,
},
accountAddress,
startAmount,
});
===[ ERROR ]===================================================================
could not decode result data (value="0x", info={ "method": "allowance", "signature": "allowance(address,address)" }, code=BAD_DATA, version=6.11.1)
at makeError (http://localhost:3000/static/js/bundle.js:154647:15)
at assert (http://localhost:3000/static/js/bundle.js:154671:11)
at Interface.decodeFunctionResult (http://localhost:3000/static/js/bundle.js:136093:27)
at staticCallResult (http://localhost:3000/static/js/bundle.js:138354:31)
at async staticCall (http://localhost:3000/static/js/bundle.js:138314:20)
at async Proxy.allowance (http://localhost:3000/static/js/bundle.js:138359:14)
at async http://localhost:3000/static/js/bundle.js:28759:24
at async Promise.all (index 0)
at async Seaport._formatOrder (http://localhost:3000/static/js/bundle.js:10089:36)
at async Seaport.createOrder (http://localhost:3000/static/js/bundle.js:9958:9)
===[ package.json ]===================================================================
{
"name": [MY PROJECT NAME],
"version": [MY PROJECT VERSION],
"private": true,
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@opensea/seaport-js": "3.0.2",
"axios": "^1.6.7",
"bootstrap": "4.6.2",
"chart.js": "3.9.1",
"crypto-browserify": "^3.12.0",
"ethers": "6.11.1",
"opensea-js": "7.0.9",
"perfect-scrollbar": "1.5.5",
"react": "18.2.0",
"react-chartjs-2": "3.3.0",
"react-dom": "18.2.0",
"react-notification-alert": "0.0.13",
"react-router-dom": "6.22.3",
"react-scripts": "5.0.1",
"reactstrap": "8.10.0",
"sass": "1.62.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"vm-browserify": "^1.1.2",
"web3": "^4.5.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start",
"compile-sass": "node-sass src/asset`s/scss/paper-dashboard.scss src/assets/css/paper-dashboard.css",
"minify-sass": "node-sass src/assets/scss/paper-dashboard.scss src/assets/css/paper-dashboard.min.css --output-style compressed",
"map-sass": "node-sass src/assets/scss/paper-dashboard.scss src/assets/css/paper-dashboard.css --source-map true"
},
"eslintConfig": {
"extends": "react-app"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"optionalDependencies": {
"typescript": "5.0.4"
},
"overrides": {
"svgo": "3.0.2",
"fsevents": "2.3.2",
"chokidar": "3.5.3",
"@babel/core": "7.18.6"
}
}
Beta Was this translation helpful? Give feedback.
All reactions