This example sends an invoke transaction with calldata. It uses an ERC20 token, but it can be any smart contract.
Steps:
- Rename the ".env.template" file located at the root of the "examples" folder to ".env"
- Uncomment, and assign your Sepolia testnet endpoint to the
RPC_PROVIDER_URL
variable in the ".env" file - Uncomment, and assign your account address to the
ACCOUNT_ADDRESS
variable in the ".env" file (make sure to have a few ETH in it) - Uncomment, and assign your starknet public key to the
PUBLIC_KEY
variable in the ".env" file - Uncomment, and assign your private key to the
PRIVATE_KEY
variable in the ".env" file - Make sure you are in the "simpleInvoke" directory
- Execute
go run main.go
The transaction hash and status will be returned at the end of the execution.