@usdu-core/usdu-core 0.0.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.
Files changed (107) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/.env.example +6 -0
  3. package/.prettierrc.json +7 -0
  4. package/LICENSE +674 -0
  5. package/README.md +244 -0
  6. package/contracts/curve/CurveAdapterV1.sol +310 -0
  7. package/contracts/curve/CurveAdapterV1_1.sol +198 -0
  8. package/contracts/curve/helpers/ICurveStableSwapNG.json +566 -0
  9. package/contracts/curve/helpers/ICurveStableSwapNG.sol +177 -0
  10. package/contracts/deploy/VaultDeployer.sol +110 -0
  11. package/contracts/morpho/MorphoAdapterV1.sol +255 -0
  12. package/contracts/morpho/MorphoAdapterV1_1.sol +137 -0
  13. package/contracts/morpho/MorphoAdapterV1_2.sol +126 -0
  14. package/contracts/morpho/helpers/AggregatorV3Interface.sol +24 -0
  15. package/contracts/morpho/helpers/ChainlinkDataFeedLib.sol +36 -0
  16. package/contracts/morpho/helpers/ConstantsLib.sol +20 -0
  17. package/contracts/morpho/helpers/ErrorsLib.sol +17 -0
  18. package/contracts/morpho/helpers/IERC4626.sol +6 -0
  19. package/contracts/morpho/helpers/IMetaMorphoV1_1.sol +229 -0
  20. package/contracts/morpho/helpers/IMetaMorphoV1_1Factory.sol +32 -0
  21. package/contracts/morpho/helpers/IMorpho.sol +361 -0
  22. package/contracts/morpho/helpers/IMorphoCallbacks.sol +52 -0
  23. package/contracts/morpho/helpers/IMorphoChainlinkOracleV2.sol +39 -0
  24. package/contracts/morpho/helpers/IMorphoChainlinkOracleV2Factory.sol +56 -0
  25. package/contracts/morpho/helpers/IOracle.sol +15 -0
  26. package/contracts/morpho/helpers/MarketParamsLib.sol +21 -0
  27. package/contracts/morpho/helpers/MathLib.sol +45 -0
  28. package/contracts/morpho/helpers/Morpho.sol.bak +517 -0
  29. package/contracts/morpho/helpers/MorphoChainlinkOracleV2.sol +157 -0
  30. package/contracts/morpho/helpers/PendingLib.sol +47 -0
  31. package/contracts/morpho/helpers/SharesMathLib.sol +45 -0
  32. package/contracts/morpho/helpers/VaultLib.sol +18 -0
  33. package/contracts/reward/RewardDistributionV1.sol +110 -0
  34. package/contracts/reward/RewardRouterV0.sol +63 -0
  35. package/contracts/reward/Rewards.example.json +72 -0
  36. package/contracts/stablecoin/IStablecoin.sol +211 -0
  37. package/contracts/stablecoin/IStablecoinMetadata.sol +27 -0
  38. package/contracts/stablecoin/IStablecoinModifier.sol +52 -0
  39. package/contracts/stablecoin/Stablecoin.sol +376 -0
  40. package/contracts/stablecoin/libraries/ConstantsLib.sol +13 -0
  41. package/contracts/stablecoin/libraries/ErrorsLib.sol +45 -0
  42. package/contracts/stablecoin/libraries/EventsLib.sol +74 -0
  43. package/contracts/stablecoin/libraries/PendingLib.sol +38 -0
  44. package/contracts/vault/VaultAdapterRecoverV1.sol +29 -0
  45. package/contracts/vault/VaultAdapterV1.sol +126 -0
  46. package/dist/index.d.mts +16154 -0
  47. package/dist/index.d.ts +16154 -0
  48. package/dist/index.js +21134 -0
  49. package/dist/index.mjs +21061 -0
  50. package/docs/CoreVault: Integration of new Markets.md +197 -0
  51. package/docs/CoreVault: SupplyQueue.md +11 -0
  52. package/docs/Markets USDC Vault.md +35 -0
  53. package/docs/Markets USDU Vault.md +89 -0
  54. package/docs/Markets WETH Vault.md +35 -0
  55. package/docs/Overview.drawio +117 -0
  56. package/exports/abis/curve/CurveAdapterV1.ts +599 -0
  57. package/exports/abis/curve/CurveAdapterV1_1.ts +609 -0
  58. package/exports/abis/curve/CurveAdapterV1_2.ts +721 -0
  59. package/exports/abis/curve/helper/ICurveStableSwapNG.ts +1589 -0
  60. package/exports/abis/morpho/MorphoAdapterV1.ts +516 -0
  61. package/exports/abis/morpho/MorphoAdapterV1_1.ts +489 -0
  62. package/exports/abis/morpho/MorphoAdapterV1_2.ts +459 -0
  63. package/exports/abis/morpho/helper/AggregatorV3Interface.ts +113 -0
  64. package/exports/abis/morpho/helper/IMetaMorphoV1_1.ts +1483 -0
  65. package/exports/abis/morpho/helper/IMetaMorphoV1_1Base.ts +607 -0
  66. package/exports/abis/morpho/helper/IMetaMorphoV1_1StaticTyping.ts +696 -0
  67. package/exports/abis/morpho/helper/IMorpho.ts +1024 -0
  68. package/exports/abis/morpho/helper/IMorphoBase.ts +886 -0
  69. package/exports/abis/morpho/helper/IMorphoChainlinkOracleV2.ts +132 -0
  70. package/exports/abis/morpho/helper/IMorphoChainlinkOracleV2Factory.ts +109 -0
  71. package/exports/abis/morpho/helper/IMorphoFlashLoanCallback.ts +20 -0
  72. package/exports/abis/morpho/helper/IMorphoLiquidateCallback.ts +20 -0
  73. package/exports/abis/morpho/helper/IMorphoRepayCallback.ts +20 -0
  74. package/exports/abis/morpho/helper/IMorphoStaticTyping.ts +1003 -0
  75. package/exports/abis/morpho/helper/IMorphoSupplyCallback.ts +20 -0
  76. package/exports/abis/morpho/helper/IMorphoSupplyCollateralCallback.ts +20 -0
  77. package/exports/abis/morpho/helper/IMulticall.ts +21 -0
  78. package/exports/abis/morpho/helper/IOracle.ts +15 -0
  79. package/exports/abis/morpho/helper/IOwnable.ts +55 -0
  80. package/exports/abis/morpho/helper/MorphoChainlinkOracleV2.ts +188 -0
  81. package/exports/abis/openzeppelin/ERC20.ts +310 -0
  82. package/exports/abis/openzeppelin/ERC20Permit.ts +520 -0
  83. package/exports/abis/openzeppelin/IERC20.ts +185 -0
  84. package/exports/abis/openzeppelin/IERC20Metadata.ts +224 -0
  85. package/exports/abis/openzeppelin/IERC20Permit.ts +77 -0
  86. package/exports/abis/openzeppelin/IERC4626.ts +614 -0
  87. package/exports/abis/reward/RewardDistributionV1.ts +246 -0
  88. package/exports/abis/stablecoin/ErrorsLib.ts +114 -0
  89. package/exports/abis/stablecoin/EventsLib.ts +372 -0
  90. package/exports/abis/stablecoin/IStablecoin.ts +642 -0
  91. package/exports/abis/stablecoin/IStablecoinMetadata.ts +856 -0
  92. package/exports/abis/stablecoin/IStablecoinModifier.ts +15 -0
  93. package/exports/abis/stablecoin/Stablecoin.ts +1922 -0
  94. package/exports/abis/termmax/ITermMaxVault.ts +2335 -0
  95. package/exports/abis/vault/VaultAdapterRecoverV1.ts +490 -0
  96. package/exports/abis/vault/VaultAdapterV1.ts +459 -0
  97. package/exports/address.config.ts +113 -0
  98. package/exports/address.types.ts +130 -0
  99. package/exports/index.ts +61 -0
  100. package/hardhat.config.ts +231 -0
  101. package/helper/store.args.ts +17 -0
  102. package/helper/wallet.info.ts +3 -0
  103. package/helper/wallet.ts +41 -0
  104. package/install-macos.sh +46 -0
  105. package/package.json +73 -0
  106. package/tsconfig.json +15 -0
  107. package/tsup.config.ts +10 -0
@@ -0,0 +1,224 @@
1
+ export const IERC20Metadata_ABI = [
2
+ {
3
+ anonymous: false,
4
+ inputs: [
5
+ {
6
+ indexed: true,
7
+ internalType: 'address',
8
+ name: 'owner',
9
+ type: 'address',
10
+ },
11
+ {
12
+ indexed: true,
13
+ internalType: 'address',
14
+ name: 'spender',
15
+ type: 'address',
16
+ },
17
+ {
18
+ indexed: false,
19
+ internalType: 'uint256',
20
+ name: 'value',
21
+ type: 'uint256',
22
+ },
23
+ ],
24
+ name: 'Approval',
25
+ type: 'event',
26
+ },
27
+ {
28
+ anonymous: false,
29
+ inputs: [
30
+ {
31
+ indexed: true,
32
+ internalType: 'address',
33
+ name: 'from',
34
+ type: 'address',
35
+ },
36
+ {
37
+ indexed: true,
38
+ internalType: 'address',
39
+ name: 'to',
40
+ type: 'address',
41
+ },
42
+ {
43
+ indexed: false,
44
+ internalType: 'uint256',
45
+ name: 'value',
46
+ type: 'uint256',
47
+ },
48
+ ],
49
+ name: 'Transfer',
50
+ type: 'event',
51
+ },
52
+ {
53
+ inputs: [
54
+ {
55
+ internalType: 'address',
56
+ name: 'owner',
57
+ type: 'address',
58
+ },
59
+ {
60
+ internalType: 'address',
61
+ name: 'spender',
62
+ type: 'address',
63
+ },
64
+ ],
65
+ name: 'allowance',
66
+ outputs: [
67
+ {
68
+ internalType: 'uint256',
69
+ name: '',
70
+ type: 'uint256',
71
+ },
72
+ ],
73
+ stateMutability: 'view',
74
+ type: 'function',
75
+ },
76
+ {
77
+ inputs: [
78
+ {
79
+ internalType: 'address',
80
+ name: 'spender',
81
+ type: 'address',
82
+ },
83
+ {
84
+ internalType: 'uint256',
85
+ name: 'value',
86
+ type: 'uint256',
87
+ },
88
+ ],
89
+ name: 'approve',
90
+ outputs: [
91
+ {
92
+ internalType: 'bool',
93
+ name: '',
94
+ type: 'bool',
95
+ },
96
+ ],
97
+ stateMutability: 'nonpayable',
98
+ type: 'function',
99
+ },
100
+ {
101
+ inputs: [
102
+ {
103
+ internalType: 'address',
104
+ name: 'account',
105
+ type: 'address',
106
+ },
107
+ ],
108
+ name: 'balanceOf',
109
+ outputs: [
110
+ {
111
+ internalType: 'uint256',
112
+ name: '',
113
+ type: 'uint256',
114
+ },
115
+ ],
116
+ stateMutability: 'view',
117
+ type: 'function',
118
+ },
119
+ {
120
+ inputs: [],
121
+ name: 'decimals',
122
+ outputs: [
123
+ {
124
+ internalType: 'uint8',
125
+ name: '',
126
+ type: 'uint8',
127
+ },
128
+ ],
129
+ stateMutability: 'view',
130
+ type: 'function',
131
+ },
132
+ {
133
+ inputs: [],
134
+ name: 'name',
135
+ outputs: [
136
+ {
137
+ internalType: 'string',
138
+ name: '',
139
+ type: 'string',
140
+ },
141
+ ],
142
+ stateMutability: 'view',
143
+ type: 'function',
144
+ },
145
+ {
146
+ inputs: [],
147
+ name: 'symbol',
148
+ outputs: [
149
+ {
150
+ internalType: 'string',
151
+ name: '',
152
+ type: 'string',
153
+ },
154
+ ],
155
+ stateMutability: 'view',
156
+ type: 'function',
157
+ },
158
+ {
159
+ inputs: [],
160
+ name: 'totalSupply',
161
+ outputs: [
162
+ {
163
+ internalType: 'uint256',
164
+ name: '',
165
+ type: 'uint256',
166
+ },
167
+ ],
168
+ stateMutability: 'view',
169
+ type: 'function',
170
+ },
171
+ {
172
+ inputs: [
173
+ {
174
+ internalType: 'address',
175
+ name: 'to',
176
+ type: 'address',
177
+ },
178
+ {
179
+ internalType: 'uint256',
180
+ name: 'value',
181
+ type: 'uint256',
182
+ },
183
+ ],
184
+ name: 'transfer',
185
+ outputs: [
186
+ {
187
+ internalType: 'bool',
188
+ name: '',
189
+ type: 'bool',
190
+ },
191
+ ],
192
+ stateMutability: 'nonpayable',
193
+ type: 'function',
194
+ },
195
+ {
196
+ inputs: [
197
+ {
198
+ internalType: 'address',
199
+ name: 'from',
200
+ type: 'address',
201
+ },
202
+ {
203
+ internalType: 'address',
204
+ name: 'to',
205
+ type: 'address',
206
+ },
207
+ {
208
+ internalType: 'uint256',
209
+ name: 'value',
210
+ type: 'uint256',
211
+ },
212
+ ],
213
+ name: 'transferFrom',
214
+ outputs: [
215
+ {
216
+ internalType: 'bool',
217
+ name: '',
218
+ type: 'bool',
219
+ },
220
+ ],
221
+ stateMutability: 'nonpayable',
222
+ type: 'function',
223
+ },
224
+ ] as const;
@@ -0,0 +1,77 @@
1
+ export const IERC20Permit_ABI = [
2
+ {
3
+ inputs: [],
4
+ name: 'DOMAIN_SEPARATOR',
5
+ outputs: [
6
+ {
7
+ internalType: 'bytes32',
8
+ name: '',
9
+ type: 'bytes32',
10
+ },
11
+ ],
12
+ stateMutability: 'view',
13
+ type: 'function',
14
+ },
15
+ {
16
+ inputs: [
17
+ {
18
+ internalType: 'address',
19
+ name: 'owner',
20
+ type: 'address',
21
+ },
22
+ ],
23
+ name: 'nonces',
24
+ outputs: [
25
+ {
26
+ internalType: 'uint256',
27
+ name: '',
28
+ type: 'uint256',
29
+ },
30
+ ],
31
+ stateMutability: 'view',
32
+ type: 'function',
33
+ },
34
+ {
35
+ inputs: [
36
+ {
37
+ internalType: 'address',
38
+ name: 'owner',
39
+ type: 'address',
40
+ },
41
+ {
42
+ internalType: 'address',
43
+ name: 'spender',
44
+ type: 'address',
45
+ },
46
+ {
47
+ internalType: 'uint256',
48
+ name: 'value',
49
+ type: 'uint256',
50
+ },
51
+ {
52
+ internalType: 'uint256',
53
+ name: 'deadline',
54
+ type: 'uint256',
55
+ },
56
+ {
57
+ internalType: 'uint8',
58
+ name: 'v',
59
+ type: 'uint8',
60
+ },
61
+ {
62
+ internalType: 'bytes32',
63
+ name: 'r',
64
+ type: 'bytes32',
65
+ },
66
+ {
67
+ internalType: 'bytes32',
68
+ name: 's',
69
+ type: 'bytes32',
70
+ },
71
+ ],
72
+ name: 'permit',
73
+ outputs: [],
74
+ stateMutability: 'nonpayable',
75
+ type: 'function',
76
+ },
77
+ ] as const;