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

feat: Use addresses from mangrove-deployments and context-addresses packages #1579

Merged
merged 10 commits into from
Nov 15, 2023

Conversation

espendk
Copy link
Collaborator

@espendk espendk commented Nov 8, 2023

This PR is a first improvement to the deployment process: It moves context addresses out of this repo and instead reads addresses from these new repos/npm packages:

See the companion PR's in mangrove-core and mangrove-strats for more details:

Brief solution overview

The configuration loading logic has been changed to load addresses from the above npm packages instead of from mangrove-core, mangrove-strats, and the addresses.json file.

When querying mangrove-deployments for deployment addresses, one must specify the contract version and whether the deployment is of a "released" version.

configuration.ts queries for contract versions matching patches of the package versions listed in package.json for mangrove-core and mangrove-strats, regardless of whether they are released. Later, we may wish to provide a way for clients to control this behaviour.

…kage

This is a first version that simply loads addresses from the latest deployments regardless of version or release status.
Query mangrove-deployments for deployments matching the installed mangrove-core and mangrove-strats packages or patches of these.
This is a first version that only loads default tokens and associates them with the token symbol.
@espendk espendk force-pushed the feat/move-addresses-to-mangrove-deployments branch from 9ec67e8 to b691cff Compare November 10, 2023 15:45
@espendk espendk changed the title Use deployed addresses from mangrove-deployments package Use addresses from mangrove-deployments and context-addresses packages Nov 10, 2023
Instead of the ambiguous token symbols use the instance ID's assigned by context-addresses.
This makes all token instances available and enforces clarity on which ERC20 instance one is interacting with.

To ease the transition, the default instances are still available using just the token symbol as identifier.
However, use of this is deprecated.
@espendk espendk force-pushed the feat/move-addresses-to-mangrove-deployments branch from a48ac5b to a4d96f5 Compare November 11, 2023 09:03
@espendk espendk force-pushed the feat/move-addresses-to-mangrove-deployments branch from f8934f0 to be7e313 Compare November 13, 2023 16:33
@espendk espendk force-pushed the feat/move-addresses-to-mangrove-deployments branch from 55a4554 to 104103f Compare November 14, 2023 16:55
@espendk espendk marked this pull request as ready for review November 15, 2023 09:33
@espendk espendk requested a review from dontrolle November 15, 2023 09:33
src/configuration.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@dontrolle dontrolle left a comment

Choose a reason for hiding this comment

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

🌴

@espendk espendk changed the title Use addresses from mangrove-deployments and context-addresses packages feat: Use addresses from mangrove-deployments and context-addresses packages Nov 15, 2023
@espendk espendk enabled auto-merge (squash) November 15, 2023 10:59
@espendk espendk merged commit 887a61c into develop Nov 15, 2023
2 checks passed
@espendk espendk deleted the feat/move-addresses-to-mangrove-deployments branch November 15, 2023 11:00
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.

2 participants