Skip to content

Commit f0aefb5

Browse files
authored
Merge pull request #288 from VenusProtocol/develop
New release
2 parents cf2a465 + 024bd52 commit f0aefb5

File tree

408 files changed

+110551
-45969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+110551
-45969
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ARCHIVE_NODE_ethereum=https://eth-mainnet.nodereal.io/v1/<YOUR_KEY_HERE>
2323
#ARCHIVE_NODE_basemainnet=https://open-platform.nodereal.io/<YOUR_KEY_HERE>/base
2424
#ARCHIVE_NODE_unichainsepolia=https://unichain-sepolia.g.alchemy.com/v2/<YOUR_KEY_HERE>
2525
#ARCHIVE_NODE_unichainmainnet=https://unichain-mainnet.g.alchemy.com/v2/<YOUR_KEY_HERE>
26+
#ARCHIVE_NODE_berachainbepolia=https://berachain-bepolia.g.alchemy.com/v2/<YOUR_KEY_HERE>
2627

2728
ETHERSCAN_API_KEY=
2829
REPORT_GAS=

.github/workflows/cd.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ jobs:
1616
fetch-depth: 0
1717
persist-credentials: false
1818

19-
- uses: actions/setup-node@v2
19+
- uses: actions/setup-node@v3
2020
with:
2121
cache: "yarn"
2222

2323
- name: Install dependencies
24-
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error
25-
run: YARN_CHECKSUM_BEHAVIOR=update yarn
24+
run: yarn
2625

2726
- name: Build
2827
run: yarn build

.github/workflows/ci.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ jobs:
1616
uses: actions/checkout@v2
1717

1818
- name: Setup Node.js environment
19-
uses: actions/setup-node@v2
19+
uses: actions/setup-node@v3
2020
with:
2121
node-version: 18
2222
cache: "yarn"
2323

2424
- name: Install dependencies
25-
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error
26-
run: YARN_CHECKSUM_BEHAVIOR=update yarn
25+
run: yarn
2726

2827
- name: Compile contract types
2928
run: yarn hardhat compile
@@ -43,14 +42,13 @@ jobs:
4342
uses: actions/checkout@v2
4443

4544
- name: Setup Node.js environment
46-
uses: actions/setup-node@v2
45+
uses: actions/setup-node@v3
4746
with:
4847
node-version: 18
4948
cache: "yarn"
5049

5150
- name: Install dependencies
52-
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error
53-
run: YARN_CHECKSUM_BEHAVIOR=update yarn
51+
run: yarn
5452

5553
- name: Run hardhat tests coverage
5654
run: yarn hardhat:coverage
@@ -83,14 +81,13 @@ jobs:
8381
uses: actions/checkout@v2
8482

8583
- name: Setup Node.js environment
86-
uses: actions/setup-node@v2
84+
uses: actions/setup-node@v3
8785
with:
8886
node-version: 18
8987
cache: "yarn"
9088

9189
- name: Install dependencies
92-
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error
93-
run: YARN_CHECKSUM_BEHAVIOR=update yarn
90+
run: yarn
9491

9592
- name: Verify deployments work
9693
run: yarn hardhat deploy
@@ -108,18 +105,17 @@ jobs:
108105
token: ${{ secrets.VENUS_TOOLS_TOKEN }}
109106

110107
- name: Setup Node.js environment
111-
uses: actions/setup-node@v2
108+
uses: actions/setup-node@v3
112109
with:
113110
node-version: 18
114111
cache: "yarn"
115112

116113
- name: Install dependencies
117-
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error
118-
run: YARN_CHECKSUM_BEHAVIOR=update yarn
114+
run: yarn
119115

120116
- name: Export deployments
121117
run: |
122-
for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet arbitrumsepolia arbitrumone opsepolia opmainnet basesepolia basemainnet unichainsepolia unichainmainnet; do
118+
for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet arbitrumsepolia arbitrumone opsepolia opmainnet basesepolia basemainnet unichainsepolia unichainmainnet berachainbepolia; do
123119
EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json
124120
jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json
125121
done

.solhint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"const-name-snakecase": "warn",
88
"constructor-syntax": "error",
99
"func-visibility": ["error", { "ignoreConstructors": true }],
10-
"max-line-length": ["error", 120],
10+
"max-line-length": ["error", 175],
1111
"not-rely-on-time": "warn",
1212
"reason-string": ["warn", { "maxLength": 64 }],
1313
"ordering": "error"

CHANGELOG.md

Lines changed: 276 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Resilient Price Feeds is a set of smart contracts that uses multiple oracles and
66

77
DeFi protocols are vulnerable to incorrectly reported prices which can lead to lost money. A price oracle can be manipulated,fail, or suffer other attacks depending on the type of price oracle. It creates a single point of failure, opening attack vectors to the protocol if not mitigated.
88

9-
The Resilient Price Feeds uses multiple oracle sources and fallback mechanisms to return accurate prices and protect from oracle failures. Currently, it includes integrations with Chainlink, RedStone, Pyth and Binance Oracle oracles.
9+
The Resilient Price Feeds uses multiple oracle sources and fallback mechanisms to return accurate prices and protect from oracle failures. Currently, it includes integrations with Chainlink, RedStone and Binance Oracle oracles.
1010

1111
## Details
1212

@@ -21,7 +21,7 @@ anchorRatio = anchorPrice/reporterPrice
2121
isValid = anchorRatio <= upperBoundAnchorRatio && anchorRatio >= lowerBoundAnchorRatio
2222
```
2323

24-
The default configuration uses Chainlink as the main oracle, RedStone or Pyth oracle as the pivot oracle depending on which supports the given market and Binance oracle as the fallback oracle. For some markets we may use RedStone or Pyth as the main oracle if the token price is not supported by Chainlink or Binance oracles.
24+
The default configuration uses Chainlink as the main oracle, RedStone oracle as the pivot oracle depending on which supports the given market and Binance oracle as the fallback oracle. For some markets we may use RedStone as the main oracle if the token price is not supported by Chainlink or Binance oracles.
2525

2626
When fetching an oracle price, for the price to be valid it must be positive and not stagnant. If the price is invalid or stagnant it is ignored and a fallback oracle is used.
2727

3.17 MB
Binary file not shown.
4.6 MB
Binary file not shown.
460 KB
Binary file not shown.
782 KB
Binary file not shown.

0 commit comments

Comments
 (0)