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 Network ID to determine the correct faucet to use #710

Open
mvadari opened this issue May 30, 2024 · 2 comments · May be fixed by #715
Open

Use Network ID to determine the correct faucet to use #710

mvadari opened this issue May 30, 2024 · 2 comments · May be fixed by #715
Labels
enhancement New feature or request

Comments

@mvadari
Copy link
Collaborator

mvadari commented May 30, 2024

Code reference: https://github.com/XRPLF/xrpl-py/blob/main/xrpl/asyncio/wallet/wallet_generation.py

Currently, the faucet generation code guesses the correct faucet to use based on substrings in the URL. This isn't a very robust system. It would be better (and more robust) to use the Network ID.

@mvadari mvadari added the enhancement New feature or request label May 30, 2024
@ckeshava
Copy link
Collaborator

If a transaction includes the NetworkID field, then it fails on mainnet, testnet, devnet (any network whose network_id < 1025). Docs: https://xrpl.org/docs/references/protocol/transactions/common-fields/#networkid-field
image

How can we disambiguate between these networks with the network_id field?

@mvadari
Copy link
Collaborator Author

mvadari commented Jun 12, 2024

If a transaction includes the NetworkID field, then it fails on mainnet, testnet, devnet (any network whose network_id < 1025). How can we disambiguate between these networks with the network_id field?

All networks have a network ID, that's how you determine whether or not the NetworkID field needs to be included in the transaction. It's available in server_info.

ckeshava added a commit to ckeshava/xrpl-py that referenced this issue Jun 12, 2024
- move the utility function _get_network_id_and_build_version into client.py file for convinience
@mvadari mvadari linked a pull request Sep 17, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants