@pendle/core-v2 0.1.0
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/LICENSE +100 -0
- package/contracts/SuperComposableYield/ISuperComposableYield.sol +68 -0
- package/contracts/SuperComposableYield/SCYUtils.sol +14 -0
- package/contracts/SuperComposableYield/implementations/RewardManager.sol +117 -0
- package/contracts/SuperComposableYield/implementations/SCYBase.sol +126 -0
- package/contracts/SuperComposableYield/implementations/SCYBaseWithRewards.sol +79 -0
- package/contracts/core/PendleBaseToken.sol +39 -0
- package/contracts/core/PendleMarket.sol +248 -0
- package/contracts/core/PendleMarketFactory.sol +60 -0
- package/contracts/core/PendleOwnershipToken.sol +44 -0
- package/contracts/core/PendleSCYImpl/AaveV3/PendleAaveV3SCY.sol +139 -0
- package/contracts/core/PendleSCYImpl/AaveV3/WadRayMath.sol +126 -0
- package/contracts/core/PendleSCYImpl/PendleBenQiErc20SCY.sol +127 -0
- package/contracts/core/PendleSCYImpl/PendleBtrflySCY.sol +125 -0
- package/contracts/core/PendleSCYImpl/PendleYearnVaultSCY.sol +115 -0
- package/contracts/core/PendleYieldContractFactory.sol +109 -0
- package/contracts/core/PendleYieldToken.sol +240 -0
- package/contracts/core/misc/BoringOwnable.sol +62 -0
- package/contracts/core/misc/BoringOwnableUpg.sol +64 -0
- package/contracts/core/misc/PendleJoeSwapHelperUpg.sol +82 -0
- package/contracts/core/router/PendleRouterCoreUpg.sol +219 -0
- package/contracts/core/router/PendleRouterProxy.sol +64 -0
- package/contracts/core/router/PendleRouterYTUpg.sol +134 -0
- package/contracts/core/router/base/PendleRouterOTBaseUpg.sol +218 -0
- package/contracts/core/router/base/PendleRouterSCYAndForgeBaseUpg.sol +141 -0
- package/contracts/core/router/base/PendleRouterYTBaseUpg.sol +212 -0
- package/contracts/interfaces/IAToken.sol +34 -0
- package/contracts/interfaces/IAavePool.sol +41 -0
- package/contracts/interfaces/IAaveRewardsController.sol +32 -0
- package/contracts/interfaces/IBenQiComptroller.sol +33 -0
- package/contracts/interfaces/IJoePair.sol +98 -0
- package/contracts/interfaces/IJoeRouter01.sol +162 -0
- package/contracts/interfaces/IPBaseToken.sol +9 -0
- package/contracts/interfaces/IPFlashCallBack.sol +10 -0
- package/contracts/interfaces/IPGovernanceManager.sol +28 -0
- package/contracts/interfaces/IPMarket.sol +57 -0
- package/contracts/interfaces/IPMarketAddRemoveCallback.sol +18 -0
- package/contracts/interfaces/IPMarketFactory.sol +8 -0
- package/contracts/interfaces/IPMarketSwapCallback.sol +10 -0
- package/contracts/interfaces/IPOwnershipToken.sol +15 -0
- package/contracts/interfaces/IPPermissionsV2.sol +28 -0
- package/contracts/interfaces/IPRouterCore.sol +108 -0
- package/contracts/interfaces/IPRouterYT.sol +47 -0
- package/contracts/interfaces/IPYieldContractFactory.sol +36 -0
- package/contracts/interfaces/IPYieldToken.sol +19 -0
- package/contracts/interfaces/IQiErc20.sol +35 -0
- package/contracts/interfaces/IQiToken.sol +29 -0
- package/contracts/interfaces/IREDACTEDStaking.sol +35 -0
- package/contracts/interfaces/IWETH.sol +34 -0
- package/contracts/interfaces/IWXBTRFLY.sol +37 -0
- package/contracts/interfaces/IYearnVault.sol +32 -0
- package/contracts/libraries/JoeLibrary.sol +121 -0
- package/contracts/libraries/SCYIndex.sol +55 -0
- package/contracts/libraries/helpers/ExpiryUtilsLib.sol +166 -0
- package/contracts/libraries/math/FixedPoint.sol +208 -0
- package/contracts/libraries/math/LogExpMath.sol +515 -0
- package/contracts/libraries/math/MarketApproxLib.sol +140 -0
- package/contracts/libraries/math/MarketMathLib.sol +606 -0
- package/contracts/periphery/PendleGovernanceManager.sol +36 -0
- package/contracts/periphery/PermissionsV2.sol +23 -0
- package/package.json +76 -0
- package/typechain-types/BoringOwnable.ts +194 -0
- package/typechain-types/BoringOwnableData.ts +100 -0
- package/typechain-types/BoringOwnableUpg.ts +194 -0
- package/typechain-types/BoringOwnableUpgData.ts +100 -0
- package/typechain-types/ERC1967UpgradeUpgradeable.ts +97 -0
- package/typechain-types/ERC20.ts +417 -0
- package/typechain-types/IAToken.ts +331 -0
- package/typechain-types/IAavePool.ts +192 -0
- package/typechain-types/IAaveRewardsController.ts +148 -0
- package/typechain-types/IBeaconUpgradeable.ts +87 -0
- package/typechain-types/IBenQiComptroller.ts +125 -0
- package/typechain-types/IERC1822ProxiableUpgradeable.ts +87 -0
- package/typechain-types/IERC20.ts +300 -0
- package/typechain-types/IERC20Metadata.ts +339 -0
- package/typechain-types/IJoePair.ts +888 -0
- package/typechain-types/IJoeRouter01.ts +1107 -0
- package/typechain-types/IPBaseToken.ts +365 -0
- package/typechain-types/IPFlashCallback.ts +115 -0
- package/typechain-types/IPGovernanceManager.ts +84 -0
- package/typechain-types/IPMarket.ts +701 -0
- package/typechain-types/IPMarketAddRemoveCallback.ts +169 -0
- package/typechain-types/IPMarketFactory.ts +109 -0
- package/typechain-types/IPMarketSwapCallback.ts +115 -0
- package/typechain-types/IPOwnershipToken.ts +488 -0
- package/typechain-types/IPRouterCore.ts +759 -0
- package/typechain-types/IPRouterYT.ts +405 -0
- package/typechain-types/IPYieldContractFactory.ts +192 -0
- package/typechain-types/IPYieldToken.ts +525 -0
- package/typechain-types/IPermissionsV2.ts +87 -0
- package/typechain-types/IQiErc20.ts +402 -0
- package/typechain-types/IQiToken.ts +327 -0
- package/typechain-types/IREDACTEDStaking.ts +216 -0
- package/typechain-types/ISuperComposableYield.ts +652 -0
- package/typechain-types/IWETH.ts +380 -0
- package/typechain-types/IWXBTRFLY.ts +254 -0
- package/typechain-types/IYearnVault.ts +152 -0
- package/typechain-types/PendleAaveV3SCY.ts +901 -0
- package/typechain-types/PendleBaseToken.ts +505 -0
- package/typechain-types/PendleBenQiErc20SCY.ts +914 -0
- package/typechain-types/PendleBtrflyScy.ts +794 -0
- package/typechain-types/PendleGovernanceManager.ts +187 -0
- package/typechain-types/PendleJoeSwapHelperUpg.ts +97 -0
- package/typechain-types/PendleMarket.ts +1008 -0
- package/typechain-types/PendleMarketFactory.ts +246 -0
- package/typechain-types/PendleOwnershipToken.ts +628 -0
- package/typechain-types/PendleRouterCoreUpg.ts +780 -0
- package/typechain-types/PendleRouterProxy.ts +417 -0
- package/typechain-types/PendleRouterSCYAndForgeBaseUpg.ts +98 -0
- package/typechain-types/PendleRouterYTBaseUpg.ts +134 -0
- package/typechain-types/PendleRouterYTUpg.ts +453 -0
- package/typechain-types/PendleYearnVaultScy.ts +784 -0
- package/typechain-types/PendleYieldContractFactory.ts +479 -0
- package/typechain-types/PendleYieldToken.ts +1030 -0
- package/typechain-types/PermissionsV2.ts +87 -0
- package/typechain-types/Proxy.ts +57 -0
- package/typechain-types/RewardManager.ts +172 -0
- package/typechain-types/SCYBase.ts +734 -0
- package/typechain-types/SCYBaseWithRewards.ts +819 -0
- package/typechain-types/UUPSUpgradeable.ts +197 -0
- package/typechain-types/common.ts +44 -0
- package/typechain-types/factories/BoringOwnableData__factory.ts +90 -0
- package/typechain-types/factories/BoringOwnableUpgData__factory.ts +94 -0
- package/typechain-types/factories/BoringOwnableUpg__factory.ts +139 -0
- package/typechain-types/factories/BoringOwnable__factory.ts +149 -0
- package/typechain-types/factories/ERC1967UpgradeUpgradeable__factory.ts +75 -0
- package/typechain-types/factories/ERC20__factory.ts +348 -0
- package/typechain-types/factories/IAToken__factory.ts +225 -0
- package/typechain-types/factories/IAavePool__factory.ts +99 -0
- package/typechain-types/factories/IAaveRewardsController__factory.ts +78 -0
- package/typechain-types/factories/IBeaconUpgradeable__factory.ts +39 -0
- package/typechain-types/factories/IBenQiComptroller__factory.ts +59 -0
- package/typechain-types/factories/IERC1822ProxiableUpgradeable__factory.ts +43 -0
- package/typechain-types/factories/IERC20Metadata__factory.ts +248 -0
- package/typechain-types/factories/IERC20__factory.ts +203 -0
- package/typechain-types/factories/IJoePair__factory.ts +674 -0
- package/typechain-types/factories/IJoeRouter01__factory.ts +772 -0
- package/typechain-types/factories/IPBaseToken__factory.ts +271 -0
- package/typechain-types/factories/IPFlashCallback__factory.ts +49 -0
- package/typechain-types/factories/IPGovernanceManager__factory.ts +39 -0
- package/typechain-types/factories/IPMarketAddRemoveCallback__factory.ts +86 -0
- package/typechain-types/factories/IPMarketFactory__factory.ts +58 -0
- package/typechain-types/factories/IPMarketSwapCallback__factory.ts +53 -0
- package/typechain-types/factories/IPMarket__factory.ts +559 -0
- package/typechain-types/factories/IPOwnershipToken__factory.ts +349 -0
- package/typechain-types/factories/IPRouterCore__factory.ts +516 -0
- package/typechain-types/factories/IPRouterYT__factory.ts +246 -0
- package/typechain-types/factories/IPYieldContractFactory__factory.ts +117 -0
- package/typechain-types/factories/IPYieldToken__factory.ts +383 -0
- package/typechain-types/factories/IPermissionsV2__factory.ts +39 -0
- package/typechain-types/factories/IQiErc20__factory.ts +270 -0
- package/typechain-types/factories/IQiToken__factory.ts +219 -0
- package/typechain-types/factories/IREDACTEDStaking__factory.ts +107 -0
- package/typechain-types/factories/ISuperComposableYield__factory.ts +438 -0
- package/typechain-types/factories/IWETH__factory.ts +261 -0
- package/typechain-types/factories/IWXBTRFLY__factory.ts +131 -0
- package/typechain-types/factories/IYearnVault__factory.ts +74 -0
- package/typechain-types/factories/PendleAaveV3SCY__factory.ts +727 -0
- package/typechain-types/factories/PendleBaseToken__factory.ts +386 -0
- package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +753 -0
- package/typechain-types/factories/PendleBtrflyScy__factory.ts +652 -0
- package/typechain-types/factories/PendleGovernanceManager__factory.ts +149 -0
- package/typechain-types/factories/PendleJoeSwapHelperUpg__factory.ts +56 -0
- package/typechain-types/factories/PendleMarketFactory__factory.ts +207 -0
- package/typechain-types/factories/PendleMarket__factory.ts +891 -0
- package/typechain-types/factories/PendleOwnershipToken__factory.ts +565 -0
- package/typechain-types/factories/PendleRouterCoreUpg__factory.ts +620 -0
- package/typechain-types/factories/PendleRouterProxy__factory.ts +316 -0
- package/typechain-types/factories/PendleRouterSCYAndForgeBaseUpg__factory.ts +56 -0
- package/typechain-types/factories/PendleRouterYTBaseUpg__factory.ts +66 -0
- package/typechain-types/factories/PendleRouterYTUpg__factory.ts +363 -0
- package/typechain-types/factories/PendleYearnVaultScy__factory.ts +630 -0
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +368 -0
- package/typechain-types/factories/PendleYieldToken__factory.ts +814 -0
- package/typechain-types/factories/PermissionsV2__factory.ts +36 -0
- package/typechain-types/factories/Proxy__factory.ts +28 -0
- package/typechain-types/factories/RewardManager__factory.ts +89 -0
- package/typechain-types/factories/SCYBaseWithRewards__factory.ts +535 -0
- package/typechain-types/factories/SCYBase__factory.ts +479 -0
- package/typechain-types/factories/UUPSUpgradeable__factory.ts +115 -0
- package/typechain-types/hardhat.d.ts +564 -0
- package/typechain-types/index.ts +122 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
|
|
5
|
+
import { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
6
|
+
import type { BoringOwnable, BoringOwnableInterface } from "../BoringOwnable";
|
|
7
|
+
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [
|
|
11
|
+
{
|
|
12
|
+
internalType: "address",
|
|
13
|
+
name: "_owner",
|
|
14
|
+
type: "address",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
stateMutability: "nonpayable",
|
|
18
|
+
type: "constructor",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
anonymous: false,
|
|
22
|
+
inputs: [
|
|
23
|
+
{
|
|
24
|
+
indexed: true,
|
|
25
|
+
internalType: "address",
|
|
26
|
+
name: "previousOwner",
|
|
27
|
+
type: "address",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
indexed: true,
|
|
31
|
+
internalType: "address",
|
|
32
|
+
name: "newOwner",
|
|
33
|
+
type: "address",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
name: "OwnershipTransferred",
|
|
37
|
+
type: "event",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
inputs: [],
|
|
41
|
+
name: "claimOwnership",
|
|
42
|
+
outputs: [],
|
|
43
|
+
stateMutability: "nonpayable",
|
|
44
|
+
type: "function",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
inputs: [],
|
|
48
|
+
name: "owner",
|
|
49
|
+
outputs: [
|
|
50
|
+
{
|
|
51
|
+
internalType: "address",
|
|
52
|
+
name: "",
|
|
53
|
+
type: "address",
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
stateMutability: "view",
|
|
57
|
+
type: "function",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
inputs: [],
|
|
61
|
+
name: "pendingOwner",
|
|
62
|
+
outputs: [
|
|
63
|
+
{
|
|
64
|
+
internalType: "address",
|
|
65
|
+
name: "",
|
|
66
|
+
type: "address",
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
stateMutability: "view",
|
|
70
|
+
type: "function",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
inputs: [
|
|
74
|
+
{
|
|
75
|
+
internalType: "address",
|
|
76
|
+
name: "newOwner",
|
|
77
|
+
type: "address",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
internalType: "bool",
|
|
81
|
+
name: "direct",
|
|
82
|
+
type: "bool",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
internalType: "bool",
|
|
86
|
+
name: "renounce",
|
|
87
|
+
type: "bool",
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
name: "transferOwnership",
|
|
91
|
+
outputs: [],
|
|
92
|
+
stateMutability: "nonpayable",
|
|
93
|
+
type: "function",
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
const _bytecode =
|
|
98
|
+
"0x608060405234801561001057600080fd5b506040516103dc3803806103dc83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b610349806100936000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063078dfbe7146100515780634e71e0c8146100665780638da5cb5b1461006e578063e30c39781461009d575b600080fd5b61006461005f3660046102a2565b6100b0565b005b6100646101e2565b600054610081906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b600154610081906001600160a01b031681565b6000546001600160a01b0316331461010f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b81156101c0576001600160a01b0383161515806101295750805b61016d5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b6044820152606401610106565b600080546040516001600160a01b03808716939216916000805160206102f483398151915291a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b6001546001600160a01b031633811461023d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152606401610106565b600080546040516001600160a01b03808516939216916000805160206102f483398151915291a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b8035801515811461029d57600080fd5b919050565b6000806000606084860312156102b757600080fd5b83356001600160a01b03811681146102ce57600080fd5b92506102dc6020850161028d565b91506102ea6040850161028d565b9050925092509256fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220e92a944d53918d6f08f7f96f21a17d6a48aff9621f93b45f63d06e386e56258864736f6c63430008090033";
|
|
99
|
+
|
|
100
|
+
type BoringOwnableConstructorParams =
|
|
101
|
+
| [signer?: Signer]
|
|
102
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
103
|
+
|
|
104
|
+
const isSuperArgs = (
|
|
105
|
+
xs: BoringOwnableConstructorParams
|
|
106
|
+
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
|
107
|
+
|
|
108
|
+
export class BoringOwnable__factory extends ContractFactory {
|
|
109
|
+
constructor(...args: BoringOwnableConstructorParams) {
|
|
110
|
+
if (isSuperArgs(args)) {
|
|
111
|
+
super(...args);
|
|
112
|
+
} else {
|
|
113
|
+
super(_abi, _bytecode, args[0]);
|
|
114
|
+
}
|
|
115
|
+
this.contractName = "BoringOwnable";
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
deploy(
|
|
119
|
+
_owner: string,
|
|
120
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
121
|
+
): Promise<BoringOwnable> {
|
|
122
|
+
return super.deploy(_owner, overrides || {}) as Promise<BoringOwnable>;
|
|
123
|
+
}
|
|
124
|
+
getDeployTransaction(
|
|
125
|
+
_owner: string,
|
|
126
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
127
|
+
): TransactionRequest {
|
|
128
|
+
return super.getDeployTransaction(_owner, overrides || {});
|
|
129
|
+
}
|
|
130
|
+
attach(address: string): BoringOwnable {
|
|
131
|
+
return super.attach(address) as BoringOwnable;
|
|
132
|
+
}
|
|
133
|
+
connect(signer: Signer): BoringOwnable__factory {
|
|
134
|
+
return super.connect(signer) as BoringOwnable__factory;
|
|
135
|
+
}
|
|
136
|
+
static readonly contractName: "BoringOwnable";
|
|
137
|
+
public readonly contractName: "BoringOwnable";
|
|
138
|
+
static readonly bytecode = _bytecode;
|
|
139
|
+
static readonly abi = _abi;
|
|
140
|
+
static createInterface(): BoringOwnableInterface {
|
|
141
|
+
return new utils.Interface(_abi) as BoringOwnableInterface;
|
|
142
|
+
}
|
|
143
|
+
static connect(
|
|
144
|
+
address: string,
|
|
145
|
+
signerOrProvider: Signer | Provider
|
|
146
|
+
): BoringOwnable {
|
|
147
|
+
return new Contract(address, _abi, signerOrProvider) as BoringOwnable;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import { Contract, Signer, utils } from "ethers";
|
|
6
|
+
import { Provider } from "@ethersproject/providers";
|
|
7
|
+
import type {
|
|
8
|
+
ERC1967UpgradeUpgradeable,
|
|
9
|
+
ERC1967UpgradeUpgradeableInterface,
|
|
10
|
+
} from "../ERC1967UpgradeUpgradeable";
|
|
11
|
+
|
|
12
|
+
const _abi = [
|
|
13
|
+
{
|
|
14
|
+
anonymous: false,
|
|
15
|
+
inputs: [
|
|
16
|
+
{
|
|
17
|
+
indexed: false,
|
|
18
|
+
internalType: "address",
|
|
19
|
+
name: "previousAdmin",
|
|
20
|
+
type: "address",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
indexed: false,
|
|
24
|
+
internalType: "address",
|
|
25
|
+
name: "newAdmin",
|
|
26
|
+
type: "address",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
name: "AdminChanged",
|
|
30
|
+
type: "event",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
anonymous: false,
|
|
34
|
+
inputs: [
|
|
35
|
+
{
|
|
36
|
+
indexed: true,
|
|
37
|
+
internalType: "address",
|
|
38
|
+
name: "beacon",
|
|
39
|
+
type: "address",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
name: "BeaconUpgraded",
|
|
43
|
+
type: "event",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
anonymous: false,
|
|
47
|
+
inputs: [
|
|
48
|
+
{
|
|
49
|
+
indexed: true,
|
|
50
|
+
internalType: "address",
|
|
51
|
+
name: "implementation",
|
|
52
|
+
type: "address",
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
name: "Upgraded",
|
|
56
|
+
type: "event",
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
export class ERC1967UpgradeUpgradeable__factory {
|
|
61
|
+
static readonly abi = _abi;
|
|
62
|
+
static createInterface(): ERC1967UpgradeUpgradeableInterface {
|
|
63
|
+
return new utils.Interface(_abi) as ERC1967UpgradeUpgradeableInterface;
|
|
64
|
+
}
|
|
65
|
+
static connect(
|
|
66
|
+
address: string,
|
|
67
|
+
signerOrProvider: Signer | Provider
|
|
68
|
+
): ERC1967UpgradeUpgradeable {
|
|
69
|
+
return new Contract(
|
|
70
|
+
address,
|
|
71
|
+
_abi,
|
|
72
|
+
signerOrProvider
|
|
73
|
+
) as ERC1967UpgradeUpgradeable;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
|
|
5
|
+
import { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
6
|
+
import type { ERC20, ERC20Interface } from "../ERC20";
|
|
7
|
+
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [
|
|
11
|
+
{
|
|
12
|
+
internalType: "string",
|
|
13
|
+
name: "name_",
|
|
14
|
+
type: "string",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
internalType: "string",
|
|
18
|
+
name: "symbol_",
|
|
19
|
+
type: "string",
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
stateMutability: "nonpayable",
|
|
23
|
+
type: "constructor",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
anonymous: false,
|
|
27
|
+
inputs: [
|
|
28
|
+
{
|
|
29
|
+
indexed: true,
|
|
30
|
+
internalType: "address",
|
|
31
|
+
name: "owner",
|
|
32
|
+
type: "address",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
indexed: true,
|
|
36
|
+
internalType: "address",
|
|
37
|
+
name: "spender",
|
|
38
|
+
type: "address",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
indexed: false,
|
|
42
|
+
internalType: "uint256",
|
|
43
|
+
name: "value",
|
|
44
|
+
type: "uint256",
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
name: "Approval",
|
|
48
|
+
type: "event",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
anonymous: false,
|
|
52
|
+
inputs: [
|
|
53
|
+
{
|
|
54
|
+
indexed: true,
|
|
55
|
+
internalType: "address",
|
|
56
|
+
name: "from",
|
|
57
|
+
type: "address",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
indexed: true,
|
|
61
|
+
internalType: "address",
|
|
62
|
+
name: "to",
|
|
63
|
+
type: "address",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
indexed: false,
|
|
67
|
+
internalType: "uint256",
|
|
68
|
+
name: "value",
|
|
69
|
+
type: "uint256",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
name: "Transfer",
|
|
73
|
+
type: "event",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
inputs: [
|
|
77
|
+
{
|
|
78
|
+
internalType: "address",
|
|
79
|
+
name: "owner",
|
|
80
|
+
type: "address",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
internalType: "address",
|
|
84
|
+
name: "spender",
|
|
85
|
+
type: "address",
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
name: "allowance",
|
|
89
|
+
outputs: [
|
|
90
|
+
{
|
|
91
|
+
internalType: "uint256",
|
|
92
|
+
name: "",
|
|
93
|
+
type: "uint256",
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
stateMutability: "view",
|
|
97
|
+
type: "function",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
inputs: [
|
|
101
|
+
{
|
|
102
|
+
internalType: "address",
|
|
103
|
+
name: "spender",
|
|
104
|
+
type: "address",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
internalType: "uint256",
|
|
108
|
+
name: "amount",
|
|
109
|
+
type: "uint256",
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
name: "approve",
|
|
113
|
+
outputs: [
|
|
114
|
+
{
|
|
115
|
+
internalType: "bool",
|
|
116
|
+
name: "",
|
|
117
|
+
type: "bool",
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
stateMutability: "nonpayable",
|
|
121
|
+
type: "function",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
inputs: [
|
|
125
|
+
{
|
|
126
|
+
internalType: "address",
|
|
127
|
+
name: "account",
|
|
128
|
+
type: "address",
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
name: "balanceOf",
|
|
132
|
+
outputs: [
|
|
133
|
+
{
|
|
134
|
+
internalType: "uint256",
|
|
135
|
+
name: "",
|
|
136
|
+
type: "uint256",
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
stateMutability: "view",
|
|
140
|
+
type: "function",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
inputs: [],
|
|
144
|
+
name: "decimals",
|
|
145
|
+
outputs: [
|
|
146
|
+
{
|
|
147
|
+
internalType: "uint8",
|
|
148
|
+
name: "",
|
|
149
|
+
type: "uint8",
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
stateMutability: "view",
|
|
153
|
+
type: "function",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
inputs: [
|
|
157
|
+
{
|
|
158
|
+
internalType: "address",
|
|
159
|
+
name: "spender",
|
|
160
|
+
type: "address",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
internalType: "uint256",
|
|
164
|
+
name: "subtractedValue",
|
|
165
|
+
type: "uint256",
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
name: "decreaseAllowance",
|
|
169
|
+
outputs: [
|
|
170
|
+
{
|
|
171
|
+
internalType: "bool",
|
|
172
|
+
name: "",
|
|
173
|
+
type: "bool",
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
stateMutability: "nonpayable",
|
|
177
|
+
type: "function",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
inputs: [
|
|
181
|
+
{
|
|
182
|
+
internalType: "address",
|
|
183
|
+
name: "spender",
|
|
184
|
+
type: "address",
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
internalType: "uint256",
|
|
188
|
+
name: "addedValue",
|
|
189
|
+
type: "uint256",
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
name: "increaseAllowance",
|
|
193
|
+
outputs: [
|
|
194
|
+
{
|
|
195
|
+
internalType: "bool",
|
|
196
|
+
name: "",
|
|
197
|
+
type: "bool",
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
stateMutability: "nonpayable",
|
|
201
|
+
type: "function",
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
inputs: [],
|
|
205
|
+
name: "name",
|
|
206
|
+
outputs: [
|
|
207
|
+
{
|
|
208
|
+
internalType: "string",
|
|
209
|
+
name: "",
|
|
210
|
+
type: "string",
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
stateMutability: "view",
|
|
214
|
+
type: "function",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
inputs: [],
|
|
218
|
+
name: "symbol",
|
|
219
|
+
outputs: [
|
|
220
|
+
{
|
|
221
|
+
internalType: "string",
|
|
222
|
+
name: "",
|
|
223
|
+
type: "string",
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
stateMutability: "view",
|
|
227
|
+
type: "function",
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
inputs: [],
|
|
231
|
+
name: "totalSupply",
|
|
232
|
+
outputs: [
|
|
233
|
+
{
|
|
234
|
+
internalType: "uint256",
|
|
235
|
+
name: "",
|
|
236
|
+
type: "uint256",
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
stateMutability: "view",
|
|
240
|
+
type: "function",
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
inputs: [
|
|
244
|
+
{
|
|
245
|
+
internalType: "address",
|
|
246
|
+
name: "to",
|
|
247
|
+
type: "address",
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
internalType: "uint256",
|
|
251
|
+
name: "amount",
|
|
252
|
+
type: "uint256",
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
name: "transfer",
|
|
256
|
+
outputs: [
|
|
257
|
+
{
|
|
258
|
+
internalType: "bool",
|
|
259
|
+
name: "",
|
|
260
|
+
type: "bool",
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
stateMutability: "nonpayable",
|
|
264
|
+
type: "function",
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
inputs: [
|
|
268
|
+
{
|
|
269
|
+
internalType: "address",
|
|
270
|
+
name: "from",
|
|
271
|
+
type: "address",
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
internalType: "address",
|
|
275
|
+
name: "to",
|
|
276
|
+
type: "address",
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
internalType: "uint256",
|
|
280
|
+
name: "amount",
|
|
281
|
+
type: "uint256",
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
name: "transferFrom",
|
|
285
|
+
outputs: [
|
|
286
|
+
{
|
|
287
|
+
internalType: "bool",
|
|
288
|
+
name: "",
|
|
289
|
+
type: "bool",
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
stateMutability: "nonpayable",
|
|
293
|
+
type: "function",
|
|
294
|
+
},
|
|
295
|
+
];
|
|
296
|
+
|
|
297
|
+
const _bytecode =
|
|
298
|
+
"0x60806040523480156200001157600080fd5b5060405162000b3d38038062000b3d8339810160408190526200003491620001db565b81516200004990600390602085019062000068565b5080516200005f90600490602084019062000068565b50505062000282565b828054620000769062000245565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013657600080fd5b81516001600160401b03808211156200015357620001536200010e565b604051601f8301601f19908116603f011681019082821181831017156200017e576200017e6200010e565b816040528381526020925086838588010111156200019b57600080fd5b600091505b83821015620001bf5785820183015181830184015290820190620001a0565b83821115620001d15760008385830101525b9695505050505050565b60008060408385031215620001ef57600080fd5b82516001600160401b03808211156200020757600080fd5b620002158683870162000124565b935060208501519150808211156200022c57600080fd5b506200023b8582860162000124565b9150509250929050565b600181811c908216806200025a57607f821691505b602082108114156200027c57634e487b7160e01b600052602260045260246000fd5b50919050565b6108ab80620002926000396000f3fe608060405234801561001057600080fd5b50600436106100995760003560e01c806306fdde031461009e578063095ea7b3146100bc57806318160ddd146100df57806323b872dd146100f1578063313ce56714610104578063395093511461011357806370a082311461012657806395d89b411461014f578063a457c2d714610157578063a9059cbb1461016a578063dd62ed3e1461017d575b600080fd5b6100a6610190565b6040516100b391906106e8565b60405180910390f35b6100cf6100ca366004610759565b610222565b60405190151581526020016100b3565b6002545b6040519081526020016100b3565b6100cf6100ff366004610783565b61023a565b604051601281526020016100b3565b6100cf610121366004610759565b61025e565b6100e36101343660046107bf565b6001600160a01b031660009081526020819052604090205490565b6100a661029d565b6100cf610165366004610759565b6102ac565b6100cf610178366004610759565b610343565b6100e361018b3660046107e1565b610351565b60606003805461019f90610814565b80601f01602080910402602001604051908101604052809291908181526020018280546101cb90610814565b80156102185780601f106101ed57610100808354040283529160200191610218565b820191906000526020600020905b8154815290600101906020018083116101fb57829003601f168201915b5050505050905090565b60003361023081858561037c565b5060019392505050565b6000336102488582856104a0565b61025385858561051a565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190610230908290869061029890879061084f565b61037c565b60606004805461019f90610814565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156103365760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610253828686840361037c565b60003361023081858561051a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103de5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161032d565b6001600160a01b03821661043f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161032d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104ac8484610351565b9050600019811461051457818110156105075760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161032d565b610514848484840361037c565b50505050565b6001600160a01b03831661057e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161032d565b6001600160a01b0382166105e05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161032d565b6001600160a01b038316600090815260208190526040902054818110156106585760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161032d565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061068f90849061084f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106db91815260200190565b60405180910390a3610514565b600060208083528351808285015260005b81811015610715578581018301518582016040015282016106f9565b81811115610727576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461075457600080fd5b919050565b6000806040838503121561076c57600080fd5b6107758361073d565b946020939093013593505050565b60008060006060848603121561079857600080fd5b6107a18461073d565b92506107af6020850161073d565b9150604084013590509250925092565b6000602082840312156107d157600080fd5b6107da8261073d565b9392505050565b600080604083850312156107f457600080fd5b6107fd8361073d565b915061080b6020840161073d565b90509250929050565b600181811c9082168061082857607f821691505b6020821081141561084957634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561087057634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122097c46d8324265a3b147870a2133604befe5793cedce279c55e63327d1939bd2264736f6c63430008090033";
|
|
299
|
+
|
|
300
|
+
type ERC20ConstructorParams =
|
|
301
|
+
| [signer?: Signer]
|
|
302
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
303
|
+
|
|
304
|
+
const isSuperArgs = (
|
|
305
|
+
xs: ERC20ConstructorParams
|
|
306
|
+
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
|
307
|
+
|
|
308
|
+
export class ERC20__factory extends ContractFactory {
|
|
309
|
+
constructor(...args: ERC20ConstructorParams) {
|
|
310
|
+
if (isSuperArgs(args)) {
|
|
311
|
+
super(...args);
|
|
312
|
+
} else {
|
|
313
|
+
super(_abi, _bytecode, args[0]);
|
|
314
|
+
}
|
|
315
|
+
this.contractName = "ERC20";
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
deploy(
|
|
319
|
+
name_: string,
|
|
320
|
+
symbol_: string,
|
|
321
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
322
|
+
): Promise<ERC20> {
|
|
323
|
+
return super.deploy(name_, symbol_, overrides || {}) as Promise<ERC20>;
|
|
324
|
+
}
|
|
325
|
+
getDeployTransaction(
|
|
326
|
+
name_: string,
|
|
327
|
+
symbol_: string,
|
|
328
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
329
|
+
): TransactionRequest {
|
|
330
|
+
return super.getDeployTransaction(name_, symbol_, overrides || {});
|
|
331
|
+
}
|
|
332
|
+
attach(address: string): ERC20 {
|
|
333
|
+
return super.attach(address) as ERC20;
|
|
334
|
+
}
|
|
335
|
+
connect(signer: Signer): ERC20__factory {
|
|
336
|
+
return super.connect(signer) as ERC20__factory;
|
|
337
|
+
}
|
|
338
|
+
static readonly contractName: "ERC20";
|
|
339
|
+
public readonly contractName: "ERC20";
|
|
340
|
+
static readonly bytecode = _bytecode;
|
|
341
|
+
static readonly abi = _abi;
|
|
342
|
+
static createInterface(): ERC20Interface {
|
|
343
|
+
return new utils.Interface(_abi) as ERC20Interface;
|
|
344
|
+
}
|
|
345
|
+
static connect(address: string, signerOrProvider: Signer | Provider): ERC20 {
|
|
346
|
+
return new Contract(address, _abi, signerOrProvider) as ERC20;
|
|
347
|
+
}
|
|
348
|
+
}
|