@pendle/core-v2 6.6.1 → 6.7.1
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/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -88
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +2 -122
- package/build/artifacts/contracts/cross-chain/OFTPTSwapper.sol/OFTPTSwapper.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/OFTPTSwapper.sol/OFTPTSwapper.json +99 -0
- package/build/artifacts/contracts/cross-chain/factory/PendleBridgePTFactory.sol/PendleBridgePTFactory.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/factory/PendleBridgePTFactory.sol/PendleBridgePTFactory.json +1388 -0
- package/build/artifacts/contracts/cross-chain/funder/BridgeFunder.sol/BridgeFunder.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterAltImpl.sol/OFTAdapterAltImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterAltImpl.sol/OFTAdapterAltImpl.json +46 -14
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.json +46 -14
- package/build/artifacts/contracts/cross-chain/oftImpl/pendleOft/PendleOFT.sol/PendleOFT.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/oftImpl/pendleOft/PendleOFT.sol/PendleOFT.json +1541 -0
- package/build/artifacts/contracts/cross-chain/oftImpl/pendleOft/PendleOFTAlt.sol/PendleOFTAlt.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/oftImpl/pendleOft/PendleOFTAlt.sol/PendleOFTAlt.json +1570 -0
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.json +57 -35
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalTokenAlt.sol/PendleBridgedPrincipalTokenAlt.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalTokenAlt.sol/PendleBridgedPrincipalTokenAlt.json +57 -35
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgeFunder.sol/IPBridgeFunder.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgePTFactory.sol/IPBridgePTFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPBridgePTFactory.sol/IPBridgePTFactory.json +1026 -0
- package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.json +11 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.json +0 -67
- package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.json +0 -120
- package/build/artifacts/contracts/interfaces/IPOFTPTSwapper.sol/IPOFTPTSwapper.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{IPSwapHelper.sol/IPSwapHelper.json → IPOFTPTSwapper.sol/IPOFTPTSwapper.json} +2 -2
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
- package/build/artifacts/contracts/limit/helpers/MintSyHelper.sol/MintSyHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +1 -28
- package/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol +1 -36
- package/contracts/cross-chain/{PendleSwapHelper.sol → OFTPTSwapper.sol} +4 -3
- package/contracts/cross-chain/factory/PendleBridgePTFactory.sol +495 -0
- package/contracts/cross-chain/oftImpl/hub/OFTAdapterAltImpl.sol +5 -4
- package/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol +14 -6
- package/contracts/cross-chain/oftImpl/pendleOft/PendleOFT.sol +11 -0
- package/contracts/cross-chain/oftImpl/pendleOft/PendleOFTAlt.sol +52 -0
- package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol +33 -24
- package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalTokenAlt.sol +4 -13
- package/contracts/interfaces/IPBridgePTFactory.sol +129 -0
- package/contracts/interfaces/IPBridgedPrincipalToken.sol +4 -2
- package/contracts/interfaces/IPMerkleDistributor.sol +0 -7
- package/contracts/interfaces/IPMultiTokenMerkleDistributor.sol +0 -10
- package/contracts/interfaces/{IPSwapHelper.sol → IPOFTPTSwapper.sol} +1 -1
- package/contracts/limit/LimitRouterBase.sol +1 -1
- package/contracts/router/swap-aggregator/OKXScaleHelper.sol +4 -1
- package/deployments/1-core.json +2 -1
- package/deployments/130-core.json +2 -1
- package/deployments/143-core.json +38 -1
- package/deployments/143-offchain-helper.json +11 -0
- package/deployments/42161-core.json +2 -1
- package/deployments/4217-core.json +3 -1
- package/deployments/43114-core.json +3 -1
- package/deployments/56-core.json +2 -1
- package/deployments/57073-core.json +4 -1
- package/deployments/747474-core.json +4 -1
- package/deployments/8453-core.json +2 -1
- package/deployments/9745-core.json +2 -1
- package/deployments/999-core.json +2 -1
- package/package.json +12 -9
- package/typechain-types/DVNOptions.ts +57 -0
- package/typechain-types/ExecutorOptions.ts +57 -0
- package/typechain-types/IPBridgePTFactory.ts +936 -0
- package/typechain-types/IPMerkleDistributor.ts +0 -90
- package/typechain-types/IPMultiTokenMerkleDistributor.ts +0 -158
- package/typechain-types/IPOFTPTSwapper.ts +161 -0
- package/typechain-types/OAppPreCrimeSimulatorUpgradeable.ts +410 -0
- package/typechain-types/OFTAdapterAltImpl.ts +50 -19
- package/typechain-types/OFTAdapterImpl.ts +50 -19
- package/typechain-types/OFTAdapterUpgradeable.ts +1337 -0
- package/typechain-types/OFTCoreUpgradeable.ts +1337 -0
- package/typechain-types/OFTPTSwapper.ts +161 -0
- package/typechain-types/OFTUpgradeable.ts +1681 -0
- package/typechain-types/OptionsBuilder.ts +57 -0
- package/typechain-types/PendleBridgePTFactory.ts +1311 -0
- package/typechain-types/PendleBridgedPrincipalToken.ts +67 -20
- package/typechain-types/PendleBridgedPrincipalTokenAlt.ts +67 -20
- package/typechain-types/PendleMerkleDistributor.ts +0 -106
- package/typechain-types/PendleMultiTokenMerkleDistributor.ts +0 -158
- package/typechain-types/PendleOFT.ts +1675 -0
- package/typechain-types/PendleOFTAlt.ts +1694 -0
- package/typechain-types/factories/DVNOptions__factory.ts +77 -0
- package/typechain-types/factories/ExecutorOptions__factory.ts +84 -0
- package/typechain-types/factories/IOFT__factory.ts +11 -0
- package/typechain-types/factories/IPBridgePTFactory__factory.ts +1041 -0
- package/typechain-types/factories/IPBridgedPrincipalToken__factory.ts +11 -0
- package/typechain-types/factories/IPMerkleDistributor__factory.ts +0 -67
- package/typechain-types/factories/IPMultiTokenMerkleDistributor__factory.ts +0 -120
- package/typechain-types/factories/IPOFTPTSwapper__factory.ts +114 -0
- package/typechain-types/factories/OAppPreCrimeSimulatorUpgradeable__factory.ts +311 -0
- package/typechain-types/factories/OFTAdapterAltImpl__factory.ts +49 -25
- package/typechain-types/factories/OFTAdapterImpl__factory.ts +49 -25
- package/typechain-types/factories/OFTAdapterUpgradeable__factory.ts +1287 -0
- package/typechain-types/factories/OFTAdapter__factory.ts +11 -0
- package/typechain-types/factories/OFTCoreUpgradeable__factory.ts +1283 -0
- package/typechain-types/factories/OFTCore__factory.ts +11 -0
- package/typechain-types/factories/OFTPTSwapper__factory.ts +149 -0
- package/typechain-types/factories/OFTUpgradeable__factory.ts +1553 -0
- package/typechain-types/factories/OFT__factory.ts +11 -0
- package/typechain-types/factories/OptionsBuilder__factory.ts +91 -0
- package/typechain-types/factories/PendleBridgePTFactory__factory.ts +1481 -0
- package/typechain-types/factories/PendleBridgedPrincipalTokenAlt__factory.ts +60 -58
- package/typechain-types/factories/PendleBridgedPrincipalToken__factory.ts +60 -58
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -87
- package/typechain-types/factories/PendleMultiTokenMerkleDistributor__factory.ts +1 -121
- package/typechain-types/factories/PendleOFTAlt__factory.ts +1628 -0
- package/typechain-types/factories/PendleOFT__factory.ts +1599 -0
- package/typechain-types/factories/PendlePTOFTAdapterFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleSwap__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +107 -53
- package/typechain-types/index.ts +26 -12
- package/build/artifacts/contracts/cross-chain/PendleSwapHelper.sol/PendleSwapHelper.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/PendleSwapHelper.sol/PendleSwapHelper.json +0 -99
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.json +0 -280
- package/build/artifacts/contracts/interfaces/IPSwapHelper.sol/IPSwapHelper.dbg.json +0 -4
- package/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol +0 -38
|
@@ -2,40 +2,49 @@
|
|
|
2
2
|
pragma solidity ^0.8.19;
|
|
3
3
|
|
|
4
4
|
import {IPBridgedPrincipalToken} from "../../../interfaces/IPBridgedPrincipalToken.sol";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import {
|
|
6
|
+
IOFT,
|
|
7
|
+
OFTCoreUpgradeable,
|
|
8
|
+
OFTUpgradeable
|
|
9
|
+
} from "@layerzerolabs/oft-evm-upgradeable/contracts/oft/OFTUpgradeable.sol";
|
|
10
|
+
import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
|
|
11
|
+
import {
|
|
12
|
+
IERC20MetadataUpgradeable
|
|
13
|
+
} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol";
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
/// @notice Contract deployer must be IPBridgePTFactory for additional information.
|
|
16
|
+
/// This is for deterministic deployment.
|
|
17
|
+
contract PendleBridgedPrincipalToken is IPBridgedPrincipalToken, OFTUpgradeable {
|
|
10
18
|
uint256 public immutable expiry;
|
|
11
19
|
uint8 internal immutable LOCAL_DECIMALS;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
constructor(
|
|
15
|
-
string memory _name,
|
|
16
|
-
string memory _symbol,
|
|
17
|
-
address _lzEndpoint,
|
|
18
|
-
address _delegate,
|
|
19
|
-
uint256 _expiry,
|
|
20
|
-
uint8 _localDecimals,
|
|
21
|
-
uint8 _sharedDecimals,
|
|
22
|
-
address initialOwner
|
|
23
|
-
) OFT(_name, _symbol, _lzEndpoint, _delegate) {
|
|
20
|
+
|
|
21
|
+
constructor(address _lzEndpoint, uint256 _expiry, uint8 _decimals) OFTUpgradeable(_lzEndpoint) {
|
|
24
22
|
expiry = _expiry;
|
|
25
|
-
_transferOwnership(initialOwner);
|
|
26
23
|
|
|
27
|
-
LOCAL_DECIMALS =
|
|
28
|
-
|
|
24
|
+
LOCAL_DECIMALS = _decimals;
|
|
25
|
+
|
|
26
|
+
uint8 shared = sharedDecimals();
|
|
27
|
+
require(LOCAL_DECIMALS >= shared, "InvalidLocalDecimals");
|
|
29
28
|
|
|
30
29
|
// override decimalConversionRate set in OFTCore constructor
|
|
31
|
-
decimalConversionRate = 10 ** (LOCAL_DECIMALS -
|
|
30
|
+
decimalConversionRate = 10 ** (LOCAL_DECIMALS - sharedDecimals());
|
|
31
|
+
|
|
32
|
+
_disableInitializers();
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
function
|
|
35
|
-
|
|
35
|
+
function initialize(string memory _name, string memory _symbol, address ownerDelegate) external initializer {
|
|
36
|
+
__OFT_init(_name, _symbol, ownerDelegate);
|
|
37
|
+
_transferOwnership(ownerDelegate);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
/// @dev This functions is used to passed in the decimals to OFTCoreUpgradeable's constructor.
|
|
41
|
+
/// Since `LOCAL_DECIMALS` was not initialized at that point, we return 18 to avoid the `InvalidLocalDecimals`
|
|
42
|
+
/// revert.
|
|
43
|
+
///
|
|
44
|
+
/// See
|
|
45
|
+
/// https://github.com/LayerZero-Labs/devtools/blob/128b697838f4b0fd53ae748093fd66cc409ae5c4/packages/oft-evm-upgradeable/contracts/oft/OFTCoreUpgradeable.sol#L72
|
|
46
|
+
function decimals() public view override(ERC20Upgradeable, IERC20MetadataUpgradeable) returns (uint8 res) {
|
|
47
|
+
res = LOCAL_DECIMALS;
|
|
48
|
+
if (res == 0) res = 18;
|
|
40
49
|
}
|
|
41
50
|
}
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
|
|
10
10
|
import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
11
11
|
|
|
12
|
+
/// @notice Contract deployer must be IPBridgePTFactory for additional information.
|
|
13
|
+
/// This is for deterministic deployment.
|
|
12
14
|
contract PendleBridgedPrincipalTokenAlt is PendleBridgedPrincipalToken {
|
|
13
15
|
using SafeERC20 for IERC20;
|
|
14
16
|
|
|
@@ -17,19 +19,8 @@ contract PendleBridgedPrincipalTokenAlt is PendleBridgedPrincipalToken {
|
|
|
17
19
|
|
|
18
20
|
address public immutable nativeToken;
|
|
19
21
|
|
|
20
|
-
constructor(
|
|
21
|
-
|
|
22
|
-
string memory _symbol,
|
|
23
|
-
address _lzEndpoint,
|
|
24
|
-
address _delegate,
|
|
25
|
-
uint256 _expiry,
|
|
26
|
-
uint8 _localDecimals,
|
|
27
|
-
uint8 _sharedDecimals,
|
|
28
|
-
address initialOwner
|
|
29
|
-
)
|
|
30
|
-
PendleBridgedPrincipalToken(
|
|
31
|
-
_name, _symbol, _lzEndpoint, _delegate, _expiry, _localDecimals, _sharedDecimals, initialOwner
|
|
32
|
-
)
|
|
22
|
+
constructor(address _lzEndpoint, uint256 _expiry, uint8 _decimals)
|
|
23
|
+
PendleBridgedPrincipalToken(_lzEndpoint, _expiry, _decimals)
|
|
33
24
|
{
|
|
34
25
|
nativeToken = endpoint.nativeToken();
|
|
35
26
|
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import {IPGovernanceProxy} from "./IPGovernanceProxy.sol";
|
|
5
|
+
import {SetConfigParam} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol";
|
|
6
|
+
import {MessagingFee, MessagingReceipt} from "@layerzerolabs/oapp-evm/contracts/oapp/OApp.sol";
|
|
7
|
+
import {IOAppCore} from "@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppCore.sol";
|
|
8
|
+
|
|
9
|
+
interface IPBridgePTFactory is IOAppCore {
|
|
10
|
+
event PTOFTDeployed(uint32 indexed lzEid, bytes32 indexed originalPt, address indexed oft);
|
|
11
|
+
|
|
12
|
+
event PTOFTWired(uint32 indexed hubLzEid, address indexed hubPt, uint32[] toPeerEids);
|
|
13
|
+
|
|
14
|
+
event FactoryWired(uint32 indexed peerEid, address indexed peer);
|
|
15
|
+
|
|
16
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
17
|
+
/// Getters
|
|
18
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
19
|
+
|
|
20
|
+
function LZ_EID() external view returns (uint32);
|
|
21
|
+
|
|
22
|
+
function GOV_PROXY() external view returns (IPGovernanceProxy);
|
|
23
|
+
|
|
24
|
+
function HUB_PT_OFT_ADAPTER_CREATION_CODE() external view returns (address);
|
|
25
|
+
|
|
26
|
+
function SPOKE_PT_OFT_CREATION_CODE() external view returns (address);
|
|
27
|
+
|
|
28
|
+
function SELF_CHAIN_SHORT_NAME() external view returns (string memory);
|
|
29
|
+
|
|
30
|
+
function OFT_PROXY_ADMIN() external view returns (address);
|
|
31
|
+
|
|
32
|
+
function derivePtOftAddress(uint32 peerLzEid, uint32 hubLzEid, address hubPt) external view returns (address oft);
|
|
33
|
+
|
|
34
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
35
|
+
/// Deploy hub PT OFT adapter
|
|
36
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
37
|
+
|
|
38
|
+
function deployHubPtOftAdapter(address hubPt) external returns (address oft);
|
|
39
|
+
|
|
40
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
41
|
+
/// Deploy spoke PT OFT
|
|
42
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
43
|
+
|
|
44
|
+
struct SpokePtDeploymentParams {
|
|
45
|
+
address hubPt;
|
|
46
|
+
string name;
|
|
47
|
+
string symbol;
|
|
48
|
+
uint256 expiry;
|
|
49
|
+
uint8 decimals;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function quoteDeploySpokePtOft(address hubPt, uint32 toPeerEid, bytes calldata options, bool payInLzToken)
|
|
53
|
+
external
|
|
54
|
+
view
|
|
55
|
+
returns (MessagingFee memory fee);
|
|
56
|
+
|
|
57
|
+
function deploySpokePtOft(address hubPt, uint32 toPeerEid, bytes calldata options, MessagingFee memory fee)
|
|
58
|
+
external
|
|
59
|
+
payable
|
|
60
|
+
returns (MessagingReceipt memory msgReceipt);
|
|
61
|
+
|
|
62
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
63
|
+
/// wirePtOft on the self chain
|
|
64
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
65
|
+
|
|
66
|
+
struct WirePtOftParams {
|
|
67
|
+
uint32 hubLzEid;
|
|
68
|
+
address hubPt;
|
|
69
|
+
uint32[] toPeerEids;
|
|
70
|
+
/// @notice enforcedReceiveGas[i] is the gas limit for the receive call on toPeerEids[i];
|
|
71
|
+
/// use 0 value = use DEFAULT_PT_OFT_ENFORCED_RECEIVE_GAS
|
|
72
|
+
uint128[] enforcedReceiveGas;
|
|
73
|
+
bool setSendLib;
|
|
74
|
+
bool setReceiveLib;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function wirePtOft(WirePtOftParams memory params) external;
|
|
78
|
+
|
|
79
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
80
|
+
/// Remote wirePtOft on the other chains
|
|
81
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
82
|
+
|
|
83
|
+
function quoteRemoteWirePtOft(
|
|
84
|
+
uint32 peerEid,
|
|
85
|
+
WirePtOftParams calldata wireParams,
|
|
86
|
+
bytes calldata options,
|
|
87
|
+
bool payInLzToken
|
|
88
|
+
) external view returns (MessagingFee memory fee);
|
|
89
|
+
|
|
90
|
+
function remoteWirePtOft(
|
|
91
|
+
uint32 peerEid,
|
|
92
|
+
WirePtOftParams calldata wireParams,
|
|
93
|
+
bytes calldata options,
|
|
94
|
+
MessagingFee memory fee
|
|
95
|
+
) external payable returns (MessagingReceipt memory msgReceipt);
|
|
96
|
+
|
|
97
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
98
|
+
/// Self wire
|
|
99
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
100
|
+
|
|
101
|
+
struct SelfWireParams {
|
|
102
|
+
uint32 peerEid;
|
|
103
|
+
address peer;
|
|
104
|
+
SetConfigParam[] sendConfigParam;
|
|
105
|
+
SetConfigParam[] receiveConfigParam;
|
|
106
|
+
bool setSendLib;
|
|
107
|
+
bool setReceiveLib;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function selfWire(SelfWireParams memory params) external;
|
|
111
|
+
|
|
112
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
113
|
+
/// Remote self wire
|
|
114
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
115
|
+
|
|
116
|
+
function quoteRemoteSelfWire(
|
|
117
|
+
uint32 peerEid,
|
|
118
|
+
SelfWireParams calldata wireParams,
|
|
119
|
+
bytes calldata options,
|
|
120
|
+
bool payInLzToken
|
|
121
|
+
) external view returns (MessagingFee memory fee);
|
|
122
|
+
|
|
123
|
+
function remoteSelfWire(
|
|
124
|
+
uint32 peerEid,
|
|
125
|
+
SelfWireParams calldata wireParams,
|
|
126
|
+
bytes calldata options,
|
|
127
|
+
MessagingFee memory fee
|
|
128
|
+
) external payable returns (MessagingReceipt memory msgReceipt);
|
|
129
|
+
}
|
|
@@ -4,8 +4,10 @@ pragma solidity ^0.8.0;
|
|
|
4
4
|
import {IOAppCore} from "@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppCore.sol";
|
|
5
5
|
import {IOAppOptionsType3} from "@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppOptionsType3.sol";
|
|
6
6
|
import {IOFT} from "@layerzerolabs/oft-evm/contracts/interfaces/IOFT.sol";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
IERC20MetadataUpgradeable
|
|
9
|
+
} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol";
|
|
8
10
|
|
|
9
|
-
interface IPBridgedPrincipalToken is IOFT, IOAppCore, IOAppOptionsType3,
|
|
11
|
+
interface IPBridgedPrincipalToken is IOFT, IOAppCore, IOAppOptionsType3, IERC20MetadataUpgradeable {
|
|
10
12
|
function expiry() external view returns (uint256);
|
|
11
13
|
}
|
|
@@ -3,7 +3,6 @@ pragma solidity ^0.8.0;
|
|
|
3
3
|
|
|
4
4
|
interface IPMerkleDistributor {
|
|
5
5
|
event Claimed(address indexed user, address indexed receiver, uint256 amount);
|
|
6
|
-
event Verified(address indexed user, uint256 amountClaimable);
|
|
7
6
|
event SetMerkleRoot(bytes32 indexed merkleRoot);
|
|
8
7
|
|
|
9
8
|
error InvalidMerkleProof();
|
|
@@ -11,10 +10,4 @@ interface IPMerkleDistributor {
|
|
|
11
10
|
function claim(address receiver, uint256 totalAccrued, bytes32[] calldata proof)
|
|
12
11
|
external
|
|
13
12
|
returns (uint256 amountOut);
|
|
14
|
-
|
|
15
|
-
function claimVerified(address receiver) external returns (uint256 amountOut);
|
|
16
|
-
|
|
17
|
-
function verify(address user, uint256 totalAccrued, bytes32[] calldata proof)
|
|
18
|
-
external
|
|
19
|
-
returns (uint256 amountVerified);
|
|
20
13
|
}
|
|
@@ -3,9 +3,7 @@ pragma solidity ^0.8.0;
|
|
|
3
3
|
|
|
4
4
|
interface IPMultiTokenMerkleDistributor {
|
|
5
5
|
event Claimed(address indexed token, address indexed user, address indexed receiver, uint256 amount);
|
|
6
|
-
event Verified(address indexed token, address indexed user, uint256 amountClaimable);
|
|
7
6
|
event SetMerkleRoot(bytes32 indexed merkleRoot);
|
|
8
|
-
event SetDefaultTokenList(address[] defaultTokenList);
|
|
9
7
|
|
|
10
8
|
error InvalidMerkleProof();
|
|
11
9
|
|
|
@@ -13,15 +11,7 @@ interface IPMultiTokenMerkleDistributor {
|
|
|
13
11
|
|
|
14
12
|
function claimed(address token, address user) external view returns (uint256);
|
|
15
13
|
|
|
16
|
-
function verified(address token, address user) external view returns (uint256);
|
|
17
|
-
|
|
18
14
|
function claim(address receiver, address[] memory tokens, uint256[] memory totalAccrueds, bytes32[][] memory proofs)
|
|
19
15
|
external
|
|
20
16
|
returns (uint256[] memory amountOuts);
|
|
21
|
-
|
|
22
|
-
function claimVerified(address receiver, address[] memory tokens) external returns (uint256[] memory amountOuts);
|
|
23
|
-
|
|
24
|
-
function verify(address user, address[] memory tokens, uint256[] memory totalAccrueds, bytes32[][] memory proofs)
|
|
25
|
-
external
|
|
26
|
-
returns (uint256[] memory amountClaimable);
|
|
27
17
|
}
|
|
@@ -24,7 +24,7 @@ abstract contract OKXScaleHelper {
|
|
|
24
24
|
|
|
25
25
|
// https://web3.okx.com/build/dev-docs/dex-api/dex-smart-contract#token-approval
|
|
26
26
|
function __getTokenApproveForChain(uint256 chainid) private pure returns (address) {
|
|
27
|
-
if (chainid == 1) {
|
|
27
|
+
if (chainid == 1 || chainid == 43_114) {
|
|
28
28
|
return 0x40aA958dd87FC8305b97f2BA922CDdCa374bcD7f;
|
|
29
29
|
}
|
|
30
30
|
if (chainid == 10) {
|
|
@@ -48,6 +48,9 @@ abstract contract OKXScaleHelper {
|
|
|
48
48
|
if (chainid == 130) {
|
|
49
49
|
return 0x2e28281Cf3D58f475cebE27bec4B8a23dFC7782c;
|
|
50
50
|
}
|
|
51
|
+
if (chainid == 143) {
|
|
52
|
+
return 0xf534A8a1CAD0543Cd6438f7534CA3486c01998d4;
|
|
53
|
+
}
|
|
51
54
|
return address(0);
|
|
52
55
|
}
|
|
53
56
|
|
package/deployments/1-core.json
CHANGED
|
@@ -76,5 +76,6 @@
|
|
|
76
76
|
"votingController": "0x44087E105137a5095c008AaB6a6530182821F2F0"
|
|
77
77
|
},
|
|
78
78
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
79
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
79
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
80
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
80
81
|
}
|
|
@@ -24,5 +24,6 @@
|
|
|
24
24
|
"devProxyAdmin": "0xD37eB2E6DE40a33ba68BaD94427723b66c954EA9",
|
|
25
25
|
"sparkLinearDiscountOracleFactory": "0x34C91651A070664279866E5f3d6B4d5F65cbbFFb",
|
|
26
26
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
27
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
27
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
28
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
28
29
|
}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
"deployer": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
|
|
3
3
|
"network": {
|
|
4
4
|
"chainId": 143,
|
|
5
|
+
"treasury": "0xCbcb48e22622a3778b6F14C2f5d258Ba026b05e6",
|
|
5
6
|
"governance": "0x7877AdFaDEd756f3248a0EBfe8Ac2E2eF87b75Ac",
|
|
6
7
|
"devMultisig": "0xE6F0489ED91dc27f40f9dbe8f81fccbFC16b9cb1",
|
|
8
|
+
"pendle": "0x5e49e1f85813f2b65858860a3fa231b4186f2e0e",
|
|
7
9
|
"wrappedNative": "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A",
|
|
8
10
|
"initialRewardFee": "50000000000000000",
|
|
9
11
|
"initialInterestFee": "50000000000000000",
|
|
@@ -11,9 +13,44 @@
|
|
|
11
13
|
"safeWaitTime": 15000,
|
|
12
14
|
"hardwareDeployer": "0xeea6F790F18563E91b18DF00B89d9f79b2E6761F"
|
|
13
15
|
},
|
|
16
|
+
"PENDLE": "0x5e49e1f85813f2b65858860a3fa231b4186f2e0e",
|
|
17
|
+
"governanceProxy": "0x2aD631F72fB16d91c4953A7f4260A97C2fE2f31e",
|
|
14
18
|
"proxyAdmin": "0xA28c08f165116587D4F3E708743B4dEe155c5E64",
|
|
15
19
|
"devProxyAdmin": "0xD37eB2E6DE40a33ba68BaD94427723b66c954EA9",
|
|
20
|
+
"baseCodeSplitter": "0xed080cfaE31Ed1c4d4FdbE0A76Ed992Ec9171264",
|
|
21
|
+
"gaugeController": "0x7e500c6efBb00FD3227888256E477171a1304721",
|
|
22
|
+
"yieldContractFactoryV6": "0x4fe1B23ab695D99394Ab78c16A5bE358f31847F4",
|
|
23
|
+
"marketFactoryV6": "0xA3cb62a49b66eB2536cf6F3C7AC82293784888A3",
|
|
24
|
+
"pyYtLpOracle": "0x5542be50420E88dd7D5B4a3D488FA6ED82F6DAc2",
|
|
25
|
+
"router": "0x888888888889758F76e7103c6CbF23ABbF58F946",
|
|
26
|
+
"routerFacets": {
|
|
27
|
+
"ActionAddRemoveLiqV3": "0x2fb6d0753602Bf397fcE38Ec8Ee3a811cA07B3FD",
|
|
28
|
+
"ActionSwapPTV3": "0xbb0Dd79794e58795b08b599297ec55a6Afb6AB58",
|
|
29
|
+
"ActionSwapYTV3": "0x171B480B1A2ebc1acE52e46E0Bd73e7E08413ec2",
|
|
30
|
+
"ActionMiscV3": "0xac1700293346b0bEFC71bCB7E14Bf1c38a5c2a97",
|
|
31
|
+
"ActionSimple": "0xc66eeDCFf0eC9eACbbF721519E5A03c4d82Fe49b",
|
|
32
|
+
"ActionCallbackV3": "0x1F593511d7C670FbA0e2601315F6444C10bC9177",
|
|
33
|
+
"ActionStorageV4": "0x9815cA631062C29f80f5A29783DDd51E08A702db"
|
|
34
|
+
},
|
|
35
|
+
"routerStatic": "0x6813d43782395A1F2AAb42f39aeEDE03ac655e09",
|
|
36
|
+
"pendleSwap": "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
|
|
37
|
+
"reflector": "0x73d5DBF81A4f3bFa7b335e6a2d4638D6017a4fA8",
|
|
38
|
+
"limitRouter": "0x000000000000c9B3E2C3Ec88B1B4c0cD853f4321",
|
|
39
|
+
"syFactory": "0x466CeD3b33045Ea986B2f306C8D0aA8067961CF8",
|
|
40
|
+
"commonDeploy": "0x2Ed473F528E5B320f850d17ADfe0e558f0298aA9",
|
|
41
|
+
"sparkLinearDiscountOracleFactory": "0x34C91651A070664279866E5f3d6B4d5F65cbbFFb",
|
|
42
|
+
"PendleChainlinkOracleFactory": "0x6502cda86f9110f3655512237C9FF2B9CE247c69",
|
|
43
|
+
"experimental": {
|
|
44
|
+
"PendleSparkLinearDiscountOracleFactoryWrapper": "0x9E80e2525c7289ebd6352B428f2beC53b5A4e579",
|
|
45
|
+
"MarketSweed": "0x9205aCD8A2fFD56917d4b9139bA423b4f2a70EE5"
|
|
46
|
+
},
|
|
47
|
+
"vePendleAirdropDistributor": "0x3942F7B55094250644cFfDa7160226Caa349A38E",
|
|
48
|
+
"externalRewardsDistributor": "0x33305665f69B4642D1275f4Ce81c23651674D21C",
|
|
49
|
+
"lpWrapperFactory": "0xA997a99af899951c6A3F218Ef65A0A448A9fF55a",
|
|
50
|
+
"decimalsFactory": "0x992ec6a490a4b7f256bd59e63746951d98b29be9",
|
|
51
|
+
"lpLinearDiscountOracleFactory": "0x44fb16D078E9C39B65d6c15E78EDe9736a9f2DF5",
|
|
52
|
+
"merkleDepositor": "0x3dAe3d1734cA3C7B3089D4DD03C9876e0A0102b4",
|
|
16
53
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
17
54
|
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
18
|
-
"
|
|
55
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
19
56
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pendleMulticallV2": "0x1ca3352a55A3D69cA8e5aB06006e08aaF2bD09f1",
|
|
3
|
+
"implicitSwapfeeContract": "0x82Fae57b2A79D893D88488A7D8BdF2AC6bd2C463",
|
|
4
|
+
"simulateHelper": "0xc23Dd2807e51dd1D317e1321CBeEb9ace98531EE",
|
|
5
|
+
"supplyCapReader": "0x251CfB4E84CefecA6c1e6a4D8a0cb9c524e7484f",
|
|
6
|
+
"balanceReader": "0x2085F50305f656f96b22ECBfe0A4f5e786Ff0438",
|
|
7
|
+
"limitBackendHelperV2": "0xf02CdbD8F6A18c73B73331FEe3C2110e74508977",
|
|
8
|
+
"checkSolvent": "0x4686b7E71571845D9598aC49131B48D698C03869",
|
|
9
|
+
"externalCapGate": "0x65E04a3b2af7716B7f0765dE62Fa2f1B3290C23F",
|
|
10
|
+
"feeSetter": "0x95e9FC738e9C94E730536C6f28c88295d3374466"
|
|
11
|
+
}
|
|
@@ -72,5 +72,6 @@
|
|
|
72
72
|
"vePendle": "0x3209E9412cca80B18338f2a56ADA59c484c39644"
|
|
73
73
|
},
|
|
74
74
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
75
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
75
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
76
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
76
77
|
}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
"devMultisig": "0xE6F0489ED91dc27f40f9dbe8f81fccbFC16b9cb1",
|
|
8
8
|
"hardwareDeployer": "0xeea6F790F18563E91b18DF00B89d9f79b2E6761F"
|
|
9
9
|
},
|
|
10
|
+
"pendleSwap": "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
|
|
10
11
|
"proxyAdmin": "0xD1253ec561EE8708Bd08a77e817668B288f643b3",
|
|
11
12
|
"devProxyAdmin": "0xD37eB2E6DE40a33ba68BaD94427723b66c954EA9",
|
|
12
13
|
"governanceProxy": "0x2aD631F72fB16d91c4953A7f4260A97C2fE2f31e",
|
|
13
|
-
"sparkLinearDiscountOracleFactory": "0x34C91651A070664279866E5f3d6B4d5F65cbbFFb"
|
|
14
|
+
"sparkLinearDiscountOracleFactory": "0x34C91651A070664279866E5f3d6B4d5F65cbbFFb",
|
|
15
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
14
16
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"safeWaitTime": 15000,
|
|
14
14
|
"hardwareDeployer": "0xeea6F790F18563E91b18DF00B89d9f79b2E6761F"
|
|
15
15
|
},
|
|
16
|
+
"pendleSwap": "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
|
|
16
17
|
"fixedPricePTAMM": "0x4d717868F4Bd14ac8B29Bb6361901e30Ae05e340",
|
|
17
18
|
"sparkLinearDiscountOracleFactory": "0x1fbacedf510daa79dfd9b41227a7ba192d5d548d",
|
|
18
19
|
"experimental": {
|
|
@@ -22,5 +23,6 @@
|
|
|
22
23
|
"proxyAdmin": "0xA28c08f165116587D4F3E708743B4dEe155c5E64",
|
|
23
24
|
"devProxyAdmin": "0xD37eB2E6DE40a33ba68BaD94427723b66c954EA9",
|
|
24
25
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
25
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
26
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
27
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
26
28
|
}
|
package/deployments/56-core.json
CHANGED
|
@@ -70,5 +70,6 @@
|
|
|
70
70
|
"vePendle": "0x8A09574b0401A856d89d1b583eE22E8cb0C5530B"
|
|
71
71
|
},
|
|
72
72
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
73
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
73
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
74
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
74
75
|
}
|
|
@@ -11,9 +11,12 @@
|
|
|
11
11
|
"safeWaitTime": 15000,
|
|
12
12
|
"hardwareDeployer": "0xeea6F790F18563E91b18DF00B89d9f79b2E6761F"
|
|
13
13
|
},
|
|
14
|
+
"governanceProxy": "0x2aD631F72fB16d91c4953A7f4260A97C2fE2f31e",
|
|
15
|
+
"pendleSwap": "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
|
|
14
16
|
"proxyAdmin": "0xA28c08f165116587D4F3E708743B4dEe155c5E64",
|
|
15
17
|
"devProxyAdmin": "0xD37eB2E6DE40a33ba68BaD94427723b66c954EA9",
|
|
16
18
|
"sparkLinearDiscountOracleFactory": "0x34C91651A070664279866E5f3d6B4d5F65cbbFFb",
|
|
17
19
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
18
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
20
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
21
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
19
22
|
}
|
|
@@ -11,9 +11,12 @@
|
|
|
11
11
|
"safeWaitTime": 15000,
|
|
12
12
|
"hardwareDeployer": "0xeea6F790F18563E91b18DF00B89d9f79b2E6761F"
|
|
13
13
|
},
|
|
14
|
+
"governanceProxy": "0x2aD631F72fB16d91c4953A7f4260A97C2fE2f31e",
|
|
15
|
+
"pendleSwap": "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
|
|
14
16
|
"proxyAdmin": "0xA28c08f165116587D4F3E708743B4dEe155c5E64",
|
|
15
17
|
"devProxyAdmin": "0xD37eB2E6DE40a33ba68BaD94427723b66c954EA9",
|
|
16
18
|
"sparkLinearDiscountOracleFactory": "0x34C91651A070664279866E5f3d6B4d5F65cbbFFb",
|
|
17
19
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
18
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
20
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
21
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
19
22
|
}
|
|
@@ -62,5 +62,6 @@
|
|
|
62
62
|
"vePendle": "0x051dcd6a80f11fE68F77Fb0EBdE03853FA96B1fD"
|
|
63
63
|
},
|
|
64
64
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
65
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
65
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
66
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
66
67
|
}
|
|
@@ -63,5 +63,6 @@
|
|
|
63
63
|
"vePendle": "0x0d7432A9f5C51fdd2407332D90D9b814827982Bf"
|
|
64
64
|
},
|
|
65
65
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
66
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
66
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
67
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
67
68
|
}
|
|
@@ -63,5 +63,6 @@
|
|
|
63
63
|
"vePendle": "0x1fBaCedf510dAA79dfD9B41227A7ba192d5D548D"
|
|
64
64
|
},
|
|
65
65
|
"crossChainSwapHub": "0xd41c99760f4A7e27E736ED25cd6915110948Ea8a",
|
|
66
|
-
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D"
|
|
66
|
+
"depositBoxFactory": "0x15Ff9D268ef3300a3fcCe5DE4bc4326316c5dD6D",
|
|
67
|
+
"oftPtSwapper": "0x8ef78aD230887E05fa3324277A5225fE93889b08"
|
|
67
68
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@pendle/core-v2",
|
|
3
3
|
"description": "Core smart contracts of Pendle Protocol.",
|
|
4
4
|
"license": "BUSL-1.1",
|
|
5
|
-
"version": "6.
|
|
5
|
+
"version": "6.7.1",
|
|
6
6
|
"homepage": "https://pendle.finance",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"pendle",
|
|
@@ -41,18 +41,21 @@
|
|
|
41
41
|
"format": "forge fmt",
|
|
42
42
|
"prepack": "yarn compile"
|
|
43
43
|
},
|
|
44
|
-
"packageManager": "yarn@4.
|
|
44
|
+
"packageManager": "yarn@4.12.0",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@chainlink/contracts": "
|
|
47
|
-
"@layerzerolabs/lz-evm-
|
|
48
|
-
"@layerzerolabs/
|
|
49
|
-
"@layerzerolabs/oapp-evm
|
|
50
|
-
"@layerzerolabs/
|
|
46
|
+
"@chainlink/contracts": "0.8.0",
|
|
47
|
+
"@layerzerolabs/lz-evm-messagelib-v2": "3.0.148",
|
|
48
|
+
"@layerzerolabs/lz-evm-protocol-v2": "3.0.148",
|
|
49
|
+
"@layerzerolabs/oapp-evm": "0.4.1",
|
|
50
|
+
"@layerzerolabs/oapp-evm-upgradeable": "0.1.3",
|
|
51
|
+
"@layerzerolabs/oft-evm": "4.0.1",
|
|
52
|
+
"@layerzerolabs/oft-evm-upgradeable": "4.0.2",
|
|
51
53
|
"@openzeppelin/contracts": "4.9.3",
|
|
52
54
|
"@openzeppelin/contracts-upgradeable": "4.9.3",
|
|
53
|
-
"ethers": "^5.7.2"
|
|
55
|
+
"ethers": "^5.7.2",
|
|
56
|
+
"solidity-bytes-utils": "0.8.4"
|
|
54
57
|
},
|
|
55
58
|
"publishConfig": {
|
|
56
59
|
"access": "public"
|
|
57
60
|
}
|
|
58
|
-
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { BaseContract, Signer, utils } from "ethers";
|
|
5
|
+
|
|
6
|
+
import { Listener, Provider } from "@ethersproject/providers";
|
|
7
|
+
import type {
|
|
8
|
+
TypedEventFilter,
|
|
9
|
+
TypedEvent,
|
|
10
|
+
TypedListener,
|
|
11
|
+
OnEvent,
|
|
12
|
+
} from "./common";
|
|
13
|
+
|
|
14
|
+
export interface DVNOptionsInterface extends utils.Interface {
|
|
15
|
+
contractName: "DVNOptions";
|
|
16
|
+
functions: {};
|
|
17
|
+
|
|
18
|
+
events: {};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface DVNOptions extends BaseContract {
|
|
22
|
+
contractName: "DVNOptions";
|
|
23
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
24
|
+
attach(addressOrName: string): this;
|
|
25
|
+
deployed(): Promise<this>;
|
|
26
|
+
|
|
27
|
+
interface: DVNOptionsInterface;
|
|
28
|
+
|
|
29
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
30
|
+
event: TypedEventFilter<TEvent>,
|
|
31
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
32
|
+
toBlock?: string | number | undefined
|
|
33
|
+
): Promise<Array<TEvent>>;
|
|
34
|
+
|
|
35
|
+
listeners<TEvent extends TypedEvent>(
|
|
36
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
37
|
+
): Array<TypedListener<TEvent>>;
|
|
38
|
+
listeners(eventName?: string): Array<Listener>;
|
|
39
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
40
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
41
|
+
): this;
|
|
42
|
+
removeAllListeners(eventName?: string): this;
|
|
43
|
+
off: OnEvent<this>;
|
|
44
|
+
on: OnEvent<this>;
|
|
45
|
+
once: OnEvent<this>;
|
|
46
|
+
removeListener: OnEvent<this>;
|
|
47
|
+
|
|
48
|
+
functions: {};
|
|
49
|
+
|
|
50
|
+
callStatic: {};
|
|
51
|
+
|
|
52
|
+
filters: {};
|
|
53
|
+
|
|
54
|
+
estimateGas: {};
|
|
55
|
+
|
|
56
|
+
populateTransaction: {};
|
|
57
|
+
}
|