Skip to Content
Quick StartDeploy a Contract

Deploy a Contract on Shape

Deploy a smart contract to Shape Sepolia and verify it on the block explorer using Foundry.

Prerequisites

1. Create a Project

forge init my-shape-contract cd my-shape-contract

This scaffolds a project with a Counter.sol contract in src/.

2. Deploy

forge create src/Counter.sol:Counter \ --rpc-url https://sepolia.shape.network \ --private-key $PRIVATE_KEY

Save the Deployed to address from the output.

3. Verify on the Explorer

forge verify-contract <DEPLOYED_ADDRESS> src/Counter.sol:Counter \ --verifier blockscout \ --verifier-url https://explorer-sepolia.shape.network/api/

Replace <DEPLOYED_ADDRESS> with the address from step 2.

4. Deploy to Mainnet

When ready for mainnet, use the mainnet RPC and verify against the mainnet explorer:

forge create src/Counter.sol:Counter \ --rpc-url https://mainnet.shape.network \ --private-key $PRIVATE_KEY
forge verify-contract <DEPLOYED_ADDRESS> src/Counter.sol:Counter \ --verifier blockscout \ --verifier-url https://shapescan.xyz/api/

5. Register for Gasback

Gasback returns 80% of sequencer fees to contract owners. Register your deployed contract to start earning.

See Registering Your Contract for Gasback for the full walkthrough.

Next Steps

Last updated on