Skip to content

Commit

Permalink
migrated se-2 - 5/18/24
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHomanics committed May 18, 2024
1 parent 6e43232 commit a117702
Show file tree
Hide file tree
Showing 136 changed files with 5,356 additions and 9,259 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
os: [ubuntu-latest]
node: [lts/*]


steps:
- name: Checkout
uses: actions/checkout@master
Expand All @@ -26,26 +25,19 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache : yarn
cache: yarn

- name: Install dependencies
run: yarn install --immutable

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

- name: Run foundry node, deploy contracts (& generate contracts typescript output)
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
- name: Run hardhat node, deploy contracts (& generate contracts typescript output)
run: yarn chain & yarn deploy
id: build

- name: Run tests
run: yarn test -vvv

- name: Run nextjs lint
run: yarn next:lint --max-warnings=0

- name: Check typings on nextjs
run: yarn next:check-types


- name: Run hardhat lint
run: yarn hardhat:lint --max-warnings=0
18 changes: 14 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# dependencies
node_modules

# dependencies, yarn, etc
# yarn / eslint
# yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# eslint
.eslintcache
.vscode/**
.DS_Store

# misc
.DS_Store

# IDE
.vscode
.idea

# cli
dist
65 changes: 65 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# --- Monorepo files ---

.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.eslintcache
.DS_Store
.vscode
.idea
.vercel

# --- Next.js files ---

# dependencies
packages/nextjs/node_modules
packages/nextjs/.pnp
packages/nextjs/.pnp.js

# testing
packages/nextjs/coverage

# next.js
packages/nextjs/.next/
packages/nextjs/out/

# production
packages/nextjs/build

# misc
packages/nextjs/.DS_Store
packages/nextjs/*.pem

# debug
packages/nextjs/npm-debug.log*
packages/nextjs/yarn-debug.log*
packages/nextjs/yarn-error.log*
packages/nextjs/.pnpm-debug.log*

# local env files
packages/nextjs/.env.local
packages/nextjs/.env.development.local
packages/nextjs/.env.test.local
packages/nextjs/.env.production.local

# typescript
packages/nextjs/*.tsbuildinfo

# --- Foundry files ---

# Compiler files
packages/foundry/cache
packages/foundry/out

# Ignores development broadcast logs
packages/foundry/broadcast

# Docs
packages/foundry/docs

# Dotenv file
packages/foundry/.env
packages/foundry/localhost.json
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ On the home page, you should see many colorful and variable cards and widgets wh

By navigating to the `Debug Contracts` page, you can interact with and view the properties of your deployed Reputation System!


<!-- # 🏗 Scaffold-ETH 2
🧪 An open-source, up-to-date toolkit for building decentralized applications (dapps) on the Ethereum blockchain. It's designed to make it easier for developers to create and deploy smart contracts and build user interfaces that interact with those contracts.
Expand Down Expand Up @@ -388,4 +387,4 @@ We welcome contributions to Scaffold-ETH 2!
Please see [CONTRIBUTING.MD](https://github.com/scaffold-eth/scaffold-eth-2/blob/main/CONTRIBUTING.md) for more information and guidelines for contributing to Scaffold-ETH 2.
Valid `CreateToken` parameters in debug window: `{ "maxMintAmountPerTx": "0x16", "isTradeable": true }` -->
Valid `CreateToken` parameters in debug window: `{ "maxMintAmountPerTx": "0x16", "isTradeable": true }` -->
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@
"compile": "yarn workspace @se-2/foundry compile",
"deploy": "yarn workspace @se-2/foundry deploy",
"deploy:verify": "yarn workspace @se-2/foundry deploy:verify",
"flatten": "yarn workspace @se-2/foundry flatten",
"fork": "yarn workspace @se-2/foundry fork",
"format": "yarn next:format && yarn foundry:format",
"foundry:format": "yarn workspace @se-2/foundry format",
"foundry:lint": "yarn workspace @se-2/foundry lint",
"foundry:test": "yarn workspace @se-2/foundry test",
"foundry:snapshot": "yarn workspace @se-2/foundry snapshot",
"generate": "yarn workspace @se-2/foundry generate",
"postinstall": "husky install",
"next:build": "yarn workspace @se-2/nextjs build",
"next:check-types": "yarn workspace @se-2/nextjs check-types",
"next:format": "yarn workspace @se-2/nextjs format",
"next:lint": "yarn workspace @se-2/nextjs lint",
"next:serve": "yarn workspace @se-2/nextjs serve",
"precommit": "lint-staged",
"prepare": "install-self-peers -- --ignore-scripts",
"start": "yarn workspace @se-2/nextjs dev",
"snapshot": "yarn foundry:snapshot",
"test": "yarn foundry:test",
"vercel": "yarn workspace @se-2/nextjs vercel",
"vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo",
Expand All @@ -36,7 +39,12 @@
},
"devDependencies": {
"husky": "~8.0.3",
"lint-staged": "~13.2.2"
"lint-staged": "~13.2.2",
"next": "~14.0.4",
"vercel": "~32.4.1"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"engines": {
"node": ">=18.17.0"
}
}
Binary file added packages/foundry/._.prettier.json
Binary file not shown.
6 changes: 6 additions & 0 deletions packages/foundry/.prettier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"arrowParens": "avoid",
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "all"
}

This file was deleted.

1,060 changes: 0 additions & 1,060 deletions packages/foundry/broadcast/DeployDemo.s.sol/11155111/run-1708665001.json

This file was deleted.

1,060 changes: 0 additions & 1,060 deletions packages/foundry/broadcast/DeployDemo.s.sol/11155111/run-latest.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/foundry/deployments/11155111.json

This file was deleted.

13 changes: 9 additions & 4 deletions packages/foundry/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ localhost = "http://127.0.0.1:8545"

mainnet = "https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_API_KEY}"
sepolia = "https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
goerli = "https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_API_KEY}"
arbitrum = "https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
arbitrumGoerli = "https://arb-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
arbitrumSepolia = "https://arb-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
optimism = "https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
optimismGoerli = "https://opt-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
optimismSepolia = "https://opt-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
polygon = "https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
polygonMumbai = "https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
gnosis = "https://rpc.gnosischain.com"
chiado = "https://rpc.chiadochain.net"
base = "https://mainnet.base.org"
baseGoerli = "https://goerli.base.org"
baseSepolia = "https://sepolia.base.org"
polygonZkEvm = "https://polygonzkevm-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
polygonZkEvmTestnet = "https://polygonzkevm-testnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
zkSyncTestnet = "https://testnet.era.zksync.dev"
Expand All @@ -30,6 +30,11 @@ scroll = "https://rpc.scroll.io"

[etherscan]
polygonMumbai = { key = "${ETHERSCAN_API_KEY}" }
goerli = { key = "${ETHERSCAN_API_KEY}" }
sepolia = { key = "${ETHERSCAN_API_KEY}" }


[fmt]
line_length = 80
multiline_func_header = "params_first"

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
18 changes: 6 additions & 12 deletions packages/foundry/lib/forge-std/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -28,7 +28,6 @@ jobs:
if: always()
run: |
output=$(forge build --skip test)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
Expand All @@ -38,7 +37,6 @@ jobs:
if: always()
run: |
output=$(forge build --skip test --use solc:0.8.0)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
Expand All @@ -48,7 +46,6 @@ jobs:
if: always()
run: |
output=$(forge build --skip test --use solc:0.7.6)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
Expand All @@ -58,7 +55,6 @@ jobs:
if: always()
run: |
output=$(forge build --skip test --use solc:0.7.0)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
Expand All @@ -68,7 +64,6 @@ jobs:
if: always()
run: |
output=$(forge build --skip test --use solc:0.6.12)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
Expand All @@ -78,7 +73,6 @@ jobs:
if: always()
run: |
output=$(forge build --skip test --use solc:0.6.2)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
Expand All @@ -104,10 +98,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -120,10 +114,10 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand Down
4 changes: 3 additions & 1 deletion packages/foundry/lib/forge-std/.github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ jobs:
if: startsWith(github.event.release.tag_name, 'v1')
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: v1

# The email is derived from the bots user id,
# found here: https://api.github.com/users/github-actions%5Bbot%5D
- name: Configure Git
run: |
git config user.name github-actions[bot]
Expand Down
3 changes: 0 additions & 3 deletions packages/foundry/lib/forge-std/.gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion packages/foundry/lib/forge-std/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ contract Bar {

### Std Assertions

Expand upon the assertion functions from the `DSTest` library.
Contains various assertions.

### `console.log`

Expand Down
6 changes: 3 additions & 3 deletions packages/foundry/lib/forge-std/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ fs_permissions = [{ access = "read-write", path = "./"}]

[rpc_endpoints]
# The RPC URLs are modified versions of the default for testing initialization.
mainnet = "https://mainnet.infura.io/v3/b1d3925804e74152b316ca7da97060d3" # Different API key.
optimism_goerli = "https://goerli.optimism.io/" # Adds a trailing slash.
arbitrum_one_goerli = "https://goerli-rollup.arbitrum.io/rpc/" # Adds a trailing slash.
mainnet = "https://eth-mainnet.alchemyapi.io/v2/WV407BEiBmjNJfKo9Uo_55u0z0ITyCOX" # Different API key.
optimism_sepolia = "https://sepolia.optimism.io/" # Adds a trailing slash.
arbitrum_one_sepolia = "https://sepolia-rollup.arbitrum.io/rpc/" # Adds a trailing slash.
needs_undefined_env_var = "${UNDEFINED_RPC_URL_PLACEHOLDER}"

[fmt]
Expand Down
Loading

0 comments on commit a117702

Please sign in to comment.