Skip to content

Commit 2302c1d

Browse files
authored
Merge pull request #126 from magiclabs/bengriffin1-fix-ethers-token-validation
Fixing ABIs
2 parents f22d2ad + 768131e commit 2302c1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/modules/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class UtilsModule extends BaseModule {
5656

5757
// Check on-chain if user owns NFT by calling contract with web3
5858
let balance = BigInt(0);
59-
const provider = new ethers.JsonRpcProvider();
59+
const provider = new ethers.JsonRpcProvider(rpcURL);
6060
if (contractType === 'ERC721') {
6161
const contract = new ethers.Contract(contractAddress, ERC721ContractABI, provider);
6262
balance = BigInt(await contract.balanceOf(walletAddress));

src/modules/utils/ownershipABIs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const ERC721ContractABI = [
2-
"function balanceOf(address) view returns (uint)",
2+
"function balanceOf(address owner) view returns (uint balance)",
33
]
44
export const ERC1155ContractABI = [
5-
"function balanceOf(address, id) view returns (uint)",
5+
"function balanceOf(address owner, uint id) view returns (uint balance)",
66
]

0 commit comments

Comments
 (0)