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

Deployment scripts rework to work locally. #2001

Merged
merged 8 commits into from
Aug 29, 2024

Conversation

StefanIliev545
Copy link
Contributor

@StefanIliev545 StefanIliev545 commented Jul 31, 2024

Why this change is needed

Deployment scripts are setup in a way that requires them to run in a docker container, launched from the hardhat launcher go file and wired with some specific env variables. This PR will change this.

What changes were made as part of this PR

Instead of only using the ENV variables, whenever they are NOT declared, the deployment scripts will poll the provider for the net_config endpoint, which in turn goes to obscuro_config under the gateway and returns the contract addresses that matter - Management, L1 Bus, L2 Bus. This way the deployment can figure out its dependencies from the network and continue forth. This allows the local deployments to work.

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Copy link
Collaborator

@tudor-malene tudor-malene left a comment

Choose a reason for hiding this comment

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

lgtm ( if it works)

}

func (api *NetAPI) Config(ctx context.Context) (*ConfigResponseJson, error) {
return UnauthenticatedTenRPCCall[ConfigResponseJson](ctx, api.we, &CacheCfg{CacheType: LongLiving}, "obscuro_config")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this called ten_config now?
returning a TenNetworkInfo object

You can try this out in the gateway test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just added this, the net_ namespace seemed most appropriate. It doesn't seem we currently have a ten one yet. Should I create one?

integration/simulation/devnetwork/config.go Show resolved Hide resolved
Copy link
Collaborator

@tudor-malene tudor-malene left a comment

Choose a reason for hiding this comment

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

lgtm

@StefanIliev545 StefanIliev545 merged commit 56f0ee1 into main Aug 29, 2024
3 checks passed
@StefanIliev545 StefanIliev545 deleted the siliev/deployment-scripts branch August 29, 2024 12:31
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