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 chain name as a blockchain alias #535

Merged
merged 1 commit into from
Mar 13, 2023
Merged

Conversation

boulix3
Copy link
Contributor

@boulix3 boulix3 commented Dec 24, 2022

Related to the issue #476
I chose to use the subnet name as the blockchain alias. I figured it was not useful to ask for another parameter since there can only have one chain per subnet with avalanche-cli.

@boulix3
Copy link
Contributor Author

boulix3 commented Dec 24, 2022

Here is an example with a subnet-evm.
You can make the same query with the alias or the blockchainId in the rpc url.

$ curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"eth_baseFee",
    "params" :[]
}' -H 'content-type:application/json;' http://127.0.0.1:9650/ext/bc/mysubnet/rpc
{"jsonrpc":"2.0","id":1,"result":"0x5d21dba00"}
$ curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"eth_baseFee",
    "params" :[]
}' -H 'content-type:application/json;' http://127.0.0.1:9650/ext/bc/2VqqvGNY71aVWm1V29HvNiv6TrdHvpg3kvceKVYP2PVrcVUe6A/rpc
{"jsonrpc":"2.0","id":1,"result":"0x5d21dba00"}

@boulix3
Copy link
Contributor Author

boulix3 commented Dec 24, 2022

Here is a screenshot of the subnet creation wizard output where we can see the ALIASURL column.
subnet-alias

@boulix3
Copy link
Contributor Author

boulix3 commented Jan 17, 2023

@dasconnor can you please check this out?

Copy link
Contributor

@dasconnor dasconnor left a comment

Choose a reason for hiding this comment

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

If you fix the failing tests, we can merge this

@boulix3
Copy link
Contributor Author

boulix3 commented Mar 13, 2023

If you fix the failing tests, we can merge this

It's fixed.

@dasconnor dasconnor linked an issue Mar 13, 2023 that may be closed by this pull request
Copy link
Contributor

@dasconnor dasconnor left a comment

Choose a reason for hiding this comment

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

LGTM Thanks for the patience!

@dasconnor
Copy link
Contributor

@boulix3 boulix3 reopened this Mar 13, 2023
@boulix3
Copy link
Contributor Author

boulix3 commented Mar 13, 2023

Sorry, one last ask, can you sign your commit? https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

No problem, I just squashed my old commits and signed the new commit.

@dasconnor dasconnor merged commit 3c04464 into ava-labs:main Mar 13, 2023
@dasconnor
Copy link
Contributor

All merged! It'll go out in the next release, probably later this week.

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.

Feature - Local network deploy - Add alias option
2 participants