Starter kit
Start from a template
A small, working project for Gully Chain Testnet: contracts you can test and deploy in minutes, and a web app that reads and writes them. MIT licensed.
Private for now
The starter repo is private while we polish it. Email us your GitHub username and we add you. It will be public soon.
What is inside
| Path | What it is |
|---|---|
contracts/ | Foundry project: Counter, StarterToken (ERC-20 with permit, OpenZeppelin Contracts 5.7.0), tests, and script/Deploy.s.sol |
foundry.toml | solc 0.8.28 and an rpc_endpoints.gully_testnet entry for chain 485590 |
app/ | Vite + React + TypeScript + viem: connect a wallet, add or switch to Gully Chain Testnet, read the Counter, send an increment and open it on the explorer |
Five-minute quickstart
You need Foundry, Node.js 20 or newer and a browser wallet.
1. Clone
git clone https://github.com/gully-labs/gully-chain-starter.git
cd gully-chain-starter
git submodule update --init2. Get testnet ETH
Use the faucet (0.001 ETH per address per day) or the bridge from Arbitrum Sepolia. Deploying both starter contracts costs about 0.0003 ETH at today's gas price.
3. Build and test
cd contracts
forge build
forge test4. Deploy
Use an encrypted Foundry keystore so your key never sits in a file or your shell history. Leave out --broadcast to simulate first.
# once: store a testnet key encrypted
cast wallet import dev --interactive
forge script script/Deploy.s.sol --rpc-url gully_testnet --account dev --broadcastThe script also accepts a PRIVATE_KEY environment variable for throwaway testnet keys. Never commit a key.
5. Run the app
cd ../app
cp .env.example .env.local # set VITE_COUNTER_ADDRESS to your Counter
npm install
npm run devConnect your wallet, press Add / switch to Gully Chain Testnet, then Increment. Every transaction links to the explorer.
Using a Gully RPC key
The public RPC https://testnet-rpc.gullychain.xyz works without a key. For your own metered endpoint, use Gully RPC, which is in invite-only beta. Your endpoint looks like this:
https://rpc.gullyrpc.xyz/<project>/evm/485590export GULLY_RPC_URL=https://rpc.gullyrpc.xyz/<project>/evm/485590
forge script script/Deploy.s.sol --rpc-url gully_rpc --account dev --broadcastIn the app, set VITE_RPC_URL in app/.env.local. Anything prefixed VITE_ ends up in the browser bundle, so never put a private key there.
Check the connection
cast block-number --rpc-url https://testnet-rpc.gullychain.xyz
cast chain-id --rpc-url https://testnet-rpc.gullychain.xyz # 485590More in the docs quickstart.
