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

Upgrade contracts to v0.4.0.alpha.1 #49

Merged
merged 5 commits into from
Jul 7, 2023
Merged

Upgrade contracts to v0.4.0.alpha.1 #49

merged 5 commits into from
Jul 7, 2023

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Jun 28, 2023

  • Bump contracts
  • More tests

@alpe alpe changed the base branch from main to wip June 28, 2023 14:39
Base automatically changed from wip to main June 28, 2023 16:15
@ethanfrey
Copy link
Collaborator

Great you started on this. Two notes (and please check with Mauro on slack to align e2e tests with contract design).

  1. No ics20 channel is used. See https://github.com/osmosis-labs/mesh-security/blob/main/docs/ibc/Rewards.md#selected-implementation
  2. Great to query that rewards show up on the provider side. When they are withdrawn, you must provide a consumer side address and the tokens will be released to that address (via the same control channel).

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

@alpe alpe marked this pull request as ready for review July 6, 2023 10:43
@alpe alpe requested a review from pinosu July 6, 2023 10:43
@@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

SignedLastBlock: true,
}
}

Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@pinosu pinosu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! LGTM 👍

@alpe alpe merged commit 2a77fc6 into main Jul 7, 2023
3 checks passed
@alpe alpe deleted the contracts_040a0 branch July 7, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants