@venusprotocol/oracle 1.6.12-dev.2 → 1.6.12-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.dbg.json +1 -1
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.dbg.json +1 -1
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +1 -1
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +1 -1
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +1 -1
- package/artifacts/build-info/{fc01a49cbd804e304740a46d676189d0.json → e6185827013b85f715ee874203b21fc8.json} +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +36 -4
- package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.json +10 -10
- package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.json +2 -2
- package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.json +19 -0
- package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.json +2 -2
- package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.dbg.json +1 -1
- package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.dbg.json +1 -1
- package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.json +49 -42
- package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.dbg.json +1 -1
- package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.json +4 -54
- package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.json +5 -60
- package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.json +6 -43
- package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.json +18 -41
- package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.json +16 -16
- package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.json +2 -2
- package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.json +2 -2
- package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.dbg.json +1 -1
- package/artifacts/contracts/test/AccessControlManager.sol/AccessControlManagerScenario.dbg.json +1 -1
- package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.dbg.json +1 -1
- package/artifacts/contracts/test/MockPyth.sol/MockPyth.dbg.json +1 -1
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.dbg.json +1 -1
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.json +32 -3
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.json +21 -2
- package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/Math.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.dbg.json +1 -1
- package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.dbg.json +1 -1
- package/contracts/ResilientOracle.sol +100 -70
- package/contracts/interfaces/FeedRegistryInterface.sol +4 -4
- package/contracts/interfaces/OracleInterface.sol +3 -1
- package/contracts/oracles/BinanceOracle.sol +53 -61
- package/contracts/oracles/BoundValidator.sol +22 -51
- package/contracts/oracles/ChainlinkOracle.sol +25 -65
- package/contracts/oracles/PythOracle.sol +28 -48
- package/contracts/oracles/TwapOracle.sol +39 -57
- package/contracts/oracles/mocks/MockBinanceFeedRegistry.sol +6 -6
- package/contracts/test/MockSimpleOracle.sol +14 -2
- package/dist/deploy/1-deploy-oracles.js +6 -6
- package/dist/deploy/1-deploy-oracles.js.map +1 -1
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
23
23
|
struct TokenConfig {
|
|
24
24
|
/// @notice Asset address, which can't be zero address and can be used for existance check
|
|
25
25
|
address asset;
|
|
26
|
-
/// @notice Decimals of
|
|
26
|
+
/// @notice Decimals of asset represented as 1e{decimals}
|
|
27
27
|
uint256 baseUnit;
|
|
28
28
|
/// @notice The address of Pancake pair
|
|
29
29
|
address pancakePool;
|
|
@@ -36,18 +36,13 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
36
36
|
uint256 anchorPeriod;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/// @notice Set this as asset address for BNB. This is the underlying for vBNB
|
|
40
|
+
address public constant BNB_ADDR = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;
|
|
41
|
+
|
|
39
42
|
/// @notice WBNB address
|
|
40
43
|
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
|
|
41
44
|
address public immutable WBNB;
|
|
42
45
|
|
|
43
|
-
/// @notice vBNB address
|
|
44
|
-
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
|
|
45
|
-
address public immutable vBnb;
|
|
46
|
-
|
|
47
|
-
/// @notice VAI address
|
|
48
|
-
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
|
|
49
|
-
address public immutable vai;
|
|
50
|
-
|
|
51
46
|
/// @notice the base unit of WBNB and BUSD, which are the paired tokens for all assets
|
|
52
47
|
uint256 public constant BNB_BASE_UNIT = 1e18;
|
|
53
48
|
uint256 public constant BUSD_BASE_UNIT = 1e18;
|
|
@@ -85,18 +80,10 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
85
80
|
}
|
|
86
81
|
|
|
87
82
|
/// @notice Constructor for the implementation contract. Sets immutable variables.
|
|
88
|
-
/// @param vBnbAddress The address of the VBNB
|
|
89
83
|
/// @param wBnbAddress The address of the WBNB
|
|
90
|
-
/// @param vaiAddress The address of the WBNB
|
|
91
84
|
/// @custom:oz-upgrades-unsafe-allow constructor
|
|
92
|
-
constructor(
|
|
93
|
-
address vBnbAddress,
|
|
94
|
-
address wBnbAddress,
|
|
95
|
-
address vaiAddress
|
|
96
|
-
) notNullAddress(vBnbAddress) notNullAddress(wBnbAddress) notNullAddress(vaiAddress) {
|
|
97
|
-
vBnb = vBnbAddress;
|
|
85
|
+
constructor(address wBnbAddress) notNullAddress(wBnbAddress) {
|
|
98
86
|
WBNB = wBnbAddress;
|
|
99
|
-
vai = vaiAddress;
|
|
100
87
|
_disableInitializers();
|
|
101
88
|
}
|
|
102
89
|
|
|
@@ -125,38 +112,29 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
125
112
|
}
|
|
126
113
|
|
|
127
114
|
/**
|
|
128
|
-
* @notice
|
|
129
|
-
* @
|
|
130
|
-
* @
|
|
131
|
-
*/
|
|
132
|
-
function updateTwap(address vToken) external returns (uint256) {
|
|
133
|
-
address asset = _getUnderlyingAsset(vToken);
|
|
134
|
-
|
|
135
|
-
if (tokenConfigs[asset].asset == address(0)) revert("asset not exist");
|
|
136
|
-
// Update & fetch WBNB price first, so we can calculate the price of WBNB paired token
|
|
137
|
-
if (asset != WBNB && tokenConfigs[asset].isBnbBased) {
|
|
138
|
-
if (tokenConfigs[WBNB].asset == address(0)) revert("WBNB not exist");
|
|
139
|
-
_updateTwapInternal(tokenConfigs[WBNB]);
|
|
140
|
-
}
|
|
141
|
-
return _updateTwapInternal(tokenConfigs[asset]);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @notice Get the underlying TWAP price for the given vToken
|
|
146
|
-
* @param vToken vToken address
|
|
147
|
-
* @return price Underlying price in USD
|
|
115
|
+
* @notice Get the TWAP price for the given asset
|
|
116
|
+
* @param asset asset address
|
|
117
|
+
* @return price asset price in USD
|
|
148
118
|
* @custom:error Missing error is thrown if the token config does not exist
|
|
149
119
|
* @custom:error Range error is thrown if TWAP price is not greater than zero
|
|
150
120
|
*/
|
|
151
|
-
function
|
|
152
|
-
|
|
121
|
+
function getPrice(address asset) external view override returns (uint256) {
|
|
122
|
+
uint256 decimals;
|
|
123
|
+
|
|
124
|
+
if (asset == BNB_ADDR) {
|
|
125
|
+
decimals = 18;
|
|
126
|
+
asset = WBNB;
|
|
127
|
+
} else {
|
|
128
|
+
IERC20Metadata token = IERC20Metadata(asset);
|
|
129
|
+
decimals = token.decimals();
|
|
130
|
+
}
|
|
153
131
|
|
|
154
132
|
if (tokenConfigs[asset].asset == address(0)) revert("asset not exist");
|
|
155
133
|
uint256 price = prices[asset];
|
|
156
134
|
|
|
157
135
|
// if price is 0, it means the price hasn't been updated yet and it's meaningless, revert
|
|
158
136
|
if (price == 0) revert("TWAP price must be positive");
|
|
159
|
-
return (price * (10 ** (18 -
|
|
137
|
+
return (price * (10 ** (18 - decimals)));
|
|
160
138
|
}
|
|
161
139
|
|
|
162
140
|
/**
|
|
@@ -188,6 +166,25 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
188
166
|
emit TokenConfigAdded(config.asset, config.pancakePool, config.anchorPeriod);
|
|
189
167
|
}
|
|
190
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @notice Updates the current token/BUSD price from PancakeSwap, with 18 decimals of precision.
|
|
171
|
+
* @return anchorPrice anchor price of the asset
|
|
172
|
+
* @custom:error Missing error is thrown if token config does not exist
|
|
173
|
+
*/
|
|
174
|
+
function updateTwap(address asset) public returns (uint256) {
|
|
175
|
+
if (asset == BNB_ADDR) {
|
|
176
|
+
asset = WBNB;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (tokenConfigs[asset].asset == address(0)) revert("asset not exist");
|
|
180
|
+
// Update & fetch WBNB price first, so we can calculate the price of WBNB paired token
|
|
181
|
+
if (asset != WBNB && tokenConfigs[asset].isBnbBased) {
|
|
182
|
+
if (tokenConfigs[WBNB].asset == address(0)) revert("WBNB not exist");
|
|
183
|
+
_updateTwapInternal(tokenConfigs[WBNB]);
|
|
184
|
+
}
|
|
185
|
+
return _updateTwapInternal(tokenConfigs[asset]);
|
|
186
|
+
}
|
|
187
|
+
|
|
191
188
|
/**
|
|
192
189
|
* @notice Fetches the current token/WBNB and token/BUSD price accumulator from PancakeSwap.
|
|
193
190
|
* @return cumulative price of target token regardless of pair order
|
|
@@ -203,7 +200,7 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
203
200
|
|
|
204
201
|
/**
|
|
205
202
|
* @notice Fetches the current token/BUSD price from PancakeSwap, with 18 decimals of precision.
|
|
206
|
-
* @return price
|
|
203
|
+
* @return price Asset price in USD, with 18 decimals
|
|
207
204
|
* @custom:error Timing error is thrown if current time is not greater than old observation timestamp
|
|
208
205
|
* @custom:error Zero price error is thrown if token is BNB based and price is zero
|
|
209
206
|
* @custom:error Zero price error is thrown if fetched anchorPriceMantissa is zero
|
|
@@ -300,19 +297,4 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
300
297
|
);
|
|
301
298
|
return (cumulativePrice, startCumulativePrice, startCumulativeTimestamp);
|
|
302
299
|
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* @dev This function returns the underlying asset of a vToken
|
|
306
|
-
* @param vToken vToken address
|
|
307
|
-
* @return asset underlying asset address
|
|
308
|
-
*/
|
|
309
|
-
function _getUnderlyingAsset(address vToken) private view returns (address asset) {
|
|
310
|
-
if (vToken == vBnb) {
|
|
311
|
-
asset = WBNB;
|
|
312
|
-
} else if (vToken == vai) {
|
|
313
|
-
asset = vai;
|
|
314
|
-
} else {
|
|
315
|
-
asset = VBep20Interface(vToken).underlying();
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
300
|
}
|
|
@@ -4,15 +4,15 @@ pragma solidity 0.8.13;
|
|
|
4
4
|
import "../../interfaces/FeedRegistryInterface.sol";
|
|
5
5
|
|
|
6
6
|
contract MockBinanceFeedRegistry is FeedRegistryInterface {
|
|
7
|
-
mapping(
|
|
7
|
+
mapping(address => uint256) public assetPrices;
|
|
8
8
|
|
|
9
|
-
function setAssetPrice(
|
|
9
|
+
function setAssetPrice(address base, uint256 price) external {
|
|
10
10
|
assetPrices[base] = price;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
function latestRoundData(
|
|
14
|
+
address base,
|
|
15
|
+
address quote
|
|
16
16
|
)
|
|
17
17
|
external
|
|
18
18
|
view
|
|
@@ -23,7 +23,7 @@ contract MockBinanceFeedRegistry is FeedRegistryInterface {
|
|
|
23
23
|
return (0, int256(assetPrices[base]), 0, block.timestamp - 10, 0);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
function
|
|
26
|
+
function decimals(address base, address quote) external view override returns (uint8) {
|
|
27
27
|
return 8;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -14,6 +14,10 @@ contract MockSimpleOracle is OracleInterface {
|
|
|
14
14
|
return prices[vToken];
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
function getPrice(address asset) external view returns (uint256) {
|
|
18
|
+
return prices[asset];
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
function setPrice(address vToken, uint256 price) public {
|
|
18
22
|
prices[vToken] = price;
|
|
19
23
|
}
|
|
@@ -35,7 +39,15 @@ contract MockBoundValidator is BoundValidatorInterface {
|
|
|
35
39
|
return validateResults[vToken];
|
|
36
40
|
}
|
|
37
41
|
|
|
38
|
-
function
|
|
39
|
-
|
|
42
|
+
function validateAssetPriceWithAnchorPrice(
|
|
43
|
+
address asset,
|
|
44
|
+
uint256 reporterPrice,
|
|
45
|
+
uint256 anchorPrice
|
|
46
|
+
) external view returns (bool) {
|
|
47
|
+
return validateResults[asset];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function setValidateResult(address token, bool pass) public {
|
|
51
|
+
validateResults[token] = pass;
|
|
40
52
|
}
|
|
41
53
|
}
|
|
@@ -60,7 +60,7 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
60
60
|
from: deployer,
|
|
61
61
|
log: true,
|
|
62
62
|
deterministicDeployment: false,
|
|
63
|
-
args: [
|
|
63
|
+
args: [],
|
|
64
64
|
proxy: {
|
|
65
65
|
owner: proxyOwnerAddress,
|
|
66
66
|
proxyContract: "OptimizedTransparentProxy",
|
|
@@ -90,7 +90,7 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
90
90
|
from: deployer,
|
|
91
91
|
log: true,
|
|
92
92
|
deterministicDeployment: false,
|
|
93
|
-
args:
|
|
93
|
+
args: [],
|
|
94
94
|
proxy: {
|
|
95
95
|
owner: proxyOwnerAddress,
|
|
96
96
|
proxyContract: "OptimizedTransparentProxy",
|
|
@@ -105,7 +105,7 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
105
105
|
from: deployer,
|
|
106
106
|
log: true,
|
|
107
107
|
deterministicDeployment: false,
|
|
108
|
-
args: network.live ? [
|
|
108
|
+
args: network.live ? [WBNBAddress] : [],
|
|
109
109
|
proxy: {
|
|
110
110
|
owner: proxyOwnerAddress,
|
|
111
111
|
proxyContract: "OptimizedTransparentProxy",
|
|
@@ -121,7 +121,7 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
121
121
|
from: deployer,
|
|
122
122
|
log: true,
|
|
123
123
|
deterministicDeployment: false,
|
|
124
|
-
args:
|
|
124
|
+
args: [],
|
|
125
125
|
proxy: {
|
|
126
126
|
owner: proxyOwnerAddress,
|
|
127
127
|
proxyContract: "OptimizedTransparentProxy",
|
|
@@ -137,13 +137,13 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
137
137
|
from: deployer,
|
|
138
138
|
log: true,
|
|
139
139
|
deterministicDeployment: false,
|
|
140
|
-
args:
|
|
140
|
+
args: [],
|
|
141
141
|
proxy: {
|
|
142
142
|
owner: proxyOwnerAddress,
|
|
143
143
|
proxyContract: "OptimizedTransparentProxy",
|
|
144
144
|
execute: {
|
|
145
145
|
methodName: "initialize",
|
|
146
|
-
args: network.live ? [sidRegistryAddress, accessControlManagerAddress] : [],
|
|
146
|
+
args: network.live ? [sidRegistryAddress, accessControlManagerAddress, WBNBAddress] : [],
|
|
147
147
|
},
|
|
148
148
|
},
|
|
149
149
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1-deploy-oracles.js","sourceRoot":"","sources":["../../deploy/1-deploy-oracles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uGAAqF;AACrF,uGAAqF;AACrF,sDAA0B;AAI1B,MAAM,SAAS,GAAG;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,sBAAkB,CAAC,SAAS,CAAC,IAAI;QAC9C,WAAW,EAAE,4CAA4C;QACzD,UAAU,EAAE,sBAAkB,CAAC,SAAS,CAAC,GAAG;QAC5C,iBAAiB,EAAE,4CAA4C;QAC/D,kBAAkB,EAAE,4CAA4C;QAChE,GAAG,EAAE,4CAA4C;QACjD,QAAQ,EAAE,sBAAkB,CAAC,SAAS,CAAC,QAAQ;KAChD;IACD,UAAU,EAAE;QACV,WAAW,EAAE,sBAAkB,CAAC,SAAS,CAAC,IAAI;QAC9C,WAAW,EAAE,4CAA4C;QACzD,UAAU,EAAE,sBAAkB,CAAC,SAAS,CAAC,GAAG;QAC5C,iBAAiB,EAAE,4CAA4C;QAC/D,kBAAkB,EAAE,4CAA4C;QAChE,GAAG,EAAE,4CAA4C;QACjD,QAAQ,EAAE,sBAAkB,CAAC,SAAS,CAAC,QAAQ;KAChD;CACF,CAAC;AAEF,MAAM,IAAI,GAAmB,UAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,OAAO,EAA6B;;QAChH,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;QAC/B,MAAM,EAAE,QAA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