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

Use the same network and contract resolution for all of the bindings generation logic #1733

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Nov 18, 2024

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.

@leighmcculloch leighmcculloch changed the base branch from main to i1512 November 18, 2024 03:59
Base automatically changed from i1512 to main November 18, 2024 17:49
@fnando fnando marked this pull request as ready for review November 18, 2024 17:53
@fnando fnando enabled auto-merge (squash) November 18, 2024 17:54
@fnando fnando merged commit 90db678 into main Nov 18, 2024
28 of 30 checks passed
@fnando fnando deleted the i1512-followup branch November 18, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants