Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
89 changes: 5 additions & 84 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,106 +31,27 @@ jobs:
key: compiled-env-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/set-protocol-v2
test:

test_ovm:
docker:
- image: circleci/node:10.16.0
working_directory: ~/set-protocol-v2
parallelism: 3
steps:
- setup_remote_docker:
docker_layer_caching: false
- run:
name: Fetch solc version
command: docker pull ethereum/solc:0.6.10
- restore_cache:
key: compiled-env-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Set Up Environment Variables
command: cp .env.default .env
- run:
name: Test RPC
command: yarn chain
background: true
- run:
name: Hardhat Test
command: |
TEST_FILES="$(circleci tests glob "./test/**/*.spec.ts" | circleci tests split --split-by=timings)"
yarn test ${TEST_FILES}

coverage:
docker:
- image: circleci/node:10.11.0
working_directory: ~/set-protocol-v2
# When changing the parallelism value, you also
# need to update the `persist_to_workspace` paths
# in this job (below) as well as the list of files passed
# to istanbul-combine in the `report_coverage` job
parallelism: 5
steps:
- setup_remote_docker:
docker_layer_caching: false
- run:
name: Fetch solc version
command: docker pull ethereum/solc:0.6.10
- restore_cache:
key: compiled-env-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Set Up Environment Variables
command: cp .env.default .env
- run:
name: Create shared coverage outputs folder
command: mkdir -p /tmp/coverage
- run:
name: Coverage
command: |
TEST_FILES="{$(circleci tests glob "./test/**/*.spec.ts" | \
circleci tests split --split-by=timings | xargs | sed -e 's/ /,/g')}"
yarn coverage -- --testfiles "$TEST_FILES"
- run:
name: Save coverage
command: |
cp coverage.json /tmp/coverage/cov_$CIRCLE_NODE_INDEX.json
chmod -R 777 /tmp/coverage/cov_$CIRCLE_NODE_INDEX.json
- persist_to_workspace:
root: /tmp/coverage
paths:
- cov_0.json
- cov_1.json
- cov_2.json
- cov_3.json
- cov_4.json

report_coverage:
docker:
- image: circleci/node:10.11.0
working_directory: ~/set-protocol-v2
steps:
- attach_workspace:
at: /tmp/coverage
- restore_cache:
key: compiled-env-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Combine coverage reports
command: |
mkdir -p reports
cp -R /tmp/coverage/* .
npx istanbul-combine-updated -r lcov cov_0.json cov_1.json cov_2.json cov_3.json cov_4.json
- run:
name: Upload coverage
command: |
cat coverage/lcov.info | node_modules/.bin/coveralls
# TODO....

workflows:
version: 2
build-and-test:
jobs:
- checkout_and_compile
- test:
requires:
- checkout_and_compile
- coverage:
requires:
- checkout_and_compile
- report_coverage:
- test_ovm:
requires:
- coverage
- checkout_and_compile
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.DS_Store
/artifacts
/artifacts-ovm
/build
/cache
/cache-ovm
/dist
/etherscan
/flatten
Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IBasicIssuanceModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IExchangeAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IIndexExchangeAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IIntegrationRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IManagerIssuanceHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IModuleIssuanceHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IOracleAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/ISetToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;
pragma experimental "ABIEncoderV2";
Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/ISetValuer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;

Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/IStreamingFeeModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/
pragma solidity 0.6.12;
pragma experimental "ABIEncoderV2";
Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/external/ICErc20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/external/ISynth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/external/ISynthetixExchanger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/external/IUniswapV2Pair.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/external/IUniswapV2Router.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/interfaces/external/IWETH.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/lib/AddressArrayUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
4 changes: 1 addition & 3 deletions contracts/lib/ExplicitERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import { SafeERC20 } from "../../external/contracts/openzeppelin/token/ERC20/SafeERC20.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";

/**
Expand Down
2 changes: 0 additions & 2 deletions contracts/lib/PreciseUnitMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/lib/Uint256ArrayUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/mocks/OracleMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/mocks/StandardTokenMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/protocol/Controller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/protocol/IntegrationRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
2 changes: 0 additions & 2 deletions contracts/protocol/PriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
limitations under the License.

SPDX-License-Identifier: Apache License, Version 2.0

// @unsupported: ovm
*/

pragma solidity 0.6.12;
Expand Down
Loading