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

Cast default RPC providers #2855

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Cast default RPC providers #2855

wants to merge 21 commits into from

Conversation

cptartur
Copy link
Member

@cptartur cptartur commented Jan 16, 2025

Closes #2708

Introduced changes

  • Added default RPC providers to sncast under --network flag
  • Breaking: renamed --network flag to --network-name in sncast account delete and sncast account import due to conflict with the added flag

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • Added changes to CHANGELOG.md

@cptartur cptartur changed the title Cast default urls mechanism Cast default RPC providers Jan 16, 2025
@cptartur cptartur force-pushed the 2708-cast-default-urs branch from 9429b14 to 820a442 Compare January 16, 2025 11:21
@cptartur cptartur force-pushed the 2708-cast-default-urs branch from 820a442 to 9fe7ffb Compare January 16, 2025 11:23
@cptartur cptartur force-pushed the 2708-cast-default-urs branch from 9fe7ffb to 1300d99 Compare January 16, 2025 11:26
@cptartur cptartur marked this pull request as ready for review January 16, 2025 11:28
Copy link
Collaborator

@kkawula kkawula left a comment

Choose a reason for hiding this comment

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

Wouldn't an alias for the default devnet URL be also convenient? Did you consider adding it?

docs/src/starknet/sncast-overview.md Outdated Show resolved Hide resolved
docs/src/starknet/account.md Outdated Show resolved Hide resolved
crates/sncast/src/helpers/rpc.rs Show resolved Hide resolved
crates/sncast/src/helpers/rpc.rs Outdated Show resolved Hide resolved
crates/sncast/src/helpers/rpc.rs Outdated Show resolved Hide resolved
crates/sncast/src/helpers/rpc.rs Outdated Show resolved Hide resolved
crates/sncast/src/helpers/rpc.rs Outdated Show resolved Hide resolved
crates/sncast/src/helpers/rpc.rs Outdated Show resolved Hide resolved
docs/src/appendix/sncast/account/create.md Outdated Show resolved Hide resolved
docs/src/appendix/sncast/account/delete.md Outdated Show resolved Hide resolved
docs/src/appendix/sncast/account/deploy.md Outdated Show resolved Hide resolved
crates/docs/src/snippet.rs Outdated Show resolved Hide resolved
FreeProvider::Blast => {
"https://starknet-mainnet.public.blastapi.io/rpc/v0_7".to_string()
}
FreeProvider::Voyager => "https://free-rpc.nethermind.io/mainnet-juno".to_string(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably version should be added here as well

Copy link
Member Author

@cptartur cptartur Jan 17, 2025

Choose a reason for hiding this comment

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

crates/sncast/src/lib.rs Outdated Show resolved Hide resolved
@@ -44,7 +44,7 @@ pub struct Create {
pub salt: Option<Felt>,

/// If passed, a profile with provided name and corresponding data will be created in snfoundry.toml
#[clap(long)]
#[clap(long, conflicts_with = "network")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

adding profile should be possible if the account is created using network alias

Copy link
Member Author

Choose a reason for hiding this comment

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

The profile stores the provider url in the Scarb.toml. If we allow this, we'll be adding URL of the free providers to users' Scarb.toml files which I though is not ideal.

docs/src/appendix/sncast/account/import.md Outdated Show resolved Hide resolved
docs/src/appendix/sncast/call.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
crates/sncast/src/starknet_commands/account/create.rs Outdated Show resolved Hide resolved
crates/sncast/src/starknet_commands/account/create.rs Outdated Show resolved Hide resolved
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.

Default URLs in cast
3 participants