-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #551 from ionicprotocol/development
merge
- Loading branch information
Showing
3,139 changed files
with
737,914 additions
and
19,258 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
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,120 @@ | ||
name: Contracts - build, lint & test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- development | ||
paths: | ||
- 'packages/contracts/**' | ||
- '.github/workflows/package-contracts-test.yml' | ||
- 'yarn.lock' | ||
pull_request: | ||
branches: [main, staging, development] | ||
paths: | ||
- 'packages/contracts/**' | ||
- '.github/workflows/package-contracts-test.yml' | ||
- 'yarn.lock' | ||
|
||
env: | ||
EXCLUDE_TESTS: "Abstract|BeefyERC4626Test|DotDotERC4626Test|ArrakisERC4626Test|JarvisERC4626Test|CurveERC4626Test|EllipsisERC4626Test|HelioERC4626Test|WombatERC4626Test|AaveV3ERC4626Test|ThenaERC4626Test|LeveredPositionLensTest|LeveredPositionFactoryTest|WmaticMaticXLeveredPositionTest|StkBnbWBnbLeveredPositionTest|Jbrl2BrlLeveredPositionTest|BombWbnbLeveredPositionTest|PearlUsdrWUsdrUsdrLpLeveredPositionTest|PearlUsdcUsdcUsdrLpLeveredPositionTest|PearlUsdrDaiUsdrLpLeveredPositionTest" | ||
FLAKY_TESTS: "AnyLiquidationTest|LiquidityMiningTest" | ||
SLOW_TESTS: "MaxBorrowTest|OraclesDecimalsScalingTest|MinBorrowTest|LeveredPositionTest|OraclesDecimalsScalingTest" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
cache: 'yarn' | ||
|
||
- name: Install NPM packages | ||
run: yarn install | ||
env: | ||
# Fixes issue: `ethereumjs-abi: The remote archive doesn't match the expected checksum` | ||
YARN_CHECKSUM_BEHAVIOR: update | ||
|
||
- name: Lint | ||
run: yarn workspace @ionicprotocol/contracts lint | ||
|
||
build-and-test-mode: | ||
needs: [lint] | ||
env: | ||
MNEMONIC: "${{ secrets.MNEMONIC }}" | ||
TEST_RUN_CHAINID: 34443 | ||
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }} | ||
MODE_MAINNET_RPC_URL: https://mainnet.mode.network/ | ||
MODE_ARCHIVE_RPC_URL: https://mainnet.mode.network/ | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Npm dependencies | ||
run: yarn install | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install Forge dependencies | ||
run: yarn workspace @ionicprotocol/contracts forge install | ||
|
||
- name: Forge RPC cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.foundry/cache" | ||
key: rpc-cache-local-${{ hashFiles('rpc-cache-keyfile') }}-${{ github.sha }} | ||
|
||
- name: Run base tests for Mode mainnet | ||
run: yarn workspace @ionicprotocol/contracts forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}' | ||
continue-on-error: true # Skip the job on test failure | ||
|
||
- name: Run slow tests for Mode mainnet | ||
if: always() | ||
run: yarn workspace @ionicprotocol/contracts forge test -vv --match-contract '${{ env.SLOW_TESTS }}' | ||
continue-on-error: true # Skip the job on test failure | ||
|
||
- name: Run flaky tests for Mode mainnet | ||
if: always() | ||
run: yarn workspace @ionicprotocol/contracts forge test -vv --match-contract '${{ env.FLAKY_TESTS }}' | ||
continue-on-error: true # Skip the job on test failure | ||
|
||
build-and-test-local: | ||
needs: [lint] | ||
env: | ||
MNEMONIC: "${{ secrets.MNEMONIC }}" | ||
TEST_RUN_CHAINID: 0 | ||
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Npm dependencies | ||
run: yarn install | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install Forge dependencies | ||
run: yarn workspace @ionicprotocol/contracts forge install | ||
|
||
- name: Forge RPC cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.foundry/cache" | ||
key: rpc-cache-local-${{ hashFiles('rpc-cache-keyfile') }}-${{ github.sha }} | ||
|
||
- name: Run forge tests locally | ||
run: yarn workspace @ionicprotocol/contracts forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}' | ||
continue-on-error: true # Skip the job on test failure |
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,24 @@ | ||
[submodule "packages/contracts/lib/forge-std"] | ||
path = packages/contracts/lib/forge-std | ||
url = https://github.com/brockelmore/forge-std | ||
[submodule "packages/contracts/lib/openzeppelin-contracts-upgradeable"] | ||
path = packages/contracts/lib/openzeppelin-contracts-upgradeable | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable | ||
[submodule "packages/contracts/lib/solmate"] | ||
path = packages/contracts/lib/solmate | ||
url = https://github.com/rari-capital/solmate | ||
[submodule "packages/contracts/lib/openzeppelin-contracts"] | ||
path = packages/contracts/lib/openzeppelin-contracts | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts | ||
[submodule "packages/contracts/lib/pyth-sdk-solidity"] | ||
path = packages/contracts/lib/pyth-sdk-solidity | ||
url = https://github.com/pyth-network/pyth-sdk-solidity | ||
[submodule "packages/contracts/lib/solidity-bytes-utils"] | ||
path = packages/contracts/lib/solidity-bytes-utils | ||
url = https://github.com/GNSPS/solidity-bytes-utils | ||
[submodule "packages/contracts/lib/ops"] | ||
path = packages/contracts/lib/ops | ||
url = https://github.com/gelatodigital/ops | ||
[submodule "packages/contracts/lib/adrastia-periphery"] | ||
path = packages/contracts/lib/adrastia-periphery | ||
url = https://github.com/adrastia-oracle/adrastia-periphery |
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
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
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
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,19 @@ | ||
artifacts | ||
artifacts_forge | ||
cache | ||
out/ | ||
typechain/ | ||
.DS_Store | ||
.idea | ||
.env | ||
deployments/localhost/ | ||
deployments/hardhat/ | ||
deployments/rinkeby/ | ||
deployments/kovan/ | ||
contracts.iml | ||
node_modules/ | ||
ionic-contracts.iml | ||
cache_hardhat | ||
transactions.json | ||
*transactions.json | ||
deployments/local |
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,2 @@ | ||
contracts/oracles/keydonix/** | ||
contracts/liquidators/BalancerPoolTokenLiquidator.sol |
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,16 @@ | ||
{ | ||
"overrides": [ | ||
{ | ||
"files": ["*.sol", "*.ts", "*.tsx", ".js"], | ||
"options": { | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": false, | ||
"bracketSpacing": true, | ||
"explicitTypes": "always", | ||
"trailingComma": "none" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.