Skip to content

Commit

Permalink
Add new billing events to go client
Browse files Browse the repository at this point in the history
  • Loading branch information
sameh-farouk committed Aug 13, 2024
1 parent 6564009 commit f5acea5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
30 changes: 30 additions & 0 deletions clients/tfchain-client-go/contract_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,33 @@ type NodeExtraFeeSet struct {
ExtraFee types.U64 `json:"extra_fee"`
Topics []types.Hash
}

type RentWaived struct {
Phase types.Phase
ContractID types.U64 `json:"contract_id"`
Topics []types.Hash
}

type ContractGracePeriodElapsed struct {
Phase types.Phase
ContractID types.U64 `json:"contract_id"`
GracePeriod types.U64 `json:"grace_period"`
Topics []types.Hash
}

type ContractPaymentOverdrafted struct {
Phase types.Phase
ContractID types.U64 `json:"contract_id"`
Timestamp types.U64 `json:"timestamp"`
PartialBilledAmount types.U128 `json:"partial_billed_amount"`
OverdraftedAmount types.U128 `json:"overdrafted_amount"`
Topics []types.Hash
}

type RewardDistributed struct {
Phase types.Phase
ContractID types.U64 `json:"contract_id"`
StandardRewards types.U128 `json:"standard_rewards"`
AdditionalRewards types.U128 `json:"additional_rewards"`
Topics []types.Hash
}
4 changes: 4 additions & 0 deletions clients/tfchain-client-go/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ type EventRecords struct {
SmartContractModule_ServiceContractBilled []ServiceContractBilled //nolint:stylecheck,golint
SmartContractModule_BillingFrequencyChanged []BillingFrequencyChanged //nolint:stylecheck,golint
SmartContractModule_NodeExtraFeeSet []NodeExtraFeeSet //nolint:stylecheck,golint
SmartContractModule_RentWaived []RentWaived //nolint:stylecheck,golint
SmartContractModule_ContractGracePeriodElapsed []ContractGracePeriodElapsed //nolint:stylecheck,golint
SmartContractModule_ContractPaymentOverdrafted []ContractPaymentOverdrafted //nolint:stylecheck,golint
SmartContractModule_RewardDistributed []RewardDistributed //nolint:stylecheck,golint

// farm events
TfgridModule_FarmStored []FarmStored //nolint:stylecheck,golint
Expand Down

0 comments on commit f5acea5

Please sign in to comment.