-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
92 changed files
with
4,367 additions
and
232 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,77 @@ | ||
name: Certora | ||
|
||
on: | ||
# push: | ||
# branches: [canary] | ||
# pull_request: | ||
# branches: [canary] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
verify_trident: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 14 LTS | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarnv1-dist-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarnv1-dist- | ||
- name: Installing dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Set up Python 3.6 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: "11" | ||
java-package: jre | ||
|
||
- name: Install dependencies | ||
run: | | ||
wget https://github.com/ethereum/solidity/releases/download/v0.8.7/solc-static-linux | ||
chmod +x solc-static-linux | ||
sudo mv solc-static-linux /usr/local/bin/solc | ||
wget https://github.com/ethereum/solidity/releases/download/v0.8.4/solc-static-linux | ||
chmod +x solc-static-linux | ||
sudo mv solc-static-linux /usr/local/bin/solc8.4 | ||
wget https://github.com/ethereum/solidity/releases/download/v0.8.2/solc-static-linux | ||
chmod +x solc-static-linux | ||
sudo mv solc-static-linux /usr/local/bin/solc8.2 | ||
wget https://github.com/ethereum/solidity/releases/download/v0.6.12/solc-static-linux | ||
chmod +x solc-static-linux | ||
sudo mv solc-static-linux /usr/local/bin/solc6.12 | ||
pip3 install certora-cli | ||
- name: Prepare | ||
run: | | ||
chmod +x spec/scripts/*.sh | ||
spec/scripts/applyHarnesses.sh | ||
- name: Verify Trident Router with Certora | ||
run: | | ||
# spec/scripts/sanityConstantProductPool.sh | ||
# spec/scripts/sanityHybridPool.sh | ||
# spec/scripts/sanityMasterDeployer.sh | ||
# spec/scripts/sanitySymbolicPool.sh | ||
# spec/scripts/sanityTridentRouter.sh | ||
spec/scripts/verifyConstantProductPool.sh | ||
spec/scripts/verifyHybridPool.sh | ||
spec/scripts/verifyTridentMath.sh | ||
spec/scripts/verifyTridentRouter.sh | ||
spec/scripts/verifyTridentRouterSimple.sh | ||
env: | ||
CERTORAKEY: ${{ secrets.CERTORAKEY }} |
File renamed without changes.
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 |
---|---|---|
@@ -1,3 +1,27 @@ | ||
module.exports = { | ||
skipFiles: ["interfaces", "examples", "flat", "mocks"], | ||
testCommand: "yarn test", | ||
compileCommand: "yarn build", | ||
skipFiles: [ | ||
"interfaces", | ||
"examples", | ||
"flat", | ||
"libraries/DyDxMath", | ||
"libraries/FullMath", | ||
"libraries/MathUtils", | ||
"libraries/SafeCast", | ||
"libraries/SwapLib", | ||
"libraries/TickMath", | ||
"libraries/Ticks", | ||
"libraries/UnsafeMath", | ||
"migration", | ||
"mocks", | ||
"pool/concentrated", | ||
"pool/franchised", | ||
"pool/hybrid", | ||
"pool/index", | ||
"TridentERC721", | ||
// Covered elsewhere | ||
"TridentBatchable", | ||
"TridentOwnable", | ||
], | ||
}; |
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,7 +1,8 @@ | ||
export/ | ||
deployments/ | ||
artifacts/ | ||
cache/ | ||
coverage/ | ||
deployments/ | ||
export/ | ||
spec/ | ||
node_modules/ | ||
types/ |
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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,24 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
pragma solidity >= 0.8.0; | ||
|
||
import "../interfaces/IPoolFactory.sol"; | ||
import "../deployer/PoolDeployer.sol"; | ||
import "./PoolTemplateMock.sol"; | ||
|
||
contract PoolFactoryMock is PoolDeployer { | ||
constructor(address _masterDeployer) PoolDeployer(_masterDeployer) {} | ||
|
||
function deployPool(bytes memory _deployData) external returns (address pool) { | ||
(address tokenA, address tokenB) = abi.decode(_deployData, (address, address)); | ||
|
||
address[] memory tokens = new address[](2); | ||
tokens[0] = tokenA; | ||
tokens[1] = tokenB; | ||
|
||
bytes32 salt = keccak256(_deployData); | ||
pool = address(new PoolTemplateMock{salt: salt}(_deployData)); | ||
|
||
_registerPool(pool, tokens, salt); | ||
} | ||
} |
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 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
pragma solidity >= 0.8.0; | ||
|
||
contract PoolTemplateMock { | ||
address public immutable token0; | ||
address public immutable token1; | ||
constructor(bytes memory _deployData) { | ||
(address _token0, address _token1) = abi.decode( | ||
_deployData, | ||
(address, address) | ||
); | ||
token0 = _token0; | ||
token1 = _token1; | ||
} | ||
} |
Oops, something went wrong.