Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the DDC types to 5.0.0 #173

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 53 additions & 29 deletions shared/substrate/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,14 @@ type EventCharged struct {
}

type EventChargeFailed struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
CustomerId types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
CustomerId types.AccountID
Charged types.U128
ExpectedToCharge types.U128
Topics []types.Hash
}

type EventIndebted struct {
Expand Down Expand Up @@ -266,18 +267,21 @@ type EventRewardingStarted struct {
}

type EventRewarded struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
NodeProviderId types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
NodeProviderId types.AccountID
Rewarded types.U128
ExpectedToReward types.U128
Topics []types.Hash
}

type EventNotDistributedReward struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
NodeProviderId types.AccountID
ExpectedReward types.U128
DistributedReward types.U128
Expand Down Expand Up @@ -313,6 +317,17 @@ type EventAuthorisedCaller struct {
Topics []types.Hash
}

type EventChargeError struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
CustomerId types.AccountID
Amount types.U128
Error types.DispatchError
Topics []types.Hash
}

// DDC Staking events:

type EventBonded struct {
Expand Down Expand Up @@ -425,31 +440,32 @@ type EventClusterGovParamsSet struct {
// DDC Customers events:

type EventDeposited struct {
Phase types.Phase
Who types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}

type EventInitialDepositUnlock struct {
Phase types.Phase
Who types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}

type EventCustomersWithdrawn struct {
Phase types.Phase
Who types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}

type EventCustomersCharged struct {
Phase types.Phase
Who types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
OwnerId types.AccountID
Charged types.U128
ExpectedToCharge types.U128
Topics []types.Hash
}

type EventBucketCreated struct {
Expand All @@ -464,6 +480,12 @@ type EventBucketUpdated struct {
Topics []types.Hash
}

type EventBucketRemoved struct {
Phase types.Phase
BucketId types.U64
Topics []types.Hash
}

type Events struct {
types.EventRecords
events.Events
Expand Down Expand Up @@ -512,6 +534,7 @@ type Events struct {
DdcPayouts_RewardingFinished []EventRewardingFinished //nolint:stylecheck,golint
DdcPayouts_BillingReportFinalized []EventBillingReportFinalized //nolint:stylecheck,golint
DdcPayouts_AuthorisedCaller []EventAuthorisedCaller //nolint:stylecheck,golint
DdcPayouts_ChargeError []EventChargeError //nolint:stylecheck,golint
DdcStaking_Bonded []EventBonded //nolint:stylecheck,golint
DdcStaking_Unbonded []EventUnbonded //nolint:stylecheck,golint
DdcStaking_Withdrawn []EventWithdrawn //nolint:stylecheck,golint
Expand All @@ -534,4 +557,5 @@ type Events struct {
DdcCustomers_Charged []EventCustomersCharged //nolint:stylecheck,golint
DdcCustomers_BucketCreated []EventBucketCreated //nolint:stylecheck,golint
DdcCustomers_BucketUpdated []EventBucketUpdated //nolint:stylecheck,golint
DdcCustomers_BucketRemoved []EventBucketRemoved //nolint:stylecheck,golint
}