Skip to content

Instantly share code, notes, and snippets.

@gabsn
Last active December 20, 2022 17:53
Show Gist options
  • Save gabsn/06a2d1dccb5573414249ef347b159a6e to your computer and use it in GitHub Desktop.
Save gabsn/06a2d1dccb5573414249ef347b159a6e to your computer and use it in GitHub Desktop.

Starknet Cheatsheet

Create devnet account

export STARKNET_WALLET=starkware.starknet.wallets.open_zeppelin.OpenZeppelinAccount
starknet --gateway_url http://127.0.0.1:5050 new_account --account toto
starknet --gateway_url http://127.0.0.1:5050 deploy_account --account toto

Debug failing transaction

https://docs.starknet.io/docs/CLI/commands/#starknet-tx_status

starknet tx_status \
  --hash 0x2d83ad2a8d0d0a33d0e12382732582f6282685c936199ce8d1853017bd3c053 \
  --contract contracts/erc20.compiled.json \
  --error_message
@gabsn
Copy link
Author

gabsn commented Dec 20, 2022

Get class by hash

starknet --gateway_url http://127.0.0.1:5050 get_class_by_hash --class 0x0149ecefd279e3ed3b39e727b48e33924c3fa7c3e88eab2cdbd57b85d61dc5b3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment