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 events types to blockchain v5.0.0 #87

Merged
merged 4 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
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
33 changes: 17 additions & 16 deletions blockchain/pallets/ddccustomers.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,29 @@ type UnlockChunk struct {
// Events
type (
EventDdcCustomersDeposited struct {
Phase types.Phase
Owner types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}
EventDdcCustomersInitialDepositUnlock struct {
Phase types.Phase
Owner types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}
EventDdcCustomersWithdrawn struct {
Phase types.Phase
Owner types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}
EventDdcCustomersCharged struct {
Phase types.Phase
Owner types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
OwnerId types.AccountID
Charged types.U128
ExpectedToCharge types.U128
Topics []types.Hash
}
EventDdcCustomersBucketCreated struct {
Phase types.Phase
Expand Down
65 changes: 47 additions & 18 deletions blockchain/pallets/ddcpayouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ type (
EventDdcPayoutsBillingReportInitialized struct {
Phase types.Phase
ClusterId ClusterId
Era DdcEra
Topics []types.Hash
}

Expand All @@ -116,13 +117,14 @@ type (
}

EventDdcPayoutsChargeFailed struct {
Phase types.Phase
ClusterId ClusterId
Era DdcEra
BatchIndex BatchIndex
CustomerId types.AccountID
Amount types.U128
Topics []types.Hash
Phase types.Phase
ClusterId ClusterId
Era DdcEra
BatchIndex BatchIndex
CustomerId types.AccountID
Charged types.U128
ExpectedToCharge types.U128
Topics []types.Hash
}

EventDdcPayoutsIndebted struct {
Expand Down Expand Up @@ -172,19 +174,35 @@ type (
Topics []types.Hash
}

EventDdcPayouts struct {
Phase types.Phase
ClusterId ClusterId
Topics []types.Hash
EventDdcPayoutsRewarded struct {
Phase types.Phase
ClusterId ClusterId
Era DdcEra
BatchIndex BatchIndex
NodeProviderId types.AccountID
Rewarded types.U128
ExpectedToReward types.U128
Topics []types.Hash
}

EventDdcPayoutsRewarded struct {
Phase types.Phase
ClusterId ClusterId
Era DdcEra
NodeProviderId types.AccountID
Amount types.U128
Topics []types.Hash
EventDdcPayoutsNotDistributedReward struct {
Phase types.Phase
ClusterId ClusterId
Era DdcEra
BatchIndex BatchIndex
NodeProviderId types.AccountID
ExpectedReward types.U128
DistributedReward types.U128
Topics []types.Hash
}

EventDdcPayoutsNotDistributedOverallReward struct {
Phase types.Phase
ClusterId ClusterId
Era DdcEra
ExpectedReward types.U128
TotalDistributedReward types.U128
Topics []types.Hash
}

EventDdcPayoutsRewardingFinished struct {
Expand All @@ -206,6 +224,17 @@ type (
AuthorisedCaller types.AccountID
Topics []types.Hash
}

EventDdcPayoutsChargeError struct {
Phase types.Phase
ClusterId ClusterId
Era DdcEra
BatchIndex BatchIndex
CustomerId types.AccountID
Amount types.U128
Error types.DispatchError
Topics []types.Hash
}
)

type DdcPayoutsApi interface {
Expand Down
3 changes: 3 additions & 0 deletions blockchain/pallets/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ type Events struct {
DdcPayouts_ValidatorFeesCollected []EventDdcPayoutsValidatorFeesCollected //nolint:stylecheck,golint
DdcPayouts_RewardingStarted []EventDdcPayoutsRewardingStarted //nolint:stylecheck,golint
DdcPayouts_Rewarded []EventDdcPayoutsRewarded //nolint:stylecheck,golint
DdcPayouts_NotDistributedReward []EventDdcPayoutsNotDistributedReward //nolint:stylecheck,golint
DdcPayouts_NotDistributedOverallReward []EventDdcPayoutsNotDistributedOverallReward //nolint:stylecheck,golint
DdcPayouts_RewardingFinished []EventDdcPayoutsRewardingFinished //nolint:stylecheck,golint
DdcPayouts_BillingReportFinalized []EventDdcPayoutsBillingReportFinalized //nolint:stylecheck,golint
DdcPayouts_AuthorisedCaller []EventDdcPayoutsAuthorisedCaller //nolint:stylecheck,golint
DdcPayouts_ChargeError []EventDdcPayoutsChargeError //nolint:stylecheck,golint

DdcStaking_Bonded []EventDdcStakingBonded //nolint:stylecheck,golint
DdcStaking_Chilled []EventDdcStakingChilled //nolint:stylecheck,golint
Expand Down
Loading