Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
0362d5e
Add Optimistic mainnet deployment (#508)
alphastorm Jan 18, 2022
7f20810
Add fantom deployment scripts (#510)
penandlim Jan 21, 2022
0a46e27
Add Fantom mainnet deployment
alphastorm Jan 22, 2022
7ad02eb
Remove show accounts flag (#511)
penandlim Jan 24, 2022
1428496
Update solidity-coverage package (#512)
penandlim Jan 24, 2022
318b4b7
Make it easier to use Alchemy API key and add .env.template (#518)
penandlim Feb 7, 2022
9efa041
Deploy USDs/ArbUSDv2 Meta pool on Arbtrium (#517)
penandlim Feb 7, 2022
a5cc791
Add SimpleRewarder contract (#509)
penandlim Feb 22, 2022
63238f0
Deploy SimpleRewarder for T rewards (#534)
penandlim Mar 10, 2022
d2682fa
Add a helper contract that calculates relative prices and exact swap …
penandlim Mar 17, 2022
8683114
Adding Multicall3 local functionality (#539)
lilPlumberBoy Mar 22, 2022
12ad5a4
Update Hardhat and other dependencies (#544)
penandlim Mar 24, 2022
fcaf69b
Add multisig addresses on each chain as constants (#543)
penandlim Mar 24, 2022
9d278d2
Apply workaround for inconsistent timestamp behavior in CI (#550)
penandlim Mar 30, 2022
c94d9af
Add `PoolRegistry` and `MasterRegistry` for keeping track of deployed…
penandlim Mar 30, 2022
3ad4b33
Fix `getUnderlyingTokenBalances` to reflect correct amounts (#555)
penandlim Apr 13, 2022
52270f9
Update dependencies and clean up imports (#560)
penandlim Apr 21, 2022
31258e1
Deploy to Evmos testnet (9000) (#559)
penandlim Apr 22, 2022
7762e48
Add permissionless versions of swaps (#551)
penandlim Apr 27, 2022
e4556a3
Mainnet deployment of 3pool to Evmos (#565)
lilPlumberBoy Apr 28, 2022
1b473c2
Deploy wBTC/renBTC base pool and tBTC metapool to evmos mainnet (#566)
lilPlumberBoy May 2, 2022
463447f
Change deployment scripts to don't over-write existing LPToken (#563)
penandlim May 3, 2022
3a2fe1c
Override existing deploy task to add pre and post deployment actions …
penandlim May 3, 2022
eb73e5e
Add a new PR template for any new deploys (#571)
penandlim May 4, 2022
a10c42c
Script for confirming onchain libs via etherscan (#574)
hammeiam May 9, 2022
32524bc
Add invariant test scripts that can be run against any network (#577)
penandlim May 11, 2022
fa9cb36
Deploy MetaSwap contract with a new library and 3 new meta pools (#578)
penandlim May 17, 2022
22a1d70
Add SDL address on evmos mainnet (#581)
penandlim May 19, 2022
f20d1d0
Deploy DAI/USDC/USDT/FRAX 4pool to mainnet. (#585)
lilPlumberBoy May 19, 2022
23ad559
Added deploy script for evmos 4pool. (#583)
lilPlumberBoy May 20, 2022
ed19e79
Deploy Swap contracts to Kava test network (#564)
lilPlumberBoy May 25, 2022
ee6e846
CI healthcheck (#588)
hammeiam May 26, 2022
82af92d
Deploy scripts for USDC/USDT/FRAX 3pool on Evmos Mainnet. (#590)
lilPlumberBoy May 26, 2022
fd870c6
Deploy USDC/USDT/Frax 3pool on mainnet. (#591)
lilPlumberBoy May 27, 2022
91f1d5b
Modify how hardhat configs are set up based on FORK_NETWORK (#596)
penandlim May 28, 2022
1ee0d9b
Prevent re-saving LP tokens for future deploy runs (#593)
penandlim May 28, 2022
877d09d
Register frax3pool in the pool registry on eth mainnet (#594)
penandlim May 28, 2022
54825c5
Deploy registries on evmos mainnet (#595)
penandlim May 28, 2022
363f163
Replace any suspects that cause transient 1s delay on SimpleRewarder …
penandlim May 28, 2022
c0e4b57
Deploy MiniChef to Evmos (#589)
lilPlumberBoy May 31, 2022
dc678e0
Add sushiswap pair SDL/FRAX address (#602)
penandlim Jun 2, 2022
b745777
Adds the address of standard L2 token created for SDL (#603)
penandlim Jun 2, 2022
ca5dd0a
Deploy SimpleRewarder for tBTC meta pool v3 (#601)
penandlim Jun 2, 2022
51e7fd8
Use `FUND_FORK_NETWORK` env variable to enable funding deployer accou…
penandlim Jun 3, 2022
87fba94
Control fork block number using env variable. (#607)
penandlim Jun 3, 2022
70b5209
Add LP token Script (#612)
nguyenaiden Jun 8, 2022
a8034b1
Create a hardhat specific deploy folder. (#613)
penandlim Jun 8, 2022
8549209
Add a script to calculate owed SDL on given chain (#611)
penandlim Jun 16, 2022
92d3d60
Deploy registries on other chains (FTM, ARB, OPT) (#630)
penandlim Jun 20, 2022
49734a3
Improve `npm run fork` to use CLI parameter instead (#638)
penandlim Jun 24, 2022
e6b10e0
Update node versions to 16 in CI. Disable Slither until fixed (#650)
penandlim Jul 7, 2022
be4fe59
veSDL contracts (#620)
penandlim Jul 8, 2022
38bc59e
Deploy dForce USX Pool on Mainnet (#647)
lilPlumberBoy Jul 8, 2022
c6c5ea5
Add tests for 'ChildChainStreamer' (#654)
hannespfeiffer Jul 15, 2022
3fde78c
Update Dockerfile's node version to 16-alpine (#657)
penandlim Jul 25, 2022
b3c57b5
Attempt to fix CI (#666)
penandlim Jul 25, 2022
6577be9
Disable fallbackToGlobal on SimpleRewarder tests (#669)
penandlim Jul 26, 2022
0e52449
Install missing packages (#668)
nguyenaiden Jul 26, 2022
fa44682
Update dockerfile to use node16-bullseye (#670)
nguyenaiden Jul 27, 2022
22b8cb8
Kava mainnet 3pool deploy (#648)
lilPlumberBoy Jul 29, 2022
1fec4c8
Add deploy script for registering evmos pools (#674)
hannespfeiffer Aug 1, 2022
fd27d3b
Fix kava contract verification script (#675)
hannespfeiffer Aug 1, 2022
04f0e69
Refactor Pool Deployment Process (#656)
lilPlumberBoy Aug 2, 2022
bd807a2
FRAX-USX metapool deployment (#661)
lilPlumberBoy Aug 2, 2022
71dde44
Deploy new targets for permisisonless deployer contract (#678)
penandlim Aug 3, 2022
3744502
Deploy Minichef on optimism (#672)
penandlim Aug 3, 2022
26d4e31
Deploy script for second SPA rewarder (#687)
hannespfeiffer Aug 19, 2022
bb076ff
Add verification deploy script for optimism (#685)
hannespfeiffer Aug 22, 2022
0bfe328
Move API keys to environment variables (#680)
penandlim Aug 22, 2022
764e4b5
Deployed master registry on kava (#679)
lilPlumberBoy Aug 22, 2022
33e4760
Add script for printing all pool addresses (#671)
hammeiam Aug 22, 2022
7f1a1b7
Script for enabling on chain gauge voting (#691)
penandlim Aug 23, 2022
e6c3199
Revert "Script for enabling on chain gauge voting (#691)"
hammeiam Sep 13, 2022
eec2895
Script for enabling on chain gauge voting (#691)
penandlim Aug 23, 2022
405d622
Add deploy script and deployment data for non-flashloan swaps (#690)
penandlim Aug 29, 2022
b295b2b
Updates pool reg for FraxBP USDs pool (#686)
lilPlumberBoy Aug 29, 2022
7ce2b27
Add separate tests for permissionless contracts (#681)
penandlim Aug 29, 2022
a474fc0
Deploy script for fake USDC (#693)
penandlim Aug 31, 2022
c9db1e4
Run prepare scripts by default on hardhat (#694)
penandlim Sep 1, 2022
0107585
Updates hardhat and migrate from waffle to hardhat chai matchers (#696)
penandlim Sep 2, 2022
d54d5a2
Adds 2 new node dependencies (#699)
penandlim Sep 3, 2022
30abbe9
Cleans up hardhat config file and moves tasks into tasks folder (#698)
penandlim Sep 7, 2022
de80f5a
Improve fork settings (#700)
penandlim Sep 7, 2022
fd27398
Adds `patch-package` to apply fix for Arbitrum Nitro (#701)
penandlim Sep 7, 2022
2d5f9c6
Update USDS pool in pool registry (#702)
penandlim Sep 8, 2022
5c606c3
USDT pool deploy (#703)
lilPlumberBoy Sep 13, 2022
05065ed
Update hardhat to 2.11.1 and associated dependencies (#704)
penandlim Sep 13, 2022
77b182b
Specify deploy tags for each test (#705)
penandlim Sep 13, 2022
241e2fc
Add x-chain gauge factory contracts w/ basic tests and deploy scripts…
lilPlumberBoy Sep 14, 2022
06f1ec5
Deploys OptimismBridger on Mainnet fork (#713)
penandlim Sep 14, 2022
9f02571
Add more test coverage for AnyCallTranslator (#712)
penandlim Sep 14, 2022
aedebe8
Refactor stealing funds from whales into a function (#717)
penandlim Sep 15, 2022
a4e84d3
ceUSDT Evmos Mainnet pool deploy (#714)
lilPlumberBoy Sep 20, 2022
3a6dd4a
Add a new script that mints some SDL to ChildGauge on forked Optmism …
penandlim Sep 21, 2022
d2d3f40
Deploy fake USDC for testing duplicate token names on forked mainnet …
penandlim Sep 21, 2022
e803e87
Add test deploy script for setting veSDL balance in ChildOracle (#721)
penandlim Sep 21, 2022
ed868cf
Increase RootOracle coverage (#723)
penandlim Sep 21, 2022
a517415
Pin hardhat to 2.11.2 with the patch file for arbitrum fork (#724)
penandlim Sep 21, 2022
8c4c71a
Correct incorrect spelling on receive function and increase ChildOrac…
penandlim Sep 22, 2022
29c785c
Update ArbitrumBridger.sol for Nitro and increase coverage (#726)
penandlim Sep 22, 2022
1645ce3
Update gas reporter and add a new ENV variable for controlling it (#727)
penandlim Sep 22, 2022
7365af9
Clean up and optimize OptimismBridger. Add coverage. (#728)
penandlim Sep 22, 2022
f0c6ae6
add node-fetch dep (#730)
hammeiam Sep 22, 2022
2c1707c
VesperFRAX-FRAXBP metapool deployment (#718)
lilPlumberBoy Sep 30, 2022
8c9974a
Add foundry setup and basic script that can be run with forge (#737)
penandlim Oct 5, 2022
cd429e9
Add a base Script contract that can read from deployment jsons
penandlim Oct 5, 2022
49f3ffd
Add an abstract contract for bridgers (#732)
penandlim Oct 7, 2022
923e8a3
Update RootGauge test to cover transmit_emissions (#731)
penandlim Oct 7, 2022
4c56d78
Opt and Arb deploy script for deforce USX/FraxBP pool (#719)
lilPlumberBoy Oct 11, 2022
367fe27
Add a script for verifying withdraw admin fees work as expected (#738)
penandlim Oct 12, 2022
4baddd9
Add USX and a whale contract to steal from (#745)
penandlim Oct 12, 2022
1411812
Use specific factory type to ensure formatting calldata is correct (#…
penandlim Oct 12, 2022
84af3f6
Update tests for reward forwarder (#742)
penandlim Oct 12, 2022
0ee8f52
Update solidity versions to 0.8.17 and remove unused MockBridger func…
penandlim Oct 12, 2022
7f84588
Add a simple script for giving some tokens to hardhat account in anvi…
penandlim Oct 17, 2022
2d1ecbf
Deploy RewardForwarder with Vesper Liquidity Gauge (#747)
lilPlumberBoy Oct 19, 2022
8db4a62
Ensure xchain gauge deployments happen regardless of cache (#750)
penandlim Oct 26, 2022
e7b2258
Increase test coverage for ChildGauge contract interactions (#746)
penandlim Oct 26, 2022
65489d1
Add dummy gauge rewards for forked optimism (#751)
penandlim Oct 26, 2022
d2ab812
Add prices from mainnet chainlink oracles. Print TVL per chain and to…
penandlim Oct 27, 2022
e5f9dfc
Mike/permissionless deployer all chains (#740)
lilPlumberBoy Oct 27, 2022
0dcb24b
Add a foundry test for quickly testing VSP deposit and claiming (#748)
penandlim Oct 27, 2022
cf57c4d
Add OpenZeppelin 4.7.3 libraries (#757)
penandlim Nov 3, 2022
fc23347
Add comments and remove any unused variables (#756)
penandlim Nov 7, 2022
d303dc8
Enable deploying x-chain system contracts on mainnet, optimism, arbit…
penandlim Nov 7, 2022
5ed8224
Update dependencies and gitignore (#760)
penandlim Nov 8, 2022
e71bd29
Change gauge deployment script for production (#759)
penandlim Nov 8, 2022
041c139
Adds a fix for reverts on RootGauge.initialize() calls (#761)
penandlim Nov 9, 2022
290d236
Add RootGauge/ChildGauge deployment jsons (#762)
penandlim Nov 9, 2022
a1537de
Impersonate multisig for adding root gauges with some weights (#763)
penandlim Nov 10, 2022
7f02676
Change test weights to use 1e18 decimal (#764)
penandlim Nov 15, 2022
7b9a241
Add test cases for AccessControl usage (#766)
penandlim Nov 22, 2022
e8d8af5
Add test cases for using bridgers for a root gauge (#765)
penandlim Nov 23, 2022
8d4d946
Adds ops multisig addresses. (#767)
penandlim Nov 23, 2022
64d29f5
Least authority revisions (#749)
lilPlumberBoy Nov 29, 2022
5586b5c
Makes env keys and named accounts explicit (#776)
penandlim Dec 21, 2022
0bdd8be
Add new script for calculating owed balanced to Minter (#777)
penandlim Jan 5, 2023
7cad2f4
Add new deploy script for 2 replacement BTC pools (#775)
penandlim Jan 5, 2023
8d33811
Add Multicall3 deployment json file (#781)
penandlim Jan 7, 2023
e94f226
Add Multisend contract json (#783)
penandlim Jan 17, 2023
3130357
Add multicall3 on Optimism and Arbitrum (#786)
penandlim Jan 25, 2023
39cd8cd
Package json updated (#784)
penandlim Jan 30, 2023
997475a
Add READMEs for specifying usages. Add more checks in RewardScheduler…
penandlim Feb 1, 2023
ccb4a6b
Remove any gas fields which are not supported by ethers.js (#792)
penandlim Feb 5, 2023
a080e31
Fix off by 1 error in arbitrum minichef PID 3 (#794)
penandlim Feb 16, 2023
8db18fe
Add nonce check to ensure deployment is from a fresh account (#797)
penandlim Feb 23, 2023
88b4033
Deployment for Aurora Network (#768)
lilPlumberBoy Mar 6, 2023
a70ef98
Add deploy script and LP token json for BaoUSD meta pool (#798)
penandlim Mar 8, 2023
40385f9
Modify RewardScheduler to have reentrancy protection, and withdraw fu…
penandlim Mar 9, 2023
e0f6f65
Certora (#793)
hannespfeiffer Mar 15, 2023
bdd0be5
Deploy fluidity gauge reward forwarder (#801)
lilPlumberBoy Mar 29, 2023
d2c01c3
Base_testnet Goerli deployment (#800)
lilPlumberBoy Apr 7, 2023
e0b6e12
Redeployment of the RewardScheduler (#805)
lilPlumberBoy Apr 11, 2023
e61c127
Provide suggested node version via nvmrc (#791)
penandlim Apr 21, 2023
fa17dee
RootGaugeV2 contract and test (#808)
lilPlumberBoy Apr 25, 2023
5d538c4
Add new deploy scripts for `fUSDC ChildGauge V3`, and associated rewa…
lilPlumberBoy Apr 26, 2023
2cfdd05
test: Add MinterCommitEmissionTest for emission rate update (#811)
penandlim Jun 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ALCHEMY_API_KEY=
DEPLOYER_PRIVATE_KEY=
CROSS_CHAIN_DEPLOYER_PRIVATE_KEY=
FUND_FORK_NETWORK=true
FORK_BLOCK_NUMBER=
MNEMONIC_TEST_ACCOUNT=
ETHERSCAN_API=
ETHERSCAN_ARB_API=
ETHERSCAN_OPT_API=
ETHERSCAN_FTM_API=
ETHERSCAN_AURORA_API=
REPORT_GAS=true
25 changes: 19 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"plugins": ["unused-imports"],
"extends": [
"plugins": [
"unused-imports"
],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:json/recommended"
],
"parser": "@typescript-eslint/parser",
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"ecmaVersion": 2018,
"sourceType": "module"
},
"env": {
Expand All @@ -16,6 +18,17 @@
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"unused-imports/no-unused-imports": "error"
"@typescript-eslint/no-unused-vars": "off",
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
]
}
}
}
14 changes: 6 additions & 8 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ jobs:
lint:
runs-on: ubuntu-latest
env:
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
ALCHEMY_API_ROPSTEN: ${{ secrets.ALCHEMY_API_ROPSTEN }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
MNEMONIC_TEST_ACCOUNT: ${{ secrets.MNEMONIC_TEST_ACCOUNT }}
steps:
- uses: actions/checkout@v2
Expand All @@ -23,18 +22,17 @@ jobs:
${{ runner.os }}-node-
- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'
# fix for forcing git to use https when pulling deps
- run: 'git config --global --replace-all url."https://github.com/".insteadOf ssh://git@github.com/'
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build --if-present
- run: npm run lint

test:
runs-on: ubuntu-latest
env:
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
ALCHEMY_API_ROPSTEN: ${{ secrets.ALCHEMY_API_ROPSTEN }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
MNEMONIC_TEST_ACCOUNT: ${{ secrets.MNEMONIC_TEST_ACCOUNT }}
steps:
- uses: actions/checkout@v2
Expand All @@ -46,9 +44,9 @@ jobs:
${{ runner.os }}-node-
- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'
# fix for forcing git to use https when pulling deps
- run: 'git config --global --replace-all url."https://github.com/".insteadOf ssh://git@github.com/'
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build --if-present
- run: npm test
76 changes: 37 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ jobs:
lint:
runs-on: ubuntu-latest
env:
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
ALCHEMY_API_ROPSTEN: ${{ secrets.ALCHEMY_API_ROPSTEN }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
MNEMONIC_TEST_ACCOUNT: ${{ secrets.MNEMONIC_TEST_ACCOUNT }}
steps:
- uses: actions/checkout@v2
Expand All @@ -23,18 +22,17 @@ jobs:
${{ runner.os }}-node-
- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'
# fix for forcing git to use https when pulling deps
- run: 'git config --global --replace-all url."https://github.com/".insteadOf ssh://git@github.com/'
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build --if-present
- run: npm run lint

test:
runs-on: ubuntu-latest
env:
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
ALCHEMY_API_ROPSTEN: ${{ secrets.ALCHEMY_API_ROPSTEN }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
MNEMONIC_TEST_ACCOUNT: ${{ secrets.MNEMONIC_TEST_ACCOUNT }}
steps:
- uses: actions/checkout@v2
Expand All @@ -46,18 +44,17 @@ jobs:
${{ runner.os }}-node-
- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'
# fix for forcing git to use https when pulling deps
- run: 'git config --global --replace-all url."https://github.com/".insteadOf ssh://git@github.com/'
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build --if-present
- run: npm test

coverage:
runs-on: ubuntu-latest
env:
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
ALCHEMY_API_ROPSTEN: ${{ secrets.ALCHEMY_API_ROPSTEN }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
MNEMONIC_TEST_ACCOUNT: ${{ secrets.MNEMONIC_TEST_ACCOUNT }}
steps:
- uses: actions/checkout@v2
Expand All @@ -69,39 +66,40 @@ jobs:
${{ runner.os }}-node-
- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'
# fix for forcing git to use https when pulling deps
- run: 'git config --global --replace-all url."https://github.com/".insteadOf ssh://git@github.com/'
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build --if-present
- run: npm run coverage
- env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: npm run coverage
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

slither:
runs-on: ubuntu-latest
env:
ALCHEMY_API: ${{ secrets.ALCHEMY_API }}
ALCHEMY_API_ROPSTEN: ${{ secrets.ALCHEMY_API_ROPSTEN }}
MNEMONIC_TEST_ACCOUNT: ${{ secrets.MNEMONIC_TEST_ACCOUNT }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/setup-node@v2
with:
node-version: '12'
# fix for forcing git to use https when pulling deps
- run: 'git config --global --replace-all url."https://github.com/".insteadOf ssh://git@github.com/'
- run: npm ci
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: python -m pip install --upgrade pip
- run: pip3 install slither-analyzer
- run: slither . --exclude-informational --exclude-low --exclude-medium --exclude-optimization
# slither:
# runs-on: ubuntu-latest
# env:
# ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
# MNEMONIC_TEST_ACCOUNT: ${{ secrets.MNEMONIC_TEST_ACCOUNT }}
# steps:
# - uses: actions/checkout@v2
# - uses: actions/cache@v2
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - uses: actions/setup-node@v2
# with:
# node-version: '16'
# # fix for forcing git to use https when pulling deps
# - run: 'git config --global --replace-all url."https://github.com/".insteadOf ssh://git@github.com/'
# - run: npm ci --legacy-peer-deps
# - uses: actions/setup-python@v2
# with:
# python-version: '3.x'
# - run: python -m pip install --upgrade pip
# - run: pip3 install slither-analyzer
# - run: slither . --exclude-informational --exclude-low --exclude-medium --exclude-optimization
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ node_modules/*
.eslintcache
docs

# Certora
.certora*
.last_confs
certora_*
resource_errors.json

### macOS ###
# General
.DS_Store
Expand Down Expand Up @@ -41,4 +47,11 @@ Temporary Items
.env
deployments/localhost/
deployments/optimistic/
.vscode/

# VS Code
.vscode/

# Forge
forge-cache
forge-out
output
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = v1

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.1
9 changes: 2 additions & 7 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
const shell = require('shelljs'); // This module is already a solidity-coverage dep

module.exports = {
onCompileComplete: async function(config){
shell.exec("typechain --target ethers-v5 --outDir ./build/typechain './build/artifacts/*.json'");
},
onIstanbulComplete: async function(config){
shell.rm('-rf', './build/typechain'); // Clean up at the end
},
// TODO: remove VirtualSwap from skipFiles once coverage is added
// TODO: add coverage for older contracts
skipFiles: [
Expand All @@ -17,7 +11,8 @@ module.exports = {
'AmplificationUtilsV1.sol',
'SwapFlashLoanV1.sol',
'SwapUtilsV1.sol',
'SwapV1.sol'
'SwapV1.sol',
'xchainGauges/mock'
],
mocha: {
grep: "@skip-on-coverage", // Find everything with this tag
Expand Down
17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# Adapted from https://nodejs.org/en/docs/guides/nodejs-docker-webapp/

FROM node:12.22.1-alpine3.10
FROM node:16-bullseye

ENV ALCHEMY_API="https://mainnet.infura.io/v3/5f79dfc1f8194c07bf7806064bb16bf9"
ENV ALCHEMY_API_ROPSTEN="https://ropsten.infura.io/v3/5f79dfc1f8194c07bf7806064bb16bf9"
ENV MNEMONIC_TEST_ACCOUNT="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
ENV LANG C.UTF-8

# Create app directory
WORKDIR /usr/src/app
ENV ROOT /usr/src/app
WORKDIR ${ROOT}

# Copy all files and config
COPY . .

COPY package*.json ./
RUN apk add --update --no-cache git
RUN apt-get install make python3 gcc g++ libc6
RUN git config --global --replace-all url."https://github.com/".insteadOf ssh://git@github.com/
RUN npm ci
RUN npm ci --legacy-peer-deps

# Bundle app source
COPY . .

RUN npm run build

EXPOSE 8545

CMD [ "npm", "run", "start" ]
30 changes: 30 additions & 0 deletions PULL_REQUEST_TEMPLATE/deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Deploy Pull Request Template

## Description

Please include a summary of the new deploy scripts. If this PR includes any imports of externally deployed contract addresses, provide sources from official docs or trustworthy references.

Fixes # (issue)

## Deployment checklist

List any new deployments that is expected to be saved after running the deploy task. After running the scripts, check off each item if they are successfully deployed.

- [ ] PoolA
- [ ] PoolALPToken

## Deployment verification

Please provide explorer links to the deployed contracts and verify them using either standard solcInputs json or manually flattened contracts using `npx hardhat flatten`. After verifying them, check off each item.

- [ ] Link to PoolA on etherscan
- [ ] Link to PoolALPToken on etherscan

## Checklist:

- [ ] Any imported tokens's addresses are verified against official docs
- [ ] If any existing contracts are changed, ensure the saved deployments are removed before running the deploy scripts
- [ ] If deploying a new pool on a testnet, ensure there is liquidity by providing the test tokens to a DEX.
- [ ] If possible, the deploy scripts are tested against forked mainnet or local hardhat node.
- [ ] Newly deployed contracts match the expected list of new deployments
- [ ] All newly deployed contracts are verified on explorers
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The contracts are compiled with [Hardhat](https://hardhat.org/getting-started/),
## Installation

```bash
$ npm i
$ npm ci --legacy-peer-deps
```

## Usage
Expand All @@ -36,21 +36,23 @@ $ npm run coverage
### Deploying contracts to localhost Hardhat EVM

```bash
$ npm run start
$ npx hardhat node
```
You can connect to this RPC server via `http://localhost:8545` with chain ID of 31337

### Deploying contracts to local fork of Mainnet
### Deploying contracts to local fork of a network

In order to successfully fork the mainnet, `ALCHEMY_API` must be set to a valid URL in the `.env` file.
In order to successfully fork a network, the networks have to be defined in hardhat.config.ts with valid RPC URLs. In case of mainnet, `ALCHEMY_API` must be set to a valid URL in the `.env` file.
```
ALCHEMY_API="https://eth-mainnet.alchemyapi.io/v2/XXXXXXXXXXXX"
```

```bash
$ npm run fork
$ npm run fork --network=mainnet
```
You can connect to this RPC server via `http://localhost:8545` with chain ID of 1.
You can connect to this RPC server via `http://localhost:8545` with chain ID of the network.

Additionally, you can choose a block number to fork from by setting `FORK_BLOCK_NUMBER` env variable.

### Deploying contracts to Ropsten

Expand Down
3 changes: 3 additions & 0 deletions certora/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.**
resource_errors.json
!.gitignore
5 changes: 5 additions & 0 deletions certora/ComplexityCheck/DummyERC20A.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.0;
import "./DummyERC20Impl.sol";

contract DummyERC20A is DummyERC20Impl {}
Loading