-
Notifications
You must be signed in to change notification settings - Fork 60
Market Module 2.0 Implementation #664
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
Open
StrathCole
wants to merge
62
commits into
classic-terra:main
Choose a base branch
from
Market-Module-2-0:feat/mm-implementation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
eeb62e5
- market module rework
StrathCole 3aefa20
- whitespace
StrathCole 513e66d
Merge branch 'main' into feat/mm-implementation
StrathCole ae860d8
- cleaning
StrathCole 86f6584
Merge branch 'main' into mm-main
StrathCole 9052c82
Merge branch 'mm-main' into feat/mm-implementation
StrathCole 9f484de
- add meta denom to whitelist on upgrade and in ballot
StrathCole f484578
- governance parameter for market swap fee distribution (Burn/CP/OP)
StrathCole de031c7
WIP: sdk 0.50
StrathCole a4bbfcd
temp file
StrathCole 2d32c0d
WIP migration to SDK 0.50
StrathCole 1705f50
fi
StrathCole 6a63c31
- several fixes
StrathCole c322844
- fix params space
StrathCole 442608b
fix missing code from migration
StrathCole 478c9df
- readd modules to simulation modules
StrathCole 18cebf6
update e2e to account for reverse charge tax
StrathCole 0be2e4f
fix further reverse charge issues in e2e
StrathCole 45182dd
fix further e2e reverse charge calculations
StrathCole 8784d6e
fix further e2e reverse charge
StrathCole 3d9c6d6
fix receive amount in e2e
StrathCole acae70a
- update ictests
StrathCole acf4ffb
fix dependencies ictest
StrathCole cc3f51e
fix dependencies in ictest
StrathCole ca54c7a
fix in gas amount, docker lint and tax handling
StrathCole 1564a2b
fix test assert in ibc transfer ictest
StrathCole 98de403
- adjust ic test for gas/tax handling
StrathCole 91134fd
- remove expedited_voting_period from start-node script (not yet avai…
StrathCole 9188bf5
- add comment to clarify temporary folder usage
StrathCole 6c13869
change upgrade height in test
StrathCole ffb9bcf
update to wasmvm 3, wasmd 0.61, cosmos-sdk 0.53, ibc v10
StrathCole b6ec263
- update dependencies
StrathCole 6e62d22
fix ibc client
StrathCole 0d9da1d
rename file to correct name
StrathCole 699bd44
ics validator test fix
StrathCole d3a71a6
- clean up ictest for validators
StrathCole 1cabdf4
- add common flags to autocli
StrathCole d332866
pfm and ibcv2 tests
StrathCole 06483ff
Merge pull request #56 from StrathCole/strath/next-gen-plus
kien6034 ae1f6ea
bump wasmd
hoank101 cabc2fb
fix createValMsg
hoank101 de7f29a
refactor and update github action (#67)
hoank101 92f7855
fix ci (#70)
TropicalDog17 9dc72a8
- several fixes
StrathCole 4c40df8
Merge branch 'main' of https://github.com/orbitorg/core into sdk53-ibcv2
hoank101 339eaae
update query handler
hoank101 1e2cf9e
fix lint
hoank101 5102ffd
Merge branch 'sdk53-ibcv2' into feat/mm-implementation
StrathCole c981034
- adjust MM2.0 code to sdk 0.53
StrathCole a6f79bb
- tidy
StrathCole 7715855
Merge branch 'main' into feat/mm-implementation
StrathCole 0c1f11b
Merge branch 'main' into feat/mm-implementation
StrathCole 59ee2e9
- linting
StrathCole 97f2d07
- change version to v4
StrathCole 15b019c
change version to v4
StrathCole 5d20148
Merge branch 'main' into feat/mm-implementation
StrathCole 8707605
- fixes from merge
StrathCole f6abb0f
Merge branch 'main' into feat/mm-implementation
StrathCole f6ec19d
Merge branch 'main' into feat/mm-implementation
StrathCole 20ca482
fix fee test to expect panic
StrathCole 846cd1a
lint
StrathCole 8afe857
fixes from copilot review
StrathCole File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package v15 | ||
|
|
||
| import ( | ||
| store "cosmossdk.io/store/types" | ||
| "github.com/classic-terra/core/v4/app/upgrades" | ||
| ) | ||
|
|
||
| const UpgradeName = "v15" | ||
|
|
||
| var Upgrade = upgrades.Upgrade{ | ||
| UpgradeName: UpgradeName, | ||
| CreateUpgradeHandler: CreateV15UpgradeHandler, | ||
| StoreUpgrades: store.StoreUpgrades{}, // no store upgrades | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| package v15 | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| sdkmath "cosmossdk.io/math" | ||
| upgradetypes "cosmossdk.io/x/upgrade/types" | ||
| "github.com/classic-terra/core/v4/app/keepers" | ||
| "github.com/classic-terra/core/v4/app/upgrades" | ||
| oracletypes "github.com/classic-terra/core/v4/x/oracle/types" | ||
| sdk "github.com/cosmos/cosmos-sdk/types" | ||
| "github.com/cosmos/cosmos-sdk/types/module" | ||
| ) | ||
|
|
||
| func CreateV15UpgradeHandler( | ||
| mm *module.Manager, | ||
| cfg module.Configurator, | ||
| _ upgrades.BaseAppParamManager, | ||
| k *keepers.AppKeepers, | ||
| ) upgradetypes.UpgradeHandler { | ||
| return func(ctx context.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { | ||
| sdkCtx := sdk.UnwrapSDKContext(ctx) | ||
|
|
||
| // Initialize/ensure allowed swap denoms for market: restrict to uusd by default. | ||
| k.MarketKeeper.SetAllowedSwapDenoms([]string{"uusd"}) | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should initialized TaxRedirectRate k.TreasuryKeeper.SetTaxRedirectRate(sdkCtx, sdkmath.LegacyZeroDec()), |
||
| // Ensure UST meta denom (oracle-only) is present in oracle vote targets. | ||
| // Existing chains won't pick up DefaultParams changes automatically, so patch params here. | ||
| params := k.OracleKeeper.GetParams(sdkCtx) | ||
| hasMeta := false | ||
| for _, d := range params.Whitelist { | ||
| if d.Name == oracletypes.MetaUSDDenom { | ||
| hasMeta = true | ||
| break | ||
| } | ||
| } | ||
| if !hasMeta { | ||
| params.Whitelist = append(params.Whitelist, oracletypes.Denom{ | ||
| Name: oracletypes.MetaUSDDenom, | ||
| TobinTax: sdkmath.LegacyZeroDec(), | ||
| }) | ||
| k.OracleKeeper.SetParams(sdkCtx, params) | ||
| // Set TobinTax immediately so it becomes a vote target without waiting a full period | ||
| k.OracleKeeper.SetTobinTax(sdkCtx, oracletypes.MetaUSDDenom, sdkmath.LegacyZeroDec()) | ||
| } | ||
|
|
||
| return mm.RunMigrations(ctx, cfg, fromVM) | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
maccPerms registers AccumulatorModuleName for new chains (via InitChainer), but for an existing chain upgrading, the account doesn't exist in the auth store. The upgrade handler must create it