forked from frolic/web3-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move contracts to foundry (frolic#15)
* add foundry to CI actions * set up forge project * submodules should be submodules * update remappings, update types * update imports * set up app build/lint CI
- Loading branch information
Showing
112 changed files
with
11,814 additions
and
7,634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
name: app | ||
on: | ||
- push | ||
env: | ||
NODE_ENV: ci | ||
|
||
defaults: | ||
run: | ||
working-directory: ./packages/app | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16.x] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Cache pnpm modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2 | ||
with: | ||
version: 6.10.0 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: pnpm build | ||
|
||
lint: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16.x] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Cache pnpm modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2 | ||
with: | ||
version: 6.10.0 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: pnpm lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
*debug.log | ||
|
||
.vercel | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[submodule "packages/contracts/lib/ds-test"] | ||
path = packages/contracts/lib/ds-test | ||
url = https://github.com/dapphub/ds-test | ||
[submodule "packages/contracts/lib/openzeppelin-contracts"] | ||
path = packages/contracts/lib/openzeppelin-contracts | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts | ||
[submodule "packages/contracts/lib/erc721a"] | ||
path = packages/contracts/lib/erc721a | ||
url = https://github.com/chiru-labs/erc721a | ||
[submodule "packages/contracts/lib/ERC721A"] | ||
path = packages/contracts/lib/ERC721A | ||
url = https://github.com/chiru-labs/ERC721A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
NEXT_PUBLIC_ETHEREUM_RPC_ENDPOINT= | ||
NEXT_PUBLIC_POLYGON_RPC_ENDPOINT= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import deploys from "@web3-scaffold/contracts/deploys.json"; | ||
import { ExampleNFT__factory } from "@web3-scaffold/contracts/typechain-types"; | ||
import ExampleNFTGoerli from "@web3-scaffold/contracts/deploys/goerli/ExampleNFT.json"; | ||
import { ExampleNFT__factory } from "@web3-scaffold/contracts/types"; | ||
|
||
import { polygonProvider } from "./providers"; | ||
|
||
const network = process.env.NODE_ENV === "production" ? "matic" : "mumbai"; | ||
import { ethereumProvider } from "./providers"; | ||
|
||
export const exampleNFTContract = ExampleNFT__factory.connect( | ||
deploys[network].ExampleNFT.address, | ||
polygonProvider | ||
ExampleNFTGoerli.deployedTo, | ||
ethereumProvider | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DEPLOYER= | ||
DEPLOYER_PRIVATE_KEY= | ||
CHAIN_NAME=goerli | ||
RPC_URL= | ||
ETHERSCAN_API_KEY= |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
cache | ||
artifacts/build-info | ||
artifacts/**/*.dbg.json | ||
*.tsbuildinfo | ||
out | ||
|
||
.env* | ||
.env.* |
Oops, something went wrong.