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

Ability to configure the smart contracts addresses to be used #166

Open
blesenechal opened this issue Oct 21, 2021 · 0 comments
Open

Ability to configure the smart contracts addresses to be used #166

blesenechal opened this issue Oct 21, 2021 · 0 comments
Labels
enhancement New feature or request libs

Comments

@blesenechal
Copy link

blesenechal commented Oct 21, 2021

Description

We would like to deploy the smart contracts several times (for example on dev, test, preprod and prod platforms).

This means having the same ABI, but with different addresses.

This is configured by the src/config.ts file, which is generated from the ABI and addresses in alastria-identity repo content when alastria-identity-lib is installed.

As this file is generated upon installation, there is currently no 'easy' way to configure the smart contracts addresses to be used.

Currently, the only way to achieve this is to have one branch of the alastria-identity repo per smart contracts deployment, containing the addresses specific to this deployment and then used by the alastria-identity-lib to generate the config file.

Business need

We would like to be able to set smart contracts addresses dynamically in the Alastria Identity Library.

Possible solutions

A possible way that we are thinking about is to override the smart contracts addresses using environments variables.

This could be made optional (if the environments variables are not set, the value from the alastria-identity is still used), so it would be a non-breaking change with no impact on existing users.

We will try to provide a pull request in the next days.

@VictorNS69 VictorNS69 added enhancement New feature or request libs labels Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request libs
Projects
None yet
Development

No branches or pull requests

2 participants