NethermindEth / starknet.go

Golang Library for StarkNet/Cairo
MIT License
145 stars 105 forks source link

Upgrade examples to use Sepolia network #579

Closed thiagodeev closed 3 months ago

thiagodeev commented 3 months ago

This PR updates all the examples inside the "examples" folder to use starknet Sepolia testnet. Besides adjustments in all codebase, the major modifications are the following:

  1. Removed all go.mod and go.work from all examples because it's not necessary to have a Go module configure to have a main package and function.
  2. Removed all .env.template files from all examples. An internal package called setup was created to centralize all environment variables loaded in all examples in only one place. There's now only one .env.template, located at the root of the "examples" folder.
  3. deployAccountUDC was renamed to deployContractUDC. It now deploys an ERC20 token as an example.
  4. The estimateFee example was removed. The deployAccount example now includes an estimate fee code snippet.
  5. The getTokenBalance example was removed. The simpleCall example now shows how to get the balance and decimals from an ERC20 contract.
  6. Added a README at the root of the "examples" folder to point out some questions answered by the examples.