Skip to content

Commit

Permalink
Merge pull request #471 from fei-protocol/release/2.5.0
Browse files Browse the repository at this point in the history
Release/2.5.0
  • Loading branch information
Joeysantoro authored Jan 20, 2022
2 parents 76739f5 + 2a59e79 commit 8d548fe
Show file tree
Hide file tree
Showing 369 changed files with 57,876 additions and 11,780 deletions.
182 changes: 97 additions & 85 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,97 @@
version: 2.1

jobs:
build:
working_directory: ~/repo
docker:
- image: circleci/node:14
resource_class: xlarge
steps:
- checkout
- run:
name: 'Update NPM'
command: sudo npm install -g [email protected]
- run:
name: 'Set caching variables'
command: |
LAST_SUCCESSFUL_BUILD_URL="https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/master?filter=successful&limit=1"
LAST_SUCCESSFUL_COMMIT=`curl -Ss -u "$CIRCLE_TOKEN:" $LAST_SUCCESSFUL_BUILD_URL | jq -r '.[0]["vcs_revision"]'`
echo $LAST_SUCCESSFUL_COMMIT > /tmp/last-successful-commit
echo $CIRCLE_SHA1 > /tmp/current-commit
- restore_cache:
keys:
- build-cache-{{ .Branch }}-{{ checksum "/tmp/last-successful-commit" }}
- run:
name: Install dependencies
command: npm install
- run:
name: Compile contracts
command: npm run compile
- save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo
lint:
working_directory: ~/repo
docker:
- image: circleci/node:14
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Run linter
command: npm run lint
test:
working_directory: ~/repo
docker:
- image: circleci/node:14
resource_class: xlarge
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Run tests
command: npm run test

e2e-test:
working_directory: ~/repo
docker:
- image: circleci/node:14
resource_class: xlarge
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Run end-to-end tests
command: npm run test:e2e

workflows:
main:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
- e2e-test:
requires:
- build
- lint
- test
version: 2.1
orbs:
discord: antonioned/[email protected]
jobs:
build:
working_directory: ~/repo
docker:
- image: circleci/node:14
resource_class: xlarge
steps:
- checkout
- run:
name: 'Update NPM'
command: sudo npm install -g [email protected]
- run:
name: 'Set caching variables'
command: |
LAST_SUCCESSFUL_BUILD_URL="https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/master?filter=successful&limit=1"
LAST_SUCCESSFUL_COMMIT=`curl -Ss -u "$CIRCLE_TOKEN:" $LAST_SUCCESSFUL_BUILD_URL | jq -r '.[0]["vcs_revision"]'`
echo $LAST_SUCCESSFUL_COMMIT > /tmp/last-successful-commit
echo $CIRCLE_SHA1 > /tmp/current-commit
- restore_cache:
keys:
- build-cache-{{ .Branch }}-{{ checksum "/tmp/last-successful-commit" }}
- run:
name: Install dependencies
command: npm install
- run:
name: Compile contracts
command: npm run compile
- save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo
lint:
working_directory: ~/repo
docker:
- image: circleci/node:14
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Run linter
command: npm run lint
test:
working_directory: ~/repo
docker:
- image: circleci/node:14
parallelism: 16
resource_class: large
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Run tests
command: |
circleci tests glob "test/unit/**/*.ts" | circleci tests split --split-by=filesize > /tmp/tests-to-run
npm run test $(cat /tmp/tests-to-run)
- store_test_results:
path: test-results
- store_artifacts:
path: test-results
e2e-test:
working_directory: ~/repo
docker:
- image: circleci/node:14
parallelism: 5
resource_class: xlarge
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Run end-to-end tests
command: |
circleci tests glob "test/integration/**/*.ts" | circleci tests split --split-by=filesize > /tmp/tests-to-run
npm run test:e2e $(cat /tmp/tests-to-run)
- store_test_results:
path: test-results
- store_artifacts:
path: test-results

workflows:
main:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
- e2e-test:
requires:
- build
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
TESTNET_MODE=
MAINNET_AGEUR_FEI_UNISWAPV2=0xF89CE5eD65737dA8440411544b0499c9FaD323B2
MAINNET_ANGLE_STABLEMASTER=0x5adDc89785D75C86aB939E9e15bfBBb7Fc086A87
MAINNET_ANGLE_POOLMANAGER=0x53b981389Cfc5dCDA2DC2e903147B5DD0E985F44
MAINNET_ANGLE_STAKINGREWARDS=0xBcb307F590972B1C3188b7916d2969Cf75309dc6
MAINNET_BONDING_CURVE_ORACLE=0x89714d3AC9149426219a3568543200D1964101C4
MAINNET_CORE=0x8d5ED43dCa8C2F7dFB20CF7b53CC7E593635d7b9
MAINNET_ETH_BONDING_CURVE=0xe1578B4a32Eaefcd563a9E6d0dc02a4213f673B7
Expand Down
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ coverage/
dist/
lib/
node_modules/
proposals/dao/old/
proposals/dao/fip_x.ts
scripts/deploy/old/
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.eslintcache
.env
node_modules
*.DS_Store*
Expand All @@ -8,4 +9,6 @@ coverage/
tenderly.yaml
artifacts
cache
types/contracts
types/contracts
.eslintcache
.xml
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Smart contract code for Fei Protocol and the FEI stablecoin
- run `npm run prettier-format` to run prettier and automatically format all ts files
- run `npm run coverage:hardhat` to run smart-contract coverage based off of all tests
- run `npm run calldata` to generage calldata for a proposal
- run `npm run checkProposal` to run tests for a specific dao proposal
- run `npm run check-proposal` to run tests for a specific dao proposal
- run `npm run compile` to compile smart contracts, if needed

## Documentation
Expand Down
Loading

0 comments on commit 8d548fe

Please sign in to comment.