-
Notifications
You must be signed in to change notification settings - Fork 54
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
Conversation
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 |
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.
is v2 still needed then?
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.
I think a bunch of our dependencies pull it in.
@@ -31,6 +32,17 @@ type ERC20ERC721Provider struct { | |||
Stack *types.Stack | |||
} | |||
|
|||
type HexAddress string |
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.
🧙🏻
if err != nil { | ||
return err | ||
} | ||
bytes = append(bytes, yamlBytes...) |
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.
I guess this works 🙂
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.
Yea... wondered if there was a more efficient way?
Changes look good to me. I'm going to run E2E on these changes in a few variations as a quick smoke test. |
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.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.docker-compose.override.yml
file, as supported by docker-compose.