ElektroEventEmitter

View Source: contracts/elektro/event-emitter/ElektroEventEmitter.sol

↗ Extends: BaseEventEmitter, OnlyRouterAccess, IElektroEventEmitter

ElektroEventEmitter

Main and the only contract of the Elektro for firing events. Simple structure where each function is firing a specific event. Made for the purpose of centralization of event management. Events for all existing and all new Elektro contracts should project, declare and fire events through this contract ONLY. See For all events docs please see {IElektroEventEmitterEvents}

Functions

  • initElektroEventEmitter(address _registry)

  • emitLedgerPositionMoved(uint64 backendId, uint32[] contractIds, address[] users, int64[] positionSizes)

initElektroEventEmitter

Function to initialize storage through Proxy Pattern module contruction.

function initElektroEventEmitter(address _registry) external nonpayable onlyRouterAccess 

Arguments

NameTypeDescription

_registry

address

- address of {ElektroRegistryRouter}

emitLedgerPositionMoved

Functiuon that emits 2 types of events upon each trade settlement. {PositionsUpdated} event is fired once per each settlement for a backendId. {LedgerPositionMoved} event fired for each row (user funds transfer) in a batch.

function emitLedgerPositionMoved(uint64 backendId, uint32[] contractIds, address[] users, int64[] positionSizes) external nonpayable isValidContract 
returns(bool)

Arguments

NameTypeDescription

backendId

uint64

- special identifier created by Java Backend to track settlement progress for each batch.

contractIds

uint32[]

- array of contractIds of the whole settlement batch

users

address[]

- address array for all user participating in the settlement

positionSizes

int64[]

- quantities of each position for every user to be settled

Last updated