Show / Hide Table of Contents

Namespace Libplanet.Action.State

Classes

Account

An internal implementation of IAccount.

AccountDelta

AccountDeltaExtensions

AccountDiff

Represents a difference between two IAccountStates. This is a partial interpretation of a raw difference obtained by Diff(ITrie) from IAccountState's perspective. Keep in mind of the following properties:

  • Any value, which is equivalent to non-existent value in the underlying storage, in the source is ignored. That is, even if the value in the target and the value in the source are different while the value in the source is null, this will not be part of the resulting AccountDiff.
  • Any null value, again, which is equivalent to non-existent value in the underlying storage, in the target for FungibleAssetValue and ValidatorSet is interpreted accordingly. That is, 0 amount of FungibleAssetValue and empty ValidatorSet are used. This is in accordance with how GetBalance(Address, Currency) and GetValidatorSet() would behave.
  • Due to the reason mentioned directly above, the size of AccountDiff derived from Diff(ITrie) may not be the same. Moreover, an AccountDiff being empty does not guarantee that the data are the same as IAccountState is not capable of distinguishing between null and 0 FungibleAssetValue and so on and so forth.
  • As Currency information is in the domain of an application using this library, only the hash of a Currency is directly stored in the underlying storage. As such, each Currency and FungibleAssetValue are handled as raw values, that is, as hash and Bencodex.Types.Integer, for an AccountDiff.

AccountExtensions

AccountState

A default implementation of IAccountState interface.

CurrencyPermissionException

The exception that is thrown when a TransactionSigner has no rights to mint a Currency or burn assets of a Currency.

InsufficientBalanceException

The exception that is thrown when a sender has less Balance than amount to transfer or an owner has less Balance than amount to burn.

SupplyOverflowException

The exception thrown when a minter tries to mint a currency such that the resulting total supply exceed the maximum amount.

TotalSupplyNotTrackableException

The exception thrown when GetTotalSupply(Currency) was called on a legacy untracked currency with set to false.

Interfaces

IAccount

An interface to manipulate an account state with maintaining Delta.

It is like a map which is virtually initialized such that every possible Address exists and is mapped to null. That means that:

  • it does not have length,
  • its index getter never throws KeyNotFoundException, but returns null instead, and
  • filling an Address with null state cannot be distinguished from the Address having never been set to any state.

IAccountDelta

IAccountState

An interface to fetch account states.

It is like a readonly map which is virtually initialized such that every possible Address exists and is mapped to null. That means that:

  • it does not have length,
  • its index getter never throws KeyNotFoundException, but returns null instead, and

IBlockChainStates

A minimal interface to get states from a .

Note that implements this interface.

In This Article
Back to top Copyright © 2018–2023 Planetarium