-
Notifications
You must be signed in to change notification settings - Fork 12
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
Upgrade contracts to v0.4.0.alpha.1 #49
Conversation
alpe
commented
Jun 28, 2023
•
edited
Loading
edited
- Bump contracts
- More tests
Great you started on this. Two notes (and please check with Mauro on slack to align e2e tests with contract design).
This is mean to handle accounting of the consumer rewards where the stakers are, but keep the rewards on their home chain, to encourage staking over selling |
@@ -33,6 +33,17 @@ func (k Keeper) HasScheduledTask(ctx sdk.Context, tp types.SchedulerTaskType, co | |||
return err == nil && result // we can ignore the unknown task type error and return false instead | |||
} | |||
|
|||
// GetNextScheduledTaskHeight returns height for task to execute | |||
func (k Keeper) GetNextScheduledTaskHeight(ctx sdk.Context, tp types.SchedulerTaskType, contract sdk.AccAddress) (height uint64, found bool) { | |||
err := k.iterateScheduledContractTasks(ctx, tp, contract, math.MaxUint, func(atHeight uint64, _ bool) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
SignedLastBlock: true, | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
.PHONY: all build build-linux test | ||
format: | ||
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./x/vendor*" -not -path "./contracts*" -not -path "./packages*" -not -path "./docs*"| xargs misspell -w | ||
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./x/vendor*" -not -path "./contracts*" -not -path "./packages*" -not -path "./docs*"| xargs gofumpt -w -s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! LGTM 👍