Skip to content

Commit

Permalink
events: Add ORML tokens events (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian authored Jul 13, 2023
1 parent 20eecd5 commit 8a67d7b
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 0 deletions.
16 changes: 16 additions & 0 deletions types/event_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,22 @@ type EventRecords struct {
OrmlAssetRegistry_RegisteredAsset []EventOrmlAssetRegistryRegisteredAsset `test-gen-blockchain:"polkadot"`
OrmlAssetRegistry_UpdatedAsset []EventOrmlAssetRegistryUpdatedAsset `test-gen-blockchain:"polkadot"`

OrmlTokens_Endowed []EventOrmlTokensEndowed `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_DustLost []EventOrmlTokensDustLost `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_Transfer []EventOrmlTokensTransfer `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_Reserved []EventOrmlTokensReserved `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_Unreserved []EventOrmlTokensUnreserved `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_ReserveRepatriated []EventOrmlTokensReserveRepatriated `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_BalanceSet []EventOrmlTokensBalanceSet `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_TotalIssuanceSet []EventOrmlTokensTotalIssuanceSet `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_Withdrawn []EventOrmlTokensWithdrawn `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_Slashed []EventOrmlTokensSlashed `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_Deposited []EventOrmlTokensDeposited `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_LockSet []EventOrmlTokensLockSet `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_LockRemoved []EventOrmlTokensLockRemoved `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_Locked []EventOrmlTokensLocked `test-gen-blockchain:"centrifuge-parachain"`
OrmlTokens_Unlocked []EventOrmlTokensUnlocked `test-gen-blockchain:"centrifuge-parachain"`

Paras_CurrentCodeUpdated []EventParasCurrentCodeUpdated `test-gen-blockchain:"polkadot"`
Paras_CurrentHeadUpdated []EventParasCurrentHeadUpdated `test-gen-blockchain:"polkadot"`
Paras_CodeUpgradeScheduled []EventParasCodeUpgradeScheduled `test-gen-blockchain:"polkadot"`
Expand Down
125 changes: 125 additions & 0 deletions types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,131 @@ type EventOffencesOffence struct {
Topics []Hash
}

type EventOrmlTokensEndowed struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensDustLost struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensTransfer struct {
Phase Phase
CurrencyID CurrencyID
From AccountID
To AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensReserved struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensUnreserved struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensReserveRepatriated struct {
Phase Phase
CurrencyID CurrencyID
From AccountID
To AccountID
Amount U128
Status BalanceStatus
Topics []Hash
}

type EventOrmlTokensBalanceSet struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Free U128
Reserved U128
Topics []Hash
}

type EventOrmlTokensTotalIssuanceSet struct {
Phase Phase
CurrencyID CurrencyID
Amount U128
Topics []Hash
}

type EventOrmlTokensWithdrawn struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensSlashed struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
FreeAmount U128
ReservedAmount U128
Topics []Hash
}

type EventOrmlTokensDeposited struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensLockSet struct {
Phase Phase
LockID [8]U8
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensLockRemoved struct {
Phase Phase
LockID [8]U8
CurrencyID CurrencyID
Who AccountID
Topics []Hash
}

type EventOrmlTokensLocked struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlTokensUnlocked struct {
Phase Phase
CurrencyID CurrencyID
Who AccountID
Amount U128
Topics []Hash
}

type EventOrmlAssetRegistryRegisteredAsset struct {
Phase Phase
AssetID CurrencyID
Expand Down

0 comments on commit 8a67d7b

Please sign in to comment.