-
Notifications
You must be signed in to change notification settings - Fork 608
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
feat: implement some gamm related methods #3
Merged
Conversation
This file contains 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
Contributor
byeongsu-hong
commented
Oct 18, 2020
- joinPool
- exitPool
- createPool
* methods * CreatePool * JoinPool * ExitPool * errors * ErrPoolNotFound * ErrMathApprox * ErrLimitExceed * keys * PoolPrefix * GlobalPoolNumber * utils * Uint64ToBytes
ValarDragon
added a commit
that referenced
this pull request
May 3, 2021
sunnya97
pushed a commit
that referenced
this pull request
May 3, 2021
* In printing out a pool's deets, convert pool asset weight to decimal * Move marshalling code to its own file * Make PoolAsset Marshal differently directly, instead of indirectly * Change serialization of TotalWeight * Undo changes to how PoolAsset serializes to JSON, only change its YML serialization * Make only YML serialization only do truncation * Add LBP YML serialization test * Fix merge issue * Fix second merge conflict * Fix merge conflict #3 * Make start_time serialization deterministic
ethanfrey
added a commit
that referenced
this pull request
Mar 21, 2022
* Add osmo_reflect contract * Start test setup for custom queries * Fix tests * Complete initial query test * Rename bindings package to bindings * Test creating and querying 2 pools * Rename package to wasmbindings * Download wasm uses osmo-bindings version
ethanfrey
added a commit
that referenced
this pull request
Mar 31, 2022
* Rename wasmtest/ to wasm/ * Wasm queries and message types * Use uint64 for pool id * Use sdk.Int for Uint128 * Update / integrate README * Rename package to wasm * Add basic wasm types tests * Add query response types * Rename test packages to wasm as well * Custom query handler (#2) * Add custom querier for osmosis wasm queries * Move tests to own dir to avoid cyclic deps * Rename wasm keeper to (custom) query plugin * Use helpers to convert from sdk to wasm coins * Test custom queries with Osmo_reflect contract (#3) * Add osmo_reflect contract * Start test setup for custom queries * Fix tests * Complete initial query test * Rename bindings package to bindings * Test creating and querying 2 pools * Rename package to wasmbindings * Download wasm uses osmo-bindings version * Wasm custom messages (#5) * Add placeholder for message handler * Implement SwapMsg encoder * First table test for swapping message * Cover basic ExactIn cases * Test ExactOut swaps as well * Update error message Co-authored-by: Mauro Lacy <[email protected]> * Custom queries (#4) * Add spot price query * Rename keeper.go to queries.go * Add estimate price query * Remove needless ViewKeeper interface * GetSpotPrice refactor * EstimatePrice refactor * Better EstimatePrice error message * Add TODO for multi-hop swap price estimation * Add SpotPrice happy path integration test * Remove FIXMEs * Add json field names * Custom queries #2 (#6) * Update reflect contract to v0.3.0 * Adapt to bindings v0.3.0 * Add full denom query * Add happy path full denom integ test * Update to v0.3.0 proper (release) * Add JSON unmarshalling tests / formats (#7) * Refactor GetFullDenom Add validation helpers * Return string by value * Use contract addr instead of user addr in full denom test * Mint token message (#8) * Convert messenge encoder to message decorator * Implement and Test mint token message * Add TODOs for future refactoring * Update app/wasm/message_plugin.go Co-authored-by: Mauro Lacy <[email protected]> Co-authored-by: Mauro Lacy <[email protected]> * Estimate price tests (#9) * Fix: sender address format * Add estimate price integration tests * Remove FIXME * Improve estimate swap rate integ tests * Refactor estimate swap (#11) * Add type conversions * Refactor EstimatePrice to use same logic as SwapMsg * Multi hop support (#12) * Add exact in multi-hop tests * Tests pass multi-hop exact in * Add failing tests for ExactOut * FImplement ExactOut multi-hop swaps * Remove two outdated TODO comments * Remove obsolete comments * Custom queries unit tests (#10) * Add full denom unit tests * Add get pool state unit tests * Add get spot price unit tests * Add estimate price extra checks * Add estimate price unit tests * Add tests for zero and negative amounts * Fix: null spot price * Fix: Avoid panic on negative amounts Fix rebase errors / missing null checks * Fix rebase errors Add negative amount checks * Add subdenom verification (#13) * Add subdenom verification * Remove TODO * Custom messages unit tests (#14) * Fix: swap tokens error handling * Rename messenger to CustomMessenger * Add perform swap unit tests * Fix: perform swap null swap check * Add PerformMint function * Add perform mint unit tests * Fixes: perform mint null mint check Mint negative amount * Rename `EstimatePrice` to `EstimateSwap` (#15) * Fix: swap tokens error handling * Rename messenger to CustomMessenger * Add perform swap unit tests * Fix: perform swap null swap check * Add PerformMint function * Add perform mint unit tests * Fixes: perform mint null mint check Mint negative amount * Update test contract to v0.4.0 * Rename EstimatePrice binding to EstimateSwap * Rename EstimatePrice custom query to EstimateSwap * Adapt test to EstimatePrice to EstimateSwap renaming * Add multi-hop swap unit test (#16) * Add multi-hop swap unit test * Adjust input amount, min output Add slippage factor * Add more multi-hop unit tests * Improve estimates in multi-hop tests * Test that self-swap is disallowed Co-authored-by: Ethan Frey <[email protected]> * Update to new gamm apis * go fmt * Merge types/ into bindings/ * Fix compile errors after merge * Fix linting issue * Update osmo reflect to v0.5.0 * Removed all mint token messages and queries * Rename local variable Co-authored-by: Mauro Lacy <[email protected]> Co-authored-by: Mauro Lacy <[email protected]> Co-authored-by: Mauro Lacy <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.