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

Point ERC20/ERC721 connector at deployed contract address #183

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

awrichar
Copy link
Contributor

@awrichar awrichar commented Apr 27, 2022

This includes multiple changes to how the docker-compose.yml file is handled:

  • docker-compose.yml has moved back up to the root directory of the stack (instead of being placed in "init" and "runtime" subfolders). A simple migration check will copy it out of "runtime" into the parent folder if needed.
  • The docker-compose.yml file will now be rewritten after first-time setup is complete. This allows it to pick up on new things such as deployed contracts. It is notated at the top with comments indicating it is a generated file and should not be edited.
  • For overriding Docker configuration values, users are now directed to edit a docker-compose.override.yml file, as supported by docker-compose.

The entire docker-compose.yml file will now be rewritten after first-time setup
is complete. This allows it to pick up on new things such as deployed contracts.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
As a convenience for editing the Docker config (which was previously supported by
editing the YAML by hand prior to having it copied to "runtime"), stub out a
docker-compose.override.yml file and direct the user to edit that instead.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@@ -34,4 +34,5 @@ require (
golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988 // indirect
golang.org/x/text v0.3.4 // indirect
gopkg.in/yaml.v2 v2.4.0
Copy link
Contributor

Choose a reason for hiding this comment

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

is v2 still needed then?

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 think a bunch of our dependencies pull it in.

@@ -31,6 +32,17 @@ type ERC20ERC721Provider struct {
Stack *types.Stack
}

type HexAddress string
Copy link
Contributor

Choose a reason for hiding this comment

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

🧙🏻

if err != nil {
return err
}
bytes = append(bytes, yamlBytes...)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this works 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea... wondered if there was a more efficient way?

@nguyer
Copy link
Contributor

nguyer commented Apr 27, 2022

Changes look good to me. I'm going to run E2E on these changes in a few variations as a quick smoke test.

@nguyer nguyer merged commit 6dabf12 into hyperledger:main Apr 27, 2022
@nguyer nguyer deleted the docker branch April 27, 2022 19:51
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.

3 participants