@ensuro/core 1.2.4 → 1.2.7
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/build/contracts/AaveAssetManager.sol/AaveAssetManager.json +21 -2
- package/build/contracts/BaseAssetManager.sol/BaseAssetManager.json +19 -0
- package/build/contracts/EToken.sol/EToken.json +21 -2
- package/build/contracts/Exchange.sol/Exchange.json +110 -2
- package/build/contracts/FlightDelayRiskModule.sol/FlightDelayRiskModule.json +21 -2
- package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +21 -2
- package/build/contracts/PolicyNFT.sol/PolicyNFT.json +2 -2
- package/build/contracts/PolicyPool.sol/PolicyPool.json +2 -2
- package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +19 -0
- package/build/contracts/PolicyPoolConfig.sol/PolicyPoolConfig.json +2 -2
- package/build/contracts/RiskModule.sol/RiskModule.json +19 -0
- package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +21 -2
- package/build/contracts/extras/PriceRiskModule.sol/PriceRiskModule.json +21 -2
- package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1.json +2 -2
- package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1_Upgrade.json +2 -2
- package/build/interfaces/IExchange.sol/IExchange.json +76 -0
- package/contracts/EToken.sol +1 -5
- package/contracts/Exchange.sol +52 -5
- package/contracts/PolicyPoolComponent.sol +6 -0
- package/interfaces/IExchange.sol +12 -0
- package/interfaces/IPolicyPoolConfig.sol +2 -0
- package/package.json +1 -1
package/interfaces/IExchange.sol
CHANGED
|
@@ -25,6 +25,8 @@ interface IExchange {
|
|
|
25
25
|
uint256 amount
|
|
26
26
|
) external view returns (uint256);
|
|
27
27
|
|
|
28
|
+
function getExchangeRate(address asset, address expressedInAsset) external view returns (uint256);
|
|
29
|
+
|
|
28
30
|
function getAmountIn(
|
|
29
31
|
address assetIn,
|
|
30
32
|
address assetOut,
|
|
@@ -43,5 +45,15 @@ interface IExchange {
|
|
|
43
45
|
uint256 deadline
|
|
44
46
|
) external view returns (bytes memory);
|
|
45
47
|
|
|
48
|
+
function buy(
|
|
49
|
+
address assetIn,
|
|
50
|
+
address assetOut,
|
|
51
|
+
uint256 amountOutExact,
|
|
52
|
+
address outAddr,
|
|
53
|
+
uint256 deadline
|
|
54
|
+
) external view returns (bytes memory);
|
|
55
|
+
|
|
46
56
|
function decodeSwapOut(bytes memory responseData) external view returns (uint256);
|
|
57
|
+
|
|
58
|
+
function maxSlippage() external view returns (uint256);
|
|
47
59
|
}
|
|
@@ -47,6 +47,8 @@ interface IPolicyPoolConfig is IAccessControlUpgradeable {
|
|
|
47
47
|
setAcceptAllRMs, // EToken Governance action - value == boolean
|
|
48
48
|
setAcceptException, // EToken Governance action - value == (!isException << 255)|address
|
|
49
49
|
setExchange, // Changes exchange helper contract
|
|
50
|
+
setPriceOracle, // Changes exchange's PriceOracle
|
|
51
|
+
setSwapRouter, // Changes exchange's SwapRouter
|
|
50
52
|
last
|
|
51
53
|
}
|
|
52
54
|
|