增加1155获取余额的方法漏出

This commit is contained in:
cebgcontract 2022-12-16 18:25:13 +08:00
parent 86822fcad9
commit c1589f5b89
2 changed files with 14 additions and 1 deletions

View File

@ -581,6 +581,19 @@ export default class JCWallet {
});
}
public async erc1155Balance(
address: string,
account: string,
tokenId: string
) {
let result = await this.erc1155Standard.getBalanceOf(
address,
account,
tokenId
);
return result;
}
public async erc1155Info(address: string) {}
public async erc1155List(address: string, account?: string) {

View File

@ -93,7 +93,7 @@ export class ERC1155Standard {
address: string,
tokenId: string
): Promise<number> => {
const contract = new this.web3.eth.Contract(abiERC1155, address);
const contract = new this.web3.eth.Contract(abiERC1155, contractAddress);
return new Promise<number>((resolve, reject) => {
contract.methods.balanceOf(
address,