-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
279 changed files
with
118,770 additions
and
0 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,173 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
codecov: codecov/[email protected] | ||
|
||
jobs: | ||
test: | ||
docker: | ||
- image: circleci/node:11 | ||
working_directory: ~/repo | ||
steps: | ||
- run: | ||
| | ||
sudo wget https://github.com/ethereum/solidity/releases/download/v0.5.8/solc-static-linux -O /usr/local/bin/solc | ||
sudo chmod +x /usr/local/bin/solc | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v2-dependencies-{{ checksum "package.json" }} | ||
- v2-dependencies- | ||
- restore_cache: | ||
keys: | ||
- v2-scenario/dependencies-{{ checksum "scenario/package.json" }} | ||
- v2-scenario/dependencies- | ||
- run: yarn install | ||
- run: cd scenario && yarn install | ||
- run: | ||
name: Ganache | ||
command: script/ganache | ||
background: true | ||
- run: | | ||
while ! nc -z localhost 8545; do | ||
sleep 0.1 # wait for ganache to start | ||
done | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v2-dependencies-{{ checksum "package.json" }} | ||
- save_cache: | ||
paths: | ||
- scenario/node_modules | ||
key: v2-scenario-dependencies-{{ checksum "scenario/package.json" }} | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: mkdir ~/junit | ||
- run: TSC_ARGS="" MOCHA_FILE=~/junit/test-results.xml script/test | ||
- store_test_results: | ||
path: ~/junit | ||
- store_artifacts: | ||
path: ~/junit | ||
parallelism: 4 | ||
|
||
mocha_coverage: | ||
parallelism: 5 | ||
docker: | ||
- image: circleci/node:11 | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v2-dependencies-{{ checksum "package.json" }} | ||
- v2-dependencies- | ||
- restore_cache: | ||
keys: | ||
- v2-scenario/dependencies-{{ checksum "scenario/package.json" }} | ||
- v2-scenario/dependencies- | ||
- run: yarn install | ||
- run: cd scenario && yarn install | ||
- run: | ||
name: Ganache | ||
command: script/ganache-coverage | ||
background: true | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v2-dependencies-{{ checksum "package.json" }} | ||
- save_cache: | ||
paths: | ||
- scenario/node_modules | ||
key: v2-scenario-dependencies-{{ checksum "scenario/package.json" }} | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
command: yarn run coverage mocha | ||
no_output_timeout: 20m | ||
- store_artifacts: | ||
path: ~/repo/coverage.json | ||
destination: coverage.json | ||
- store_artifacts: | ||
path: ~/repo/coverage | ||
destination: coverage | ||
- codecov/upload | ||
|
||
scenario_coverage: | ||
docker: | ||
- image: circleci/node:11 | ||
working_directory: ~/repo | ||
steps: | ||
- run: | ||
| | ||
sudo wget https://github.com/ethereum/solidity/releases/download/v0.5.8/solc-static-linux -O /usr/local/bin/solc | ||
sudo chmod +x /usr/local/bin/solc | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v2-dependencies-{{ checksum "package.json" }} | ||
- v2-dependencies- | ||
- restore_cache: | ||
keys: | ||
- v2-scenario/dependencies-{{ checksum "scenario/package.json" }} | ||
- v2-scenario/dependencies- | ||
- run: yarn install | ||
- run: cd scenario && yarn install | ||
- run: | ||
name: Ganache | ||
command: script/ganache-coverage | ||
background: true | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v2-dependencies-{{ checksum "package.json" }} | ||
- save_cache: | ||
paths: | ||
- scenario/node_modules | ||
key: v2-scenario-dependencies-{{ checksum "scenario/package.json" }} | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
command: yarn run coverage scenario | ||
no_output_timeout: 20m | ||
- store_artifacts: | ||
path: ~/repo/coverage.json | ||
destination: coverage.json | ||
- store_artifacts: | ||
path: ~/repo/coverage | ||
destination: coverage | ||
- codecov/upload | ||
|
||
lint: | ||
docker: | ||
- image: circleci/node:11 | ||
- image: trufflesuite/ganache-cli:v6.2.5 | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v2-dependencies-{{ checksum "package.json" }} | ||
- v2-dependencies- | ||
- run: yarn install | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v2-dependencies-{{ checksum "package.json" }} | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: yarn run lint | ||
|
||
workflows: | ||
version: 2 | ||
build-test-and-deploy: | ||
jobs: | ||
- test | ||
- mocha_coverage: | ||
filters: | ||
branches: | ||
only: /^(master|(.*-cov(er(age)?)?))$/ | ||
- scenario_coverage: | ||
filters: | ||
branches: | ||
only: /^(master|(.*-cov(er(age)?)?))$/ | ||
- lint |
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,5 @@ | ||
node_modules | ||
scenario/node_modules | ||
test | ||
!test/contracts | ||
*.DS_Store |
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,27 @@ | ||
allFiredEvents | ||
.build-temp | ||
build | ||
build_ | ||
node_modules | ||
.env | ||
coverage/ | ||
coverage.json | ||
coverageEnv/ | ||
formulas/ | ||
networks/test.json | ||
networks/test-abi.json | ||
networks/coverage.json | ||
networks/coverage-abi.json | ||
networks/development.json | ||
networks/development-abi.json | ||
networks/*-contracts.json | ||
networks/*-history | ||
networks/*-settings.json | ||
outputs/ | ||
Reports/ | ||
scTopics | ||
*.DS_Store | ||
test-results.xml | ||
.tsbuilt | ||
yarn-error.log | ||
scenario/build/webpack.js |
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,8 @@ | ||
module.exports = { | ||
port: 8555, | ||
norpc: true, | ||
testCommand: process.env['TEST_COMMAND'] || 'NETWORK=coverage script/test', | ||
skipFiles: ['FormalMoneyMarket.sol', 'test_contracts'].concat( | ||
process.env['SKIP_UNITROLLER'] ? ['Unitroller.sol'] : []), | ||
deepSkip: true | ||
}; |
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 @@ | ||
node_modules | ||
test/contracts/WBTC.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 @@ | ||
{ | ||
"extends": "solium:recommended", | ||
"plugins": [ | ||
"security" | ||
], | ||
"rules": { | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"indentation": [ | ||
"error", | ||
4 | ||
] | ||
} | ||
} |
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,32 @@ | ||
FROM mhart/alpine-node:11.10.1 | ||
|
||
RUN apk update && apk add --no-cache --virtual build-dependencies git python g++ make | ||
RUN yarn global add [email protected] | ||
RUN yarn global add [email protected] | ||
RUN yarn global add typescript | ||
|
||
RUN wget https://github.com/ethereum/solidity/releases/download/v0.5.8/solc-static-linux -O /usr/local/bin/solc && \ | ||
chmod +x /usr/local/bin/solc | ||
|
||
RUN mkdir -p /deploy/compound-protocol/scenario | ||
WORKDIR /deploy/compound-protocol | ||
|
||
# First add deps | ||
ADD ./package.json /deploy/compound-protocol/ | ||
ADD ./yarn.lock /deploy/compound-protocol/ | ||
RUN yarn install | ||
ADD scenario/package.json /deploy/compound-protocol/scenario | ||
ADD scenario/yarn.lock /deploy/compound-protocol/scenario | ||
RUN ls -la /deploy/compound-protocol | ||
RUN ls -la /deploy/compound-protocol/scenario | ||
RUN cd /deploy/compound-protocol/scenario && yarn install | ||
|
||
# Then rest of code and build | ||
ADD . /deploy/compound-protocol | ||
|
||
RUN truffle compile | ||
|
||
RUN apk del build-dependencies | ||
RUN yarn cache clean | ||
|
||
CMD while :; do sleep 2073600; done | ||
This comment has been minimized.
Sorry, something went wrong. |
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,5 @@ | ||
The software and documentation available in this repository (the "Software") is protected by copyright law and accessible pursuant to the license set forth below. Copyright © 2019 Compound Labs, Inc. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person or organization obtaining the Software (the “Licensee”) to privately study, review, and analyze the Software. Licensee shall not use the Software for any other purpose. Licensee shall not modify, transfer, assign, share, or sub-license the Software or any derivative works of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE. |
Oops, something went wrong.
Why?