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

starknet-invoke cli command not updating storage in contract #230

Closed
Nathan-SL opened this issue Oct 11, 2022 · 4 comments
Closed

starknet-invoke cli command not updating storage in contract #230

Nathan-SL opened this issue Oct 11, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Nathan-SL
Copy link
Contributor

starknet-invoke has no effect on storgae (balance) after a successful transaction.

set -e
NETWORK=alpha-goerli
INITIAL_VALUE=10

output=$(npx hardhat starknet-deploy starknet-artifacts/contracts/contract.cairo/ --starknet-network "$NETWORK" --inputs "$INITIAL_VALUE" --wait)
tail=${output#*$'\n'Contract address: }
address=${tail%%$'\n'*}
echo Contract address: "$address"
npx hardhat starknet-invoke --starknet-network "$NETWORK" --contract contract --function increase_balance --address "$address"  --inputs "10 20" --wallet OpenZeppelin
npx hardhat starknet-call --starknet-network "$NETWORK" --contract contract --function get_balance --address "$address"

starknet-call should return 40 but returns 10

@Nathan-SL Nathan-SL added the bug Something isn't working label Oct 11, 2022
@ivpavici
Copy link
Contributor

@FabijanC
Copy link
Collaborator

starkware-libs/cairo-lang#101

I took a look at this linked issue, I think it's explained by OpenZeppelin/cairo-contracts#471

@FabijanC
Copy link
Collaborator

What was the conclusion about this? Was invoking attempted with an account that was not deployed/funded? If so, it's not really an issue with the plugin. If someone can confirm, the issue can be closed. Otherwise further investigation needs to be done.

@Nathan-SL
Copy link
Contributor Author

Yes, the account was not funded.

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

No branches or pull requests

3 participants