State Modification Patterns
Introduction
Ledger Views
ReadView
class ReadView
{
public:
// Read a ledger entry (returns nullptr if not found)
virtual std::shared_ptr<SLE const> read(Keylet const& k) const = 0;
// Check if an entry exists
virtual bool exists(Keylet const& k) const = 0;
// Get current fees
virtual Fees const& fees() const = 0;
// Get current rules (amendments)
virtual Rules const& rules() const = 0;
// Get ledger sequence
virtual LedgerIndex seq() const = 0;
};ApplyView
OpenView
Serialized Ledger Entries (SLEs)
Creating an SLE
Reading an SLE
Modifying an SLE
Deleting an SLE
Keylets
Directory Management
Adding to a Directory
Removing from a Directory
Owner Count Management
Incrementing Owner Count
Decrementing Owner Count
The adjustOwnerCount Function
Reserve Checking
Atomic Operations
How Atomicity Works
Common Utility Functions
Reading Account Balances
Checking Freeze Status
Checking Expiration
Best Practices
Codebase References
File
Description
Last updated

