@morpho-org/bundler-sdk-viem 2.2.1-next.0 → 3.0.0-next.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/lib/abis.js CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated All bundles should be encoded using Bundler3 instead.
3
+ */
1
4
  export const baseBundlerAbi = [
2
5
  {
3
6
  type: "function",
@@ -14,6 +17,9 @@ export const baseBundlerAbi = [
14
17
  stateMutability: "payable",
15
18
  },
16
19
  ];
20
+ /**
21
+ * @deprecated All bundles should be encoded using Bundler3 instead.
22
+ */
17
23
  export const transferBundlerAbi = [
18
24
  ...baseBundlerAbi,
19
25
  {
@@ -48,6 +54,9 @@ export const transferBundlerAbi = [
48
54
  stateMutability: "payable",
49
55
  },
50
56
  ];
57
+ /**
58
+ * @deprecated All bundles should be encoded using Bundler3 instead.
59
+ */
51
60
  export const permitBundlerAbi = [
52
61
  ...baseBundlerAbi,
53
62
  {
@@ -66,6 +75,9 @@ export const permitBundlerAbi = [
66
75
  stateMutability: "payable",
67
76
  },
68
77
  ];
78
+ /**
79
+ * @deprecated All bundles should be encoded using Bundler3 instead.
80
+ */
69
81
  export const ethereumPermitBundlerAbi = [
70
82
  ...permitBundlerAbi,
71
83
  {
@@ -84,6 +96,9 @@ export const ethereumPermitBundlerAbi = [
84
96
  stateMutability: "payable",
85
97
  },
86
98
  ];
99
+ /**
100
+ * @deprecated All bundles should be encoded using Bundler3 instead.
101
+ */
87
102
  export const permit2BundlerAbi = [
88
103
  ...baseBundlerAbi,
89
104
  {
@@ -128,6 +143,9 @@ export const permit2BundlerAbi = [
128
143
  },
129
144
  { type: "error", name: "UnsafeCast", inputs: [] },
130
145
  ];
146
+ /**
147
+ * @deprecated All bundles should be encoded using Bundler3 instead.
148
+ */
131
149
  export const erc20WrapperBundlerAbi = [
132
150
  ...baseBundlerAbi,
133
151
  {
@@ -152,6 +170,9 @@ export const erc20WrapperBundlerAbi = [
152
170
  stateMutability: "payable",
153
171
  },
154
172
  ];
173
+ /**
174
+ * @deprecated All bundles should be encoded using Bundler3 instead.
175
+ */
155
176
  export const erc4626BundlerAbi = [
156
177
  ...baseBundlerAbi,
157
178
  {
@@ -205,6 +226,9 @@ export const erc4626BundlerAbi = [
205
226
  stateMutability: "payable",
206
227
  },
207
228
  ];
229
+ /**
230
+ * @deprecated All bundles should be encoded using Bundler3 instead.
231
+ */
208
232
  export const morphoBundlerAbi = [
209
233
  ...baseBundlerAbi,
210
234
  {
@@ -487,6 +511,9 @@ export const morphoBundlerAbi = [
487
511
  stateMutability: "payable",
488
512
  },
489
513
  ];
514
+ /**
515
+ * @deprecated All bundles should be encoded using Bundler3 instead.
516
+ */
490
517
  export const urdBundlerAbi = [
491
518
  ...baseBundlerAbi,
492
519
  {
@@ -504,6 +531,9 @@ export const urdBundlerAbi = [
504
531
  stateMutability: "payable",
505
532
  },
506
533
  ];
534
+ /**
535
+ * @deprecated All bundles should be encoded using Bundler3 instead.
536
+ */
507
537
  export const wNativeBundlerAbi = [
508
538
  ...baseBundlerAbi,
509
539
  { type: "receive", stateMutability: "payable" },
@@ -529,6 +559,9 @@ export const wNativeBundlerAbi = [
529
559
  stateMutability: "payable",
530
560
  },
531
561
  ];
562
+ /**
563
+ * @deprecated All bundles should be encoded using Bundler3 instead.
564
+ */
532
565
  export const stEthBundlerAbi = [
533
566
  ...baseBundlerAbi,
534
567
  {
@@ -571,6 +604,9 @@ export const stEthBundlerAbi = [
571
604
  stateMutability: "payable",
572
605
  },
573
606
  ];
607
+ /**
608
+ * @deprecated All bundles should be encoded using Bundler3 instead.
609
+ */
574
610
  export const aaveV2MigrationBundlerAbi = [
575
611
  ...transferBundlerAbi,
576
612
  ...permitBundlerAbi,
@@ -617,6 +653,9 @@ export const aaveV2MigrationBundlerAbi = [
617
653
  },
618
654
  { type: "error", name: "UnsafeCast", inputs: [] },
619
655
  ];
656
+ /**
657
+ * @deprecated All bundles should be encoded using Bundler3 instead.
658
+ */
620
659
  export const aaveV3MigrationBundlerAbi = [
621
660
  ...transferBundlerAbi,
622
661
  ...permitBundlerAbi,
@@ -662,6 +701,9 @@ export const aaveV3MigrationBundlerAbi = [
662
701
  },
663
702
  { type: "error", name: "UnsafeCast", inputs: [] },
664
703
  ];
704
+ /**
705
+ * @deprecated All bundles should be encoded using Bundler3 instead.
706
+ */
665
707
  export const aaveV3OptimizerMigrationBundlerAbi = [
666
708
  ...transferBundlerAbi,
667
709
  ...permitBundlerAbi,
@@ -741,6 +783,9 @@ export const aaveV3OptimizerMigrationBundlerAbi = [
741
783
  },
742
784
  { type: "error", name: "UnsafeCast", inputs: [] },
743
785
  ];
786
+ /**
787
+ * @deprecated All bundles should be encoded using Bundler3 instead.
788
+ */
744
789
  export const compoundV2MigrationBundlerAbi = [
745
790
  ...transferBundlerAbi,
746
791
  ...permitBundlerAbi,
@@ -787,6 +832,9 @@ export const compoundV2MigrationBundlerAbi = [
787
832
  },
788
833
  { type: "error", name: "UnsafeCast", inputs: [] },
789
834
  ];
835
+ /**
836
+ * @deprecated All bundles should be encoded using Bundler3 instead.
837
+ */
790
838
  export const compoundV3MigrationBundlerAbi = [
791
839
  ...transferBundlerAbi,
792
840
  ...permitBundlerAbi,
@@ -838,3 +886,2050 @@ export const compoundV3MigrationBundlerAbi = [
838
886
  },
839
887
  { type: "error", name: "UnsafeCast", inputs: [] },
840
888
  ];
889
+ export const universalRewardsDistributorAbi = [
890
+ {
891
+ inputs: [
892
+ { internalType: "address", name: "initialOwner", type: "address" },
893
+ { internalType: "uint256", name: "initialTimelock", type: "uint256" },
894
+ { internalType: "bytes32", name: "initialRoot", type: "bytes32" },
895
+ { internalType: "bytes32", name: "initialIpfsHash", type: "bytes32" },
896
+ ],
897
+ stateMutability: "nonpayable",
898
+ type: "constructor",
899
+ },
900
+ {
901
+ inputs: [],
902
+ name: "acceptRoot",
903
+ outputs: [],
904
+ stateMutability: "nonpayable",
905
+ type: "function",
906
+ },
907
+ {
908
+ inputs: [
909
+ { internalType: "address", name: "account", type: "address" },
910
+ { internalType: "address", name: "reward", type: "address" },
911
+ { internalType: "uint256", name: "claimable", type: "uint256" },
912
+ { internalType: "bytes32[]", name: "proof", type: "bytes32[]" },
913
+ ],
914
+ name: "claim",
915
+ outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
916
+ stateMutability: "nonpayable",
917
+ type: "function",
918
+ },
919
+ {
920
+ inputs: [
921
+ { internalType: "address", name: "account", type: "address" },
922
+ { internalType: "address", name: "reward", type: "address" },
923
+ ],
924
+ name: "claimed",
925
+ outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
926
+ stateMutability: "view",
927
+ type: "function",
928
+ },
929
+ {
930
+ inputs: [],
931
+ name: "ipfsHash",
932
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
933
+ stateMutability: "view",
934
+ type: "function",
935
+ },
936
+ {
937
+ inputs: [{ internalType: "address", name: "", type: "address" }],
938
+ name: "isUpdater",
939
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
940
+ stateMutability: "view",
941
+ type: "function",
942
+ },
943
+ {
944
+ inputs: [],
945
+ name: "owner",
946
+ outputs: [{ internalType: "address", name: "", type: "address" }],
947
+ stateMutability: "view",
948
+ type: "function",
949
+ },
950
+ {
951
+ inputs: [],
952
+ name: "pendingRoot",
953
+ outputs: [
954
+ { internalType: "bytes32", name: "root", type: "bytes32" },
955
+ { internalType: "bytes32", name: "ipfsHash", type: "bytes32" },
956
+ { internalType: "uint256", name: "validAt", type: "uint256" },
957
+ ],
958
+ stateMutability: "view",
959
+ type: "function",
960
+ },
961
+ {
962
+ inputs: [],
963
+ name: "revokePendingRoot",
964
+ outputs: [],
965
+ stateMutability: "nonpayable",
966
+ type: "function",
967
+ },
968
+ {
969
+ inputs: [],
970
+ name: "root",
971
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
972
+ stateMutability: "view",
973
+ type: "function",
974
+ },
975
+ {
976
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
977
+ name: "setOwner",
978
+ outputs: [],
979
+ stateMutability: "nonpayable",
980
+ type: "function",
981
+ },
982
+ {
983
+ inputs: [
984
+ { internalType: "bytes32", name: "newRoot", type: "bytes32" },
985
+ { internalType: "bytes32", name: "newIpfsHash", type: "bytes32" },
986
+ ],
987
+ name: "setRoot",
988
+ outputs: [],
989
+ stateMutability: "nonpayable",
990
+ type: "function",
991
+ },
992
+ {
993
+ inputs: [
994
+ { internalType: "address", name: "updater", type: "address" },
995
+ { internalType: "bool", name: "active", type: "bool" },
996
+ ],
997
+ name: "setRootUpdater",
998
+ outputs: [],
999
+ stateMutability: "nonpayable",
1000
+ type: "function",
1001
+ },
1002
+ {
1003
+ inputs: [{ internalType: "uint256", name: "newTimelock", type: "uint256" }],
1004
+ name: "setTimelock",
1005
+ outputs: [],
1006
+ stateMutability: "nonpayable",
1007
+ type: "function",
1008
+ },
1009
+ {
1010
+ inputs: [
1011
+ { internalType: "bytes32", name: "newRoot", type: "bytes32" },
1012
+ { internalType: "bytes32", name: "newIpfsHash", type: "bytes32" },
1013
+ ],
1014
+ name: "submitRoot",
1015
+ outputs: [],
1016
+ stateMutability: "nonpayable",
1017
+ type: "function",
1018
+ },
1019
+ {
1020
+ inputs: [],
1021
+ name: "timelock",
1022
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1023
+ stateMutability: "view",
1024
+ type: "function",
1025
+ },
1026
+ ];
1027
+ export const bundler3Abi = [
1028
+ {
1029
+ type: "function",
1030
+ name: "initiator",
1031
+ inputs: [],
1032
+ outputs: [
1033
+ {
1034
+ name: "",
1035
+ type: "address",
1036
+ internalType: "address",
1037
+ },
1038
+ ],
1039
+ stateMutability: "view",
1040
+ },
1041
+ {
1042
+ type: "function",
1043
+ name: "multicall",
1044
+ inputs: [
1045
+ {
1046
+ name: "bundle",
1047
+ type: "tuple[]",
1048
+ internalType: "struct Call[]",
1049
+ components: [
1050
+ {
1051
+ name: "to",
1052
+ type: "address",
1053
+ internalType: "address",
1054
+ },
1055
+ {
1056
+ name: "data",
1057
+ type: "bytes",
1058
+ internalType: "bytes",
1059
+ },
1060
+ {
1061
+ name: "value",
1062
+ type: "uint256",
1063
+ internalType: "uint256",
1064
+ },
1065
+ {
1066
+ name: "skipRevert",
1067
+ type: "bool",
1068
+ internalType: "bool",
1069
+ },
1070
+ {
1071
+ name: "callbackHash",
1072
+ type: "bytes32",
1073
+ internalType: "bytes32",
1074
+ },
1075
+ ],
1076
+ },
1077
+ ],
1078
+ outputs: [],
1079
+ stateMutability: "payable",
1080
+ },
1081
+ {
1082
+ type: "function",
1083
+ name: "reenter",
1084
+ inputs: [
1085
+ {
1086
+ name: "bundle",
1087
+ type: "tuple[]",
1088
+ internalType: "struct Call[]",
1089
+ components: [
1090
+ {
1091
+ name: "to",
1092
+ type: "address",
1093
+ internalType: "address",
1094
+ },
1095
+ {
1096
+ name: "data",
1097
+ type: "bytes",
1098
+ internalType: "bytes",
1099
+ },
1100
+ {
1101
+ name: "value",
1102
+ type: "uint256",
1103
+ internalType: "uint256",
1104
+ },
1105
+ {
1106
+ name: "skipRevert",
1107
+ type: "bool",
1108
+ internalType: "bool",
1109
+ },
1110
+ {
1111
+ name: "callbackHash",
1112
+ type: "bytes32",
1113
+ internalType: "bytes32",
1114
+ },
1115
+ ],
1116
+ },
1117
+ ],
1118
+ outputs: [],
1119
+ stateMutability: "nonpayable",
1120
+ },
1121
+ {
1122
+ type: "function",
1123
+ name: "reenterHash",
1124
+ inputs: [],
1125
+ outputs: [
1126
+ {
1127
+ name: "",
1128
+ type: "bytes32",
1129
+ internalType: "bytes32",
1130
+ },
1131
+ ],
1132
+ stateMutability: "view",
1133
+ },
1134
+ {
1135
+ type: "error",
1136
+ name: "AlreadyInitiated",
1137
+ inputs: [],
1138
+ },
1139
+ {
1140
+ type: "error",
1141
+ name: "EmptyBundle",
1142
+ inputs: [],
1143
+ },
1144
+ {
1145
+ type: "error",
1146
+ name: "IncorrectReenterHash",
1147
+ inputs: [],
1148
+ },
1149
+ {
1150
+ type: "error",
1151
+ name: "MissingExpectedReenter",
1152
+ inputs: [],
1153
+ },
1154
+ ];
1155
+ export const coreAdapterAbi = [
1156
+ {
1157
+ type: "receive",
1158
+ stateMutability: "payable",
1159
+ },
1160
+ {
1161
+ type: "function",
1162
+ name: "BUNDLER3",
1163
+ inputs: [],
1164
+ outputs: [
1165
+ {
1166
+ name: "",
1167
+ type: "address",
1168
+ internalType: "address",
1169
+ },
1170
+ ],
1171
+ stateMutability: "view",
1172
+ },
1173
+ {
1174
+ type: "function",
1175
+ name: "erc20Transfer",
1176
+ inputs: [
1177
+ {
1178
+ name: "token",
1179
+ type: "address",
1180
+ internalType: "address",
1181
+ },
1182
+ {
1183
+ name: "receiver",
1184
+ type: "address",
1185
+ internalType: "address",
1186
+ },
1187
+ {
1188
+ name: "amount",
1189
+ type: "uint256",
1190
+ internalType: "uint256",
1191
+ },
1192
+ ],
1193
+ outputs: [],
1194
+ stateMutability: "nonpayable",
1195
+ },
1196
+ {
1197
+ type: "function",
1198
+ name: "nativeTransfer",
1199
+ inputs: [
1200
+ {
1201
+ name: "receiver",
1202
+ type: "address",
1203
+ internalType: "address",
1204
+ },
1205
+ {
1206
+ name: "amount",
1207
+ type: "uint256",
1208
+ internalType: "uint256",
1209
+ },
1210
+ ],
1211
+ outputs: [],
1212
+ stateMutability: "nonpayable",
1213
+ },
1214
+ {
1215
+ type: "error",
1216
+ name: "AdapterAddress",
1217
+ inputs: [],
1218
+ },
1219
+ {
1220
+ type: "error",
1221
+ name: "FailedCall",
1222
+ inputs: [],
1223
+ },
1224
+ {
1225
+ type: "error",
1226
+ name: "InsufficientBalance",
1227
+ inputs: [
1228
+ {
1229
+ name: "balance",
1230
+ type: "uint256",
1231
+ internalType: "uint256",
1232
+ },
1233
+ {
1234
+ name: "needed",
1235
+ type: "uint256",
1236
+ internalType: "uint256",
1237
+ },
1238
+ ],
1239
+ },
1240
+ {
1241
+ type: "error",
1242
+ name: "SafeERC20FailedOperation",
1243
+ inputs: [
1244
+ {
1245
+ name: "token",
1246
+ type: "address",
1247
+ internalType: "address",
1248
+ },
1249
+ ],
1250
+ },
1251
+ {
1252
+ type: "error",
1253
+ name: "UnauthorizedSender",
1254
+ inputs: [],
1255
+ },
1256
+ {
1257
+ type: "error",
1258
+ name: "ZeroAddress",
1259
+ inputs: [],
1260
+ },
1261
+ {
1262
+ type: "error",
1263
+ name: "ZeroAmount",
1264
+ inputs: [],
1265
+ },
1266
+ ];
1267
+ export const generalAdapter1Abi = [
1268
+ ...coreAdapterAbi,
1269
+ {
1270
+ type: "constructor",
1271
+ inputs: [
1272
+ {
1273
+ name: "bundler3",
1274
+ type: "address",
1275
+ internalType: "address",
1276
+ },
1277
+ {
1278
+ name: "morpho",
1279
+ type: "address",
1280
+ internalType: "address",
1281
+ },
1282
+ {
1283
+ name: "wNative",
1284
+ type: "address",
1285
+ internalType: "address",
1286
+ },
1287
+ ],
1288
+ stateMutability: "nonpayable",
1289
+ },
1290
+ {
1291
+ type: "function",
1292
+ name: "MORPHO",
1293
+ inputs: [],
1294
+ outputs: [
1295
+ {
1296
+ name: "",
1297
+ type: "address",
1298
+ internalType: "contract IMorpho",
1299
+ },
1300
+ ],
1301
+ stateMutability: "view",
1302
+ },
1303
+ {
1304
+ type: "function",
1305
+ name: "WRAPPED_NATIVE",
1306
+ inputs: [],
1307
+ outputs: [
1308
+ {
1309
+ name: "",
1310
+ type: "address",
1311
+ internalType: "contract IWNative",
1312
+ },
1313
+ ],
1314
+ stateMutability: "view",
1315
+ },
1316
+ {
1317
+ type: "function",
1318
+ name: "erc20TransferFrom",
1319
+ inputs: [
1320
+ {
1321
+ name: "token",
1322
+ type: "address",
1323
+ internalType: "address",
1324
+ },
1325
+ {
1326
+ name: "receiver",
1327
+ type: "address",
1328
+ internalType: "address",
1329
+ },
1330
+ {
1331
+ name: "amount",
1332
+ type: "uint256",
1333
+ internalType: "uint256",
1334
+ },
1335
+ ],
1336
+ outputs: [],
1337
+ stateMutability: "nonpayable",
1338
+ },
1339
+ {
1340
+ type: "function",
1341
+ name: "erc4626Deposit",
1342
+ inputs: [
1343
+ {
1344
+ name: "vault",
1345
+ type: "address",
1346
+ internalType: "address",
1347
+ },
1348
+ {
1349
+ name: "assets",
1350
+ type: "uint256",
1351
+ internalType: "uint256",
1352
+ },
1353
+ {
1354
+ name: "maxSharePriceE27",
1355
+ type: "uint256",
1356
+ internalType: "uint256",
1357
+ },
1358
+ {
1359
+ name: "receiver",
1360
+ type: "address",
1361
+ internalType: "address",
1362
+ },
1363
+ ],
1364
+ outputs: [],
1365
+ stateMutability: "nonpayable",
1366
+ },
1367
+ {
1368
+ type: "function",
1369
+ name: "erc4626Mint",
1370
+ inputs: [
1371
+ {
1372
+ name: "vault",
1373
+ type: "address",
1374
+ internalType: "address",
1375
+ },
1376
+ {
1377
+ name: "shares",
1378
+ type: "uint256",
1379
+ internalType: "uint256",
1380
+ },
1381
+ {
1382
+ name: "maxSharePriceE27",
1383
+ type: "uint256",
1384
+ internalType: "uint256",
1385
+ },
1386
+ {
1387
+ name: "receiver",
1388
+ type: "address",
1389
+ internalType: "address",
1390
+ },
1391
+ ],
1392
+ outputs: [],
1393
+ stateMutability: "nonpayable",
1394
+ },
1395
+ {
1396
+ type: "function",
1397
+ name: "erc4626Redeem",
1398
+ inputs: [
1399
+ {
1400
+ name: "vault",
1401
+ type: "address",
1402
+ internalType: "address",
1403
+ },
1404
+ {
1405
+ name: "shares",
1406
+ type: "uint256",
1407
+ internalType: "uint256",
1408
+ },
1409
+ {
1410
+ name: "minSharePriceE27",
1411
+ type: "uint256",
1412
+ internalType: "uint256",
1413
+ },
1414
+ {
1415
+ name: "receiver",
1416
+ type: "address",
1417
+ internalType: "address",
1418
+ },
1419
+ {
1420
+ name: "owner",
1421
+ type: "address",
1422
+ internalType: "address",
1423
+ },
1424
+ ],
1425
+ outputs: [],
1426
+ stateMutability: "nonpayable",
1427
+ },
1428
+ {
1429
+ type: "function",
1430
+ name: "erc4626Withdraw",
1431
+ inputs: [
1432
+ {
1433
+ name: "vault",
1434
+ type: "address",
1435
+ internalType: "address",
1436
+ },
1437
+ {
1438
+ name: "assets",
1439
+ type: "uint256",
1440
+ internalType: "uint256",
1441
+ },
1442
+ {
1443
+ name: "minSharePriceE27",
1444
+ type: "uint256",
1445
+ internalType: "uint256",
1446
+ },
1447
+ {
1448
+ name: "receiver",
1449
+ type: "address",
1450
+ internalType: "address",
1451
+ },
1452
+ {
1453
+ name: "owner",
1454
+ type: "address",
1455
+ internalType: "address",
1456
+ },
1457
+ ],
1458
+ outputs: [],
1459
+ stateMutability: "nonpayable",
1460
+ },
1461
+ {
1462
+ type: "function",
1463
+ name: "morphoBorrow",
1464
+ inputs: [
1465
+ {
1466
+ name: "marketParams",
1467
+ type: "tuple",
1468
+ internalType: "struct MarketParams",
1469
+ components: [
1470
+ {
1471
+ name: "loanToken",
1472
+ type: "address",
1473
+ internalType: "address",
1474
+ },
1475
+ {
1476
+ name: "collateralToken",
1477
+ type: "address",
1478
+ internalType: "address",
1479
+ },
1480
+ {
1481
+ name: "oracle",
1482
+ type: "address",
1483
+ internalType: "address",
1484
+ },
1485
+ {
1486
+ name: "irm",
1487
+ type: "address",
1488
+ internalType: "address",
1489
+ },
1490
+ {
1491
+ name: "lltv",
1492
+ type: "uint256",
1493
+ internalType: "uint256",
1494
+ },
1495
+ ],
1496
+ },
1497
+ {
1498
+ name: "assets",
1499
+ type: "uint256",
1500
+ internalType: "uint256",
1501
+ },
1502
+ {
1503
+ name: "shares",
1504
+ type: "uint256",
1505
+ internalType: "uint256",
1506
+ },
1507
+ {
1508
+ name: "minSharePriceE27",
1509
+ type: "uint256",
1510
+ internalType: "uint256",
1511
+ },
1512
+ {
1513
+ name: "receiver",
1514
+ type: "address",
1515
+ internalType: "address",
1516
+ },
1517
+ ],
1518
+ outputs: [],
1519
+ stateMutability: "nonpayable",
1520
+ },
1521
+ {
1522
+ type: "function",
1523
+ name: "morphoFlashLoan",
1524
+ inputs: [
1525
+ {
1526
+ name: "token",
1527
+ type: "address",
1528
+ internalType: "address",
1529
+ },
1530
+ {
1531
+ name: "assets",
1532
+ type: "uint256",
1533
+ internalType: "uint256",
1534
+ },
1535
+ {
1536
+ name: "data",
1537
+ type: "bytes",
1538
+ internalType: "bytes",
1539
+ },
1540
+ ],
1541
+ outputs: [],
1542
+ stateMutability: "nonpayable",
1543
+ },
1544
+ {
1545
+ type: "function",
1546
+ name: "morphoRepay",
1547
+ inputs: [
1548
+ {
1549
+ name: "marketParams",
1550
+ type: "tuple",
1551
+ internalType: "struct MarketParams",
1552
+ components: [
1553
+ {
1554
+ name: "loanToken",
1555
+ type: "address",
1556
+ internalType: "address",
1557
+ },
1558
+ {
1559
+ name: "collateralToken",
1560
+ type: "address",
1561
+ internalType: "address",
1562
+ },
1563
+ {
1564
+ name: "oracle",
1565
+ type: "address",
1566
+ internalType: "address",
1567
+ },
1568
+ {
1569
+ name: "irm",
1570
+ type: "address",
1571
+ internalType: "address",
1572
+ },
1573
+ {
1574
+ name: "lltv",
1575
+ type: "uint256",
1576
+ internalType: "uint256",
1577
+ },
1578
+ ],
1579
+ },
1580
+ {
1581
+ name: "assets",
1582
+ type: "uint256",
1583
+ internalType: "uint256",
1584
+ },
1585
+ {
1586
+ name: "shares",
1587
+ type: "uint256",
1588
+ internalType: "uint256",
1589
+ },
1590
+ {
1591
+ name: "maxSharePriceE27",
1592
+ type: "uint256",
1593
+ internalType: "uint256",
1594
+ },
1595
+ {
1596
+ name: "onBehalf",
1597
+ type: "address",
1598
+ internalType: "address",
1599
+ },
1600
+ {
1601
+ name: "data",
1602
+ type: "bytes",
1603
+ internalType: "bytes",
1604
+ },
1605
+ ],
1606
+ outputs: [],
1607
+ stateMutability: "nonpayable",
1608
+ },
1609
+ {
1610
+ type: "function",
1611
+ name: "morphoSupply",
1612
+ inputs: [
1613
+ {
1614
+ name: "marketParams",
1615
+ type: "tuple",
1616
+ internalType: "struct MarketParams",
1617
+ components: [
1618
+ {
1619
+ name: "loanToken",
1620
+ type: "address",
1621
+ internalType: "address",
1622
+ },
1623
+ {
1624
+ name: "collateralToken",
1625
+ type: "address",
1626
+ internalType: "address",
1627
+ },
1628
+ {
1629
+ name: "oracle",
1630
+ type: "address",
1631
+ internalType: "address",
1632
+ },
1633
+ {
1634
+ name: "irm",
1635
+ type: "address",
1636
+ internalType: "address",
1637
+ },
1638
+ {
1639
+ name: "lltv",
1640
+ type: "uint256",
1641
+ internalType: "uint256",
1642
+ },
1643
+ ],
1644
+ },
1645
+ {
1646
+ name: "assets",
1647
+ type: "uint256",
1648
+ internalType: "uint256",
1649
+ },
1650
+ {
1651
+ name: "shares",
1652
+ type: "uint256",
1653
+ internalType: "uint256",
1654
+ },
1655
+ {
1656
+ name: "maxSharePriceE27",
1657
+ type: "uint256",
1658
+ internalType: "uint256",
1659
+ },
1660
+ {
1661
+ name: "onBehalf",
1662
+ type: "address",
1663
+ internalType: "address",
1664
+ },
1665
+ {
1666
+ name: "data",
1667
+ type: "bytes",
1668
+ internalType: "bytes",
1669
+ },
1670
+ ],
1671
+ outputs: [],
1672
+ stateMutability: "nonpayable",
1673
+ },
1674
+ {
1675
+ type: "function",
1676
+ name: "morphoSupplyCollateral",
1677
+ inputs: [
1678
+ {
1679
+ name: "marketParams",
1680
+ type: "tuple",
1681
+ internalType: "struct MarketParams",
1682
+ components: [
1683
+ {
1684
+ name: "loanToken",
1685
+ type: "address",
1686
+ internalType: "address",
1687
+ },
1688
+ {
1689
+ name: "collateralToken",
1690
+ type: "address",
1691
+ internalType: "address",
1692
+ },
1693
+ {
1694
+ name: "oracle",
1695
+ type: "address",
1696
+ internalType: "address",
1697
+ },
1698
+ {
1699
+ name: "irm",
1700
+ type: "address",
1701
+ internalType: "address",
1702
+ },
1703
+ {
1704
+ name: "lltv",
1705
+ type: "uint256",
1706
+ internalType: "uint256",
1707
+ },
1708
+ ],
1709
+ },
1710
+ {
1711
+ name: "assets",
1712
+ type: "uint256",
1713
+ internalType: "uint256",
1714
+ },
1715
+ {
1716
+ name: "onBehalf",
1717
+ type: "address",
1718
+ internalType: "address",
1719
+ },
1720
+ {
1721
+ name: "data",
1722
+ type: "bytes",
1723
+ internalType: "bytes",
1724
+ },
1725
+ ],
1726
+ outputs: [],
1727
+ stateMutability: "nonpayable",
1728
+ },
1729
+ {
1730
+ type: "function",
1731
+ name: "morphoWithdraw",
1732
+ inputs: [
1733
+ {
1734
+ name: "marketParams",
1735
+ type: "tuple",
1736
+ internalType: "struct MarketParams",
1737
+ components: [
1738
+ {
1739
+ name: "loanToken",
1740
+ type: "address",
1741
+ internalType: "address",
1742
+ },
1743
+ {
1744
+ name: "collateralToken",
1745
+ type: "address",
1746
+ internalType: "address",
1747
+ },
1748
+ {
1749
+ name: "oracle",
1750
+ type: "address",
1751
+ internalType: "address",
1752
+ },
1753
+ {
1754
+ name: "irm",
1755
+ type: "address",
1756
+ internalType: "address",
1757
+ },
1758
+ {
1759
+ name: "lltv",
1760
+ type: "uint256",
1761
+ internalType: "uint256",
1762
+ },
1763
+ ],
1764
+ },
1765
+ {
1766
+ name: "assets",
1767
+ type: "uint256",
1768
+ internalType: "uint256",
1769
+ },
1770
+ {
1771
+ name: "shares",
1772
+ type: "uint256",
1773
+ internalType: "uint256",
1774
+ },
1775
+ {
1776
+ name: "minSharePriceE27",
1777
+ type: "uint256",
1778
+ internalType: "uint256",
1779
+ },
1780
+ {
1781
+ name: "receiver",
1782
+ type: "address",
1783
+ internalType: "address",
1784
+ },
1785
+ ],
1786
+ outputs: [],
1787
+ stateMutability: "nonpayable",
1788
+ },
1789
+ {
1790
+ type: "function",
1791
+ name: "morphoWithdrawCollateral",
1792
+ inputs: [
1793
+ {
1794
+ name: "marketParams",
1795
+ type: "tuple",
1796
+ internalType: "struct MarketParams",
1797
+ components: [
1798
+ {
1799
+ name: "loanToken",
1800
+ type: "address",
1801
+ internalType: "address",
1802
+ },
1803
+ {
1804
+ name: "collateralToken",
1805
+ type: "address",
1806
+ internalType: "address",
1807
+ },
1808
+ {
1809
+ name: "oracle",
1810
+ type: "address",
1811
+ internalType: "address",
1812
+ },
1813
+ {
1814
+ name: "irm",
1815
+ type: "address",
1816
+ internalType: "address",
1817
+ },
1818
+ {
1819
+ name: "lltv",
1820
+ type: "uint256",
1821
+ internalType: "uint256",
1822
+ },
1823
+ ],
1824
+ },
1825
+ {
1826
+ name: "assets",
1827
+ type: "uint256",
1828
+ internalType: "uint256",
1829
+ },
1830
+ {
1831
+ name: "receiver",
1832
+ type: "address",
1833
+ internalType: "address",
1834
+ },
1835
+ ],
1836
+ outputs: [],
1837
+ stateMutability: "nonpayable",
1838
+ },
1839
+ {
1840
+ type: "function",
1841
+ name: "onMorphoFlashLoan",
1842
+ inputs: [
1843
+ {
1844
+ name: "",
1845
+ type: "uint256",
1846
+ internalType: "uint256",
1847
+ },
1848
+ {
1849
+ name: "data",
1850
+ type: "bytes",
1851
+ internalType: "bytes",
1852
+ },
1853
+ ],
1854
+ outputs: [],
1855
+ stateMutability: "nonpayable",
1856
+ },
1857
+ {
1858
+ type: "function",
1859
+ name: "onMorphoRepay",
1860
+ inputs: [
1861
+ {
1862
+ name: "",
1863
+ type: "uint256",
1864
+ internalType: "uint256",
1865
+ },
1866
+ {
1867
+ name: "data",
1868
+ type: "bytes",
1869
+ internalType: "bytes",
1870
+ },
1871
+ ],
1872
+ outputs: [],
1873
+ stateMutability: "nonpayable",
1874
+ },
1875
+ {
1876
+ type: "function",
1877
+ name: "onMorphoSupply",
1878
+ inputs: [
1879
+ {
1880
+ name: "",
1881
+ type: "uint256",
1882
+ internalType: "uint256",
1883
+ },
1884
+ {
1885
+ name: "data",
1886
+ type: "bytes",
1887
+ internalType: "bytes",
1888
+ },
1889
+ ],
1890
+ outputs: [],
1891
+ stateMutability: "nonpayable",
1892
+ },
1893
+ {
1894
+ type: "function",
1895
+ name: "onMorphoSupplyCollateral",
1896
+ inputs: [
1897
+ {
1898
+ name: "",
1899
+ type: "uint256",
1900
+ internalType: "uint256",
1901
+ },
1902
+ {
1903
+ name: "data",
1904
+ type: "bytes",
1905
+ internalType: "bytes",
1906
+ },
1907
+ ],
1908
+ outputs: [],
1909
+ stateMutability: "nonpayable",
1910
+ },
1911
+ {
1912
+ type: "function",
1913
+ name: "permit2TransferFrom",
1914
+ inputs: [
1915
+ {
1916
+ name: "token",
1917
+ type: "address",
1918
+ internalType: "address",
1919
+ },
1920
+ {
1921
+ name: "receiver",
1922
+ type: "address",
1923
+ internalType: "address",
1924
+ },
1925
+ {
1926
+ name: "amount",
1927
+ type: "uint256",
1928
+ internalType: "uint256",
1929
+ },
1930
+ ],
1931
+ outputs: [],
1932
+ stateMutability: "nonpayable",
1933
+ },
1934
+ {
1935
+ type: "function",
1936
+ name: "unwrapNative",
1937
+ inputs: [
1938
+ {
1939
+ name: "amount",
1940
+ type: "uint256",
1941
+ internalType: "uint256",
1942
+ },
1943
+ {
1944
+ name: "receiver",
1945
+ type: "address",
1946
+ internalType: "address",
1947
+ },
1948
+ ],
1949
+ outputs: [],
1950
+ stateMutability: "nonpayable",
1951
+ },
1952
+ {
1953
+ type: "function",
1954
+ name: "wrapNative",
1955
+ inputs: [
1956
+ {
1957
+ name: "amount",
1958
+ type: "uint256",
1959
+ internalType: "uint256",
1960
+ },
1961
+ {
1962
+ name: "receiver",
1963
+ type: "address",
1964
+ internalType: "address",
1965
+ },
1966
+ ],
1967
+ outputs: [],
1968
+ stateMutability: "nonpayable",
1969
+ },
1970
+ {
1971
+ type: "error",
1972
+ name: "SlippageExceeded",
1973
+ inputs: [],
1974
+ },
1975
+ {
1976
+ type: "error",
1977
+ name: "UnexpectedOwner",
1978
+ inputs: [],
1979
+ },
1980
+ {
1981
+ type: "error",
1982
+ name: "UnsafeCast",
1983
+ inputs: [],
1984
+ },
1985
+ {
1986
+ type: "error",
1987
+ name: "ZeroShares",
1988
+ inputs: [],
1989
+ },
1990
+ ];
1991
+ export const ethereumGeneralAdapter1Abi = [
1992
+ ...generalAdapter1Abi,
1993
+ {
1994
+ type: "constructor",
1995
+ inputs: [
1996
+ {
1997
+ name: "bundler3",
1998
+ type: "address",
1999
+ internalType: "address",
2000
+ },
2001
+ {
2002
+ name: "morpho",
2003
+ type: "address",
2004
+ internalType: "address",
2005
+ },
2006
+ {
2007
+ name: "weth",
2008
+ type: "address",
2009
+ internalType: "address",
2010
+ },
2011
+ {
2012
+ name: "wStEth",
2013
+ type: "address",
2014
+ internalType: "address",
2015
+ },
2016
+ {
2017
+ name: "morphoToken",
2018
+ type: "address",
2019
+ internalType: "address",
2020
+ },
2021
+ {
2022
+ name: "morphoWrapper",
2023
+ type: "address",
2024
+ internalType: "address",
2025
+ },
2026
+ ],
2027
+ stateMutability: "nonpayable",
2028
+ },
2029
+ {
2030
+ type: "function",
2031
+ name: "MORPHO_TOKEN",
2032
+ inputs: [],
2033
+ outputs: [
2034
+ {
2035
+ name: "",
2036
+ type: "address",
2037
+ internalType: "address",
2038
+ },
2039
+ ],
2040
+ stateMutability: "view",
2041
+ },
2042
+ {
2043
+ type: "function",
2044
+ name: "MORPHO_WRAPPER",
2045
+ inputs: [],
2046
+ outputs: [
2047
+ {
2048
+ name: "",
2049
+ type: "address",
2050
+ internalType: "address",
2051
+ },
2052
+ ],
2053
+ stateMutability: "view",
2054
+ },
2055
+ {
2056
+ type: "function",
2057
+ name: "ST_ETH",
2058
+ inputs: [],
2059
+ outputs: [
2060
+ {
2061
+ name: "",
2062
+ type: "address",
2063
+ internalType: "address",
2064
+ },
2065
+ ],
2066
+ stateMutability: "view",
2067
+ },
2068
+ {
2069
+ type: "function",
2070
+ name: "WST_ETH",
2071
+ inputs: [],
2072
+ outputs: [
2073
+ {
2074
+ name: "",
2075
+ type: "address",
2076
+ internalType: "address",
2077
+ },
2078
+ ],
2079
+ stateMutability: "view",
2080
+ },
2081
+ {
2082
+ type: "function",
2083
+ name: "morphoWrapperDepositFor",
2084
+ inputs: [
2085
+ {
2086
+ name: "receiver",
2087
+ type: "address",
2088
+ internalType: "address",
2089
+ },
2090
+ {
2091
+ name: "amount",
2092
+ type: "uint256",
2093
+ internalType: "uint256",
2094
+ },
2095
+ ],
2096
+ outputs: [],
2097
+ stateMutability: "nonpayable",
2098
+ },
2099
+ {
2100
+ type: "function",
2101
+ name: "morphoWrapperWithdrawTo",
2102
+ inputs: [
2103
+ {
2104
+ name: "receiver",
2105
+ type: "address",
2106
+ internalType: "address",
2107
+ },
2108
+ {
2109
+ name: "amount",
2110
+ type: "uint256",
2111
+ internalType: "uint256",
2112
+ },
2113
+ ],
2114
+ outputs: [],
2115
+ stateMutability: "nonpayable",
2116
+ },
2117
+ {
2118
+ type: "function",
2119
+ name: "stakeEth",
2120
+ inputs: [
2121
+ {
2122
+ name: "amount",
2123
+ type: "uint256",
2124
+ internalType: "uint256",
2125
+ },
2126
+ {
2127
+ name: "maxSharePriceE27",
2128
+ type: "uint256",
2129
+ internalType: "uint256",
2130
+ },
2131
+ {
2132
+ name: "referral",
2133
+ type: "address",
2134
+ internalType: "address",
2135
+ },
2136
+ {
2137
+ name: "receiver",
2138
+ type: "address",
2139
+ internalType: "address",
2140
+ },
2141
+ ],
2142
+ outputs: [],
2143
+ stateMutability: "nonpayable",
2144
+ },
2145
+ {
2146
+ type: "function",
2147
+ name: "unwrapStEth",
2148
+ inputs: [
2149
+ {
2150
+ name: "amount",
2151
+ type: "uint256",
2152
+ internalType: "uint256",
2153
+ },
2154
+ {
2155
+ name: "receiver",
2156
+ type: "address",
2157
+ internalType: "address",
2158
+ },
2159
+ ],
2160
+ outputs: [],
2161
+ stateMutability: "nonpayable",
2162
+ },
2163
+ {
2164
+ type: "function",
2165
+ name: "wrapStEth",
2166
+ inputs: [
2167
+ {
2168
+ name: "amount",
2169
+ type: "uint256",
2170
+ internalType: "uint256",
2171
+ },
2172
+ {
2173
+ name: "receiver",
2174
+ type: "address",
2175
+ internalType: "address",
2176
+ },
2177
+ ],
2178
+ outputs: [],
2179
+ stateMutability: "nonpayable",
2180
+ },
2181
+ ];
2182
+ export const paraswapAdapterAbi = [
2183
+ ...coreAdapterAbi,
2184
+ {
2185
+ type: "constructor",
2186
+ inputs: [
2187
+ {
2188
+ name: "bundler3",
2189
+ type: "address",
2190
+ internalType: "address",
2191
+ },
2192
+ {
2193
+ name: "morpho",
2194
+ type: "address",
2195
+ internalType: "address",
2196
+ },
2197
+ {
2198
+ name: "augustusRegistry",
2199
+ type: "address",
2200
+ internalType: "address",
2201
+ },
2202
+ ],
2203
+ stateMutability: "nonpayable",
2204
+ },
2205
+ {
2206
+ type: "function",
2207
+ name: "AUGUSTUS_REGISTRY",
2208
+ inputs: [],
2209
+ outputs: [
2210
+ {
2211
+ name: "",
2212
+ type: "address",
2213
+ internalType: "contract IAugustusRegistry",
2214
+ },
2215
+ ],
2216
+ stateMutability: "view",
2217
+ },
2218
+ {
2219
+ type: "function",
2220
+ name: "MORPHO",
2221
+ inputs: [],
2222
+ outputs: [
2223
+ {
2224
+ name: "",
2225
+ type: "address",
2226
+ internalType: "contract IMorpho",
2227
+ },
2228
+ ],
2229
+ stateMutability: "view",
2230
+ },
2231
+ {
2232
+ type: "function",
2233
+ name: "buy",
2234
+ inputs: [
2235
+ {
2236
+ name: "augustus",
2237
+ type: "address",
2238
+ internalType: "address",
2239
+ },
2240
+ {
2241
+ name: "callData",
2242
+ type: "bytes",
2243
+ internalType: "bytes",
2244
+ },
2245
+ {
2246
+ name: "srcToken",
2247
+ type: "address",
2248
+ internalType: "address",
2249
+ },
2250
+ {
2251
+ name: "destToken",
2252
+ type: "address",
2253
+ internalType: "address",
2254
+ },
2255
+ {
2256
+ name: "newDestAmount",
2257
+ type: "uint256",
2258
+ internalType: "uint256",
2259
+ },
2260
+ {
2261
+ name: "offsets",
2262
+ type: "tuple",
2263
+ internalType: "struct Offsets",
2264
+ components: [
2265
+ {
2266
+ name: "exactAmount",
2267
+ type: "uint256",
2268
+ internalType: "uint256",
2269
+ },
2270
+ {
2271
+ name: "limitAmount",
2272
+ type: "uint256",
2273
+ internalType: "uint256",
2274
+ },
2275
+ {
2276
+ name: "quotedAmount",
2277
+ type: "uint256",
2278
+ internalType: "uint256",
2279
+ },
2280
+ ],
2281
+ },
2282
+ {
2283
+ name: "receiver",
2284
+ type: "address",
2285
+ internalType: "address",
2286
+ },
2287
+ ],
2288
+ outputs: [],
2289
+ stateMutability: "nonpayable",
2290
+ },
2291
+ {
2292
+ type: "function",
2293
+ name: "buyMorphoDebt",
2294
+ inputs: [
2295
+ {
2296
+ name: "augustus",
2297
+ type: "address",
2298
+ internalType: "address",
2299
+ },
2300
+ {
2301
+ name: "callData",
2302
+ type: "bytes",
2303
+ internalType: "bytes",
2304
+ },
2305
+ {
2306
+ name: "srcToken",
2307
+ type: "address",
2308
+ internalType: "address",
2309
+ },
2310
+ {
2311
+ name: "marketParams",
2312
+ type: "tuple",
2313
+ internalType: "struct MarketParams",
2314
+ components: [
2315
+ {
2316
+ name: "loanToken",
2317
+ type: "address",
2318
+ internalType: "address",
2319
+ },
2320
+ {
2321
+ name: "collateralToken",
2322
+ type: "address",
2323
+ internalType: "address",
2324
+ },
2325
+ {
2326
+ name: "oracle",
2327
+ type: "address",
2328
+ internalType: "address",
2329
+ },
2330
+ {
2331
+ name: "irm",
2332
+ type: "address",
2333
+ internalType: "address",
2334
+ },
2335
+ {
2336
+ name: "lltv",
2337
+ type: "uint256",
2338
+ internalType: "uint256",
2339
+ },
2340
+ ],
2341
+ },
2342
+ {
2343
+ name: "offsets",
2344
+ type: "tuple",
2345
+ internalType: "struct Offsets",
2346
+ components: [
2347
+ {
2348
+ name: "exactAmount",
2349
+ type: "uint256",
2350
+ internalType: "uint256",
2351
+ },
2352
+ {
2353
+ name: "limitAmount",
2354
+ type: "uint256",
2355
+ internalType: "uint256",
2356
+ },
2357
+ {
2358
+ name: "quotedAmount",
2359
+ type: "uint256",
2360
+ internalType: "uint256",
2361
+ },
2362
+ ],
2363
+ },
2364
+ {
2365
+ name: "onBehalf",
2366
+ type: "address",
2367
+ internalType: "address",
2368
+ },
2369
+ {
2370
+ name: "receiver",
2371
+ type: "address",
2372
+ internalType: "address",
2373
+ },
2374
+ ],
2375
+ outputs: [],
2376
+ stateMutability: "nonpayable",
2377
+ },
2378
+ {
2379
+ type: "function",
2380
+ name: "sell",
2381
+ inputs: [
2382
+ {
2383
+ name: "augustus",
2384
+ type: "address",
2385
+ internalType: "address",
2386
+ },
2387
+ {
2388
+ name: "callData",
2389
+ type: "bytes",
2390
+ internalType: "bytes",
2391
+ },
2392
+ {
2393
+ name: "srcToken",
2394
+ type: "address",
2395
+ internalType: "address",
2396
+ },
2397
+ {
2398
+ name: "destToken",
2399
+ type: "address",
2400
+ internalType: "address",
2401
+ },
2402
+ {
2403
+ name: "sellEntireBalance",
2404
+ type: "bool",
2405
+ internalType: "bool",
2406
+ },
2407
+ {
2408
+ name: "offsets",
2409
+ type: "tuple",
2410
+ internalType: "struct Offsets",
2411
+ components: [
2412
+ {
2413
+ name: "exactAmount",
2414
+ type: "uint256",
2415
+ internalType: "uint256",
2416
+ },
2417
+ {
2418
+ name: "limitAmount",
2419
+ type: "uint256",
2420
+ internalType: "uint256",
2421
+ },
2422
+ {
2423
+ name: "quotedAmount",
2424
+ type: "uint256",
2425
+ internalType: "uint256",
2426
+ },
2427
+ ],
2428
+ },
2429
+ {
2430
+ name: "receiver",
2431
+ type: "address",
2432
+ internalType: "address",
2433
+ },
2434
+ ],
2435
+ outputs: [],
2436
+ stateMutability: "nonpayable",
2437
+ },
2438
+ {
2439
+ type: "error",
2440
+ name: "BuyAmountTooLow",
2441
+ inputs: [],
2442
+ },
2443
+ {
2444
+ type: "error",
2445
+ name: "InvalidAugustus",
2446
+ inputs: [],
2447
+ },
2448
+ {
2449
+ type: "error",
2450
+ name: "InvalidOffset",
2451
+ inputs: [],
2452
+ },
2453
+ {
2454
+ type: "error",
2455
+ name: "SellAmountTooHigh",
2456
+ inputs: [],
2457
+ },
2458
+ ];
2459
+ export const erc20WrapperAdapterAbi = [
2460
+ ...coreAdapterAbi,
2461
+ {
2462
+ type: "constructor",
2463
+ inputs: [
2464
+ {
2465
+ name: "bundler3",
2466
+ type: "address",
2467
+ internalType: "address",
2468
+ },
2469
+ ],
2470
+ stateMutability: "nonpayable",
2471
+ },
2472
+ {
2473
+ type: "function",
2474
+ name: "erc20WrapperDepositFor",
2475
+ inputs: [
2476
+ {
2477
+ name: "wrapper",
2478
+ type: "address",
2479
+ internalType: "address",
2480
+ },
2481
+ {
2482
+ name: "amount",
2483
+ type: "uint256",
2484
+ internalType: "uint256",
2485
+ },
2486
+ ],
2487
+ outputs: [],
2488
+ stateMutability: "nonpayable",
2489
+ },
2490
+ {
2491
+ type: "function",
2492
+ name: "erc20WrapperWithdrawTo",
2493
+ inputs: [
2494
+ {
2495
+ name: "wrapper",
2496
+ type: "address",
2497
+ internalType: "address",
2498
+ },
2499
+ {
2500
+ name: "receiver",
2501
+ type: "address",
2502
+ internalType: "address",
2503
+ },
2504
+ {
2505
+ name: "amount",
2506
+ type: "uint256",
2507
+ internalType: "uint256",
2508
+ },
2509
+ ],
2510
+ outputs: [],
2511
+ stateMutability: "nonpayable",
2512
+ },
2513
+ {
2514
+ type: "error",
2515
+ name: "DepositFailed",
2516
+ inputs: [],
2517
+ },
2518
+ {
2519
+ type: "error",
2520
+ name: "WithdrawFailed",
2521
+ inputs: [],
2522
+ },
2523
+ ];
2524
+ export const aaveV2MigrationAdapterAbi = [
2525
+ ...coreAdapterAbi,
2526
+ {
2527
+ type: "constructor",
2528
+ inputs: [
2529
+ {
2530
+ name: "bundler3",
2531
+ type: "address",
2532
+ internalType: "address",
2533
+ },
2534
+ {
2535
+ name: "aaveV2Pool",
2536
+ type: "address",
2537
+ internalType: "address",
2538
+ },
2539
+ ],
2540
+ stateMutability: "nonpayable",
2541
+ },
2542
+ {
2543
+ type: "function",
2544
+ name: "aaveV2Repay",
2545
+ inputs: [
2546
+ {
2547
+ name: "token",
2548
+ type: "address",
2549
+ internalType: "address",
2550
+ },
2551
+ {
2552
+ name: "amount",
2553
+ type: "uint256",
2554
+ internalType: "uint256",
2555
+ },
2556
+ {
2557
+ name: "interestRateMode",
2558
+ type: "uint256",
2559
+ internalType: "uint256",
2560
+ },
2561
+ {
2562
+ name: "onBehalf",
2563
+ type: "address",
2564
+ internalType: "address",
2565
+ },
2566
+ ],
2567
+ outputs: [],
2568
+ stateMutability: "nonpayable",
2569
+ },
2570
+ {
2571
+ type: "function",
2572
+ name: "aaveV2Withdraw",
2573
+ inputs: [
2574
+ {
2575
+ name: "token",
2576
+ type: "address",
2577
+ internalType: "address",
2578
+ },
2579
+ {
2580
+ name: "amount",
2581
+ type: "uint256",
2582
+ internalType: "uint256",
2583
+ },
2584
+ {
2585
+ name: "receiver",
2586
+ type: "address",
2587
+ internalType: "address",
2588
+ },
2589
+ ],
2590
+ outputs: [],
2591
+ stateMutability: "nonpayable",
2592
+ },
2593
+ ];
2594
+ export const aaveV3MigrationAdapterAbi = [
2595
+ ...coreAdapterAbi,
2596
+ {
2597
+ type: "constructor",
2598
+ inputs: [
2599
+ {
2600
+ name: "bundler3",
2601
+ type: "address",
2602
+ internalType: "address",
2603
+ },
2604
+ {
2605
+ name: "aaveV3Pool",
2606
+ type: "address",
2607
+ internalType: "address",
2608
+ },
2609
+ ],
2610
+ stateMutability: "nonpayable",
2611
+ },
2612
+ {
2613
+ type: "function",
2614
+ name: "aaveV3Repay",
2615
+ inputs: [
2616
+ {
2617
+ name: "token",
2618
+ type: "address",
2619
+ internalType: "address",
2620
+ },
2621
+ {
2622
+ name: "amount",
2623
+ type: "uint256",
2624
+ internalType: "uint256",
2625
+ },
2626
+ {
2627
+ name: "interestRateMode",
2628
+ type: "uint256",
2629
+ internalType: "uint256",
2630
+ },
2631
+ {
2632
+ name: "onBehalf",
2633
+ type: "address",
2634
+ internalType: "address",
2635
+ },
2636
+ ],
2637
+ outputs: [],
2638
+ stateMutability: "nonpayable",
2639
+ },
2640
+ {
2641
+ type: "function",
2642
+ name: "aaveV3Withdraw",
2643
+ inputs: [
2644
+ {
2645
+ name: "token",
2646
+ type: "address",
2647
+ internalType: "address",
2648
+ },
2649
+ {
2650
+ name: "amount",
2651
+ type: "uint256",
2652
+ internalType: "uint256",
2653
+ },
2654
+ {
2655
+ name: "receiver",
2656
+ type: "address",
2657
+ internalType: "address",
2658
+ },
2659
+ ],
2660
+ outputs: [],
2661
+ stateMutability: "nonpayable",
2662
+ },
2663
+ ];
2664
+ export const aaveV3OptimizerMigrationAdapterAbi = [
2665
+ ...coreAdapterAbi,
2666
+ {
2667
+ type: "constructor",
2668
+ inputs: [
2669
+ {
2670
+ name: "bundler3",
2671
+ type: "address",
2672
+ internalType: "address",
2673
+ },
2674
+ {
2675
+ name: "aaveV3Optimizer",
2676
+ type: "address",
2677
+ internalType: "address",
2678
+ },
2679
+ ],
2680
+ stateMutability: "nonpayable",
2681
+ },
2682
+ {
2683
+ type: "function",
2684
+ name: "aaveV3OptimizerRepay",
2685
+ inputs: [
2686
+ {
2687
+ name: "underlying",
2688
+ type: "address",
2689
+ internalType: "address",
2690
+ },
2691
+ {
2692
+ name: "amount",
2693
+ type: "uint256",
2694
+ internalType: "uint256",
2695
+ },
2696
+ {
2697
+ name: "onBehalf",
2698
+ type: "address",
2699
+ internalType: "address",
2700
+ },
2701
+ ],
2702
+ outputs: [],
2703
+ stateMutability: "nonpayable",
2704
+ },
2705
+ {
2706
+ type: "function",
2707
+ name: "aaveV3OptimizerWithdraw",
2708
+ inputs: [
2709
+ {
2710
+ name: "underlying",
2711
+ type: "address",
2712
+ internalType: "address",
2713
+ },
2714
+ {
2715
+ name: "amount",
2716
+ type: "uint256",
2717
+ internalType: "uint256",
2718
+ },
2719
+ {
2720
+ name: "maxIterations",
2721
+ type: "uint256",
2722
+ internalType: "uint256",
2723
+ },
2724
+ {
2725
+ name: "receiver",
2726
+ type: "address",
2727
+ internalType: "address",
2728
+ },
2729
+ ],
2730
+ outputs: [],
2731
+ stateMutability: "nonpayable",
2732
+ },
2733
+ {
2734
+ type: "function",
2735
+ name: "aaveV3OptimizerWithdrawCollateral",
2736
+ inputs: [
2737
+ {
2738
+ name: "underlying",
2739
+ type: "address",
2740
+ internalType: "address",
2741
+ },
2742
+ {
2743
+ name: "amount",
2744
+ type: "uint256",
2745
+ internalType: "uint256",
2746
+ },
2747
+ {
2748
+ name: "receiver",
2749
+ type: "address",
2750
+ internalType: "address",
2751
+ },
2752
+ ],
2753
+ outputs: [],
2754
+ stateMutability: "nonpayable",
2755
+ },
2756
+ ];
2757
+ export const compoundV2MigrationAdapterAbi = [
2758
+ ...coreAdapterAbi,
2759
+ {
2760
+ type: "constructor",
2761
+ inputs: [
2762
+ {
2763
+ name: "bundler3",
2764
+ type: "address",
2765
+ internalType: "address",
2766
+ },
2767
+ {
2768
+ name: "cEth",
2769
+ type: "address",
2770
+ internalType: "address",
2771
+ },
2772
+ ],
2773
+ stateMutability: "nonpayable",
2774
+ },
2775
+ {
2776
+ type: "function",
2777
+ name: "C_ETH",
2778
+ inputs: [],
2779
+ outputs: [
2780
+ {
2781
+ name: "",
2782
+ type: "address",
2783
+ internalType: "address",
2784
+ },
2785
+ ],
2786
+ stateMutability: "view",
2787
+ },
2788
+ {
2789
+ type: "function",
2790
+ name: "compoundV2RedeemErc20",
2791
+ inputs: [
2792
+ {
2793
+ name: "cToken",
2794
+ type: "address",
2795
+ internalType: "address",
2796
+ },
2797
+ {
2798
+ name: "amount",
2799
+ type: "uint256",
2800
+ internalType: "uint256",
2801
+ },
2802
+ {
2803
+ name: "receiver",
2804
+ type: "address",
2805
+ internalType: "address",
2806
+ },
2807
+ ],
2808
+ outputs: [],
2809
+ stateMutability: "nonpayable",
2810
+ },
2811
+ {
2812
+ type: "function",
2813
+ name: "compoundV2RedeemEth",
2814
+ inputs: [
2815
+ {
2816
+ name: "amount",
2817
+ type: "uint256",
2818
+ internalType: "uint256",
2819
+ },
2820
+ {
2821
+ name: "receiver",
2822
+ type: "address",
2823
+ internalType: "address",
2824
+ },
2825
+ ],
2826
+ outputs: [],
2827
+ stateMutability: "nonpayable",
2828
+ },
2829
+ {
2830
+ type: "function",
2831
+ name: "compoundV2RepayErc20",
2832
+ inputs: [
2833
+ {
2834
+ name: "cToken",
2835
+ type: "address",
2836
+ internalType: "address",
2837
+ },
2838
+ {
2839
+ name: "amount",
2840
+ type: "uint256",
2841
+ internalType: "uint256",
2842
+ },
2843
+ {
2844
+ name: "onBehalf",
2845
+ type: "address",
2846
+ internalType: "address",
2847
+ },
2848
+ ],
2849
+ outputs: [],
2850
+ stateMutability: "nonpayable",
2851
+ },
2852
+ {
2853
+ type: "function",
2854
+ name: "compoundV2RepayEth",
2855
+ inputs: [
2856
+ {
2857
+ name: "amount",
2858
+ type: "uint256",
2859
+ internalType: "uint256",
2860
+ },
2861
+ {
2862
+ name: "onBehalf",
2863
+ type: "address",
2864
+ internalType: "address",
2865
+ },
2866
+ ],
2867
+ outputs: [],
2868
+ stateMutability: "nonpayable",
2869
+ },
2870
+ ];
2871
+ export const compoundV3MigrationAdapterAbi = [
2872
+ ...coreAdapterAbi,
2873
+ {
2874
+ type: "constructor",
2875
+ inputs: [
2876
+ {
2877
+ name: "bundler3",
2878
+ type: "address",
2879
+ internalType: "address",
2880
+ },
2881
+ ],
2882
+ stateMutability: "nonpayable",
2883
+ },
2884
+ {
2885
+ type: "function",
2886
+ name: "compoundV3Repay",
2887
+ inputs: [
2888
+ {
2889
+ name: "instance",
2890
+ type: "address",
2891
+ internalType: "address",
2892
+ },
2893
+ {
2894
+ name: "amount",
2895
+ type: "uint256",
2896
+ internalType: "uint256",
2897
+ },
2898
+ {
2899
+ name: "onBehalf",
2900
+ type: "address",
2901
+ internalType: "address",
2902
+ },
2903
+ ],
2904
+ outputs: [],
2905
+ stateMutability: "nonpayable",
2906
+ },
2907
+ {
2908
+ type: "function",
2909
+ name: "compoundV3WithdrawFrom",
2910
+ inputs: [
2911
+ {
2912
+ name: "instance",
2913
+ type: "address",
2914
+ internalType: "address",
2915
+ },
2916
+ {
2917
+ name: "asset",
2918
+ type: "address",
2919
+ internalType: "address",
2920
+ },
2921
+ {
2922
+ name: "amount",
2923
+ type: "uint256",
2924
+ internalType: "uint256",
2925
+ },
2926
+ {
2927
+ name: "receiver",
2928
+ type: "address",
2929
+ internalType: "address",
2930
+ },
2931
+ ],
2932
+ outputs: [],
2933
+ stateMutability: "nonpayable",
2934
+ },
2935
+ ];