mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-23 23:05:18 +00:00
cleanup cdp events
This commit is contained in:
parent
fd8d48e208
commit
db7aaef98d
@ -22,7 +22,7 @@ const (
|
||||
EventTypeCdpLiquidation = types.EventTypeCdpLiquidation
|
||||
EventTypeBeginBlockerFatal = types.EventTypeBeginBlockerFatal
|
||||
AttributeKeyCdpID = types.AttributeKeyCdpID
|
||||
AttributeKeyDepositor = types.AttributeKeyDepositor
|
||||
AttributeKeyDeposit = types.AttributeKeyDeposit
|
||||
AttributeValueCategory = types.AttributeValueCategory
|
||||
AttributeKeyError = types.AttributeKeyError
|
||||
ModuleName = types.ModuleName
|
||||
|
@ -40,7 +40,7 @@ func (k Keeper) SeizeCollateral(ctx sdk.Context, cdp types.CDP) error {
|
||||
types.EventTypeCdpLiquidation,
|
||||
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
|
||||
sdk.NewAttribute(types.AttributeKeyCdpID, fmt.Sprintf("%d", cdp.ID)),
|
||||
sdk.NewAttribute(types.AttributeKeyDepositor, fmt.Sprintf("%s", dep.Depositor)),
|
||||
sdk.NewAttribute(types.AttributeKeyDeposit, dep.String()),
|
||||
),
|
||||
)
|
||||
err := k.supplyKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, types.LiquidatorMacc, sdk.NewCoins(dep.Amount))
|
||||
|
@ -18,10 +18,12 @@ The cdp module emits the following events:
|
||||
|
||||
### MsgWithdraw
|
||||
|
||||
| Type | Attribute Key | Attribute Value |
|
||||
|---------|---------------|------------------|
|
||||
| message | module | cdp |
|
||||
| message | sender | {sender address} |
|
||||
| Type | Attribute Key | Attribute Value |
|
||||
|---------|--------------- |-----------------------|
|
||||
| message | cdp_withdrawal | {collateral amount} |
|
||||
| message | cdp_id | {cdp_id} |
|
||||
| message | module | cdp |
|
||||
| message | sender | {sender address} |
|
||||
|
||||
### MsgDeposit
|
||||
|
||||
@ -43,10 +45,13 @@ The cdp module emits the following events:
|
||||
|
||||
### MsgRepayDebt
|
||||
|
||||
| Type | Attribute Key | Attribute Value |
|
||||
|---------|---------------|------------------|
|
||||
| message | module | cdp |
|
||||
| message | sender | {sender address} |
|
||||
| Type | Attribute Key | Attribute Value |
|
||||
|---------------|---------------|--------------------|
|
||||
| cdp_repayment | amount | {repayment amount} |
|
||||
| cdp_repayment | cdp_id | {cdp id} |
|
||||
| cdp_close | cdp_id | {cdp id} |
|
||||
| message | module | cdp |
|
||||
| message | sender | {sender address} |
|
||||
|
||||
## BeginBlock
|
||||
|
||||
@ -54,6 +59,6 @@ The cdp module emits the following events:
|
||||
|-------------------------|---------------|---------------------|
|
||||
| cdp_liquidation | module | cdp |
|
||||
| cdp_liquidation | cdp_id | {cdp id} |
|
||||
| cdp_liquidation | depositor | {depositor address} |
|
||||
| cdp_liquidation | deposit | {deposit} |
|
||||
| cdp_begin_blocker_error | module | cdp |
|
||||
| cdp_begin_blocker_error | error_message | {error} |
|
||||
|
@ -12,7 +12,7 @@ const (
|
||||
EventTypeBeginBlockerFatal = "cdp_begin_block_error"
|
||||
|
||||
AttributeKeyCdpID = "cdp_id"
|
||||
AttributeKeyDepositor = "depositor"
|
||||
AttributeKeyDeposit = "deposit"
|
||||
AttributeValueCategory = "cdp"
|
||||
AttributeKeyError = "error_message"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user