We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Forge
forge 0.2.0 (5b7e4cb 2023-12-02T00:23:06.838679000Z)
No response
macOS (Apple Silicon)
when trying to write a 'setter function' like,
_function setNumber(int _newNumber) public { number = newNumber; }
with 'number' being a contract variable (private or public does not matter, also variable type does not matter).
Forge test, forg build etc. work.
However wenn running it against a blockchain (tried Sepolia, Goerli, Anvil) with the following command
cast send $ConAddress "setNumber(5)" --private-key $PrivKey --rpc-url $RPC_URL
I get the following error message
invalid AbiItem keyword: "setNumber", expected one of "constructor", "function", "error", or "event"
Thanks
The text was updated successfully, but these errors were encountered:
"setNumber(5)" is not a valid function signature; it's "setNumber(int)", with an argument of 5, so cast send address "setNumber(uint256)" 5 ...
cast send address "setNumber(uint256)" 5 ...
Sorry, something went wrong.
Thanks a lot @DaniPopes
No branches or pull requests
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (5b7e4cb 2023-12-02T00:23:06.838679000Z)
What command(s) is the bug in?
No response
Operating System
macOS (Apple Silicon)
Describe the bug
when trying to write a 'setter function' like,
_function setNumber(int _newNumber) public {
number = newNumber;
}
with 'number' being a contract variable (private or public does not matter, also variable type does not matter).
Forge test, forg build etc. work.
However wenn running it against a blockchain (tried Sepolia, Goerli, Anvil) with the following command
cast send $ConAddress "setNumber(5)" --private-key $PrivKey --rpc-url $RPC_URL
I get the following error message
invalid AbiItem keyword: "setNumber", expected one of "constructor", "function", "error", or "event"
Thanks
The text was updated successfully, but these errors were encountered: