Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chandn0 authored Oct 27, 2023
0 parents commit c139f59
Show file tree
Hide file tree
Showing 67 changed files with 8,005 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Generated with Catapulta.sh
PRIVATE_KEY=
CATAPULTA_API_KEY=
WETH_ADDRESS=0x5f207d42F869fd1c71d7f0f81a2A67Fc20FF7323
MANAGER_OWNER=0x01D8Be21A8c7407dfffa75553742e4FD2ba67e56
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI
on:
push:
branches:
- master
pull_request:

env:
FOUNDRY_PROFILE: ci

jobs:
run-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install deps
run: forge install

- name: Run tests
run: forge test
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cache/
out/
.env
broadcast/
.gas-snapshot
compressedArtifacts.zip
node_modules
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std

24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>
106 changes: 106 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# <h1 align="center"> Catapulta.sh Forge Template </h1>

Template repository for getting started quickly with [Catapulta.sh](https://catapulta.sh/docs) Chain Ops Suite for Foundry projects.

This repository contains the foundational Foundry project, including Catapula and Nouns protocol smart contracts, as well as deployment scripts.

Requirements

- [Git](https://gist.github.com/derhuerst/1b15ff4652a867391f03)
- [Node.js 18v](https://gist.github.com/d2s/372b5943bce17b964a79)
- [Foundry](https://book.getfoundry.sh/)

## Getting Started

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

## Deploy your first contract with Catapulta

1. Git clone this repository and enter to the repository directory:

```
git clone RepoLink
cd catapulta-forge-template
```

2. Install dependencies,

```
forge install
```
```
npm install
```

3. 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

```
npx catapulta wallet
# Output:
# Wallet address: 0x6B193d5604e09f1737E33cFc4B06fb3f2C7fC3CE
# Private key appended to your .env file.
```

4. Get funds for your address by using [List of Faucets for Public Testnets](https://www.buildbear.io/faucet)
5. Setup your `CATAPULTA_API_KEY` into your .env, generate one at [Catapulta dashboard](https://catapulta.sh)
6. Deploy the basic contract into Sepolia testnet with Catapulta

```
npx catapulta script scripts/DeployContracts.s.sol --network sepolia
```
```
# Output:
Catapulta.sh 🏏 Forge script deployment (0.1.36)
================================================
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/DeployContracts.s.sol --rpc-url "https://catapulta.sh/api/run/add/chain/11155111/5922a91ad2-57c8242c6-b37e-2af0e170f31a/gNd4vq8AqnRWhxwPJiMS" --broadcast --chain-id 11155111
.
Compiling 2 files with 0.8.19
Solc 0.8.19 finished in 623.73ms
Compiler run successful!
[...]
==========================
ONCHAIN EXECUTION COMPLETE & SUCCESSFUL.
Total Paid: 0.000852774003979612 ETH (284258 gas * avg 3.000000014 gwei)
βœ… 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
```

7. Check the deployment report at the Catapulta UI, and enjoy delegated Etherscan verification without any extra configs or API keys.

![basic 2](https://github.com/catapulta-sh/catapulta-forge-template/assets/11179847/9b2c830b-ab4e-4da6-b3c0-e515639cc47b)


## Development

This project uses [Foundry](https://getfoundry.sh) and [Catapulta](https://catapulta.sh/docs). See the [book](https://book.getfoundry.sh/getting-started/installation.html) for instructions on how to install and use Foundry.
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[profile.ci.fuzz]
runs = 10_000
1 change: 1 addition & 0 deletions lib/forge-std
Submodule forge-std added at 74cfb7
Loading

0 comments on commit c139f59

Please sign in to comment.