Show / Hide Table of Contents

Interface IWorldState

An interface to fetch world 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
  • filling an Address with null state cannot be distinguished from the Address having never been set to any state.
Namespace: Libplanet.Action.State
Assembly: Libplanet.Action.dll
Syntax
public interface IWorldState

Properties

| Improve this Doc View Source

Legacy

Whether IWorldState is in legacy state or not.

Declaration
bool Legacy { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Trie

The ITrie of the IWorldState.

Declaration
ITrie Trie { get; }
Property Value
Type Description
ITrie

Methods

| Improve this Doc View Source

GetAccountState(Address)

Gets the IAccountState of the given address.

Declaration
[Pure]
IAccountState GetAccountState(Address address)
Parameters
Type Name Description
Address address

The Address referring the world to get its state.

Returns
Type Description
IAccountState

The IAccountState of the given address. If it has never been set to any state it returns null instead.

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