Skip to content

Commit

Permalink
chore(bank): update events spec
Browse files Browse the repository at this point in the history
  • Loading branch information
fdymylja committed Feb 25, 2021
1 parent 63e6fcb commit ea4927a
Showing 1 changed file with 120 additions and 0 deletions.
120 changes: 120 additions & 0 deletions x/bank/spec/04_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,123 @@ The bank module emits the following events:
| message | module | bank |
| message | action | multisend |
| message | sender | {senderAddress} |

## Keeper events

In addition to handlers events, the bank keeper will produce events when the following methods are called (or any method which ends up calling them)

### MintCoins

```json
{
"type": "coinbase",
"attributes": [
{
"key": "minter",
"value": "{{sdk.AccAddress of the module minting coins}}",
"index": true
},
{
"key": "amount",
"value": "{{sdk.Coins being minted}}",
"index": true
}
]
}
```

```json
{
"type": "coin_received",
"attributes": [
{
"key": "receiver",
"value": "{{sdk.AccAddress of the module minting coins}}",
"index": true
},
{
"key": "amount",
"value": "{{sdk.Coins being received}}",
"index": true
}
]
}
```

### BurnCoins

```json
{
"type": "burn",
"attributes": [
{
"key": "burner",
"value": "{{sdk.AccAddress of the module burning coins}}",
"index": true
},
{
"key": "amount",
"value": "{{sdk.Coins being burned}}",
"index": true
}
]
}
```

```json
{
"type": "coin_spent",
"attributes": [
{
"key": "spender",
"value": "{{sdk.AccAddress of the module burning coins}}",
"index": true
},
{
"key": "amount",
"value": "{{sdk.Coins being burned}}",
"index": true
}
]
}
```

### addCoins

```json
{
"type": "coin_received",
"attributes": [
{
"key": "receiver",
"value": "{{sdk.AccAddress of the address beneficiary of the coins}}",
"index": true
},
{
"key": "amount",
"value": "{{sdk.Coins being received}}",
"index": true
}
]
}
```

### subUnlockedCoins/DelegateCoins

```json
{
"type": "coin_spent",
"attributes": [
{
"key": "spender",
"value": "{{sdk.AccAddress of the address which is spending coins}}",
"index": true
},
{
"key": "amount",
"value": "{{sdk.Coins being spent}}",
"index": true
}
]
}
```

0 comments on commit ea4927a

Please sign in to comment.