UNPKG

locklift

Version:

Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.

15 lines (12 loc) 656 B
import { Address, ProviderRpcClient } from "everscale-inpage-provider"; import { AccountData, TracingTransportConnection } from "../types"; export class TracingProxyConnection implements TracingTransportConnection { constructor(readonly provider: ProviderRpcClient) {} async getAccountData(account: Address): Promise<AccountData> { const fullAcc = await this.provider.getFullContractState({ address: account }); return { id: account.toString(), codeHash: fullAcc.state?.codeHash }; } async getAccountsData(accounts: Address[]): Promise<AccountData[]> { return Promise.all(accounts.map(account => this.getAccountData(account))); } }