require('dotenv').config();
var Moralis = require('moralis').default;
var EvmChain = require('@moralisweb3/evm-utils');
var response
var chain = EvmChain.ETHEREUM;
var address
get_nfts = async () => {
await Moralis.start({
apiKey: '',
// ...and any other configuration
});
response = await Moralis.EvmApi.account.getNFTs({
address,
chain,
});
return response
}
var results = get_nfts()
results.then(response => {
console.log(response.result)
})
C:\Work\NFT.community\node_modules\@moralisweb3\evm-utils\lib\dataTypes\EvmNftContractType.js:11
^switch (value.toUpperCase()) {
TypeError: Cannot read properties of undefined (reading 'toUpperCase')
at isValidEvmContractType (C:\Work\NFT.community\node_modules\@moralisweb3\evm-utils\lib\dataTypes\EvmNftContractType.js:11:19)
at validateValidEvmContractType (C:\Work\NFT.community\node_modules\@moralisweb3\evm-utils\lib\dataTypes\EvmNftContractType.js:22:45)
at Function.EvmNft.parse (C:\Work\NFT.community\node_modules\@moralisweb3\evm-utils\lib\dataTypes\EvmNft\EvmNft.js:73:192)
at new EvmNft (C:\Work\NFT.community\node_modules\@moralisweb3\evm-utils\lib\dataTypes\EvmNft\EvmNft.js:24:29)
at Function.EvmNft.create (C:\Work\NFT.community\node_modules\@moralisweb3\evm-utils\lib\dataTypes\EvmNft\EvmNft.js:30:16)
at C:\Work\NFT.community\node_modules\@moralisweb3\evm-api\lib\resolvers\account\getNFTs.js:27:43
at Array.map (<anonymous>)
at ApiPaginatedResultAdapter.apiToResult [as _adapter] (C:\Work\NFT.community\node_modules\@moralisweb3\evm-api\lib\resolvers\account\getNFTs.js:26:77)
at ApiPaginatedResultAdapter.get (C:\Work\NFT.community\node_modules\@moralisweb3\api-utils\lib\resolvers\ApiResultAdapter.js:31:25)
at C:\Work\NFT.community\router\landing_page.js:38:46
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I am using the version [email protected]
The same endpoint was working yesterday but suddenly has stopped working today .