public virtual BigInteger BalanceOf(StoreView snapshot, UInt160 account) { StorageItem storage = snapshot.Storages.TryGet(CreateAccountKey(account)); if (storage is null) { return(BigInteger.Zero); } Nep5AccountState state = new Nep5AccountState(storage.Value); return(state.Balance); }
protected virtual BigInteger BalanceOf(ApplicationEngine engine, UInt160 account) { StorageItem storage = engine.Service.Snapshot.Storages.TryGet(CreateAccountKey(account)); if (storage is null) { return(BigInteger.Zero); } Nep5AccountState state = new Nep5AccountState(storage.Value); return(state.Balance); }