Skip to content

Commit

Permalink
restructure foundry contract directory (#1089)
Browse files Browse the repository at this point in the history
* restructure contracts directory

* fixed git action error for contracts

* push to trigger github action

* Update vrf/README.md

Co-authored-by: Martin Kersner <[email protected]>

* moved github action in contract-v0.2 to root repo

---------

Co-authored-by: Martin Kersner <[email protected]>
  • Loading branch information
KelvinThai and martinkersner authored Jan 31, 2024
1 parent e5ddf0d commit 02114df
Show file tree
Hide file tree
Showing 539 changed files with 6,996 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: test
name: "contracts-v0.2: test"

on: workflow_dispatch
on:
push:
branches-ignore:
- "master"
paths:
- "contracts-v0.2/**"

env:
FOUNDRY_PROFILE: ci
Expand All @@ -10,7 +15,7 @@ jobs:
strategy:
fail-fast: true

name: Foundry project
name: Contracts v0.2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -27,8 +32,10 @@ jobs:
forge --version
forge build --sizes
id: build
working-directory: ./contracts-v0.2

- name: Run Forge tests
run: |
forge test -vvv
id: test
working-directory: ./contracts-v0.2
10 changes: 5 additions & 5 deletions .github/workflows/contracts.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
branches-ignore:
- "master"
paths:
- "contracts/**"
- "!contracts/**/VRFCoordinator.sol"
- "!contracts/**/VRFConsumerBase.sol"
- "!contracts/**/vrf/**"
- "contracts-v0.1/**"
- "!contracts-v0.1/**/VRFCoordinator.sol"
- "!contracts-v0.1/**/VRFConsumerBase.sol"
- "!contracts-v0.1/**/vrf/**"
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -34,7 +34,7 @@ jobs:
uses: sergeysova/jq-action@v2
id: packageJsonVersion
with:
cmd: "jq .version ./contracts/package.json -r"
cmd: "jq .version ./contracts-v0.1/package.json -r"
- name: Extract version from the latest published package
id: npmPackageVersion
run: echo "VERSION=`npm view @bisonai/orakl-contracts version`" >> $GITHUB_OUTPUT
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/vrf.contracts.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
branches-ignore:
- "master"
paths:
- "contracts/**/VRFCoordinator.sol"
- "contracts/**/VRFConsumerBase.sol"
- "contracts/**/vrf/**"
- "contracts-v0.1/**/VRFCoordinator.sol"
- "contracts-v0.1/**/VRFConsumerBase.sol"
- "contracts-v0.1/**/vrf/**"
jobs:
build:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "foundryContract/lib/forge-std"]
path = foundryContract/lib/forge-std
[submodule "contracts-v0.2/lib/forge-std"]
path = contracts-v0.2/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "foundryContract/lib/openzeppelin-contracts"]
path = foundryContract/lib/openzeppelin-contracts
[submodule "contracts-v0.2/lib/openzeppelin-contracts"]
path = contracts-v0.2/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions contracts-v0.1/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd contracts-v0.1 && yarn prettier-solidity-write && yarn lint --fix
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions contracts/README.md → contracts-v0.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ yarn deploy:localhost:aggregator
- run `scripts/v0.1/generate-aggregator-deployments.cjs` to creates migration, wallets, and bulk json files
- migration files are saved in migration folder while wallets and bulk files are saved in scripts/\*\*/tmp/ folder
- call example `node ./scripts/v0.1/admin-aggregator/generate-aggregator-deployments.cjs --pairs '["usd-krw", "jpy-usd", "joy-usdc"]' --chain baobab`

###
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 02114df

Please sign in to comment.