Update ABI files.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { environment } from '@src/environments/environment';
|
||||
import Web3 from 'web3';
|
||||
|
||||
const abi: Array<any> = require('@src/assets/js/block-sync/data/AccountRegistry.json');
|
||||
const abi: Array<any> = require('@src/assets/js/block-sync/data/AccountsIndex.json');
|
||||
const web3: Web3 = new Web3(environment.web3Provider);
|
||||
|
||||
export class AccountIndex {
|
||||
@@ -20,11 +20,11 @@ export class AccountIndex {
|
||||
}
|
||||
|
||||
public async totalAccounts(): Promise<number> {
|
||||
return await this.contract.methods.count().call();
|
||||
return await this.contract.methods.entryCount().call();
|
||||
}
|
||||
|
||||
public async haveAccount(address: string): Promise<boolean> {
|
||||
return (await this.contract.methods.accountIndex(address).call()) !== 0;
|
||||
return (await this.contract.methods.have(address).call()) !== 0;
|
||||
}
|
||||
|
||||
public async last(numberOfAccounts: number): Promise<Array<string>> {
|
||||
@@ -35,7 +35,7 @@ export class AccountIndex {
|
||||
}
|
||||
const accounts: Array<string> = [];
|
||||
for (let i = count - 1; i > lowest; i--) {
|
||||
const account: string = await this.contract.methods.accounts(i).call();
|
||||
const account: string = await this.contract.methods.entry(i).call();
|
||||
accounts.push(account);
|
||||
}
|
||||
return accounts;
|
||||
|
||||
Reference in New Issue
Block a user