Show / Hide Table of Contents

Delegate BalanceGetter<T>

An intermediary delegate for AccountBalanceGetter.

Namespace: Libplanet.Action
Assembly: Libplanet.dll
Syntax
public delegate FungibleAssetValue BalanceGetter<T>(Address address, Currency currency, BlockHash? hashDigest, FungibleAssetStateCompleter<T> fungibleAssetStateCompleter)
    where T : IAction, new();
Parameters
Type Name Description
Address address

The address of an account to read the state from.

Currency currency

The currency to look up.

Nullable<BlockHash> hashDigest

The address of a block to read the state from.

FungibleAssetStateCompleter<T> fungibleAssetStateCompleter

The FungibleAssetStateCompleter<T> to use.

Returns
Type Description
FungibleAssetValue

The balance of the currency at address.

Type Parameters
Name Description
T

An IAction type. It should match to BlockChain<T>'s type parameter.

Remarks

If the account state at address has never been set by the evaluation up to the Block<T> with Hash of hashDigest, returns null instead of throwing an exception.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2021 Planetarium