Skip to content

Latest commit

 

History

History
108 lines (66 loc) · 3.79 KB

README.md

File metadata and controls

108 lines (66 loc) · 3.79 KB

Catapulta.sh Foundry Template

Template repository for getting started quickly with Catapulta.sh smart contracts development platform for Foundry projects.

Getting Started - Dev Container

Get onboarded faster using Docker with a developer environment ready to build and deploy Solidity smart contracts:

  • Click here to open a Solidity environment in Cursor:

    • Dev Container - Cursor
  • Click here to open a Solidity environment in VSCode:

    • Dev Container - Vscode

Once your IDE loads the Dev Container, proceed to Deploy your first contract with Catapulta section.

Getting Started - Git

Requirements

Click "Use this template" on GitHub to create a new repository with this repo as the initial state.

You can also git clone this repository and enter to the repository directory:

git clone https://github.com/catapulta-sh/catapulta-foundry-template
cd catapulta-foundry-template

Deploy your first contract with Catapulta

  1. Install forge dependencies
forge install
  1. Install catapulta via npm
npm i -g catapulta
  1. Generate a new private key with Catapulta, is stored offline in your .env, or add your own as PRIVATE_KEY in the .env file stored at the root of the project
catapulta wallet

# Output:
# Wallet address: 0x6B193d5604e09f1737E33cFc4B06fb3f2C7fC3CE
# Private key appended to your .env file.
  1. Setup your CATAPULTA_API_KEY into your .env, generate one free key at Catapulta
  2. Deploy the basic contract into Sepolia testnet with Catapulta, using --sponsor flag to request gas. This skips the need of faucets.
catapulta script script/Deploy.s.sol --network baseSepolia --sponsor
# Output:
Catapulta.sh 🏏 Forge script deployment (0.4.1)
================================================
Project name: Ghost Deployments
Project URL: https://catapulta.sh/project/6116272a59b37a3a4a7afb55
Deployment UUID: 592a91ad-57c8-42c6-b37e-2af0e170f31a

📀 Building artifacts...

🗜  Compressing artifacts...

📤 Uploading artifacts to the Catapulta DB...

✅ Artifacts uploaded successfully.

📡 Broadcasting deployments to Catapulta Gateway RPC:

📜 Running Foundry script: forge script scripts/DeployBasic.sol --broadcast

[...]

✅ Deployment successfully broadcasted

- Etherscan verification request sent. Check the dashboard for keeping track of verifications. If contracts are not verified in 10 minutes, contact support at Discord.

💾 Artifacts stored at:
- https://users-artifacts.s3.eu-west-1.amazonaws.com/595a911d-57c8-42c6-b37e-2af0e170f31a-deployment-artifacts/artifacts.zip

📸 Check your deployment report at:
 - https://catapulta.sh/project/6416272a59b37a3a4a7afb55/op/595a91ad-57c8-42c6-b37e-2af0e170f31a
  1. Check the deployment report at the Catapulta UI, and enjoy automated Etherscan verification without any extra configs or API keys.

Development

This project uses Foundry and Catapulta.