SettlementManager
State Variables
nextSettlementId
uint256 public nextSettlementId = 1;
settlements
mapping(uint256 => Settlement) public settlements;
Functions
requestSettlement
function requestSettlement(address toLedger, uint256 fromEntryId, int256 amount) public returns (uint256);
processSettlement
function processSettlement(uint256 settlementId, uint256 toEntryId) public;
archiveSettlement
function archiveSettlement(uint256 settlementId) public;
Events
SettlementRequested
event SettlementRequested(
uint256 settlementId, address fromLedger, address toLedger, uint256 fromEntryId, int256 amount
);
SettlementProcessed
event SettlementProcessed(uint256 settlementId, uint256 toEntryId);
SettlementStatusUpdated
event SettlementStatusUpdated(uint256 settlementId, SettlementStatus status);
Structs
Settlement
struct Settlement {
uint256 settlementId;
address fromLedger;
address toLedger;
uint256 fromEntryId;
uint256 toEntryId;
int256 amount;
SettlementStatus status;
}
Enums
SettlementStatus
enum SettlementStatus {
Pending,
Posted,
Archived
}
Last updated
Was this helpful?