-
Notifications
You must be signed in to change notification settings - Fork 2
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: connect core backend #102
Conversation
6ac3624
to
a42af47
Compare
a42af47
to
f3bde6a
Compare
- to handle different scenarios better: - Keyed Ticks by ID are better for isolated context updates better - Sorted arrays allow sorting only once when needed
- when events come through with updates to certain ticks, indexes of all ticks will need to change
f3bde6a
to
695fd32
Compare
695fd32
to
e1df047
Compare
I'm thinking maybe we should remove |
- pools may be empty in one direction if there is no liquidity of one of the tokens available
This reverts commit cc08afe.
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.
Looks good
## [0.1.16](v0.1.15...v0.1.16) (2022-08-26) ### Features * connect core backend ([#102](#102)) ([7ca9e8c](7ca9e8c))
🎉 This PR is included in version 0.1.16 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
- This is the current used version since release v0.1.58: - https://github.com/duality-labs/duality-web-app/releases/tag/v0.1.58 - #173 - before that the FE was developed against an unreleased branch: - duality-labs/duality@0768dd5 - #102 - and before that the FE was developed against an Ethereum chain on a different unreleased prototype repository
* Add current version of the backend into the ReadMe file: - This is the current used version since release v0.1.58: - https://github.com/duality-labs/duality-web-app/releases/tag/v0.1.58 - #173 - before that the FE was developed against an unreleased branch: - duality-labs/duality@0768dd5 - #102 - and before that the FE was developed against an Ethereum chain on a different unreleased prototype repository * Generalize backend version note so it only needs to be updated once
This PR adds the backend of
duality
(commit duality-labs/duality@0768dd5) and removes the backend ofduality-cosmos-mock
.Changes:
src/lib/web3/generated/duality/duality.duality/*
) with new generated code (src/lib/web3/generated/duality/nicholasdotsol.duality.*/*
)src/lib/web3/api.ts
workapi.ts
would handle all of thosescripts/update-generated-files.sh
transforms each module'sindex.ts
file to meet the minimum requirements needed to call the autogenerated function correctly. In a way this is a step back, as some options are no longer exposed. Overall it could be considered a step forward: runningnpm run update
no longer requires you to manually updateapi.ts
to reflect other autogenerated changes.Tick
structures no longer haveprice0
/price1
values. This has been replaced withprice
as a decimal ratio (18 decimal place precision) ofprice1
/price0
.ticks
array structure in queries has been replaced with a nested structure: an array of Pair objects each with two arrays of Pool objects:poolsZeroToOne
andpoolsOneToZero
.sortedTicks
for the router) and aticks
TickMap structure to lookup individual ticks for individual tick updates (this could however be removed) as it doesn't yet serve a purpose.router
module does not accept a swap path by a frontend router, instead it acceptstokenA
,tokenB
,amountIn
, andminOut
as parameters and calculates the swap path by itself. Therefore the front-end router is treated as an estimator to calculate a reasonableminOut
value to pass to the router.NewDeposit
,NewWithdraw
, andNewSwap
events.Not implemented:
MsgSingleDeposit
andMsgSingleWithdraw
msg actions.totalShares
valuesFixes: