Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script crashes if a token number doesn't exist #4

Open
wertercatt opened this issue Mar 15, 2022 · 0 comments
Open

Script crashes if a token number doesn't exist #4

wertercatt opened this issue Mar 15, 2022 · 0 comments

Comments

@wertercatt
Copy link

wertercatt commented Mar 15, 2022

[wertercatt@RGBeast flipper]$ npm run start

> [email protected] start
> ts-node src/app.ts

info: Scraping Foundation collection (supply: 117894)
info: original metadata folder exists till token #39
info: flipped metadata folder exists but is empty
/home/wertercatt/flipper/node_modules/@ethersproject/logger/src.ts/index.ts:225
        const error: any = new Error(message);
                           ^
Error: call revert exception (method="tokenURI(uint256)", errorArgs=["ERC721Metadata: URI query for nonexistent token"], errorName="Error", errorSignature="Error(string)", reason="ERC721Metadata: URI query for nonexistent token", code=CALL_EXCEPTION, version=abi/5.5.0)
    at Logger.makeError (/home/wertercatt/flipper/node_modules/@ethersproject/logger/src.ts/index.ts:225:28)
    at Logger.throwError (/home/wertercatt/flipper/node_modules/@ethersproject/logger/src.ts/index.ts:237:20)
    at Interface.decodeFunctionResult (/home/wertercatt/flipper/node_modules/@ethersproject/abi/src.ts/interface.ts:425:23)
    at Contract.<anonymous> (/home/wertercatt/flipper/node_modules/@ethersproject/contracts/src.ts/index.ts:392:44)
    at step (/home/wertercatt/flipper/node_modules/@ethersproject/contracts/lib/index.js:48:23)
    at Object.next (/home/wertercatt/flipper/node_modules/@ethersproject/contracts/lib/index.js:29:53)
    at fulfilled (/home/wertercatt/flipper/node_modules/@ethersproject/contracts/lib/index.js:20:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  reason: 'ERC721Metadata: URI query for nonexistent token',
  code: 'CALL_EXCEPTION',
  method: 'tokenURI(uint256)',
  errorArgs: [ 'ERC721Metadata: URI query for nonexistent token' ],
  errorName: 'Error',
  errorSignature: 'Error(string)',
  address: '0x3b3ee1931dc30c1957379fac9aba94d1c48a5405',
  args: [ 40 ],
  transaction: {
    data: '0xc87b56dd0000000000000000000000000000000000000000000000000000000000000028',
    to: '0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405'
  }
}
[wertercatt@RGBeast flipper]$ cat .env
IPFS="http://127.0.0.1:8080/ipfs/"
RPC="https://mainnet.infura.io/v3/[secret-removed]"
CONTRACT="0x3b3ee1931dc30c1957379fac9aba94d1c48a5405"

# Optional for automatic uploading of metadata (requires pinFileToIPFS perm)
PINATA_JWT=""
@wertercatt wertercatt changed the title Script crashes if a token number doesn Script crashes if a token number doesn't exist Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant