@venusprotocol/oracle 1.6.12-dev.7 → 1.6.13
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/{5e3358a24918f424864f98433dd157fb.json → fc01a49cbd804e304740a46d676189d0.json} +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +4 -36
- 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/BoundValidatorInterface.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 +0 -19
- package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.json +3 -3
- 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 +32 -45
- package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.dbg.json +1 -1
- package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.json +54 -4
- package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.json +60 -5
- package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.json +43 -6
- package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.json +41 -18
- 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 +3 -32
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.json +2 -21
- 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 +70 -100
- package/contracts/interfaces/FeedRegistryInterface.sol +4 -4
- package/contracts/interfaces/OracleInterface.sol +3 -5
- package/contracts/oracles/BinanceOracle.sol +58 -53
- package/contracts/oracles/BoundValidator.sol +51 -22
- package/contracts/oracles/ChainlinkOracle.sol +68 -28
- package/contracts/oracles/PythOracle.sol +48 -28
- package/contracts/oracles/TwapOracle.sol +57 -39
- package/contracts/oracles/mocks/MockBinanceFeedRegistry.sol +6 -6
- package/contracts/test/MockSimpleOracle.sol +2 -14
- 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 asset represented as 1e{decimals}
|
|
26
|
+
/// @notice Decimals of underlying asset represented as 1e{decimals}
|
|
27
27
|
uint256 baseUnit;
|
|
28
28
|
/// @notice The address of Pancake pair
|
|
29
29
|
address pancakePool;
|
|
@@ -36,13 +36,18 @@ 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
|
-
|
|
42
39
|
/// @notice WBNB address
|
|
43
40
|
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
|
|
44
41
|
address public immutable WBNB;
|
|
45
42
|
|
|
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
|
+
|
|
46
51
|
/// @notice the base unit of WBNB and BUSD, which are the paired tokens for all assets
|
|
47
52
|
uint256 public constant BNB_BASE_UNIT = 1e18;
|
|
48
53
|
uint256 public constant BUSD_BASE_UNIT = 1e18;
|
|
@@ -80,10 +85,18 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
/// @notice Constructor for the implementation contract. Sets immutable variables.
|
|
88
|
+
/// @param vBnbAddress The address of the VBNB
|
|
83
89
|
/// @param wBnbAddress The address of the WBNB
|
|
90
|
+
/// @param vaiAddress The address of the WBNB
|
|
84
91
|
/// @custom:oz-upgrades-unsafe-allow constructor
|
|
85
|
-
constructor(
|
|
92
|
+
constructor(
|
|
93
|
+
address vBnbAddress,
|
|
94
|
+
address wBnbAddress,
|
|
95
|
+
address vaiAddress
|
|
96
|
+
) notNullAddress(vBnbAddress) notNullAddress(wBnbAddress) notNullAddress(vaiAddress) {
|
|
97
|
+
vBnb = vBnbAddress;
|
|
86
98
|
WBNB = wBnbAddress;
|
|
99
|
+
vai = vaiAddress;
|
|
87
100
|
_disableInitializers();
|
|
88
101
|
}
|
|
89
102
|
|
|
@@ -112,29 +125,38 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
112
125
|
}
|
|
113
126
|
|
|
114
127
|
/**
|
|
115
|
-
* @notice
|
|
116
|
-
* @
|
|
117
|
-
* @
|
|
118
|
-
* @custom:error Missing error is thrown if the token config does not exist
|
|
119
|
-
* @custom:error Range error is thrown if TWAP price is not greater than zero
|
|
128
|
+
* @notice Updates the current token/BUSD price from PancakeSwap, with 18 decimals of precision.
|
|
129
|
+
* @return anchorPrice anchor price of the underlying asset of the vToken
|
|
130
|
+
* @custom:error Missing error is thrown if token config does not exist
|
|
120
131
|
*/
|
|
121
|
-
function
|
|
122
|
-
|
|
132
|
+
function updateTwap(address vToken) external returns (uint256) {
|
|
133
|
+
address asset = _getUnderlyingAsset(vToken);
|
|
123
134
|
|
|
124
|
-
if (asset ==
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
decimals = token.decimals();
|
|
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]);
|
|
130
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
|
|
148
|
+
* @custom:error Missing error is thrown if the token config does not exist
|
|
149
|
+
* @custom:error Range error is thrown if TWAP price is not greater than zero
|
|
150
|
+
*/
|
|
151
|
+
function getUnderlyingPrice(address vToken) external view override returns (uint256) {
|
|
152
|
+
address asset = _getUnderlyingAsset(vToken);
|
|
131
153
|
|
|
132
154
|
if (tokenConfigs[asset].asset == address(0)) revert("asset not exist");
|
|
133
155
|
uint256 price = prices[asset];
|
|
134
156
|
|
|
135
157
|
// if price is 0, it means the price hasn't been updated yet and it's meaningless, revert
|
|
136
158
|
if (price == 0) revert("TWAP price must be positive");
|
|
137
|
-
return (price * (10 ** (18 - decimals)));
|
|
159
|
+
return (price * (10 ** (18 - IERC20Metadata(asset).decimals())));
|
|
138
160
|
}
|
|
139
161
|
|
|
140
162
|
/**
|
|
@@ -166,25 +188,6 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
166
188
|
emit TokenConfigAdded(config.asset, config.pancakePool, config.anchorPeriod);
|
|
167
189
|
}
|
|
168
190
|
|
|
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
|
-
|
|
188
191
|
/**
|
|
189
192
|
* @notice Fetches the current token/WBNB and token/BUSD price accumulator from PancakeSwap.
|
|
190
193
|
* @return cumulative price of target token regardless of pair order
|
|
@@ -200,7 +203,7 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
200
203
|
|
|
201
204
|
/**
|
|
202
205
|
* @notice Fetches the current token/BUSD price from PancakeSwap, with 18 decimals of precision.
|
|
203
|
-
* @return price
|
|
206
|
+
* @return price Underlying price in USD, with 18 decimals
|
|
204
207
|
* @custom:error Timing error is thrown if current time is not greater than old observation timestamp
|
|
205
208
|
* @custom:error Zero price error is thrown if token is BNB based and price is zero
|
|
206
209
|
* @custom:error Zero price error is thrown if fetched anchorPriceMantissa is zero
|
|
@@ -297,4 +300,19 @@ contract TwapOracle is AccessControlledV8, TwapInterface {
|
|
|
297
300
|
);
|
|
298
301
|
return (cumulativePrice, startCumulativePrice, startCumulativeTimestamp);
|
|
299
302
|
}
|
|
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
|
+
}
|
|
300
318
|
}
|
|
@@ -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(string => uint256) public assetPrices;
|
|
8
8
|
|
|
9
|
-
function setAssetPrice(
|
|
9
|
+
function setAssetPrice(string memory base, uint256 price) external {
|
|
10
10
|
assetPrices[base] = price;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
function latestRoundDataByName(
|
|
14
|
+
string memory base,
|
|
15
|
+
string memory 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 decimalsByName(string memory base, string memory quote) external view override returns (uint8) {
|
|
27
27
|
return 8;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -14,10 +14,6 @@ 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
|
-
|
|
21
17
|
function setPrice(address vToken, uint256 price) public {
|
|
22
18
|
prices[vToken] = price;
|
|
23
19
|
}
|
|
@@ -39,15 +35,7 @@ contract MockBoundValidator is BoundValidatorInterface {
|
|
|
39
35
|
return validateResults[vToken];
|
|
40
36
|
}
|
|
41
37
|
|
|
42
|
-
function
|
|
43
|
-
|
|
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;
|
|
38
|
+
function setValidateResult(address vToken, bool pass) public {
|
|
39
|
+
validateResults[vToken] = pass;
|
|
52
40
|
}
|
|
53
41
|
}
|
|
@@ -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: [vBNBAddress, VAIAddress],
|
|
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: network.live ? [vBNBAddress, VAIAddress] : [],
|
|
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 ? [WBNBAddress] : [],
|
|
108
|
+
args: network.live ? [vBNBAddress, WBNBAddress, VAIAddress] : [],
|
|
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: network.live ? [vBNBAddress, VAIAddress] : [],
|
|
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: network.live ? [vBNBAddress, VAIAddress] : [],
|
|
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] : [],
|
|
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,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