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:
Namespace: Libplanet.Action.State
Assembly: Libplanet.Action.dll
Syntax
public interface IWorldState
Properties
| Improve this Doc View SourceLegacy
Whether IWorldState is backed by an ITrie with the legacy data model. This is true if and only if Version is less than WorldStateProtocolVersion.
Declaration
bool Legacy { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Trie
The ITrie of the IWorldState.
Declaration
ITrie Trie { get; }
Property Value
Type | Description |
---|---|
ITrie |
Version
The version of the backend ITrie data model. This should be in sync with ProtocolVersion of the IPreEvaluationBlock getting evaluated. As this was only introduced since WorldStateProtocolVersion, this returns zero with any ITrie representing an IWorldState before WorldStateProtocolVersion or any ITrie representing an IAccountState.
Declaration
int Version { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
See Also
Methods
| Improve this Doc View SourceGetAccountState(Address)
Gets the IAccountState of the given address
.
Declaration
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 |