From 8a67d7ba06f6d961f4d20d498e16c25591c099d8 Mon Sep 17 00:00:00 2001 From: Cosmin Damian <17934949+cdamian@users.noreply.github.com> Date: Thu, 13 Jul 2023 12:57:23 +0300 Subject: [PATCH] events: Add ORML tokens events (#358) --- types/event_record.go | 16 ++++++ types/events.go | 125 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) diff --git a/types/event_record.go b/types/event_record.go index 49fb2cc9b..323fdd918 100644 --- a/types/event_record.go +++ b/types/event_record.go @@ -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"` diff --git a/types/events.go b/types/events.go index 1a0b4151f..cd82ab774 100644 --- a/types/events.go +++ b/types/events.go @@ -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