Use the same network and contract resolution for all of the bindings generation logic #1733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Use a single network and contract resolution for all of the bindings generation logic.
Why
There were two network resolutions being performed in the typescript bindings generation. It doesn't make sense to potentially select two different networks, and even if there couldn't be two selected due to some quality of them, it doesn't bring much value to write the logic two ways inside the same function.
There are also two resolutions for the contract ID. When downloading the contract spec the command resolves the alias to an address, but then when filling out the placeholders in the generated files the command goes back to simply outputting the alias name. We shouldn't leak alias names into generated code. Aliases are potentially personal to one developers computer.
This change also includes what was going to be committed in a separate PR, changing the default network from futurenet to testnet. It was too difficult to keep the change separate:
These changes are largely intended to be a no-op, other than the default change.
Merging
This change is a draft until #1731 is merged. Once #1731 is merged, this change can be merged to
main
.