I deployed on Polygon a few days ago and everything was OK.
I'm trying to do the same changing only the maximum number of NFTs available in the contract and it fails to compile:
$ npx hardhat run scripts/run.js --network polygon
Compiling 15 files with 0.8.4
Solidity compilation finished successfully
Contract deployed to: 0xD8F0C83513AaA3aAde3B7BF016ca999CEDe4961E
9 NFTs have been reserved
Error: call revert exception (method="tokensOfOwner(address)", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.5.0)
at Logger.makeError (C:\Users\User\nft-collectible\node_modules@ethersproject\logger\src.ts\index.ts:225:28)
at Logger.throwError (C:\Users\User\nft-collectible\node_modules@ethersproject\logger\src.ts\index.ts:237:20)
at Interface.decodeFunctionResult (C:\Users\User\nft-collectible\node_modules@ethersproject\abi\src.ts\interface.ts:425:23)
at Contract. (C:\Users\User\nft-collectible\node_modules@ethersproject\contracts\src.ts\index.ts:392:44)
at step (C:\Users\User\nft-collectible\node_modules@ethersproject\contracts\lib\index.js:48:23)
at Object.next (C:\Users\User\nft-collectible\node_modules@ethersproject\contracts\lib\index.js:29:53)
at fulfilled (C:\Users\User\nft-collectible\node_modules@ethersproject\contracts\lib\index.js:20:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: null,
code: 'CALL_EXCEPTION',
method: 'tokensOfOwner(address)',
errorArgs: null,
errorName: null,
errorSignature: null,
address: '0xD8F0C83513AaA3aAde3B7BF016ca999CEDe4961E',
args: [ '0xD561Fd6763e8cc8c7603C0D7971Bc003DD2Dd17d' ],
transaction: {
data: '0x8462151c000000000000000000000000d561fd6763e8cc8c7603c0d7971bc003dd2dd17d',
to: '0xD8F0C83513AaA3aAde3B7BF016ca999CEDe4961E',
from: '0xD561Fd6763e8cc8c7603C0D7971Bc003DD2Dd17d'
}
}
And furher on, if I try to verify:
$ npx hardhat verify --network polygon 0xD8F0C83513AaA3aAde3B7BF016ca999CEDe4961E "ipfs://QmWKW6nqqHnpRoUVjnNeLE46KaDfy2oMWAysCt7qjmk8nz/"
Error in plugin @nomiclabs/hardhat-etherscan: The address 0xD8F0C83513AaA3aAde3B7BF016ca999CEDe4961E has no bytecode. Is the contract deployed to this network? The selected network is polygon.
What can it possibly be?