Show / Hide Table of Contents

Class CurrencyAccount

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Inheritance
System.Object
CurrencyAccount
Namespace: Libplanet.Action.State
Assembly: Libplanet.Action.dll
Syntax
public sealed class CurrencyAccount : object

Constructors

| Improve this Doc View Source

CurrencyAccount(ITrie, Int32, Currency)

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public CurrencyAccount(ITrie trie, int worldVersion, Currency currency)
Parameters
Type Name Description
ITrie trie
System.Int32 worldVersion
Currency currency

Fields

| Improve this Doc View Source

TotalSupplyAddress

The Address location within the account where the total supply of the currency gets stored.

Declaration
public static readonly Address TotalSupplyAddress
Field Value
Type Description
Address

Properties

| Improve this Doc View Source

Currency

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public Currency Currency { get; }
Property Value
Type Description
Currency
| Improve this Doc View Source

Trie

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public ITrie Trie { get; }
Property Value
Type Description
ITrie
| Improve this Doc View Source

WorldVersion

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public int WorldVersion { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

AsAccount()

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public IAccount AsAccount()
Returns
Type Description
IAccount
| Improve this Doc View Source

BurnAsset(Address, FungibleAssetValue)

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public CurrencyAccount BurnAsset(Address owner, FungibleAssetValue value)
Parameters
Type Name Description
Address owner
FungibleAssetValue value
Returns
Type Description
CurrencyAccount
| Improve this Doc View Source

GetBalance(Address, Currency)

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public FungibleAssetValue GetBalance(Address address, Currency currency)
Parameters
Type Name Description
Address address
Currency currency
Returns
Type Description
FungibleAssetValue
| Improve this Doc View Source

GetTotalSupply(Currency)

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public FungibleAssetValue GetTotalSupply(Currency currency)
Parameters
Type Name Description
Currency currency
Returns
Type Description
FungibleAssetValue
| Improve this Doc View Source

MintAsset(Address, FungibleAssetValue)

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public CurrencyAccount MintAsset(Address recipient, FungibleAssetValue value)
Parameters
Type Name Description
Address recipient
FungibleAssetValue value
Returns
Type Description
CurrencyAccount
| Improve this Doc View Source

TransferAsset(Address, Address, FungibleAssetValue)

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public CurrencyAccount TransferAsset(Address sender, Address recipient, FungibleAssetValue value)
Parameters
Type Name Description
Address sender
Address recipient
FungibleAssetValue value
Returns
Type Description
CurrencyAccount
| Improve this Doc View Source

TransferAssetV0(Address, Address, FungibleAssetValue)

A special "account" for managing Currency starting with CurrencyAccountProtocolVersion.

Declaration
public CurrencyAccount TransferAssetV0(Address sender, Address recipient, FungibleAssetValue value)
Parameters
Type Name Description
Address sender
Address recipient
FungibleAssetValue value
Returns
Type Description
CurrencyAccount
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium