diff --git a/src/modules/utils/index.ts b/src/modules/utils/index.ts index 16d4070..9a65696 100644 --- a/src/modules/utils/index.ts +++ b/src/modules/utils/index.ts @@ -59,11 +59,9 @@ export class UtilsModule extends BaseModule { const provider = new ethers.JsonRpcProvider(); if (contractType === 'ERC721') { const contract = new ethers.Contract(contractAddress, ERC721ContractABI, provider); - // const contract = new web3.eth.Contract(ERC721ContractABI, contractAddress); balance = BigInt(await contract.balanceOf(walletAddress)); } else { const contract = new ethers.Contract(contractAddress, ERC1155ContractABI, provider); - // const contract = new web3.eth.Contract(ERC1155ContractABI, contractAddress); balance = BigInt(await contract.balanceOf(walletAddress, tokenId)); } if (balance > BigInt(0)) { diff --git a/src/modules/utils/ownershipABIs.ts b/src/modules/utils/ownershipABIs.ts index 6bc89f0..ed4ee7d 100644 --- a/src/modules/utils/ownershipABIs.ts +++ b/src/modules/utils/ownershipABIs.ts @@ -1,60 +1,6 @@ -// // Reduced ABI for ERC1155 with just balanceOf -// export const ERC1155ContractABI = [ -// { -// "constant": true, -// "inputs": [ -// { -// "name": "_owner", -// "type": "address" -// }, -// { -// "name": "_id", -// "type": "uint256" -// } -// ], -// "name": "balanceOf", -// "outputs": [ -// { -// "name": "", -// "type": "uint256" -// } -// ], -// "payable": false, -// "stateMutability": "view", -// "type": "function" -// } -// ]; - -// // Reduced ABI for ERC721 with just balanceOf -// export const ERC721ContractABI = [ -// { -// "constant": true, -// "inputs": [ -// { -// "name": "_owner", -// "type": "address" -// }, -// { -// "name": "_id", -// "type": "uint256" -// } -// ], -// "name": "balanceOf", -// "outputs": [ -// { -// "name": "", -// "type": "uint256" -// } -// ], -// "payable": false, -// "stateMutability": "view", -// "type": "function" -// } -// ]; - export const ERC721ContractABI = [ "function balanceOf(address) view returns (uint)", ] export const ERC1155ContractABI = [ "function balanceOf(address, id) view returns (uint)", -] \ No newline at end of file +] diff --git a/test/tsconfig.json b/test/tsconfig.json index 32ab7f5..f416863 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,10 +1,3 @@ { - "extends": "../config/tsconfig.test.json", - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "strict": true, - "skipLibCheck": true, - "esModuleInterop": true, - } + "extends": "../config/tsconfig.test.json" } diff --git a/tsconfig.json b/tsconfig.json index c1f2895..317fff1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,3 @@ { - "extends": "./config/tsconfig.base.json", - "compilerOptions": { - "esModuleInterop": true, - } + "extends": "./config/tsconfig.base.json" }