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

Sncast do not work with correct configure of snfoundry.toml #1984

Closed
1 task done
Xor0v0 opened this issue Apr 6, 2024 · 2 comments
Closed
1 task done

Sncast do not work with correct configure of snfoundry.toml #1984

Xor0v0 opened this issue Apr 6, 2024 · 2 comments
Assignees
Labels
bug Something isn't working sncast

Comments

@Xor0v0
Copy link

Xor0v0 commented Apr 6, 2024

Which component is your bug related to?

sncast

Foundry Version

v0.17.0~v0.21.0

What operating system are you using?

MacOS

What system architecture are you using?

arm

What happened

I am trying to use sncast but it did not work even with the same configure in the starknet foundry book.

The following is my snfoundry.toml configure information:

[sncast.default]
account = "Xor0v0"
accounts-file = "~/my-starknet-accounts/account.json"
url = "https://rpc.nethermind.io/sepolia-juno?apikey=rpc_key"
# url = "https://starknet-mainnet.infura.io/v3/rpc_key"
# url = "https://starknet-mainnet.g.alchemy.com/v2/rpc_key"

When I try to call a contract function with following command:

sncast call \
--contract-address 0x01a730fb914b6e79e6e05af2996b423306652c1c2d5036a455f3979d20161c8f \
--function get_owner \
--block-id latest

It return : Error: RPC url not passed nor found in snfoundry.toml. But instead I use command:

sncast -u https://rpc.nethermind.io/sepolia-juno?apikey=rpc_key call \
--contract-address 0x01a730fb914b6e79e6e05af2996b423306652c1c2d5036a455f3979d20161c8f \
--function get_owner \
--block-id latest

it return the expected result: command: call response: [0x5b54a13bfc88......cbd4d6938e907]

As you can see, I have tried many solutions: different networks (mainnet and sepolia), different rpc(nethermind, infura, alchemy) endpoints and even snfoundry version from 0.17.0 to 0.21.0 (latest). They all get the bad response.

Trace

Error: RPC url not passed nor found in snfoundry.toml

Is there an existing issue for this?

  • I have searched the existing issues and verified no issue exits for this problem.
@Xor0v0 Xor0v0 added the bug Something isn't working label Apr 6, 2024
@github-actions github-actions bot added the new label Apr 6, 2024
@THenry14 THenry14 self-assigned this Apr 8, 2024
@THenry14 THenry14 added sncast and removed new labels Apr 8, 2024
@THenry14
Copy link
Contributor

Hi, @Xor0v0 , sadly I cannot reproduce the issue you've described. Can you tell me something more about your setup?
My guess is maybe snfoundry.toml is not present in the current/parent directory, and because of that the url cannot be properly determined? Can you show me your directory layout and exact commands (with an information about current working directory)? Alternatively, are you able to provide some repro code I could use to try to debug it further locally on my machine? thanks!

@THenry14
Copy link
Contributor

Closing an issue since it seems it might have been an user error. If you think this is not the case, and are able to provide repro code, feel free to re-open and provide the necessary info to reproduce the error. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sncast
Projects
Archived in project
Development

No branches or pull requests

2 participants