Throughout execution, the contract emits the following events which might be useful for experienced traders
Configuration events:
UpdateExchangeInvoker {invoker: ContractAddress, enabled: bool}
BaseTokenUpdate {new_base_token: ContractAddress}
FeeRecipientUpdate {new_fee_recipient: ContractAddress}
RouterComponentUpdate {new_delay:SlowModeDelay, min_amount_to_route:u256, new_punishment_bips:u16}
WithdrawComponentUpdate {new_withdraw_steps: u16, new_delay:SlowModeDelay}
User balance events:
Mint { token:ContractAddress, to:ContractAddress, amount:u256}
Burn { from_:ContractAddress, token:ContractAddress, amount:u256}
Transfer { token: ContractAddress, from_: ContractAddress, to: ContractAddress, amount: u256}
Deposit { receiver: ContractAddress, token: ContractAddress, funder:ContractAddress, amount: u256}
ReqOnChainWithdraw { maker: ContractAddress, withdraw:Withdraw}
Withdrawal {
maker: ContractAddress, token: ContractAddress, receiver: ContractAddress,
salt: felt252, amount: u256, gas_price: u256, gas_fee: GasFee, direct: bool }
Trading account signer events:
NewBinding {trading_account: ContractAddress, signer: ContractAddress}
Change of trading account nonce events:
NonceIncrease { maker: ContractAddress, new_nonce: u32}
Router events:
Deposit { router: ContractAddress, token: ContractAddress, funder: ContractAddress, amount: u256,}
Withdraw { router:ContractAddress, token:ContractAddress, amount:u256, receiver:ContractAddress,}
RouterRegistration {router:ContractAddress, status: u8} //0registered, 1scheduled unregister, 2unregsiter
Binding {router:ContractAddress, signer:ContractAddress, is_added:bool}
RouterMint {token:ContractAddress, router:ContractAddress, amount:u256}
RouterBurn {router:ContractAddress, token:ContractAddress, amount:u256}
Trade events:
Trade { maker:ContractAddress, taker:ContractAddress,
ticker:(ContractAddress,ContractAddress),
amount_base: u256, amount_quote: u256, is_sell_side: bool, is_failed:bool, is_ecosystem_book: bool,
maker_hash:felt252, taker_hash:felt252,
maker_source:felt252, taker_source:felt252
}
FeeReward {recipient:ContractAddress,token:ContractAddress, amount:u256}
RouterPunish { router:ContractAddress, taker:_hashContractAddress, maker_hash:felt252, amount:u256}
To deduce how much was paid in trading fees and gas, the user can filter Transfer events with "to" set to exchange fee recipient.
To filter orders by origin collect event from chain and filter by maker_source and taker _source
maker and taker fields are indexed