Ledger

Git Source

Inherits: Diamond

A diamond-based ledger contract representing an organization's complete chart of accounts

Implements financial accounting with standard account numbering and sections using diamond pattern

Functions

constructor

Constructor for the Ledger diamond

constructor(address _owner, uint8 _decimals, string memory _currencyCode)
    Diamond(_createInitParams(_owner, _decimals, _currencyCode));

Parameters

Name
Type
Description

_owner

address

The owner of this ledger

_decimals

uint8

The number of decimal places for amounts

_currencyCode

string

The ISO currency code for this ledger

_createInitParams

Create initialization parameters for the diamond

function _createInitParams(address _owner, uint8 _decimals, string memory _currencyCode)
    internal
    returns (Diamond.InitParams memory initParams);

Parameters

Name
Type
Description

_owner

address

The owner of this ledger

_decimals

uint8

The number of decimal places for amounts

_currencyCode

string

The ISO currency code for this ledger

Returns

Name
Type
Description

initParams

Diamond.InitParams

The initialization parameters

Last updated

Was this helpful?