Purpose
The Ledger module provides a comprehensive financial tracking system for NFTs, allowing for detailed accounting of transactions, disbursements, payments, and fees associated with NFT ownership. It maintains a chronological record of all financial activities and their impact on principal, interest, and other balances.
How It Works
- Ledger Classes: Define configuration for specific classes of assets
- Ledgers: Track financial activities for specific NFTs or scopes
- Ledger Entries: Represent individual financial transactions or activities
- Balance Buckets: Maintain balances in different categories (Principal, Interest, Other)
- Entry Types: Support various transaction types (Disbursements, Payments, Fees, etc.)
Key Messages/Actions
MsgCreateLedgerClass
Creates a new ledger class configuration.
protobufmessage MsgCreateLedgerClass { LedgerClass ledger_class = 1; string authority = 2; }
MsgCreateLedger
Creates a new ledger for an asset.
protobufmessage MsgCreateLedger { Ledger ledger = 1; string authority = 2; }
MsgAppendLedgerEntry
Adds one or more new entries to an existing ledger.
protobufmessage MsgAppendLedgerEntry { string nft_id = 1; string asset_class_id = 2; repeated LedgerEntry entries = 3; string authority = 4; }
MsgDestroyLedger
Removes a ledger and all associated data.
protobufmessage MsgDestroyLedger { string nft_id = 1; string asset_class_id = 2; string authority = 3; }