File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export class UtilsModule extends BaseModule {
56
56
57
57
// Check on-chain if user owns NFT by calling contract with web3
58
58
let balance = BigInt ( 0 ) ;
59
- const provider = new ethers . JsonRpcProvider ( ) ;
59
+ const provider = new ethers . JsonRpcProvider ( rpcURL ) ;
60
60
if ( contractType === 'ERC721' ) {
61
61
const contract = new ethers . Contract ( contractAddress , ERC721ContractABI , provider ) ;
62
62
balance = BigInt ( await contract . balanceOf ( walletAddress ) ) ;
Original file line number Diff line number Diff line change 1
1
export const ERC721ContractABI = [
2
- "function balanceOf(address) view returns (uint)" ,
2
+ "function balanceOf(address owner ) view returns (uint balance )" ,
3
3
]
4
4
export const ERC1155ContractABI = [
5
- "function balanceOf(address, id) view returns (uint)" ,
5
+ "function balanceOf(address owner, uint id) view returns (uint balance )" ,
6
6
]
You can’t perform that action at this time.
0 commit comments