@varla/sdk 2.19.0 → 3.0.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/AGENTS.md +10 -10
- package/CHANGELOG.md +26 -0
- package/README.md +2 -2
- package/dist/abi/full/OpinionCtfExecutionEngineAdapter.d.ts +4 -0
- package/dist/abi/full/OpinionCtfExecutionEngineAdapter.d.ts.map +1 -1
- package/dist/abi/full/OpinionCtfExecutionEngineAdapter.js +5 -0
- package/dist/abi/full/OpinionCtfExecutionEngineAdapter.js.map +1 -1
- package/dist/abi/full/PolymarketCtfAdapter.d.ts +32 -0
- package/dist/abi/full/PolymarketCtfAdapter.d.ts.map +1 -1
- package/dist/abi/full/PolymarketCtfAdapter.js +41 -0
- package/dist/abi/full/PolymarketCtfAdapter.js.map +1 -1
- package/dist/abi/full/VarlaConvertLiquidator.d.ts +39 -0
- package/dist/abi/full/VarlaConvertLiquidator.d.ts.map +1 -1
- package/dist/abi/full/VarlaConvertLiquidator.js +50 -0
- package/dist/abi/full/VarlaConvertLiquidator.js.map +1 -1
- package/dist/abi/full/VarlaCore.d.ts +82 -0
- package/dist/abi/full/VarlaCore.d.ts.map +1 -1
- package/dist/abi/full/VarlaCore.js +106 -0
- package/dist/abi/full/VarlaCore.js.map +1 -1
- package/dist/abi/full/VarlaMergeLiquidator.d.ts +0 -39
- package/dist/abi/full/VarlaMergeLiquidator.d.ts.map +1 -1
- package/dist/abi/full/VarlaMergeLiquidator.js +0 -50
- package/dist/abi/full/VarlaMergeLiquidator.js.map +1 -1
- package/dist/abi/full/VarlaPool.d.ts +326 -0
- package/dist/abi/full/VarlaPool.d.ts.map +1 -1
- package/dist/abi/full/VarlaPool.js +424 -0
- package/dist/abi/full/VarlaPool.js.map +1 -1
- package/dist/abi/index.d.ts +0 -1
- package/dist/abi/index.d.ts.map +1 -1
- package/dist/abi/index.js +0 -1
- package/dist/abi/index.js.map +1 -1
- package/dist/actions/admin.d.ts +14 -0
- package/dist/actions/admin.d.ts.map +1 -1
- package/dist/actions/admin.js +18 -0
- package/dist/actions/admin.js.map +1 -1
- package/dist/actions/core.d.ts +14 -0
- package/dist/actions/core.d.ts.map +1 -1
- package/dist/actions/core.js +18 -0
- package/dist/actions/core.js.map +1 -1
- package/dist/actions/pool.d.ts +17 -0
- package/dist/actions/pool.d.ts.map +1 -1
- package/dist/actions/pool.js +18 -0
- package/dist/actions/pool.js.map +1 -1
- package/dist/addresses/polygon.d.ts.map +1 -1
- package/dist/addresses/polygon.js +0 -1
- package/dist/addresses/polygon.js.map +1 -1
- package/dist/addresses/polygonProxy.d.ts.map +1 -1
- package/dist/addresses/polygonProxy.js +0 -1
- package/dist/addresses/polygonProxy.js.map +1 -1
- package/dist/contracts.d.ts +1 -2
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +0 -8
- package/dist/contracts.js.map +1 -1
- package/dist/generated.d.ts +470 -273
- package/dist/generated.d.ts.map +1 -1
- package/dist/generated.js +0 -1
- package/dist/generated.js.map +1 -1
- package/dist/meta.d.ts +16 -1
- package/dist/meta.d.ts.map +1 -1
- package/dist/meta.js +17 -2
- package/dist/meta.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/views/core.d.ts +2 -1
- package/dist/views/core.d.ts.map +1 -1
- package/dist/views/core.js +2 -1
- package/dist/views/core.js.map +1 -1
- package/dist/views/oracle.d.ts +15 -0
- package/dist/views/oracle.d.ts.map +1 -1
- package/dist/views/oracle.js +44 -0
- package/dist/views/oracle.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/full/OpinionCtfExecutionEngineAdapter.ts +5 -0
- package/src/abi/full/PolymarketCtfAdapter.ts +41 -0
- package/src/abi/full/VarlaConvertLiquidator.ts +50 -0
- package/src/abi/full/VarlaCore.ts +106 -0
- package/src/abi/full/VarlaMergeLiquidator.ts +0 -50
- package/src/abi/full/VarlaPool.ts +424 -0
- package/src/abi/index.ts +0 -1
- package/src/actions/admin.ts +32 -0
- package/src/actions/core.ts +32 -0
- package/src/actions/pool.ts +35 -0
- package/src/addresses/polygon.json +1 -2
- package/src/addresses/polygon.ts +0 -1
- package/src/addresses/polygonProxy.ts +0 -1
- package/src/contracts.ts +0 -11
- package/src/generated.ts +0 -1
- package/src/meta.ts +33 -3
- package/src/types.ts +0 -1
- package/src/views/core.ts +2 -1
- package/src/views/oracle.ts +65 -0
|
@@ -83,6 +83,27 @@ export const VARLAPOOL_ABI = [
|
|
|
83
83
|
"name": "BorrowCapExceeded",
|
|
84
84
|
"type": "error"
|
|
85
85
|
},
|
|
86
|
+
{
|
|
87
|
+
"inputs": [
|
|
88
|
+
{
|
|
89
|
+
"internalType": "uint256",
|
|
90
|
+
"name": "expected",
|
|
91
|
+
"type": "uint256"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"internalType": "uint256",
|
|
95
|
+
"name": "actual",
|
|
96
|
+
"type": "uint256"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"name": "CollateralAmountMismatch",
|
|
100
|
+
"type": "error"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"inputs": [],
|
|
104
|
+
"name": "CollateralRampNotConfigured",
|
|
105
|
+
"type": "error"
|
|
106
|
+
},
|
|
86
107
|
{
|
|
87
108
|
"inputs": [
|
|
88
109
|
{
|
|
@@ -343,6 +364,17 @@ export const VARLAPOOL_ABI = [
|
|
|
343
364
|
"name": "StrategyNotContract",
|
|
344
365
|
"type": "error"
|
|
345
366
|
},
|
|
367
|
+
{
|
|
368
|
+
"inputs": [
|
|
369
|
+
{
|
|
370
|
+
"internalType": "address",
|
|
371
|
+
"name": "asset",
|
|
372
|
+
"type": "address"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"name": "UnsupportedWrappedAsset",
|
|
376
|
+
"type": "error"
|
|
377
|
+
},
|
|
346
378
|
{
|
|
347
379
|
"inputs": [],
|
|
348
380
|
"name": "VarlaCoreAlreadySet",
|
|
@@ -441,6 +473,37 @@ export const VARLAPOOL_ABI = [
|
|
|
441
473
|
"name": "BorrowCapUpdated",
|
|
442
474
|
"type": "event"
|
|
443
475
|
},
|
|
476
|
+
{
|
|
477
|
+
"anonymous": false,
|
|
478
|
+
"inputs": [
|
|
479
|
+
{
|
|
480
|
+
"indexed": true,
|
|
481
|
+
"internalType": "address",
|
|
482
|
+
"name": "oldOnramp",
|
|
483
|
+
"type": "address"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"indexed": true,
|
|
487
|
+
"internalType": "address",
|
|
488
|
+
"name": "newOnramp",
|
|
489
|
+
"type": "address"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"indexed": true,
|
|
493
|
+
"internalType": "address",
|
|
494
|
+
"name": "oldOfframp",
|
|
495
|
+
"type": "address"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"indexed": false,
|
|
499
|
+
"internalType": "address",
|
|
500
|
+
"name": "newOfframp",
|
|
501
|
+
"type": "address"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
"name": "CollateralRampsSet",
|
|
505
|
+
"type": "event"
|
|
506
|
+
},
|
|
444
507
|
{
|
|
445
508
|
"anonymous": false,
|
|
446
509
|
"inputs": [
|
|
@@ -698,6 +761,37 @@ export const VARLAPOOL_ABI = [
|
|
|
698
761
|
"name": "Withdraw",
|
|
699
762
|
"type": "event"
|
|
700
763
|
},
|
|
764
|
+
{
|
|
765
|
+
"anonymous": false,
|
|
766
|
+
"inputs": [
|
|
767
|
+
{
|
|
768
|
+
"indexed": true,
|
|
769
|
+
"internalType": "address",
|
|
770
|
+
"name": "oldUsdc",
|
|
771
|
+
"type": "address"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"indexed": true,
|
|
775
|
+
"internalType": "address",
|
|
776
|
+
"name": "newUsdc",
|
|
777
|
+
"type": "address"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"indexed": true,
|
|
781
|
+
"internalType": "address",
|
|
782
|
+
"name": "oldUsdce",
|
|
783
|
+
"type": "address"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"indexed": false,
|
|
787
|
+
"internalType": "address",
|
|
788
|
+
"name": "newUsdce",
|
|
789
|
+
"type": "address"
|
|
790
|
+
}
|
|
791
|
+
],
|
|
792
|
+
"name": "WrappedCollateralAssetsSet",
|
|
793
|
+
"type": "event"
|
|
794
|
+
},
|
|
701
795
|
{
|
|
702
796
|
"inputs": [],
|
|
703
797
|
"name": "PRECISION",
|
|
@@ -856,6 +950,45 @@ export const VARLAPOOL_ABI = [
|
|
|
856
950
|
"stateMutability": "view",
|
|
857
951
|
"type": "function"
|
|
858
952
|
},
|
|
953
|
+
{
|
|
954
|
+
"inputs": [],
|
|
955
|
+
"name": "bridgedUsdc",
|
|
956
|
+
"outputs": [
|
|
957
|
+
{
|
|
958
|
+
"internalType": "address",
|
|
959
|
+
"name": "",
|
|
960
|
+
"type": "address"
|
|
961
|
+
}
|
|
962
|
+
],
|
|
963
|
+
"stateMutability": "view",
|
|
964
|
+
"type": "function"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"inputs": [],
|
|
968
|
+
"name": "collateralOfframp",
|
|
969
|
+
"outputs": [
|
|
970
|
+
{
|
|
971
|
+
"internalType": "address",
|
|
972
|
+
"name": "",
|
|
973
|
+
"type": "address"
|
|
974
|
+
}
|
|
975
|
+
],
|
|
976
|
+
"stateMutability": "view",
|
|
977
|
+
"type": "function"
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"inputs": [],
|
|
981
|
+
"name": "collateralOnramp",
|
|
982
|
+
"outputs": [
|
|
983
|
+
{
|
|
984
|
+
"internalType": "address",
|
|
985
|
+
"name": "",
|
|
986
|
+
"type": "address"
|
|
987
|
+
}
|
|
988
|
+
],
|
|
989
|
+
"stateMutability": "view",
|
|
990
|
+
"type": "function"
|
|
991
|
+
},
|
|
859
992
|
{
|
|
860
993
|
"inputs": [
|
|
861
994
|
{
|
|
@@ -944,6 +1077,83 @@ export const VARLAPOOL_ABI = [
|
|
|
944
1077
|
"stateMutability": "view",
|
|
945
1078
|
"type": "function"
|
|
946
1079
|
},
|
|
1080
|
+
{
|
|
1081
|
+
"inputs": [
|
|
1082
|
+
{
|
|
1083
|
+
"internalType": "uint256",
|
|
1084
|
+
"name": "amount",
|
|
1085
|
+
"type": "uint256"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"internalType": "address",
|
|
1089
|
+
"name": "receiver",
|
|
1090
|
+
"type": "address"
|
|
1091
|
+
}
|
|
1092
|
+
],
|
|
1093
|
+
"name": "depositUSDC",
|
|
1094
|
+
"outputs": [
|
|
1095
|
+
{
|
|
1096
|
+
"internalType": "uint256",
|
|
1097
|
+
"name": "shares",
|
|
1098
|
+
"type": "uint256"
|
|
1099
|
+
}
|
|
1100
|
+
],
|
|
1101
|
+
"stateMutability": "nonpayable",
|
|
1102
|
+
"type": "function"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
"inputs": [
|
|
1106
|
+
{
|
|
1107
|
+
"internalType": "uint256",
|
|
1108
|
+
"name": "amount",
|
|
1109
|
+
"type": "uint256"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"internalType": "address",
|
|
1113
|
+
"name": "receiver",
|
|
1114
|
+
"type": "address"
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
"name": "depositUSDCE",
|
|
1118
|
+
"outputs": [
|
|
1119
|
+
{
|
|
1120
|
+
"internalType": "uint256",
|
|
1121
|
+
"name": "shares",
|
|
1122
|
+
"type": "uint256"
|
|
1123
|
+
}
|
|
1124
|
+
],
|
|
1125
|
+
"stateMutability": "nonpayable",
|
|
1126
|
+
"type": "function"
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
"inputs": [
|
|
1130
|
+
{
|
|
1131
|
+
"internalType": "address",
|
|
1132
|
+
"name": "inputAsset",
|
|
1133
|
+
"type": "address"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"internalType": "uint256",
|
|
1137
|
+
"name": "amount",
|
|
1138
|
+
"type": "uint256"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"internalType": "address",
|
|
1142
|
+
"name": "receiver",
|
|
1143
|
+
"type": "address"
|
|
1144
|
+
}
|
|
1145
|
+
],
|
|
1146
|
+
"name": "depositWrappedAsset",
|
|
1147
|
+
"outputs": [
|
|
1148
|
+
{
|
|
1149
|
+
"internalType": "uint256",
|
|
1150
|
+
"name": "shares",
|
|
1151
|
+
"type": "uint256"
|
|
1152
|
+
}
|
|
1153
|
+
],
|
|
1154
|
+
"stateMutability": "nonpayable",
|
|
1155
|
+
"type": "function"
|
|
1156
|
+
},
|
|
947
1157
|
{
|
|
948
1158
|
"inputs": [
|
|
949
1159
|
{
|
|
@@ -955,6 +1165,11 @@ export const VARLAPOOL_ABI = [
|
|
|
955
1165
|
"internalType": "uint256",
|
|
956
1166
|
"name": "amount",
|
|
957
1167
|
"type": "uint256"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"internalType": "address",
|
|
1171
|
+
"name": "outputAsset",
|
|
1172
|
+
"type": "address"
|
|
958
1173
|
}
|
|
959
1174
|
],
|
|
960
1175
|
"name": "drawFunds",
|
|
@@ -1254,6 +1469,35 @@ export const VARLAPOOL_ABI = [
|
|
|
1254
1469
|
"stateMutability": "nonpayable",
|
|
1255
1470
|
"type": "function"
|
|
1256
1471
|
},
|
|
1472
|
+
{
|
|
1473
|
+
"inputs": [
|
|
1474
|
+
{
|
|
1475
|
+
"internalType": "address",
|
|
1476
|
+
"name": "inputAsset",
|
|
1477
|
+
"type": "address"
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"internalType": "uint256",
|
|
1481
|
+
"name": "shares",
|
|
1482
|
+
"type": "uint256"
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"internalType": "address",
|
|
1486
|
+
"name": "receiver",
|
|
1487
|
+
"type": "address"
|
|
1488
|
+
}
|
|
1489
|
+
],
|
|
1490
|
+
"name": "mintWrappedAsset",
|
|
1491
|
+
"outputs": [
|
|
1492
|
+
{
|
|
1493
|
+
"internalType": "uint256",
|
|
1494
|
+
"name": "assets",
|
|
1495
|
+
"type": "uint256"
|
|
1496
|
+
}
|
|
1497
|
+
],
|
|
1498
|
+
"stateMutability": "nonpayable",
|
|
1499
|
+
"type": "function"
|
|
1500
|
+
},
|
|
1257
1501
|
{
|
|
1258
1502
|
"inputs": [],
|
|
1259
1503
|
"name": "name",
|
|
@@ -1267,6 +1511,19 @@ export const VARLAPOOL_ABI = [
|
|
|
1267
1511
|
"stateMutability": "view",
|
|
1268
1512
|
"type": "function"
|
|
1269
1513
|
},
|
|
1514
|
+
{
|
|
1515
|
+
"inputs": [],
|
|
1516
|
+
"name": "nativeUsdc",
|
|
1517
|
+
"outputs": [
|
|
1518
|
+
{
|
|
1519
|
+
"internalType": "address",
|
|
1520
|
+
"name": "",
|
|
1521
|
+
"type": "address"
|
|
1522
|
+
}
|
|
1523
|
+
],
|
|
1524
|
+
"stateMutability": "view",
|
|
1525
|
+
"type": "function"
|
|
1526
|
+
},
|
|
1270
1527
|
{
|
|
1271
1528
|
"inputs": [
|
|
1272
1529
|
{
|
|
@@ -1354,6 +1611,11 @@ export const VARLAPOOL_ABI = [
|
|
|
1354
1611
|
"internalType": "uint256",
|
|
1355
1612
|
"name": "actualAmount",
|
|
1356
1613
|
"type": "uint256"
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
"internalType": "address",
|
|
1617
|
+
"name": "inputAsset",
|
|
1618
|
+
"type": "address"
|
|
1357
1619
|
}
|
|
1358
1620
|
],
|
|
1359
1621
|
"name": "receiveFunds",
|
|
@@ -1390,6 +1652,40 @@ export const VARLAPOOL_ABI = [
|
|
|
1390
1652
|
"stateMutability": "nonpayable",
|
|
1391
1653
|
"type": "function"
|
|
1392
1654
|
},
|
|
1655
|
+
{
|
|
1656
|
+
"inputs": [
|
|
1657
|
+
{
|
|
1658
|
+
"internalType": "address",
|
|
1659
|
+
"name": "outputAsset",
|
|
1660
|
+
"type": "address"
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
"internalType": "uint256",
|
|
1664
|
+
"name": "shares",
|
|
1665
|
+
"type": "uint256"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"internalType": "address",
|
|
1669
|
+
"name": "receiver",
|
|
1670
|
+
"type": "address"
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"internalType": "address",
|
|
1674
|
+
"name": "owner",
|
|
1675
|
+
"type": "address"
|
|
1676
|
+
}
|
|
1677
|
+
],
|
|
1678
|
+
"name": "redeemAsWrappedAsset",
|
|
1679
|
+
"outputs": [
|
|
1680
|
+
{
|
|
1681
|
+
"internalType": "uint256",
|
|
1682
|
+
"name": "assets",
|
|
1683
|
+
"type": "uint256"
|
|
1684
|
+
}
|
|
1685
|
+
],
|
|
1686
|
+
"stateMutability": "nonpayable",
|
|
1687
|
+
"type": "function"
|
|
1688
|
+
},
|
|
1393
1689
|
{
|
|
1394
1690
|
"inputs": [],
|
|
1395
1691
|
"name": "reserveBalance",
|
|
@@ -1442,6 +1738,24 @@ export const VARLAPOOL_ABI = [
|
|
|
1442
1738
|
"stateMutability": "nonpayable",
|
|
1443
1739
|
"type": "function"
|
|
1444
1740
|
},
|
|
1741
|
+
{
|
|
1742
|
+
"inputs": [
|
|
1743
|
+
{
|
|
1744
|
+
"internalType": "address",
|
|
1745
|
+
"name": "newOnramp",
|
|
1746
|
+
"type": "address"
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
"internalType": "address",
|
|
1750
|
+
"name": "newOfframp",
|
|
1751
|
+
"type": "address"
|
|
1752
|
+
}
|
|
1753
|
+
],
|
|
1754
|
+
"name": "setCollateralRamps",
|
|
1755
|
+
"outputs": [],
|
|
1756
|
+
"stateMutability": "nonpayable",
|
|
1757
|
+
"type": "function"
|
|
1758
|
+
},
|
|
1445
1759
|
{
|
|
1446
1760
|
"inputs": [
|
|
1447
1761
|
{
|
|
@@ -1481,6 +1795,24 @@ export const VARLAPOOL_ABI = [
|
|
|
1481
1795
|
"stateMutability": "nonpayable",
|
|
1482
1796
|
"type": "function"
|
|
1483
1797
|
},
|
|
1798
|
+
{
|
|
1799
|
+
"inputs": [
|
|
1800
|
+
{
|
|
1801
|
+
"internalType": "address",
|
|
1802
|
+
"name": "newNativeUsdc",
|
|
1803
|
+
"type": "address"
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
"internalType": "address",
|
|
1807
|
+
"name": "newBridgedUsdc",
|
|
1808
|
+
"type": "address"
|
|
1809
|
+
}
|
|
1810
|
+
],
|
|
1811
|
+
"name": "setWrappedCollateralAssets",
|
|
1812
|
+
"outputs": [],
|
|
1813
|
+
"stateMutability": "nonpayable",
|
|
1814
|
+
"type": "function"
|
|
1815
|
+
},
|
|
1484
1816
|
{
|
|
1485
1817
|
"inputs": [],
|
|
1486
1818
|
"name": "symbol",
|
|
@@ -1615,6 +1947,40 @@ export const VARLAPOOL_ABI = [
|
|
|
1615
1947
|
"stateMutability": "nonpayable",
|
|
1616
1948
|
"type": "function"
|
|
1617
1949
|
},
|
|
1950
|
+
{
|
|
1951
|
+
"inputs": [
|
|
1952
|
+
{
|
|
1953
|
+
"internalType": "address",
|
|
1954
|
+
"name": "outputAsset",
|
|
1955
|
+
"type": "address"
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
"internalType": "uint256",
|
|
1959
|
+
"name": "assets",
|
|
1960
|
+
"type": "uint256"
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
"internalType": "address",
|
|
1964
|
+
"name": "receiver",
|
|
1965
|
+
"type": "address"
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
"internalType": "address",
|
|
1969
|
+
"name": "owner",
|
|
1970
|
+
"type": "address"
|
|
1971
|
+
}
|
|
1972
|
+
],
|
|
1973
|
+
"name": "withdrawAsWrappedAsset",
|
|
1974
|
+
"outputs": [
|
|
1975
|
+
{
|
|
1976
|
+
"internalType": "uint256",
|
|
1977
|
+
"name": "shares",
|
|
1978
|
+
"type": "uint256"
|
|
1979
|
+
}
|
|
1980
|
+
],
|
|
1981
|
+
"stateMutability": "nonpayable",
|
|
1982
|
+
"type": "function"
|
|
1983
|
+
},
|
|
1618
1984
|
{
|
|
1619
1985
|
"inputs": [
|
|
1620
1986
|
{
|
|
@@ -1632,6 +1998,64 @@ export const VARLAPOOL_ABI = [
|
|
|
1632
1998
|
"outputs": [],
|
|
1633
1999
|
"stateMutability": "nonpayable",
|
|
1634
2000
|
"type": "function"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"inputs": [
|
|
2004
|
+
{
|
|
2005
|
+
"internalType": "uint256",
|
|
2006
|
+
"name": "assets",
|
|
2007
|
+
"type": "uint256"
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
"internalType": "address",
|
|
2011
|
+
"name": "receiver",
|
|
2012
|
+
"type": "address"
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
"internalType": "address",
|
|
2016
|
+
"name": "owner",
|
|
2017
|
+
"type": "address"
|
|
2018
|
+
}
|
|
2019
|
+
],
|
|
2020
|
+
"name": "withdrawUSDC",
|
|
2021
|
+
"outputs": [
|
|
2022
|
+
{
|
|
2023
|
+
"internalType": "uint256",
|
|
2024
|
+
"name": "shares",
|
|
2025
|
+
"type": "uint256"
|
|
2026
|
+
}
|
|
2027
|
+
],
|
|
2028
|
+
"stateMutability": "nonpayable",
|
|
2029
|
+
"type": "function"
|
|
2030
|
+
},
|
|
2031
|
+
{
|
|
2032
|
+
"inputs": [
|
|
2033
|
+
{
|
|
2034
|
+
"internalType": "uint256",
|
|
2035
|
+
"name": "assets",
|
|
2036
|
+
"type": "uint256"
|
|
2037
|
+
},
|
|
2038
|
+
{
|
|
2039
|
+
"internalType": "address",
|
|
2040
|
+
"name": "receiver",
|
|
2041
|
+
"type": "address"
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
"internalType": "address",
|
|
2045
|
+
"name": "owner",
|
|
2046
|
+
"type": "address"
|
|
2047
|
+
}
|
|
2048
|
+
],
|
|
2049
|
+
"name": "withdrawUSDCE",
|
|
2050
|
+
"outputs": [
|
|
2051
|
+
{
|
|
2052
|
+
"internalType": "uint256",
|
|
2053
|
+
"name": "shares",
|
|
2054
|
+
"type": "uint256"
|
|
2055
|
+
}
|
|
2056
|
+
],
|
|
2057
|
+
"stateMutability": "nonpayable",
|
|
2058
|
+
"type": "function"
|
|
1635
2059
|
}
|
|
1636
2060
|
] as const satisfies Abi;
|
|
1637
2061
|
|
package/src/abi/index.ts
CHANGED
|
@@ -13,7 +13,6 @@ export { VARLAMERGELIQUIDATOR_ABI } from "./full/VarlaMergeLiquidator.js";
|
|
|
13
13
|
export { VARLACONVERTLIQUIDATOR_ABI } from "./full/VarlaConvertLiquidator.js";
|
|
14
14
|
export { VARLASTAKING_ABI } from "./full/VarlaStaking.js";
|
|
15
15
|
export { POLYMARKETCTFADAPTER_ABI } from "./full/PolymarketCtfAdapter.js";
|
|
16
|
-
export { POLYMARKETNEGRISKMERGEADAPTER_ABI } from "./full/PolymarketNegRiskMergeAdapter.js";
|
|
17
16
|
export { OPINIONCTFEXECUTIONENGINEADAPTER_ABI } from "./full/OpinionCtfExecutionEngineAdapter.js";
|
|
18
17
|
export { VARLAORACLE_ABI_REGISTRY } from "./subsets/VarlaOracle.registry.js";
|
|
19
18
|
|
package/src/actions/admin.ts
CHANGED
|
@@ -246,6 +246,38 @@ export async function preparePoolSetInterestRateStrategy(params: {
|
|
|
246
246
|
} as any)) as any;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
+
export async function preparePoolSetCollateralRamps(params: {
|
|
250
|
+
publicClient: Pick<PublicClient, "simulateContract">;
|
|
251
|
+
poolAddress: Address;
|
|
252
|
+
account: Address;
|
|
253
|
+
onramp: Address;
|
|
254
|
+
offramp: Address;
|
|
255
|
+
}): Promise<SimulatedTx> {
|
|
256
|
+
return (await params.publicClient.simulateContract({
|
|
257
|
+
address: params.poolAddress,
|
|
258
|
+
abi: abis.VARLAPOOL_ABI,
|
|
259
|
+
functionName: "setCollateralRamps",
|
|
260
|
+
args: [params.onramp, params.offramp],
|
|
261
|
+
account: params.account,
|
|
262
|
+
} as any)) as any;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export async function preparePoolSetWrappedCollateralAssets(params: {
|
|
266
|
+
publicClient: Pick<PublicClient, "simulateContract">;
|
|
267
|
+
poolAddress: Address;
|
|
268
|
+
account: Address;
|
|
269
|
+
nativeUsdc: Address;
|
|
270
|
+
bridgedUsdc: Address;
|
|
271
|
+
}): Promise<SimulatedTx> {
|
|
272
|
+
return (await params.publicClient.simulateContract({
|
|
273
|
+
address: params.poolAddress,
|
|
274
|
+
abi: abis.VARLAPOOL_ABI,
|
|
275
|
+
functionName: "setWrappedCollateralAssets",
|
|
276
|
+
args: [params.nativeUsdc, params.bridgedUsdc],
|
|
277
|
+
account: params.account,
|
|
278
|
+
} as any)) as any;
|
|
279
|
+
}
|
|
280
|
+
|
|
249
281
|
// -----------------
|
|
250
282
|
// Oracle admin
|
|
251
283
|
// -----------------
|
package/src/actions/core.ts
CHANGED
|
@@ -52,6 +52,22 @@ export async function prepareCoreBorrow(params: {
|
|
|
52
52
|
} as any)) as any;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
export async function prepareCoreBorrowWithAsset(params: {
|
|
56
|
+
publicClient: Pick<PublicClient, "simulateContract">;
|
|
57
|
+
coreAddress: Address;
|
|
58
|
+
account: Address;
|
|
59
|
+
amount: bigint;
|
|
60
|
+
outputAsset: Address;
|
|
61
|
+
}): Promise<SimulatedTx> {
|
|
62
|
+
return (await params.publicClient.simulateContract({
|
|
63
|
+
address: params.coreAddress,
|
|
64
|
+
abi: abis.VARLACORE_ABI,
|
|
65
|
+
functionName: "borrow",
|
|
66
|
+
args: [params.amount, params.outputAsset],
|
|
67
|
+
account: params.account,
|
|
68
|
+
} as any)) as any;
|
|
69
|
+
}
|
|
70
|
+
|
|
55
71
|
export async function prepareCoreRepay(params: {
|
|
56
72
|
publicClient: Pick<PublicClient, "simulateContract">;
|
|
57
73
|
coreAddress: Address;
|
|
@@ -66,3 +82,19 @@ export async function prepareCoreRepay(params: {
|
|
|
66
82
|
account: params.account,
|
|
67
83
|
} as any)) as any;
|
|
68
84
|
}
|
|
85
|
+
|
|
86
|
+
export async function prepareCoreRepayWithAsset(params: {
|
|
87
|
+
publicClient: Pick<PublicClient, "simulateContract">;
|
|
88
|
+
coreAddress: Address;
|
|
89
|
+
account: Address;
|
|
90
|
+
amount: bigint;
|
|
91
|
+
inputAsset: Address;
|
|
92
|
+
}): Promise<SimulatedTx> {
|
|
93
|
+
return (await params.publicClient.simulateContract({
|
|
94
|
+
address: params.coreAddress,
|
|
95
|
+
abi: abis.VARLACORE_ABI,
|
|
96
|
+
functionName: "repay",
|
|
97
|
+
args: [params.amount, params.inputAsset],
|
|
98
|
+
account: params.account,
|
|
99
|
+
} as any)) as any;
|
|
100
|
+
}
|
package/src/actions/pool.ts
CHANGED
|
@@ -25,6 +25,23 @@ export async function preparePoolDeposit(params: {
|
|
|
25
25
|
} as any)) as any;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
export async function preparePoolDepositWrappedAsset(params: {
|
|
29
|
+
publicClient: Pick<PublicClient, "simulateContract">;
|
|
30
|
+
poolAddress: Address;
|
|
31
|
+
account: Address;
|
|
32
|
+
inputAsset: Address;
|
|
33
|
+
amount: bigint;
|
|
34
|
+
receiver: Address;
|
|
35
|
+
}): Promise<SimulatedTx> {
|
|
36
|
+
return (await params.publicClient.simulateContract({
|
|
37
|
+
address: params.poolAddress,
|
|
38
|
+
abi: abis.VARLAPOOL_ABI,
|
|
39
|
+
functionName: "depositWrappedAsset",
|
|
40
|
+
args: [params.inputAsset, params.amount, params.receiver],
|
|
41
|
+
account: params.account,
|
|
42
|
+
} as any)) as any;
|
|
43
|
+
}
|
|
44
|
+
|
|
28
45
|
export async function preparePoolMint(params: {
|
|
29
46
|
publicClient: Pick<PublicClient, "simulateContract">;
|
|
30
47
|
poolAddress: Address;
|
|
@@ -58,6 +75,24 @@ export async function preparePoolWithdraw(params: {
|
|
|
58
75
|
} as any)) as any;
|
|
59
76
|
}
|
|
60
77
|
|
|
78
|
+
export async function preparePoolWithdrawAsWrappedAsset(params: {
|
|
79
|
+
publicClient: Pick<PublicClient, "simulateContract">;
|
|
80
|
+
poolAddress: Address;
|
|
81
|
+
account: Address;
|
|
82
|
+
assets: bigint;
|
|
83
|
+
outputAsset: Address;
|
|
84
|
+
receiver: Address;
|
|
85
|
+
owner: Address;
|
|
86
|
+
}): Promise<SimulatedTx> {
|
|
87
|
+
return (await params.publicClient.simulateContract({
|
|
88
|
+
address: params.poolAddress,
|
|
89
|
+
abi: abis.VARLAPOOL_ABI,
|
|
90
|
+
functionName: "withdrawAsWrappedAsset",
|
|
91
|
+
args: [params.assets, params.outputAsset, params.receiver, params.owner],
|
|
92
|
+
account: params.account,
|
|
93
|
+
} as any)) as any;
|
|
94
|
+
}
|
|
95
|
+
|
|
61
96
|
export async function preparePoolRedeem(params: {
|
|
62
97
|
publicClient: Pick<PublicClient, "simulateContract">;
|
|
63
98
|
poolAddress: Address;
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"VarlaLiquidator": "0xa1d30AEC3106bfe10311D290228F342727Cae5cF",
|
|
12
12
|
"VarlaMergeLiquidator": "0xDa929503D720653433eb9DB273E5a42d8C14aF90",
|
|
13
13
|
"VarlaConvertLiquidator": "0xA59e346f4C663AF4cF9B3F302B3eAd460101d709",
|
|
14
|
-
"PolymarketCtfAdapter": "0x1715CC1c9797098F77993d6aa0D190F323aa9421"
|
|
15
|
-
"PolymarketNegRiskMergeAdapter": "0x3611E0AA36ebEFe3b555Db9b5BDcB071Fb64a477"
|
|
14
|
+
"PolymarketCtfAdapter": "0x1715CC1c9797098F77993d6aa0D190F323aa9421"
|
|
16
15
|
}
|
|
17
16
|
}
|
package/src/addresses/polygon.ts
CHANGED
|
@@ -13,6 +13,5 @@ export const polygon: AddressBook = {
|
|
|
13
13
|
mergeLiquidator: "0xDa929503D720653433eb9DB273E5a42d8C14aF90",
|
|
14
14
|
convertLiquidator: "0xA59e346f4C663AF4cF9B3F302B3eAd460101d709",
|
|
15
15
|
polymarketCtfAdapter: "0x1715CC1c9797098F77993d6aa0D190F323aa9421",
|
|
16
|
-
negRiskMergeAdapter: "0x3611E0AA36ebEFe3b555Db9b5BDcB071Fb64a477",
|
|
17
16
|
};
|
|
18
17
|
|
|
@@ -13,6 +13,5 @@ export const polygonProxy: AddressBook = {
|
|
|
13
13
|
mergeLiquidator: "0xd0017264cd4Ee870F6869F1ab47f6ff579c31ba5",
|
|
14
14
|
convertLiquidator: "0x68421cDD230e550ac467Ae980454032bf8CE3651",
|
|
15
15
|
polymarketCtfAdapter: "0x1715CC1c9797098F77993d6aa0D190F323aa9421",
|
|
16
|
-
negRiskMergeAdapter: "0x3611E0AA36ebEFe3b555Db9b5BDcB071Fb64a477",
|
|
17
16
|
};
|
|
18
17
|
|