Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Сomet with extended asset list #53

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
bba7d99
feat: create comet with extended asset list
MishaShWoof Aug 9, 2024
fc16ae0
feat: move new cometExt to its own contract
MishaShWoof Aug 12, 2024
6b62ee6
fix: clean up
MishaShWoof Aug 12, 2024
d06a3f6
fix: gas optimization
MishaShWoof Aug 12, 2024
d2873ad
fix: more gas optimization
MishaShWoof Aug 12, 2024
5e867a0
fix: linter fix
MishaShWoof Aug 12, 2024
8ab1786
fix: natspec
MishaShWoof Aug 12, 2024
171eb7a
fix: more natspec
MishaShWoof Aug 12, 2024
53f1513
Update index.ts
MishaShWoof Aug 23, 2024
8df38e6
fix: remove unused iterface
MishaShWoof Aug 26, 2024
70e8a73
feat: add prepare and enact for simulation
MishaShWoof Aug 26, 2024
4c0a8f4
fix: fix to workflow
MishaShWoof Aug 26, 2024
c29f4b9
Update enact-migration.yaml
MishaShWoof Aug 26, 2024
cf08c19
fix: reverse
MishaShWoof Aug 26, 2024
71fee7b
feat: add prepare and enact workflow
MishaShWoof Aug 26, 2024
57d04f7
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
f0c33a1
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
df2d152
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
92937aa
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
b72092c
fix: remove verification from simulatative migration
MishaShWoof Aug 27, 2024
ea15450
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
MishaShWoof Sep 17, 2024
dfe98c9
feat: fixes after audit
MishaShWoof Sep 19, 2024
4f2ba04
fix: working tests
MishaShWoof Sep 19, 2024
e641f95
fix: no network issue resolved
MishaShWoof Dec 13, 2024
986efa2
Merge branch 'main' into woof-software/collateral-extension
MishaShWoof Dec 20, 2024
547e934
Merge branch 'woof-software/fix-to-no-network' of github.com:woof-sof…
MishaShWoof Dec 23, 2024
6635049
feat: working scenarios
MishaShWoof Dec 26, 2024
4ba3b92
feat: migrations and working scenarios
MishaShWoof Dec 27, 2024
c792011
fix
MishaShWoof Dec 27, 2024
9d67b33
fix: secret fix for scroll
MishaShWoof Dec 27, 2024
978dec0
fix: increase arbitrary number
MishaShWoof Dec 27, 2024
b6fb6a2
fix: scroll scan fix
MishaShWoof Dec 27, 2024
6a7f18a
feat: migrations and descriptions
MishaShWoof Jan 6, 2025
d7d9c2c
fix
MishaShWoof Jan 6, 2025
262fb3b
update descriptions
dmitriy-woof-software Jan 14, 2025
1b4307b
fix
MishaShWoof Jan 14, 2025
94131ad
fix: optimization
MishaShWoof Jan 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/deploy-market.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ on:
options:
- fuji
- mainnet
- goerli
- sepolia
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
- base
- base-goerli
- linea-goerli
- optimism
- mantle
- scroll-goerli
- scroll
deployment:
description: Deployment Name (e.g. "usdc")
Expand All @@ -44,13 +38,14 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
steps:
- name: Seacrest
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\",\"scroll-goerli\":\"https://alpha-rpc.scroll.io/l2\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/enact-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ on:
options:
- fuji
- mainnet
- goerli
- sepolia
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
- base
- base-goerli
- linea-goerli
- optimism
- mantle
- scroll-goerli
- scroll
deployment:
description: Deployment Name (e.g. "usdc")
Expand Down Expand Up @@ -61,14 +55,15 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
steps:
- name: Get governance network
run: |
case ${{ github.event.inputs.network }} in
polygon | arbitrum | base | optimism | mantle)
polygon | arbitrum | base | optimism | mantle | scroll)
echo "GOV_NETWORK=mainnet" >> $GITHUB_ENV ;;
mumbai | arbitrum-goerli | base-goerli | linea-goerli | scroll-goerli | scroll)
echo "GOV_NETWORK=goerli" >> $GITHUB_ENV ;;
sepolia)
echo "GOV_NETWORK=sepolia" >> $GITHUB_ENV ;;
*)
echo "No governance network for selected network" ;;
esac
Expand All @@ -78,7 +73,7 @@ jobs:
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\",\"scroll-goerli\":\"https://alpha-rpc.scroll.io/l2\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand All @@ -87,7 +82,7 @@ jobs:
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ env.GOV_NETWORK }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[env.GOV_NETWORK] }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[env.GOV_NETWORK] }}"
port: 8685
if: github.event.inputs.eth_pk == '' && env.GOV_NETWORK != '' && github.event.inputs.impersonateAccount == ''

Expand All @@ -113,7 +108,7 @@ jobs:
run_id: ${{ github.event.inputs.run_id }}
name: ${{ github.event.inputs.network }}-${{ github.event.inputs.deployment }}-${{ github.event.inputs.migration }}
path: deployments/${{ github.event.inputs.network }}/${{ github.event.inputs.deployment }}/artifacts/
if: github.event.inputs.run_id != ''
if: github.event.inputs.run_id != '' && github.event.inputs.run_id != 0

- name: Run Deploy Market and Enact Migration (impersonate)
run: |
Expand Down Expand Up @@ -147,6 +142,17 @@ jobs:
GOV_NETWORK_PROVIDER: ${{ fromJSON('["", "http://localhost:8685"]')[github.event.inputs.eth_pk == '' && env.GOV_NETWORK != ''] }}
GOV_NETWORK: ${{ env.GOV_NETWORK }}
REMOTE_ACCOUNTS: ${{ fromJSON('["", "true"]')[github.event.inputs.eth_pk == ''] }}
if: github.event.inputs.impersonateAccount != '' && github.event.inputs.run_id != 0
- name: Run Prepare and Enact Migration (impersonate)
run: |
yarn hardhat migrate --network ${{ github.event.inputs.network }} --deployment ${{ github.event.inputs.deployment }} --prepare --enact --overwrite ${{ fromJSON('["", "--simulate"]')[github.event.inputs.simulate == 'true'] }} ${{ fromJSON('["", "--no-enacted"]')[github.event.inputs.no_enacted == 'true'] }} ${{ github.event.inputs.migration }} --impersonate ${{ github.event.inputs.impersonateAccount }}
env:
DEBUG: true
ETH_PK: "${{ inputs.eth_pk }}"
NETWORK_PROVIDER: ${{ fromJSON('["", "http://localhost:8585"]')[github.event.inputs.eth_pk == ''] }}
GOV_NETWORK_PROVIDER: ${{ fromJSON('["", "http://localhost:8685"]')[github.event.inputs.eth_pk == '' && env.GOV_NETWORK != ''] }}
GOV_NETWORK: ${{ env.GOV_NETWORK }}
REMOTE_ACCOUNTS: ${{ fromJSON('["", "true"]')[github.event.inputs.eth_pk == ''] }}
if: github.event.inputs.impersonateAccount != '' && github.event.inputs.with_deploy == 'false'
- name: Commit changes
if: ${{ github.event.inputs.simulate == 'false' }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/prepare-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ on:
options:
- fuji
- mainnet
- goerli
- sepolia
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
- base
- base-goerli
- optimism
- mantle
deployment:
Expand Down Expand Up @@ -44,13 +40,14 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
steps:
- name: Seacrest
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\",\"scroll-goerli\":\"https://alpha-rpc.scroll.io/l2\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-contract-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-eslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/run-forge-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: forge install

- name: Run tests
run: forge test -vvv --via-ir
run: forge test -vvv --via-ir --optimizer-runs 1
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
Expand All @@ -31,7 +31,8 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}

- name: Build Comet with older solc versions
run: |
forge build --contracts contracts/Comet.sol --use solc:0.8.15 --via-ir
forge build --contracts contracts/Comet.sol --use solc:0.8.15 --via-ir --optimizer-runs 1
1 change: 1 addition & 0 deletions .github/workflows/run-gas-profiler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
bases: [ development, mainnet, mainnet-weth, mainnet-usdt, mainnet-wsteth, mainnet-usds, goerli, goerli-weth, sepolia-usdc, sepolia-weth, fuji, mumbai, polygon, polygon-usdt, arbitrum-usdc.e, arbitrum-usdc, arbitrum-weth, arbitrum-usdt, arbitrum-goerli-usdc, arbitrum-goerli-usdc.e, base-usdbc, base-weth, base-usdc, base-aero, base-goerli, base-goerli-weth, linea-goerli, optimism-usdc, optimism-usdt, optimism-weth, mantle-usde, scroll-goerli, scroll-usdc]
bases: [ development, mainnet, mainnet-weth, mainnet-usdt, mainnet-wsteth, mainnet-usds, sepolia-usdc, sepolia-weth, fuji, polygon, polygon-usdt, arbitrum-usdc.e, arbitrum-usdc, arbitrum-weth, arbitrum-usdt, base-usdbc, base-weth, base-usdc, base-aero, optimism-usdc, optimism-usdt, optimism-weth, mantle-usde, scroll-usdc]
name: Run scenarios
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
Expand All @@ -20,6 +20,7 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-semgrep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
container:
# A Docker image with Semgrep installed. Do not change this.
image: returntocorp/semgrep
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-slither.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
run: solc-select install 0.8.15;solc-select use 0.8.15

- name: Function clash analysis
run: yarn slither:fn-clashes &> tmp_res; cat tmp_res | grep 'Function id collision found' && exit 1 || exit 0
run: yarn slither:fn-clashes &> tmp_res; cat tmp_res | grep 'Function id collision found' && exit 1 || exit 0
1 change: 1 addition & 0 deletions .github/workflows/run-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions MIGRATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Migrations are simple scripts which deploy or modify contracts. The goal of migr
To create a new migration, run:

```sh
yarn hardhat gen:migration --network goerli --deployment usdc my_migration
yarn hardhat gen:migration --network sepolia --deployment usdc my_migration
```

This will create a new file, such as `deployments/goerli/usdc/migrations/164443237_my_migration.ts` with a base migration script. There are currently two steps to a migration script, but this is likely to change soon:
This will create a new file, such as `deployments/sepolia/usdc/migrations/164443237_my_migration.ts` with a base migration script. There are currently two steps to a migration script, but this is likely to change soon:

1. Prepare: steps used to create artifacts, such as new on-chain contracts. The output from this step is stored (e.g. "NewCometImplementation: 0x...")
2. Enact: steps used to make these artifacts current, such as upgrading the proxy to the address from the previous step.
Expand All @@ -20,31 +20,31 @@ This will create a new file, such as `deployments/goerli/usdc/migrations/1644432
You can run the preparation for a migration locally via:

```sh
yarn hardhat migrate --network goerli --deployment usdc --prepare 164443237_my_migration
yarn hardhat migrate --network sepolia --deployment usdc --prepare 164443237_my_migration
```

or the enactment via:

```sh
yarn hardhat migrate --network goerli --deployment usdc --enact 164443237_my_migration
yarn hardhat migrate --network sepolia --deployment usdc --enact 164443237_my_migration
```

or both preparation and enactment via:

```sh
yarn hardhat migrate --network goerli --deployment usdc --prepare --enact 164443237_my_migration
yarn hardhat migrate --network sepolia --deployment usdc --prepare --enact 164443237_my_migration
```

Also, you can simulate either of the previous steps to see what effect they would have without actually modifying the on-chain state:

```sh
yarn hardhat migrate --network goerli --deployment usdc --prepare --simulate 164443237_my_migration
yarn hardhat migrate --network sepolia --deployment usdc --prepare --simulate 164443237_my_migration
```

When simulating a migration, you can also impersonate an address to run the migration as. This can be helpful when trying to test a migration that makes a proposal, which requires an address with enough COMP:

```sh
yarn hardhat migrate --network goerli --deployment usdc --prepare --simulate --impersonate ADDRESS_TO_IMPERSONATE 164443237_my_migration
yarn hardhat migrate --network sepolia --deployment usdc --prepare --simulate --impersonate ADDRESS_TO_IMPERSONATE 164443237_my_migration
```

## Running a Migration in GitHub
Expand All @@ -53,7 +53,7 @@ The preferred way to run a migration is in GitHub, via manual workflow dispatch.

## Migration Artifacts

After preparation, a migration stores some artifacts under `deployments/goerli/usdc/artifacts/164443237_my_migration.json`. These will be loaded and can be referenced in the enact step of that migration.
After preparation, a migration stores some artifacts under `deployments/sepolia/usdc/artifacts/164443237_my_migration.json`. These will be loaded and can be referenced in the enact step of that migration.

## Testing Migrations

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ This can also be used together with `--overwrite`, to produce the verification a
#### Other considerations

Make sure that the deploying address has a sufficient amount of the chain's
native asset (i.e. 2 ETH for Goerli, 2 AVAX for Fuji)
native asset (i.e. 2 ETH for Sepolia, 2 AVAX for Fuji)

### Clone Multisig

Expand All @@ -277,7 +277,7 @@ Uniswap for a profit.
To run the bot, you'll need the address of a deployed version of the Liquidator
contract (or you can deploy a new instance of it yourself):

`LIQUIDATOR_ADDRESS="0xABC..." DEPLOYMENT="usdc" yarn liquidation-bot --network goerli`
`LIQUIDATOR_ADDRESS="0xABC..." DEPLOYMENT="usdc" yarn liquidation-bot --network sepolia`

Initiating transactions this way via the public mempool will
[almost certainly get frontrun](https://youtu.be/UZ-NNd6yjFM), but you might be
Expand Down
Loading
Loading