@gearbox-protocol/sdk 3.0.0-vfour.102 → 3.0.0-vfour.103
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/dist/cjs/sdk/index.cjs +3042 -283
- package/dist/cjs/sdk/index.d.ts +9399 -4536
- package/dist/esm/sdk/index.d.mts +9399 -4536
- package/dist/esm/sdk/index.mjs +3037 -281
- package/package.json +1 -1
package/dist/cjs/sdk/index.cjs
CHANGED
|
@@ -18629,58 +18629,2469 @@ var iCreditFacadeV310Abi = [
|
|
|
18629
18629
|
anonymous: false
|
|
18630
18630
|
}
|
|
18631
18631
|
];
|
|
18632
|
+
var iCreditManagerV310Abi = [
|
|
18633
|
+
{
|
|
18634
|
+
type: "function",
|
|
18635
|
+
name: "accountFactory",
|
|
18636
|
+
inputs: [],
|
|
18637
|
+
outputs: [
|
|
18638
|
+
{
|
|
18639
|
+
name: "",
|
|
18640
|
+
type: "address",
|
|
18641
|
+
internalType: "address"
|
|
18642
|
+
}
|
|
18643
|
+
],
|
|
18644
|
+
stateMutability: "view"
|
|
18645
|
+
},
|
|
18646
|
+
{
|
|
18647
|
+
type: "function",
|
|
18648
|
+
name: "adapterToContract",
|
|
18649
|
+
inputs: [
|
|
18650
|
+
{
|
|
18651
|
+
name: "adapter",
|
|
18652
|
+
type: "address",
|
|
18653
|
+
internalType: "address"
|
|
18654
|
+
}
|
|
18655
|
+
],
|
|
18656
|
+
outputs: [
|
|
18657
|
+
{
|
|
18658
|
+
name: "targetContract",
|
|
18659
|
+
type: "address",
|
|
18660
|
+
internalType: "address"
|
|
18661
|
+
}
|
|
18662
|
+
],
|
|
18663
|
+
stateMutability: "view"
|
|
18664
|
+
},
|
|
18665
|
+
{
|
|
18666
|
+
type: "function",
|
|
18667
|
+
name: "addCollateral",
|
|
18668
|
+
inputs: [
|
|
18669
|
+
{
|
|
18670
|
+
name: "payer",
|
|
18671
|
+
type: "address",
|
|
18672
|
+
internalType: "address"
|
|
18673
|
+
},
|
|
18674
|
+
{
|
|
18675
|
+
name: "creditAccount",
|
|
18676
|
+
type: "address",
|
|
18677
|
+
internalType: "address"
|
|
18678
|
+
},
|
|
18679
|
+
{
|
|
18680
|
+
name: "token",
|
|
18681
|
+
type: "address",
|
|
18682
|
+
internalType: "address"
|
|
18683
|
+
},
|
|
18684
|
+
{
|
|
18685
|
+
name: "amount",
|
|
18686
|
+
type: "uint256",
|
|
18687
|
+
internalType: "uint256"
|
|
18688
|
+
}
|
|
18689
|
+
],
|
|
18690
|
+
outputs: [
|
|
18691
|
+
{
|
|
18692
|
+
name: "",
|
|
18693
|
+
type: "uint256",
|
|
18694
|
+
internalType: "uint256"
|
|
18695
|
+
}
|
|
18696
|
+
],
|
|
18697
|
+
stateMutability: "nonpayable"
|
|
18698
|
+
},
|
|
18699
|
+
{
|
|
18700
|
+
type: "function",
|
|
18701
|
+
name: "addToken",
|
|
18702
|
+
inputs: [
|
|
18703
|
+
{
|
|
18704
|
+
name: "token",
|
|
18705
|
+
type: "address",
|
|
18706
|
+
internalType: "address"
|
|
18707
|
+
}
|
|
18708
|
+
],
|
|
18709
|
+
outputs: [],
|
|
18710
|
+
stateMutability: "nonpayable"
|
|
18711
|
+
},
|
|
18712
|
+
{
|
|
18713
|
+
type: "function",
|
|
18714
|
+
name: "approveCreditAccount",
|
|
18715
|
+
inputs: [
|
|
18716
|
+
{
|
|
18717
|
+
name: "token",
|
|
18718
|
+
type: "address",
|
|
18719
|
+
internalType: "address"
|
|
18720
|
+
},
|
|
18721
|
+
{
|
|
18722
|
+
name: "amount",
|
|
18723
|
+
type: "uint256",
|
|
18724
|
+
internalType: "uint256"
|
|
18725
|
+
}
|
|
18726
|
+
],
|
|
18727
|
+
outputs: [],
|
|
18728
|
+
stateMutability: "nonpayable"
|
|
18729
|
+
},
|
|
18730
|
+
{
|
|
18731
|
+
type: "function",
|
|
18732
|
+
name: "approveToken",
|
|
18733
|
+
inputs: [
|
|
18734
|
+
{
|
|
18735
|
+
name: "creditAccount",
|
|
18736
|
+
type: "address",
|
|
18737
|
+
internalType: "address"
|
|
18738
|
+
},
|
|
18739
|
+
{
|
|
18740
|
+
name: "token",
|
|
18741
|
+
type: "address",
|
|
18742
|
+
internalType: "address"
|
|
18743
|
+
},
|
|
18744
|
+
{
|
|
18745
|
+
name: "spender",
|
|
18746
|
+
type: "address",
|
|
18747
|
+
internalType: "address"
|
|
18748
|
+
},
|
|
18749
|
+
{
|
|
18750
|
+
name: "amount",
|
|
18751
|
+
type: "uint256",
|
|
18752
|
+
internalType: "uint256"
|
|
18753
|
+
}
|
|
18754
|
+
],
|
|
18755
|
+
outputs: [],
|
|
18756
|
+
stateMutability: "nonpayable"
|
|
18757
|
+
},
|
|
18758
|
+
{
|
|
18759
|
+
type: "function",
|
|
18760
|
+
name: "calcDebtAndCollateral",
|
|
18761
|
+
inputs: [
|
|
18762
|
+
{
|
|
18763
|
+
name: "creditAccount",
|
|
18764
|
+
type: "address",
|
|
18765
|
+
internalType: "address"
|
|
18766
|
+
},
|
|
18767
|
+
{
|
|
18768
|
+
name: "task",
|
|
18769
|
+
type: "uint8",
|
|
18770
|
+
internalType: "enum CollateralCalcTask"
|
|
18771
|
+
}
|
|
18772
|
+
],
|
|
18773
|
+
outputs: [
|
|
18774
|
+
{
|
|
18775
|
+
name: "cdd",
|
|
18776
|
+
type: "tuple",
|
|
18777
|
+
internalType: "struct CollateralDebtData",
|
|
18778
|
+
components: [
|
|
18779
|
+
{
|
|
18780
|
+
name: "debt",
|
|
18781
|
+
type: "uint256",
|
|
18782
|
+
internalType: "uint256"
|
|
18783
|
+
},
|
|
18784
|
+
{
|
|
18785
|
+
name: "cumulativeIndexNow",
|
|
18786
|
+
type: "uint256",
|
|
18787
|
+
internalType: "uint256"
|
|
18788
|
+
},
|
|
18789
|
+
{
|
|
18790
|
+
name: "cumulativeIndexLastUpdate",
|
|
18791
|
+
type: "uint256",
|
|
18792
|
+
internalType: "uint256"
|
|
18793
|
+
},
|
|
18794
|
+
{
|
|
18795
|
+
name: "cumulativeQuotaInterest",
|
|
18796
|
+
type: "uint128",
|
|
18797
|
+
internalType: "uint128"
|
|
18798
|
+
},
|
|
18799
|
+
{
|
|
18800
|
+
name: "accruedInterest",
|
|
18801
|
+
type: "uint256",
|
|
18802
|
+
internalType: "uint256"
|
|
18803
|
+
},
|
|
18804
|
+
{
|
|
18805
|
+
name: "accruedFees",
|
|
18806
|
+
type: "uint256",
|
|
18807
|
+
internalType: "uint256"
|
|
18808
|
+
},
|
|
18809
|
+
{
|
|
18810
|
+
name: "totalDebtUSD",
|
|
18811
|
+
type: "uint256",
|
|
18812
|
+
internalType: "uint256"
|
|
18813
|
+
},
|
|
18814
|
+
{
|
|
18815
|
+
name: "totalValue",
|
|
18816
|
+
type: "uint256",
|
|
18817
|
+
internalType: "uint256"
|
|
18818
|
+
},
|
|
18819
|
+
{
|
|
18820
|
+
name: "totalValueUSD",
|
|
18821
|
+
type: "uint256",
|
|
18822
|
+
internalType: "uint256"
|
|
18823
|
+
},
|
|
18824
|
+
{
|
|
18825
|
+
name: "twvUSD",
|
|
18826
|
+
type: "uint256",
|
|
18827
|
+
internalType: "uint256"
|
|
18828
|
+
},
|
|
18829
|
+
{
|
|
18830
|
+
name: "enabledTokensMask",
|
|
18831
|
+
type: "uint256",
|
|
18832
|
+
internalType: "uint256"
|
|
18833
|
+
},
|
|
18834
|
+
{
|
|
18835
|
+
name: "quotedTokensMask",
|
|
18836
|
+
type: "uint256",
|
|
18837
|
+
internalType: "uint256"
|
|
18838
|
+
},
|
|
18839
|
+
{
|
|
18840
|
+
name: "quotedTokens",
|
|
18841
|
+
type: "address[]",
|
|
18842
|
+
internalType: "address[]"
|
|
18843
|
+
},
|
|
18844
|
+
{
|
|
18845
|
+
name: "_poolQuotaKeeper",
|
|
18846
|
+
type: "address",
|
|
18847
|
+
internalType: "address"
|
|
18848
|
+
}
|
|
18849
|
+
]
|
|
18850
|
+
}
|
|
18851
|
+
],
|
|
18852
|
+
stateMutability: "view"
|
|
18853
|
+
},
|
|
18854
|
+
{
|
|
18855
|
+
type: "function",
|
|
18856
|
+
name: "closeCreditAccount",
|
|
18857
|
+
inputs: [
|
|
18858
|
+
{
|
|
18859
|
+
name: "creditAccount",
|
|
18860
|
+
type: "address",
|
|
18861
|
+
internalType: "address"
|
|
18862
|
+
}
|
|
18863
|
+
],
|
|
18864
|
+
outputs: [],
|
|
18865
|
+
stateMutability: "nonpayable"
|
|
18866
|
+
},
|
|
18867
|
+
{
|
|
18868
|
+
type: "function",
|
|
18869
|
+
name: "collateralTokenByMask",
|
|
18870
|
+
inputs: [
|
|
18871
|
+
{
|
|
18872
|
+
name: "tokenMask",
|
|
18873
|
+
type: "uint256",
|
|
18874
|
+
internalType: "uint256"
|
|
18875
|
+
}
|
|
18876
|
+
],
|
|
18877
|
+
outputs: [
|
|
18878
|
+
{
|
|
18879
|
+
name: "token",
|
|
18880
|
+
type: "address",
|
|
18881
|
+
internalType: "address"
|
|
18882
|
+
},
|
|
18883
|
+
{
|
|
18884
|
+
name: "liquidationThreshold",
|
|
18885
|
+
type: "uint16",
|
|
18886
|
+
internalType: "uint16"
|
|
18887
|
+
}
|
|
18888
|
+
],
|
|
18889
|
+
stateMutability: "view"
|
|
18890
|
+
},
|
|
18891
|
+
{
|
|
18892
|
+
type: "function",
|
|
18893
|
+
name: "collateralTokensCount",
|
|
18894
|
+
inputs: [],
|
|
18895
|
+
outputs: [
|
|
18896
|
+
{
|
|
18897
|
+
name: "",
|
|
18898
|
+
type: "uint8",
|
|
18899
|
+
internalType: "uint8"
|
|
18900
|
+
}
|
|
18901
|
+
],
|
|
18902
|
+
stateMutability: "view"
|
|
18903
|
+
},
|
|
18904
|
+
{
|
|
18905
|
+
type: "function",
|
|
18906
|
+
name: "contractToAdapter",
|
|
18907
|
+
inputs: [
|
|
18908
|
+
{
|
|
18909
|
+
name: "targetContract",
|
|
18910
|
+
type: "address",
|
|
18911
|
+
internalType: "address"
|
|
18912
|
+
}
|
|
18913
|
+
],
|
|
18914
|
+
outputs: [
|
|
18915
|
+
{
|
|
18916
|
+
name: "adapter",
|
|
18917
|
+
type: "address",
|
|
18918
|
+
internalType: "address"
|
|
18919
|
+
}
|
|
18920
|
+
],
|
|
18921
|
+
stateMutability: "view"
|
|
18922
|
+
},
|
|
18923
|
+
{
|
|
18924
|
+
type: "function",
|
|
18925
|
+
name: "contractType",
|
|
18926
|
+
inputs: [],
|
|
18927
|
+
outputs: [
|
|
18928
|
+
{
|
|
18929
|
+
name: "",
|
|
18930
|
+
type: "bytes32",
|
|
18931
|
+
internalType: "bytes32"
|
|
18932
|
+
}
|
|
18933
|
+
],
|
|
18934
|
+
stateMutability: "view"
|
|
18935
|
+
},
|
|
18936
|
+
{
|
|
18937
|
+
type: "function",
|
|
18938
|
+
name: "creditAccountInfo",
|
|
18939
|
+
inputs: [
|
|
18940
|
+
{
|
|
18941
|
+
name: "creditAccount",
|
|
18942
|
+
type: "address",
|
|
18943
|
+
internalType: "address"
|
|
18944
|
+
}
|
|
18945
|
+
],
|
|
18946
|
+
outputs: [
|
|
18947
|
+
{
|
|
18948
|
+
name: "debt",
|
|
18949
|
+
type: "uint256",
|
|
18950
|
+
internalType: "uint256"
|
|
18951
|
+
},
|
|
18952
|
+
{
|
|
18953
|
+
name: "cumulativeIndexLastUpdate",
|
|
18954
|
+
type: "uint256",
|
|
18955
|
+
internalType: "uint256"
|
|
18956
|
+
},
|
|
18957
|
+
{
|
|
18958
|
+
name: "cumulativeQuotaInterest",
|
|
18959
|
+
type: "uint128",
|
|
18960
|
+
internalType: "uint128"
|
|
18961
|
+
},
|
|
18962
|
+
{
|
|
18963
|
+
name: "quotaFees",
|
|
18964
|
+
type: "uint128",
|
|
18965
|
+
internalType: "uint128"
|
|
18966
|
+
},
|
|
18967
|
+
{
|
|
18968
|
+
name: "enabledTokensMask",
|
|
18969
|
+
type: "uint256",
|
|
18970
|
+
internalType: "uint256"
|
|
18971
|
+
},
|
|
18972
|
+
{
|
|
18973
|
+
name: "flags",
|
|
18974
|
+
type: "uint16",
|
|
18975
|
+
internalType: "uint16"
|
|
18976
|
+
},
|
|
18977
|
+
{
|
|
18978
|
+
name: "lastDebtUpdate",
|
|
18979
|
+
type: "uint64",
|
|
18980
|
+
internalType: "uint64"
|
|
18981
|
+
},
|
|
18982
|
+
{
|
|
18983
|
+
name: "borrower",
|
|
18984
|
+
type: "address",
|
|
18985
|
+
internalType: "address"
|
|
18986
|
+
}
|
|
18987
|
+
],
|
|
18988
|
+
stateMutability: "view"
|
|
18989
|
+
},
|
|
18990
|
+
{
|
|
18991
|
+
type: "function",
|
|
18992
|
+
name: "creditAccounts",
|
|
18993
|
+
inputs: [
|
|
18994
|
+
{
|
|
18995
|
+
name: "offset",
|
|
18996
|
+
type: "uint256",
|
|
18997
|
+
internalType: "uint256"
|
|
18998
|
+
},
|
|
18999
|
+
{
|
|
19000
|
+
name: "limit",
|
|
19001
|
+
type: "uint256",
|
|
19002
|
+
internalType: "uint256"
|
|
19003
|
+
}
|
|
19004
|
+
],
|
|
19005
|
+
outputs: [
|
|
19006
|
+
{
|
|
19007
|
+
name: "",
|
|
19008
|
+
type: "address[]",
|
|
19009
|
+
internalType: "address[]"
|
|
19010
|
+
}
|
|
19011
|
+
],
|
|
19012
|
+
stateMutability: "view"
|
|
19013
|
+
},
|
|
19014
|
+
{
|
|
19015
|
+
type: "function",
|
|
19016
|
+
name: "creditAccounts",
|
|
19017
|
+
inputs: [],
|
|
19018
|
+
outputs: [
|
|
19019
|
+
{
|
|
19020
|
+
name: "",
|
|
19021
|
+
type: "address[]",
|
|
19022
|
+
internalType: "address[]"
|
|
19023
|
+
}
|
|
19024
|
+
],
|
|
19025
|
+
stateMutability: "view"
|
|
19026
|
+
},
|
|
19027
|
+
{
|
|
19028
|
+
type: "function",
|
|
19029
|
+
name: "creditAccountsLen",
|
|
19030
|
+
inputs: [],
|
|
19031
|
+
outputs: [
|
|
19032
|
+
{
|
|
19033
|
+
name: "",
|
|
19034
|
+
type: "uint256",
|
|
19035
|
+
internalType: "uint256"
|
|
19036
|
+
}
|
|
19037
|
+
],
|
|
19038
|
+
stateMutability: "view"
|
|
19039
|
+
},
|
|
19040
|
+
{
|
|
19041
|
+
type: "function",
|
|
19042
|
+
name: "creditConfigurator",
|
|
19043
|
+
inputs: [],
|
|
19044
|
+
outputs: [
|
|
19045
|
+
{
|
|
19046
|
+
name: "",
|
|
19047
|
+
type: "address",
|
|
19048
|
+
internalType: "address"
|
|
19049
|
+
}
|
|
19050
|
+
],
|
|
19051
|
+
stateMutability: "view"
|
|
19052
|
+
},
|
|
19053
|
+
{
|
|
19054
|
+
type: "function",
|
|
19055
|
+
name: "creditFacade",
|
|
19056
|
+
inputs: [],
|
|
19057
|
+
outputs: [
|
|
19058
|
+
{
|
|
19059
|
+
name: "",
|
|
19060
|
+
type: "address",
|
|
19061
|
+
internalType: "address"
|
|
19062
|
+
}
|
|
19063
|
+
],
|
|
19064
|
+
stateMutability: "view"
|
|
19065
|
+
},
|
|
19066
|
+
{
|
|
19067
|
+
type: "function",
|
|
19068
|
+
name: "enabledTokensMaskOf",
|
|
19069
|
+
inputs: [
|
|
19070
|
+
{
|
|
19071
|
+
name: "creditAccount",
|
|
19072
|
+
type: "address",
|
|
19073
|
+
internalType: "address"
|
|
19074
|
+
}
|
|
19075
|
+
],
|
|
19076
|
+
outputs: [
|
|
19077
|
+
{
|
|
19078
|
+
name: "",
|
|
19079
|
+
type: "uint256",
|
|
19080
|
+
internalType: "uint256"
|
|
19081
|
+
}
|
|
19082
|
+
],
|
|
19083
|
+
stateMutability: "view"
|
|
19084
|
+
},
|
|
19085
|
+
{
|
|
19086
|
+
type: "function",
|
|
19087
|
+
name: "execute",
|
|
19088
|
+
inputs: [
|
|
19089
|
+
{
|
|
19090
|
+
name: "data",
|
|
19091
|
+
type: "bytes",
|
|
19092
|
+
internalType: "bytes"
|
|
19093
|
+
}
|
|
19094
|
+
],
|
|
19095
|
+
outputs: [
|
|
19096
|
+
{
|
|
19097
|
+
name: "result",
|
|
19098
|
+
type: "bytes",
|
|
19099
|
+
internalType: "bytes"
|
|
19100
|
+
}
|
|
19101
|
+
],
|
|
19102
|
+
stateMutability: "nonpayable"
|
|
19103
|
+
},
|
|
19104
|
+
{
|
|
19105
|
+
type: "function",
|
|
19106
|
+
name: "externalCall",
|
|
19107
|
+
inputs: [
|
|
19108
|
+
{
|
|
19109
|
+
name: "creditAccount",
|
|
19110
|
+
type: "address",
|
|
19111
|
+
internalType: "address"
|
|
19112
|
+
},
|
|
19113
|
+
{
|
|
19114
|
+
name: "target",
|
|
19115
|
+
type: "address",
|
|
19116
|
+
internalType: "address"
|
|
19117
|
+
},
|
|
19118
|
+
{
|
|
19119
|
+
name: "callData",
|
|
19120
|
+
type: "bytes",
|
|
19121
|
+
internalType: "bytes"
|
|
19122
|
+
}
|
|
19123
|
+
],
|
|
19124
|
+
outputs: [
|
|
19125
|
+
{
|
|
19126
|
+
name: "result",
|
|
19127
|
+
type: "bytes",
|
|
19128
|
+
internalType: "bytes"
|
|
19129
|
+
}
|
|
19130
|
+
],
|
|
19131
|
+
stateMutability: "nonpayable"
|
|
19132
|
+
},
|
|
19133
|
+
{
|
|
19134
|
+
type: "function",
|
|
19135
|
+
name: "fees",
|
|
19136
|
+
inputs: [],
|
|
19137
|
+
outputs: [
|
|
19138
|
+
{
|
|
19139
|
+
name: "feeInterest",
|
|
19140
|
+
type: "uint16",
|
|
19141
|
+
internalType: "uint16"
|
|
19142
|
+
},
|
|
19143
|
+
{
|
|
19144
|
+
name: "feeLiquidation",
|
|
19145
|
+
type: "uint16",
|
|
19146
|
+
internalType: "uint16"
|
|
19147
|
+
},
|
|
19148
|
+
{
|
|
19149
|
+
name: "liquidationDiscount",
|
|
19150
|
+
type: "uint16",
|
|
19151
|
+
internalType: "uint16"
|
|
19152
|
+
},
|
|
19153
|
+
{
|
|
19154
|
+
name: "feeLiquidationExpired",
|
|
19155
|
+
type: "uint16",
|
|
19156
|
+
internalType: "uint16"
|
|
19157
|
+
},
|
|
19158
|
+
{
|
|
19159
|
+
name: "liquidationDiscountExpired",
|
|
19160
|
+
type: "uint16",
|
|
19161
|
+
internalType: "uint16"
|
|
19162
|
+
}
|
|
19163
|
+
],
|
|
19164
|
+
stateMutability: "view"
|
|
19165
|
+
},
|
|
19166
|
+
{
|
|
19167
|
+
type: "function",
|
|
19168
|
+
name: "flagsOf",
|
|
19169
|
+
inputs: [
|
|
19170
|
+
{
|
|
19171
|
+
name: "creditAccount",
|
|
19172
|
+
type: "address",
|
|
19173
|
+
internalType: "address"
|
|
19174
|
+
}
|
|
19175
|
+
],
|
|
19176
|
+
outputs: [
|
|
19177
|
+
{
|
|
19178
|
+
name: "",
|
|
19179
|
+
type: "uint16",
|
|
19180
|
+
internalType: "uint16"
|
|
19181
|
+
}
|
|
19182
|
+
],
|
|
19183
|
+
stateMutability: "view"
|
|
19184
|
+
},
|
|
19185
|
+
{
|
|
19186
|
+
type: "function",
|
|
19187
|
+
name: "fullCollateralCheck",
|
|
19188
|
+
inputs: [
|
|
19189
|
+
{
|
|
19190
|
+
name: "creditAccount",
|
|
19191
|
+
type: "address",
|
|
19192
|
+
internalType: "address"
|
|
19193
|
+
},
|
|
19194
|
+
{
|
|
19195
|
+
name: "enabledTokensMask",
|
|
19196
|
+
type: "uint256",
|
|
19197
|
+
internalType: "uint256"
|
|
19198
|
+
},
|
|
19199
|
+
{
|
|
19200
|
+
name: "collateralHints",
|
|
19201
|
+
type: "uint256[]",
|
|
19202
|
+
internalType: "uint256[]"
|
|
19203
|
+
},
|
|
19204
|
+
{
|
|
19205
|
+
name: "minHealthFactor",
|
|
19206
|
+
type: "uint16",
|
|
19207
|
+
internalType: "uint16"
|
|
19208
|
+
},
|
|
19209
|
+
{
|
|
19210
|
+
name: "useSafePrices",
|
|
19211
|
+
type: "bool",
|
|
19212
|
+
internalType: "bool"
|
|
19213
|
+
}
|
|
19214
|
+
],
|
|
19215
|
+
outputs: [
|
|
19216
|
+
{
|
|
19217
|
+
name: "",
|
|
19218
|
+
type: "uint256",
|
|
19219
|
+
internalType: "uint256"
|
|
19220
|
+
}
|
|
19221
|
+
],
|
|
19222
|
+
stateMutability: "nonpayable"
|
|
19223
|
+
},
|
|
19224
|
+
{
|
|
19225
|
+
type: "function",
|
|
19226
|
+
name: "getActiveCreditAccountOrRevert",
|
|
19227
|
+
inputs: [],
|
|
19228
|
+
outputs: [
|
|
19229
|
+
{
|
|
19230
|
+
name: "creditAccount",
|
|
19231
|
+
type: "address",
|
|
19232
|
+
internalType: "address"
|
|
19233
|
+
}
|
|
19234
|
+
],
|
|
19235
|
+
stateMutability: "view"
|
|
19236
|
+
},
|
|
19237
|
+
{
|
|
19238
|
+
type: "function",
|
|
19239
|
+
name: "getBorrowerOrRevert",
|
|
19240
|
+
inputs: [
|
|
19241
|
+
{
|
|
19242
|
+
name: "creditAccount",
|
|
19243
|
+
type: "address",
|
|
19244
|
+
internalType: "address"
|
|
19245
|
+
}
|
|
19246
|
+
],
|
|
19247
|
+
outputs: [
|
|
19248
|
+
{
|
|
19249
|
+
name: "borrower",
|
|
19250
|
+
type: "address",
|
|
19251
|
+
internalType: "address"
|
|
19252
|
+
}
|
|
19253
|
+
],
|
|
19254
|
+
stateMutability: "view"
|
|
19255
|
+
},
|
|
19256
|
+
{
|
|
19257
|
+
type: "function",
|
|
19258
|
+
name: "getTokenByMask",
|
|
19259
|
+
inputs: [
|
|
19260
|
+
{
|
|
19261
|
+
name: "tokenMask",
|
|
19262
|
+
type: "uint256",
|
|
19263
|
+
internalType: "uint256"
|
|
19264
|
+
}
|
|
19265
|
+
],
|
|
19266
|
+
outputs: [
|
|
19267
|
+
{
|
|
19268
|
+
name: "token",
|
|
19269
|
+
type: "address",
|
|
19270
|
+
internalType: "address"
|
|
19271
|
+
}
|
|
19272
|
+
],
|
|
19273
|
+
stateMutability: "view"
|
|
19274
|
+
},
|
|
19275
|
+
{
|
|
19276
|
+
type: "function",
|
|
19277
|
+
name: "getTokenMaskOrRevert",
|
|
19278
|
+
inputs: [
|
|
19279
|
+
{
|
|
19280
|
+
name: "token",
|
|
19281
|
+
type: "address",
|
|
19282
|
+
internalType: "address"
|
|
19283
|
+
}
|
|
19284
|
+
],
|
|
19285
|
+
outputs: [
|
|
19286
|
+
{
|
|
19287
|
+
name: "tokenMask",
|
|
19288
|
+
type: "uint256",
|
|
19289
|
+
internalType: "uint256"
|
|
19290
|
+
}
|
|
19291
|
+
],
|
|
19292
|
+
stateMutability: "view"
|
|
19293
|
+
},
|
|
19294
|
+
{
|
|
19295
|
+
type: "function",
|
|
19296
|
+
name: "isLiquidatable",
|
|
19297
|
+
inputs: [
|
|
19298
|
+
{
|
|
19299
|
+
name: "creditAccount",
|
|
19300
|
+
type: "address",
|
|
19301
|
+
internalType: "address"
|
|
19302
|
+
},
|
|
19303
|
+
{
|
|
19304
|
+
name: "minHealthFactor",
|
|
19305
|
+
type: "uint16",
|
|
19306
|
+
internalType: "uint16"
|
|
19307
|
+
}
|
|
19308
|
+
],
|
|
19309
|
+
outputs: [
|
|
19310
|
+
{
|
|
19311
|
+
name: "",
|
|
19312
|
+
type: "bool",
|
|
19313
|
+
internalType: "bool"
|
|
19314
|
+
}
|
|
19315
|
+
],
|
|
19316
|
+
stateMutability: "view"
|
|
19317
|
+
},
|
|
19318
|
+
{
|
|
19319
|
+
type: "function",
|
|
19320
|
+
name: "liquidateCreditAccount",
|
|
19321
|
+
inputs: [
|
|
19322
|
+
{
|
|
19323
|
+
name: "creditAccount",
|
|
19324
|
+
type: "address",
|
|
19325
|
+
internalType: "address"
|
|
19326
|
+
},
|
|
19327
|
+
{
|
|
19328
|
+
name: "collateralDebtData",
|
|
19329
|
+
type: "tuple",
|
|
19330
|
+
internalType: "struct CollateralDebtData",
|
|
19331
|
+
components: [
|
|
19332
|
+
{
|
|
19333
|
+
name: "debt",
|
|
19334
|
+
type: "uint256",
|
|
19335
|
+
internalType: "uint256"
|
|
19336
|
+
},
|
|
19337
|
+
{
|
|
19338
|
+
name: "cumulativeIndexNow",
|
|
19339
|
+
type: "uint256",
|
|
19340
|
+
internalType: "uint256"
|
|
19341
|
+
},
|
|
19342
|
+
{
|
|
19343
|
+
name: "cumulativeIndexLastUpdate",
|
|
19344
|
+
type: "uint256",
|
|
19345
|
+
internalType: "uint256"
|
|
19346
|
+
},
|
|
19347
|
+
{
|
|
19348
|
+
name: "cumulativeQuotaInterest",
|
|
19349
|
+
type: "uint128",
|
|
19350
|
+
internalType: "uint128"
|
|
19351
|
+
},
|
|
19352
|
+
{
|
|
19353
|
+
name: "accruedInterest",
|
|
19354
|
+
type: "uint256",
|
|
19355
|
+
internalType: "uint256"
|
|
19356
|
+
},
|
|
19357
|
+
{
|
|
19358
|
+
name: "accruedFees",
|
|
19359
|
+
type: "uint256",
|
|
19360
|
+
internalType: "uint256"
|
|
19361
|
+
},
|
|
19362
|
+
{
|
|
19363
|
+
name: "totalDebtUSD",
|
|
19364
|
+
type: "uint256",
|
|
19365
|
+
internalType: "uint256"
|
|
19366
|
+
},
|
|
19367
|
+
{
|
|
19368
|
+
name: "totalValue",
|
|
19369
|
+
type: "uint256",
|
|
19370
|
+
internalType: "uint256"
|
|
19371
|
+
},
|
|
19372
|
+
{
|
|
19373
|
+
name: "totalValueUSD",
|
|
19374
|
+
type: "uint256",
|
|
19375
|
+
internalType: "uint256"
|
|
19376
|
+
},
|
|
19377
|
+
{
|
|
19378
|
+
name: "twvUSD",
|
|
19379
|
+
type: "uint256",
|
|
19380
|
+
internalType: "uint256"
|
|
19381
|
+
},
|
|
19382
|
+
{
|
|
19383
|
+
name: "enabledTokensMask",
|
|
19384
|
+
type: "uint256",
|
|
19385
|
+
internalType: "uint256"
|
|
19386
|
+
},
|
|
19387
|
+
{
|
|
19388
|
+
name: "quotedTokensMask",
|
|
19389
|
+
type: "uint256",
|
|
19390
|
+
internalType: "uint256"
|
|
19391
|
+
},
|
|
19392
|
+
{
|
|
19393
|
+
name: "quotedTokens",
|
|
19394
|
+
type: "address[]",
|
|
19395
|
+
internalType: "address[]"
|
|
19396
|
+
},
|
|
19397
|
+
{
|
|
19398
|
+
name: "_poolQuotaKeeper",
|
|
19399
|
+
type: "address",
|
|
19400
|
+
internalType: "address"
|
|
19401
|
+
}
|
|
19402
|
+
]
|
|
19403
|
+
},
|
|
19404
|
+
{
|
|
19405
|
+
name: "to",
|
|
19406
|
+
type: "address",
|
|
19407
|
+
internalType: "address"
|
|
19408
|
+
},
|
|
19409
|
+
{
|
|
19410
|
+
name: "isExpired",
|
|
19411
|
+
type: "bool",
|
|
19412
|
+
internalType: "bool"
|
|
19413
|
+
}
|
|
19414
|
+
],
|
|
19415
|
+
outputs: [
|
|
19416
|
+
{
|
|
19417
|
+
name: "remainingFunds",
|
|
19418
|
+
type: "uint256",
|
|
19419
|
+
internalType: "uint256"
|
|
19420
|
+
},
|
|
19421
|
+
{
|
|
19422
|
+
name: "loss",
|
|
19423
|
+
type: "uint256",
|
|
19424
|
+
internalType: "uint256"
|
|
19425
|
+
}
|
|
19426
|
+
],
|
|
19427
|
+
stateMutability: "nonpayable"
|
|
19428
|
+
},
|
|
19429
|
+
{
|
|
19430
|
+
type: "function",
|
|
19431
|
+
name: "liquidationThresholds",
|
|
19432
|
+
inputs: [
|
|
19433
|
+
{
|
|
19434
|
+
name: "token",
|
|
19435
|
+
type: "address",
|
|
19436
|
+
internalType: "address"
|
|
19437
|
+
}
|
|
19438
|
+
],
|
|
19439
|
+
outputs: [
|
|
19440
|
+
{
|
|
19441
|
+
name: "lt",
|
|
19442
|
+
type: "uint16",
|
|
19443
|
+
internalType: "uint16"
|
|
19444
|
+
}
|
|
19445
|
+
],
|
|
19446
|
+
stateMutability: "view"
|
|
19447
|
+
},
|
|
19448
|
+
{
|
|
19449
|
+
type: "function",
|
|
19450
|
+
name: "ltParams",
|
|
19451
|
+
inputs: [
|
|
19452
|
+
{
|
|
19453
|
+
name: "token",
|
|
19454
|
+
type: "address",
|
|
19455
|
+
internalType: "address"
|
|
19456
|
+
}
|
|
19457
|
+
],
|
|
19458
|
+
outputs: [
|
|
19459
|
+
{
|
|
19460
|
+
name: "ltInitial",
|
|
19461
|
+
type: "uint16",
|
|
19462
|
+
internalType: "uint16"
|
|
19463
|
+
},
|
|
19464
|
+
{
|
|
19465
|
+
name: "ltFinal",
|
|
19466
|
+
type: "uint16",
|
|
19467
|
+
internalType: "uint16"
|
|
19468
|
+
},
|
|
19469
|
+
{
|
|
19470
|
+
name: "timestampRampStart",
|
|
19471
|
+
type: "uint40",
|
|
19472
|
+
internalType: "uint40"
|
|
19473
|
+
},
|
|
19474
|
+
{
|
|
19475
|
+
name: "rampDuration",
|
|
19476
|
+
type: "uint24",
|
|
19477
|
+
internalType: "uint24"
|
|
19478
|
+
}
|
|
19479
|
+
],
|
|
19480
|
+
stateMutability: "view"
|
|
19481
|
+
},
|
|
19482
|
+
{
|
|
19483
|
+
type: "function",
|
|
19484
|
+
name: "manageDebt",
|
|
19485
|
+
inputs: [
|
|
19486
|
+
{
|
|
19487
|
+
name: "creditAccount",
|
|
19488
|
+
type: "address",
|
|
19489
|
+
internalType: "address"
|
|
19490
|
+
},
|
|
19491
|
+
{
|
|
19492
|
+
name: "amount",
|
|
19493
|
+
type: "uint256",
|
|
19494
|
+
internalType: "uint256"
|
|
19495
|
+
},
|
|
19496
|
+
{
|
|
19497
|
+
name: "enabledTokensMask",
|
|
19498
|
+
type: "uint256",
|
|
19499
|
+
internalType: "uint256"
|
|
19500
|
+
},
|
|
19501
|
+
{
|
|
19502
|
+
name: "action",
|
|
19503
|
+
type: "uint8",
|
|
19504
|
+
internalType: "enum ManageDebtAction"
|
|
19505
|
+
}
|
|
19506
|
+
],
|
|
19507
|
+
outputs: [
|
|
19508
|
+
{
|
|
19509
|
+
name: "newDebt",
|
|
19510
|
+
type: "uint256",
|
|
19511
|
+
internalType: "uint256"
|
|
19512
|
+
},
|
|
19513
|
+
{
|
|
19514
|
+
name: "",
|
|
19515
|
+
type: "uint256",
|
|
19516
|
+
internalType: "uint256"
|
|
19517
|
+
},
|
|
19518
|
+
{
|
|
19519
|
+
name: "",
|
|
19520
|
+
type: "uint256",
|
|
19521
|
+
internalType: "uint256"
|
|
19522
|
+
}
|
|
19523
|
+
],
|
|
19524
|
+
stateMutability: "nonpayable"
|
|
19525
|
+
},
|
|
19526
|
+
{
|
|
19527
|
+
type: "function",
|
|
19528
|
+
name: "maxEnabledTokens",
|
|
19529
|
+
inputs: [],
|
|
19530
|
+
outputs: [
|
|
19531
|
+
{
|
|
19532
|
+
name: "",
|
|
19533
|
+
type: "uint8",
|
|
19534
|
+
internalType: "uint8"
|
|
19535
|
+
}
|
|
19536
|
+
],
|
|
19537
|
+
stateMutability: "view"
|
|
19538
|
+
},
|
|
19539
|
+
{
|
|
19540
|
+
type: "function",
|
|
19541
|
+
name: "name",
|
|
19542
|
+
inputs: [],
|
|
19543
|
+
outputs: [
|
|
19544
|
+
{
|
|
19545
|
+
name: "",
|
|
19546
|
+
type: "string",
|
|
19547
|
+
internalType: "string"
|
|
19548
|
+
}
|
|
19549
|
+
],
|
|
19550
|
+
stateMutability: "view"
|
|
19551
|
+
},
|
|
19552
|
+
{
|
|
19553
|
+
type: "function",
|
|
19554
|
+
name: "openCreditAccount",
|
|
19555
|
+
inputs: [
|
|
19556
|
+
{
|
|
19557
|
+
name: "onBehalfOf",
|
|
19558
|
+
type: "address",
|
|
19559
|
+
internalType: "address"
|
|
19560
|
+
}
|
|
19561
|
+
],
|
|
19562
|
+
outputs: [
|
|
19563
|
+
{
|
|
19564
|
+
name: "",
|
|
19565
|
+
type: "address",
|
|
19566
|
+
internalType: "address"
|
|
19567
|
+
}
|
|
19568
|
+
],
|
|
19569
|
+
stateMutability: "nonpayable"
|
|
19570
|
+
},
|
|
19571
|
+
{
|
|
19572
|
+
type: "function",
|
|
19573
|
+
name: "pool",
|
|
19574
|
+
inputs: [],
|
|
19575
|
+
outputs: [
|
|
19576
|
+
{
|
|
19577
|
+
name: "",
|
|
19578
|
+
type: "address",
|
|
19579
|
+
internalType: "address"
|
|
19580
|
+
}
|
|
19581
|
+
],
|
|
19582
|
+
stateMutability: "view"
|
|
19583
|
+
},
|
|
19584
|
+
{
|
|
19585
|
+
type: "function",
|
|
19586
|
+
name: "poolQuotaKeeper",
|
|
19587
|
+
inputs: [],
|
|
19588
|
+
outputs: [
|
|
19589
|
+
{
|
|
19590
|
+
name: "",
|
|
19591
|
+
type: "address",
|
|
19592
|
+
internalType: "address"
|
|
19593
|
+
}
|
|
19594
|
+
],
|
|
19595
|
+
stateMutability: "view"
|
|
19596
|
+
},
|
|
19597
|
+
{
|
|
19598
|
+
type: "function",
|
|
19599
|
+
name: "priceOracle",
|
|
19600
|
+
inputs: [],
|
|
19601
|
+
outputs: [
|
|
19602
|
+
{
|
|
19603
|
+
name: "",
|
|
19604
|
+
type: "address",
|
|
19605
|
+
internalType: "address"
|
|
19606
|
+
}
|
|
19607
|
+
],
|
|
19608
|
+
stateMutability: "view"
|
|
19609
|
+
},
|
|
19610
|
+
{
|
|
19611
|
+
type: "function",
|
|
19612
|
+
name: "quotedTokensMask",
|
|
19613
|
+
inputs: [],
|
|
19614
|
+
outputs: [
|
|
19615
|
+
{
|
|
19616
|
+
name: "",
|
|
19617
|
+
type: "uint256",
|
|
19618
|
+
internalType: "uint256"
|
|
19619
|
+
}
|
|
19620
|
+
],
|
|
19621
|
+
stateMutability: "view"
|
|
19622
|
+
},
|
|
19623
|
+
{
|
|
19624
|
+
type: "function",
|
|
19625
|
+
name: "setActiveCreditAccount",
|
|
19626
|
+
inputs: [
|
|
19627
|
+
{
|
|
19628
|
+
name: "creditAccount",
|
|
19629
|
+
type: "address",
|
|
19630
|
+
internalType: "address"
|
|
19631
|
+
}
|
|
19632
|
+
],
|
|
19633
|
+
outputs: [],
|
|
19634
|
+
stateMutability: "nonpayable"
|
|
19635
|
+
},
|
|
19636
|
+
{
|
|
19637
|
+
type: "function",
|
|
19638
|
+
name: "setCollateralTokenData",
|
|
19639
|
+
inputs: [
|
|
19640
|
+
{
|
|
19641
|
+
name: "token",
|
|
19642
|
+
type: "address",
|
|
19643
|
+
internalType: "address"
|
|
19644
|
+
},
|
|
19645
|
+
{
|
|
19646
|
+
name: "ltInitial",
|
|
19647
|
+
type: "uint16",
|
|
19648
|
+
internalType: "uint16"
|
|
19649
|
+
},
|
|
19650
|
+
{
|
|
19651
|
+
name: "ltFinal",
|
|
19652
|
+
type: "uint16",
|
|
19653
|
+
internalType: "uint16"
|
|
19654
|
+
},
|
|
19655
|
+
{
|
|
19656
|
+
name: "timestampRampStart",
|
|
19657
|
+
type: "uint40",
|
|
19658
|
+
internalType: "uint40"
|
|
19659
|
+
},
|
|
19660
|
+
{
|
|
19661
|
+
name: "rampDuration",
|
|
19662
|
+
type: "uint24",
|
|
19663
|
+
internalType: "uint24"
|
|
19664
|
+
}
|
|
19665
|
+
],
|
|
19666
|
+
outputs: [],
|
|
19667
|
+
stateMutability: "nonpayable"
|
|
19668
|
+
},
|
|
19669
|
+
{
|
|
19670
|
+
type: "function",
|
|
19671
|
+
name: "setContractAllowance",
|
|
19672
|
+
inputs: [
|
|
19673
|
+
{
|
|
19674
|
+
name: "adapter",
|
|
19675
|
+
type: "address",
|
|
19676
|
+
internalType: "address"
|
|
19677
|
+
},
|
|
19678
|
+
{
|
|
19679
|
+
name: "targetContract",
|
|
19680
|
+
type: "address",
|
|
19681
|
+
internalType: "address"
|
|
19682
|
+
}
|
|
19683
|
+
],
|
|
19684
|
+
outputs: [],
|
|
19685
|
+
stateMutability: "nonpayable"
|
|
19686
|
+
},
|
|
19687
|
+
{
|
|
19688
|
+
type: "function",
|
|
19689
|
+
name: "setCreditConfigurator",
|
|
19690
|
+
inputs: [
|
|
19691
|
+
{
|
|
19692
|
+
name: "creditConfigurator",
|
|
19693
|
+
type: "address",
|
|
19694
|
+
internalType: "address"
|
|
19695
|
+
}
|
|
19696
|
+
],
|
|
19697
|
+
outputs: [],
|
|
19698
|
+
stateMutability: "nonpayable"
|
|
19699
|
+
},
|
|
19700
|
+
{
|
|
19701
|
+
type: "function",
|
|
19702
|
+
name: "setCreditFacade",
|
|
19703
|
+
inputs: [
|
|
19704
|
+
{
|
|
19705
|
+
name: "creditFacade",
|
|
19706
|
+
type: "address",
|
|
19707
|
+
internalType: "address"
|
|
19708
|
+
}
|
|
19709
|
+
],
|
|
19710
|
+
outputs: [],
|
|
19711
|
+
stateMutability: "nonpayable"
|
|
19712
|
+
},
|
|
19713
|
+
{
|
|
19714
|
+
type: "function",
|
|
19715
|
+
name: "setFees",
|
|
19716
|
+
inputs: [
|
|
19717
|
+
{
|
|
19718
|
+
name: "feeInterest",
|
|
19719
|
+
type: "uint16",
|
|
19720
|
+
internalType: "uint16"
|
|
19721
|
+
},
|
|
19722
|
+
{
|
|
19723
|
+
name: "feeLiquidation",
|
|
19724
|
+
type: "uint16",
|
|
19725
|
+
internalType: "uint16"
|
|
19726
|
+
},
|
|
19727
|
+
{
|
|
19728
|
+
name: "liquidationDiscount",
|
|
19729
|
+
type: "uint16",
|
|
19730
|
+
internalType: "uint16"
|
|
19731
|
+
},
|
|
19732
|
+
{
|
|
19733
|
+
name: "feeLiquidationExpired",
|
|
19734
|
+
type: "uint16",
|
|
19735
|
+
internalType: "uint16"
|
|
19736
|
+
},
|
|
19737
|
+
{
|
|
19738
|
+
name: "liquidationDiscountExpired",
|
|
19739
|
+
type: "uint16",
|
|
19740
|
+
internalType: "uint16"
|
|
19741
|
+
}
|
|
19742
|
+
],
|
|
19743
|
+
outputs: [],
|
|
19744
|
+
stateMutability: "nonpayable"
|
|
19745
|
+
},
|
|
19746
|
+
{
|
|
19747
|
+
type: "function",
|
|
19748
|
+
name: "setFlagFor",
|
|
19749
|
+
inputs: [
|
|
19750
|
+
{
|
|
19751
|
+
name: "creditAccount",
|
|
19752
|
+
type: "address",
|
|
19753
|
+
internalType: "address"
|
|
19754
|
+
},
|
|
19755
|
+
{
|
|
19756
|
+
name: "flag",
|
|
19757
|
+
type: "uint16",
|
|
19758
|
+
internalType: "uint16"
|
|
19759
|
+
},
|
|
19760
|
+
{
|
|
19761
|
+
name: "value",
|
|
19762
|
+
type: "bool",
|
|
19763
|
+
internalType: "bool"
|
|
19764
|
+
}
|
|
19765
|
+
],
|
|
19766
|
+
outputs: [],
|
|
19767
|
+
stateMutability: "nonpayable"
|
|
19768
|
+
},
|
|
19769
|
+
{
|
|
19770
|
+
type: "function",
|
|
19771
|
+
name: "setPriceOracle",
|
|
19772
|
+
inputs: [
|
|
19773
|
+
{
|
|
19774
|
+
name: "priceOracle",
|
|
19775
|
+
type: "address",
|
|
19776
|
+
internalType: "address"
|
|
19777
|
+
}
|
|
19778
|
+
],
|
|
19779
|
+
outputs: [],
|
|
19780
|
+
stateMutability: "nonpayable"
|
|
19781
|
+
},
|
|
19782
|
+
{
|
|
19783
|
+
type: "function",
|
|
19784
|
+
name: "underlying",
|
|
19785
|
+
inputs: [],
|
|
19786
|
+
outputs: [
|
|
19787
|
+
{
|
|
19788
|
+
name: "",
|
|
19789
|
+
type: "address",
|
|
19790
|
+
internalType: "address"
|
|
19791
|
+
}
|
|
19792
|
+
],
|
|
19793
|
+
stateMutability: "view"
|
|
19794
|
+
},
|
|
19795
|
+
{
|
|
19796
|
+
type: "function",
|
|
19797
|
+
name: "updateQuota",
|
|
19798
|
+
inputs: [
|
|
19799
|
+
{
|
|
19800
|
+
name: "creditAccount",
|
|
19801
|
+
type: "address",
|
|
19802
|
+
internalType: "address"
|
|
19803
|
+
},
|
|
19804
|
+
{
|
|
19805
|
+
name: "token",
|
|
19806
|
+
type: "address",
|
|
19807
|
+
internalType: "address"
|
|
19808
|
+
},
|
|
19809
|
+
{
|
|
19810
|
+
name: "quotaChange",
|
|
19811
|
+
type: "int96",
|
|
19812
|
+
internalType: "int96"
|
|
19813
|
+
},
|
|
19814
|
+
{
|
|
19815
|
+
name: "minQuota",
|
|
19816
|
+
type: "uint96",
|
|
19817
|
+
internalType: "uint96"
|
|
19818
|
+
},
|
|
19819
|
+
{
|
|
19820
|
+
name: "maxQuota",
|
|
19821
|
+
type: "uint96",
|
|
19822
|
+
internalType: "uint96"
|
|
19823
|
+
}
|
|
19824
|
+
],
|
|
19825
|
+
outputs: [
|
|
19826
|
+
{
|
|
19827
|
+
name: "tokensToEnable",
|
|
19828
|
+
type: "uint256",
|
|
19829
|
+
internalType: "uint256"
|
|
19830
|
+
},
|
|
19831
|
+
{
|
|
19832
|
+
name: "tokensToDisable",
|
|
19833
|
+
type: "uint256",
|
|
19834
|
+
internalType: "uint256"
|
|
19835
|
+
}
|
|
19836
|
+
],
|
|
19837
|
+
stateMutability: "nonpayable"
|
|
19838
|
+
},
|
|
19839
|
+
{
|
|
19840
|
+
type: "function",
|
|
19841
|
+
name: "version",
|
|
19842
|
+
inputs: [],
|
|
19843
|
+
outputs: [
|
|
19844
|
+
{
|
|
19845
|
+
name: "",
|
|
19846
|
+
type: "uint256",
|
|
19847
|
+
internalType: "uint256"
|
|
19848
|
+
}
|
|
19849
|
+
],
|
|
19850
|
+
stateMutability: "view"
|
|
19851
|
+
},
|
|
19852
|
+
{
|
|
19853
|
+
type: "function",
|
|
19854
|
+
name: "withdrawCollateral",
|
|
19855
|
+
inputs: [
|
|
19856
|
+
{
|
|
19857
|
+
name: "creditAccount",
|
|
19858
|
+
type: "address",
|
|
19859
|
+
internalType: "address"
|
|
19860
|
+
},
|
|
19861
|
+
{
|
|
19862
|
+
name: "token",
|
|
19863
|
+
type: "address",
|
|
19864
|
+
internalType: "address"
|
|
19865
|
+
},
|
|
19866
|
+
{
|
|
19867
|
+
name: "amount",
|
|
19868
|
+
type: "uint256",
|
|
19869
|
+
internalType: "uint256"
|
|
19870
|
+
},
|
|
19871
|
+
{
|
|
19872
|
+
name: "to",
|
|
19873
|
+
type: "address",
|
|
19874
|
+
internalType: "address"
|
|
19875
|
+
}
|
|
19876
|
+
],
|
|
19877
|
+
outputs: [
|
|
19878
|
+
{
|
|
19879
|
+
name: "",
|
|
19880
|
+
type: "uint256",
|
|
19881
|
+
internalType: "uint256"
|
|
19882
|
+
}
|
|
19883
|
+
],
|
|
19884
|
+
stateMutability: "nonpayable"
|
|
19885
|
+
},
|
|
19886
|
+
{
|
|
19887
|
+
type: "event",
|
|
19888
|
+
name: "SetCreditConfigurator",
|
|
19889
|
+
inputs: [
|
|
19890
|
+
{
|
|
19891
|
+
name: "newConfigurator",
|
|
19892
|
+
type: "address",
|
|
19893
|
+
indexed: true,
|
|
19894
|
+
internalType: "address"
|
|
19895
|
+
}
|
|
19896
|
+
],
|
|
19897
|
+
anonymous: false
|
|
19898
|
+
}
|
|
19899
|
+
];
|
|
19900
|
+
var iPriceOracleV310Abi = [
|
|
19901
|
+
{
|
|
19902
|
+
type: "function",
|
|
19903
|
+
name: "acl",
|
|
19904
|
+
inputs: [],
|
|
19905
|
+
outputs: [
|
|
19906
|
+
{
|
|
19907
|
+
name: "",
|
|
19908
|
+
type: "address",
|
|
19909
|
+
internalType: "address"
|
|
19910
|
+
}
|
|
19911
|
+
],
|
|
19912
|
+
stateMutability: "view"
|
|
19913
|
+
},
|
|
19914
|
+
{
|
|
19915
|
+
type: "function",
|
|
19916
|
+
name: "addUpdatablePriceFeed",
|
|
19917
|
+
inputs: [
|
|
19918
|
+
{
|
|
19919
|
+
name: "priceFeed",
|
|
19920
|
+
type: "address",
|
|
19921
|
+
internalType: "address"
|
|
19922
|
+
}
|
|
19923
|
+
],
|
|
19924
|
+
outputs: [],
|
|
19925
|
+
stateMutability: "nonpayable"
|
|
19926
|
+
},
|
|
19927
|
+
{
|
|
19928
|
+
type: "function",
|
|
19929
|
+
name: "contractType",
|
|
19930
|
+
inputs: [],
|
|
19931
|
+
outputs: [
|
|
19932
|
+
{
|
|
19933
|
+
name: "",
|
|
19934
|
+
type: "bytes32",
|
|
19935
|
+
internalType: "bytes32"
|
|
19936
|
+
}
|
|
19937
|
+
],
|
|
19938
|
+
stateMutability: "view"
|
|
19939
|
+
},
|
|
19940
|
+
{
|
|
19941
|
+
type: "function",
|
|
19942
|
+
name: "controller",
|
|
19943
|
+
inputs: [],
|
|
19944
|
+
outputs: [
|
|
19945
|
+
{
|
|
19946
|
+
name: "",
|
|
19947
|
+
type: "address",
|
|
19948
|
+
internalType: "address"
|
|
19949
|
+
}
|
|
19950
|
+
],
|
|
19951
|
+
stateMutability: "view"
|
|
19952
|
+
},
|
|
19953
|
+
{
|
|
19954
|
+
type: "function",
|
|
19955
|
+
name: "convert",
|
|
19956
|
+
inputs: [
|
|
19957
|
+
{
|
|
19958
|
+
name: "amount",
|
|
19959
|
+
type: "uint256",
|
|
19960
|
+
internalType: "uint256"
|
|
19961
|
+
},
|
|
19962
|
+
{
|
|
19963
|
+
name: "tokenFrom",
|
|
19964
|
+
type: "address",
|
|
19965
|
+
internalType: "address"
|
|
19966
|
+
},
|
|
19967
|
+
{
|
|
19968
|
+
name: "tokenTo",
|
|
19969
|
+
type: "address",
|
|
19970
|
+
internalType: "address"
|
|
19971
|
+
}
|
|
19972
|
+
],
|
|
19973
|
+
outputs: [
|
|
19974
|
+
{
|
|
19975
|
+
name: "",
|
|
19976
|
+
type: "uint256",
|
|
19977
|
+
internalType: "uint256"
|
|
19978
|
+
}
|
|
19979
|
+
],
|
|
19980
|
+
stateMutability: "view"
|
|
19981
|
+
},
|
|
19982
|
+
{
|
|
19983
|
+
type: "function",
|
|
19984
|
+
name: "convertFromUSD",
|
|
19985
|
+
inputs: [
|
|
19986
|
+
{
|
|
19987
|
+
name: "amount",
|
|
19988
|
+
type: "uint256",
|
|
19989
|
+
internalType: "uint256"
|
|
19990
|
+
},
|
|
19991
|
+
{
|
|
19992
|
+
name: "token",
|
|
19993
|
+
type: "address",
|
|
19994
|
+
internalType: "address"
|
|
19995
|
+
}
|
|
19996
|
+
],
|
|
19997
|
+
outputs: [
|
|
19998
|
+
{
|
|
19999
|
+
name: "",
|
|
20000
|
+
type: "uint256",
|
|
20001
|
+
internalType: "uint256"
|
|
20002
|
+
}
|
|
20003
|
+
],
|
|
20004
|
+
stateMutability: "view"
|
|
20005
|
+
},
|
|
20006
|
+
{
|
|
20007
|
+
type: "function",
|
|
20008
|
+
name: "convertToUSD",
|
|
20009
|
+
inputs: [
|
|
20010
|
+
{
|
|
20011
|
+
name: "amount",
|
|
20012
|
+
type: "uint256",
|
|
20013
|
+
internalType: "uint256"
|
|
20014
|
+
},
|
|
20015
|
+
{
|
|
20016
|
+
name: "token",
|
|
20017
|
+
type: "address",
|
|
20018
|
+
internalType: "address"
|
|
20019
|
+
}
|
|
20020
|
+
],
|
|
20021
|
+
outputs: [
|
|
20022
|
+
{
|
|
20023
|
+
name: "",
|
|
20024
|
+
type: "uint256",
|
|
20025
|
+
internalType: "uint256"
|
|
20026
|
+
}
|
|
20027
|
+
],
|
|
20028
|
+
stateMutability: "view"
|
|
20029
|
+
},
|
|
20030
|
+
{
|
|
20031
|
+
type: "function",
|
|
20032
|
+
name: "getPrice",
|
|
20033
|
+
inputs: [
|
|
20034
|
+
{
|
|
20035
|
+
name: "token",
|
|
20036
|
+
type: "address",
|
|
20037
|
+
internalType: "address"
|
|
20038
|
+
}
|
|
20039
|
+
],
|
|
20040
|
+
outputs: [
|
|
20041
|
+
{
|
|
20042
|
+
name: "",
|
|
20043
|
+
type: "uint256",
|
|
20044
|
+
internalType: "uint256"
|
|
20045
|
+
}
|
|
20046
|
+
],
|
|
20047
|
+
stateMutability: "view"
|
|
20048
|
+
},
|
|
20049
|
+
{
|
|
20050
|
+
type: "function",
|
|
20051
|
+
name: "getReservePrice",
|
|
20052
|
+
inputs: [
|
|
20053
|
+
{
|
|
20054
|
+
name: "token",
|
|
20055
|
+
type: "address",
|
|
20056
|
+
internalType: "address"
|
|
20057
|
+
}
|
|
20058
|
+
],
|
|
20059
|
+
outputs: [
|
|
20060
|
+
{
|
|
20061
|
+
name: "",
|
|
20062
|
+
type: "uint256",
|
|
20063
|
+
internalType: "uint256"
|
|
20064
|
+
}
|
|
20065
|
+
],
|
|
20066
|
+
stateMutability: "view"
|
|
20067
|
+
},
|
|
20068
|
+
{
|
|
20069
|
+
type: "function",
|
|
20070
|
+
name: "getSafePrice",
|
|
20071
|
+
inputs: [
|
|
20072
|
+
{
|
|
20073
|
+
name: "token",
|
|
20074
|
+
type: "address",
|
|
20075
|
+
internalType: "address"
|
|
20076
|
+
}
|
|
20077
|
+
],
|
|
20078
|
+
outputs: [
|
|
20079
|
+
{
|
|
20080
|
+
name: "",
|
|
20081
|
+
type: "uint256",
|
|
20082
|
+
internalType: "uint256"
|
|
20083
|
+
}
|
|
20084
|
+
],
|
|
20085
|
+
stateMutability: "view"
|
|
20086
|
+
},
|
|
20087
|
+
{
|
|
20088
|
+
type: "function",
|
|
20089
|
+
name: "getTokens",
|
|
20090
|
+
inputs: [],
|
|
20091
|
+
outputs: [
|
|
20092
|
+
{
|
|
20093
|
+
name: "",
|
|
20094
|
+
type: "address[]",
|
|
20095
|
+
internalType: "address[]"
|
|
20096
|
+
}
|
|
20097
|
+
],
|
|
20098
|
+
stateMutability: "view"
|
|
20099
|
+
},
|
|
20100
|
+
{
|
|
20101
|
+
type: "function",
|
|
20102
|
+
name: "getUpdatablePriceFeeds",
|
|
20103
|
+
inputs: [],
|
|
20104
|
+
outputs: [
|
|
20105
|
+
{
|
|
20106
|
+
name: "",
|
|
20107
|
+
type: "address[]",
|
|
20108
|
+
internalType: "address[]"
|
|
20109
|
+
}
|
|
20110
|
+
],
|
|
20111
|
+
stateMutability: "view"
|
|
20112
|
+
},
|
|
20113
|
+
{
|
|
20114
|
+
type: "function",
|
|
20115
|
+
name: "priceFeedParams",
|
|
20116
|
+
inputs: [
|
|
20117
|
+
{
|
|
20118
|
+
name: "token",
|
|
20119
|
+
type: "address",
|
|
20120
|
+
internalType: "address"
|
|
20121
|
+
}
|
|
20122
|
+
],
|
|
20123
|
+
outputs: [
|
|
20124
|
+
{
|
|
20125
|
+
name: "",
|
|
20126
|
+
type: "tuple",
|
|
20127
|
+
internalType: "struct PriceFeedParams",
|
|
20128
|
+
components: [
|
|
20129
|
+
{
|
|
20130
|
+
name: "priceFeed",
|
|
20131
|
+
type: "address",
|
|
20132
|
+
internalType: "address"
|
|
20133
|
+
},
|
|
20134
|
+
{
|
|
20135
|
+
name: "stalenessPeriod",
|
|
20136
|
+
type: "uint32",
|
|
20137
|
+
internalType: "uint32"
|
|
20138
|
+
},
|
|
20139
|
+
{
|
|
20140
|
+
name: "skipCheck",
|
|
20141
|
+
type: "bool",
|
|
20142
|
+
internalType: "bool"
|
|
20143
|
+
},
|
|
20144
|
+
{
|
|
20145
|
+
name: "tokenDecimals",
|
|
20146
|
+
type: "uint8",
|
|
20147
|
+
internalType: "uint8"
|
|
20148
|
+
}
|
|
20149
|
+
]
|
|
20150
|
+
}
|
|
20151
|
+
],
|
|
20152
|
+
stateMutability: "view"
|
|
20153
|
+
},
|
|
20154
|
+
{
|
|
20155
|
+
type: "function",
|
|
20156
|
+
name: "priceFeeds",
|
|
20157
|
+
inputs: [
|
|
20158
|
+
{
|
|
20159
|
+
name: "token",
|
|
20160
|
+
type: "address",
|
|
20161
|
+
internalType: "address"
|
|
20162
|
+
}
|
|
20163
|
+
],
|
|
20164
|
+
outputs: [
|
|
20165
|
+
{
|
|
20166
|
+
name: "priceFeed",
|
|
20167
|
+
type: "address",
|
|
20168
|
+
internalType: "address"
|
|
20169
|
+
}
|
|
20170
|
+
],
|
|
20171
|
+
stateMutability: "view"
|
|
20172
|
+
},
|
|
20173
|
+
{
|
|
20174
|
+
type: "function",
|
|
20175
|
+
name: "reservePriceFeedParams",
|
|
20176
|
+
inputs: [
|
|
20177
|
+
{
|
|
20178
|
+
name: "token",
|
|
20179
|
+
type: "address",
|
|
20180
|
+
internalType: "address"
|
|
20181
|
+
}
|
|
20182
|
+
],
|
|
20183
|
+
outputs: [
|
|
20184
|
+
{
|
|
20185
|
+
name: "",
|
|
20186
|
+
type: "tuple",
|
|
20187
|
+
internalType: "struct PriceFeedParams",
|
|
20188
|
+
components: [
|
|
20189
|
+
{
|
|
20190
|
+
name: "priceFeed",
|
|
20191
|
+
type: "address",
|
|
20192
|
+
internalType: "address"
|
|
20193
|
+
},
|
|
20194
|
+
{
|
|
20195
|
+
name: "stalenessPeriod",
|
|
20196
|
+
type: "uint32",
|
|
20197
|
+
internalType: "uint32"
|
|
20198
|
+
},
|
|
20199
|
+
{
|
|
20200
|
+
name: "skipCheck",
|
|
20201
|
+
type: "bool",
|
|
20202
|
+
internalType: "bool"
|
|
20203
|
+
},
|
|
20204
|
+
{
|
|
20205
|
+
name: "tokenDecimals",
|
|
20206
|
+
type: "uint8",
|
|
20207
|
+
internalType: "uint8"
|
|
20208
|
+
}
|
|
20209
|
+
]
|
|
20210
|
+
}
|
|
20211
|
+
],
|
|
20212
|
+
stateMutability: "view"
|
|
20213
|
+
},
|
|
20214
|
+
{
|
|
20215
|
+
type: "function",
|
|
20216
|
+
name: "reservePriceFeeds",
|
|
20217
|
+
inputs: [
|
|
20218
|
+
{
|
|
20219
|
+
name: "token",
|
|
20220
|
+
type: "address",
|
|
20221
|
+
internalType: "address"
|
|
20222
|
+
}
|
|
20223
|
+
],
|
|
20224
|
+
outputs: [
|
|
20225
|
+
{
|
|
20226
|
+
name: "",
|
|
20227
|
+
type: "address",
|
|
20228
|
+
internalType: "address"
|
|
20229
|
+
}
|
|
20230
|
+
],
|
|
20231
|
+
stateMutability: "view"
|
|
20232
|
+
},
|
|
20233
|
+
{
|
|
20234
|
+
type: "function",
|
|
20235
|
+
name: "safeConvertToUSD",
|
|
20236
|
+
inputs: [
|
|
20237
|
+
{
|
|
20238
|
+
name: "amount",
|
|
20239
|
+
type: "uint256",
|
|
20240
|
+
internalType: "uint256"
|
|
20241
|
+
},
|
|
20242
|
+
{
|
|
20243
|
+
name: "token",
|
|
20244
|
+
type: "address",
|
|
20245
|
+
internalType: "address"
|
|
20246
|
+
}
|
|
20247
|
+
],
|
|
20248
|
+
outputs: [
|
|
20249
|
+
{
|
|
20250
|
+
name: "",
|
|
20251
|
+
type: "uint256",
|
|
20252
|
+
internalType: "uint256"
|
|
20253
|
+
}
|
|
20254
|
+
],
|
|
20255
|
+
stateMutability: "view"
|
|
20256
|
+
},
|
|
20257
|
+
{
|
|
20258
|
+
type: "function",
|
|
20259
|
+
name: "setController",
|
|
20260
|
+
inputs: [
|
|
20261
|
+
{
|
|
20262
|
+
name: "",
|
|
20263
|
+
type: "address",
|
|
20264
|
+
internalType: "address"
|
|
20265
|
+
}
|
|
20266
|
+
],
|
|
20267
|
+
outputs: [],
|
|
20268
|
+
stateMutability: "nonpayable"
|
|
20269
|
+
},
|
|
20270
|
+
{
|
|
20271
|
+
type: "function",
|
|
20272
|
+
name: "setPriceFeed",
|
|
20273
|
+
inputs: [
|
|
20274
|
+
{
|
|
20275
|
+
name: "token",
|
|
20276
|
+
type: "address",
|
|
20277
|
+
internalType: "address"
|
|
20278
|
+
},
|
|
20279
|
+
{
|
|
20280
|
+
name: "priceFeed",
|
|
20281
|
+
type: "address",
|
|
20282
|
+
internalType: "address"
|
|
20283
|
+
},
|
|
20284
|
+
{
|
|
20285
|
+
name: "stalenessPeriod",
|
|
20286
|
+
type: "uint32",
|
|
20287
|
+
internalType: "uint32"
|
|
20288
|
+
}
|
|
20289
|
+
],
|
|
20290
|
+
outputs: [],
|
|
20291
|
+
stateMutability: "nonpayable"
|
|
20292
|
+
},
|
|
20293
|
+
{
|
|
20294
|
+
type: "function",
|
|
20295
|
+
name: "setReservePriceFeed",
|
|
20296
|
+
inputs: [
|
|
20297
|
+
{
|
|
20298
|
+
name: "token",
|
|
20299
|
+
type: "address",
|
|
20300
|
+
internalType: "address"
|
|
20301
|
+
},
|
|
20302
|
+
{
|
|
20303
|
+
name: "priceFeed",
|
|
20304
|
+
type: "address",
|
|
20305
|
+
internalType: "address"
|
|
20306
|
+
},
|
|
20307
|
+
{
|
|
20308
|
+
name: "stalenessPeriod",
|
|
20309
|
+
type: "uint32",
|
|
20310
|
+
internalType: "uint32"
|
|
20311
|
+
}
|
|
20312
|
+
],
|
|
20313
|
+
outputs: [],
|
|
20314
|
+
stateMutability: "nonpayable"
|
|
20315
|
+
},
|
|
20316
|
+
{
|
|
20317
|
+
type: "function",
|
|
20318
|
+
name: "updatePrices",
|
|
20319
|
+
inputs: [
|
|
20320
|
+
{
|
|
20321
|
+
name: "updates",
|
|
20322
|
+
type: "tuple[]",
|
|
20323
|
+
internalType: "struct PriceUpdate[]",
|
|
20324
|
+
components: [
|
|
20325
|
+
{
|
|
20326
|
+
name: "priceFeed",
|
|
20327
|
+
type: "address",
|
|
20328
|
+
internalType: "address"
|
|
20329
|
+
},
|
|
20330
|
+
{
|
|
20331
|
+
name: "data",
|
|
20332
|
+
type: "bytes",
|
|
20333
|
+
internalType: "bytes"
|
|
20334
|
+
}
|
|
20335
|
+
]
|
|
20336
|
+
}
|
|
20337
|
+
],
|
|
20338
|
+
outputs: [],
|
|
20339
|
+
stateMutability: "nonpayable"
|
|
20340
|
+
},
|
|
20341
|
+
{
|
|
20342
|
+
type: "function",
|
|
20343
|
+
name: "version",
|
|
20344
|
+
inputs: [],
|
|
20345
|
+
outputs: [
|
|
20346
|
+
{
|
|
20347
|
+
name: "",
|
|
20348
|
+
type: "uint256",
|
|
20349
|
+
internalType: "uint256"
|
|
20350
|
+
}
|
|
20351
|
+
],
|
|
20352
|
+
stateMutability: "view"
|
|
20353
|
+
},
|
|
20354
|
+
{
|
|
20355
|
+
type: "event",
|
|
20356
|
+
name: "AddUpdatablePriceFeed",
|
|
20357
|
+
inputs: [
|
|
20358
|
+
{
|
|
20359
|
+
name: "priceFeed",
|
|
20360
|
+
type: "address",
|
|
20361
|
+
indexed: true,
|
|
20362
|
+
internalType: "address"
|
|
20363
|
+
}
|
|
20364
|
+
],
|
|
20365
|
+
anonymous: false
|
|
20366
|
+
},
|
|
20367
|
+
{
|
|
20368
|
+
type: "event",
|
|
20369
|
+
name: "NewController",
|
|
20370
|
+
inputs: [
|
|
20371
|
+
{
|
|
20372
|
+
name: "newController",
|
|
20373
|
+
type: "address",
|
|
20374
|
+
indexed: true,
|
|
20375
|
+
internalType: "address"
|
|
20376
|
+
}
|
|
20377
|
+
],
|
|
20378
|
+
anonymous: false
|
|
20379
|
+
},
|
|
20380
|
+
{
|
|
20381
|
+
type: "event",
|
|
20382
|
+
name: "SetPriceFeed",
|
|
20383
|
+
inputs: [
|
|
20384
|
+
{
|
|
20385
|
+
name: "token",
|
|
20386
|
+
type: "address",
|
|
20387
|
+
indexed: true,
|
|
20388
|
+
internalType: "address"
|
|
20389
|
+
},
|
|
20390
|
+
{
|
|
20391
|
+
name: "priceFeed",
|
|
20392
|
+
type: "address",
|
|
20393
|
+
indexed: true,
|
|
20394
|
+
internalType: "address"
|
|
20395
|
+
},
|
|
20396
|
+
{
|
|
20397
|
+
name: "stalenessPeriod",
|
|
20398
|
+
type: "uint32",
|
|
20399
|
+
indexed: false,
|
|
20400
|
+
internalType: "uint32"
|
|
20401
|
+
},
|
|
20402
|
+
{
|
|
20403
|
+
name: "skipCheck",
|
|
20404
|
+
type: "bool",
|
|
20405
|
+
indexed: false,
|
|
20406
|
+
internalType: "bool"
|
|
20407
|
+
}
|
|
20408
|
+
],
|
|
20409
|
+
anonymous: false
|
|
20410
|
+
},
|
|
20411
|
+
{
|
|
20412
|
+
type: "event",
|
|
20413
|
+
name: "SetReservePriceFeed",
|
|
20414
|
+
inputs: [
|
|
20415
|
+
{
|
|
20416
|
+
name: "token",
|
|
20417
|
+
type: "address",
|
|
20418
|
+
indexed: true,
|
|
20419
|
+
internalType: "address"
|
|
20420
|
+
},
|
|
20421
|
+
{
|
|
20422
|
+
name: "priceFeed",
|
|
20423
|
+
type: "address",
|
|
20424
|
+
indexed: true,
|
|
20425
|
+
internalType: "address"
|
|
20426
|
+
},
|
|
20427
|
+
{
|
|
20428
|
+
name: "stalenessPeriod",
|
|
20429
|
+
type: "uint32",
|
|
20430
|
+
indexed: false,
|
|
20431
|
+
internalType: "uint32"
|
|
20432
|
+
},
|
|
20433
|
+
{
|
|
20434
|
+
name: "skipCheck",
|
|
20435
|
+
type: "bool",
|
|
20436
|
+
indexed: false,
|
|
20437
|
+
internalType: "bool"
|
|
20438
|
+
}
|
|
20439
|
+
],
|
|
20440
|
+
anonymous: false
|
|
20441
|
+
}
|
|
20442
|
+
];
|
|
18632
20443
|
var iCreditFacadeV310MulticallAbi = [
|
|
18633
20444
|
{
|
|
18634
20445
|
type: "function",
|
|
18635
|
-
name: "addCollateral",
|
|
18636
|
-
inputs: [
|
|
20446
|
+
name: "addCollateral",
|
|
20447
|
+
inputs: [
|
|
20448
|
+
{
|
|
20449
|
+
name: "token",
|
|
20450
|
+
type: "address",
|
|
20451
|
+
internalType: "address"
|
|
20452
|
+
},
|
|
20453
|
+
{
|
|
20454
|
+
name: "amount",
|
|
20455
|
+
type: "uint256",
|
|
20456
|
+
internalType: "uint256"
|
|
20457
|
+
}
|
|
20458
|
+
],
|
|
20459
|
+
outputs: [],
|
|
20460
|
+
stateMutability: "nonpayable"
|
|
20461
|
+
},
|
|
20462
|
+
{
|
|
20463
|
+
type: "function",
|
|
20464
|
+
name: "addCollateralWithPermit",
|
|
20465
|
+
inputs: [
|
|
20466
|
+
{
|
|
20467
|
+
name: "token",
|
|
20468
|
+
type: "address",
|
|
20469
|
+
internalType: "address"
|
|
20470
|
+
},
|
|
20471
|
+
{
|
|
20472
|
+
name: "amount",
|
|
20473
|
+
type: "uint256",
|
|
20474
|
+
internalType: "uint256"
|
|
20475
|
+
},
|
|
20476
|
+
{
|
|
20477
|
+
name: "deadline",
|
|
20478
|
+
type: "uint256",
|
|
20479
|
+
internalType: "uint256"
|
|
20480
|
+
},
|
|
20481
|
+
{
|
|
20482
|
+
name: "v",
|
|
20483
|
+
type: "uint8",
|
|
20484
|
+
internalType: "uint8"
|
|
20485
|
+
},
|
|
20486
|
+
{
|
|
20487
|
+
name: "r",
|
|
20488
|
+
type: "bytes32",
|
|
20489
|
+
internalType: "bytes32"
|
|
20490
|
+
},
|
|
20491
|
+
{
|
|
20492
|
+
name: "s",
|
|
20493
|
+
type: "bytes32",
|
|
20494
|
+
internalType: "bytes32"
|
|
20495
|
+
}
|
|
20496
|
+
],
|
|
20497
|
+
outputs: [],
|
|
20498
|
+
stateMutability: "nonpayable"
|
|
20499
|
+
},
|
|
20500
|
+
{
|
|
20501
|
+
type: "function",
|
|
20502
|
+
name: "compareBalances",
|
|
20503
|
+
inputs: [],
|
|
20504
|
+
outputs: [],
|
|
20505
|
+
stateMutability: "nonpayable"
|
|
20506
|
+
},
|
|
20507
|
+
{
|
|
20508
|
+
type: "function",
|
|
20509
|
+
name: "decreaseDebt",
|
|
20510
|
+
inputs: [
|
|
20511
|
+
{
|
|
20512
|
+
name: "amount",
|
|
20513
|
+
type: "uint256",
|
|
20514
|
+
internalType: "uint256"
|
|
20515
|
+
}
|
|
20516
|
+
],
|
|
20517
|
+
outputs: [],
|
|
20518
|
+
stateMutability: "nonpayable"
|
|
20519
|
+
},
|
|
20520
|
+
{
|
|
20521
|
+
type: "function",
|
|
20522
|
+
name: "increaseDebt",
|
|
20523
|
+
inputs: [
|
|
20524
|
+
{
|
|
20525
|
+
name: "amount",
|
|
20526
|
+
type: "uint256",
|
|
20527
|
+
internalType: "uint256"
|
|
20528
|
+
}
|
|
20529
|
+
],
|
|
20530
|
+
outputs: [],
|
|
20531
|
+
stateMutability: "nonpayable"
|
|
20532
|
+
},
|
|
20533
|
+
{
|
|
20534
|
+
type: "function",
|
|
20535
|
+
name: "onDemandPriceUpdates",
|
|
20536
|
+
inputs: [
|
|
20537
|
+
{
|
|
20538
|
+
name: "updates",
|
|
20539
|
+
type: "tuple[]",
|
|
20540
|
+
internalType: "struct PriceUpdate[]",
|
|
20541
|
+
components: [
|
|
20542
|
+
{
|
|
20543
|
+
name: "priceFeed",
|
|
20544
|
+
type: "address",
|
|
20545
|
+
internalType: "address"
|
|
20546
|
+
},
|
|
20547
|
+
{
|
|
20548
|
+
name: "data",
|
|
20549
|
+
type: "bytes",
|
|
20550
|
+
internalType: "bytes"
|
|
20551
|
+
}
|
|
20552
|
+
]
|
|
20553
|
+
}
|
|
20554
|
+
],
|
|
20555
|
+
outputs: [],
|
|
20556
|
+
stateMutability: "nonpayable"
|
|
20557
|
+
},
|
|
20558
|
+
{
|
|
20559
|
+
type: "function",
|
|
20560
|
+
name: "setBotPermissions",
|
|
20561
|
+
inputs: [
|
|
20562
|
+
{
|
|
20563
|
+
name: "bot",
|
|
20564
|
+
type: "address",
|
|
20565
|
+
internalType: "address"
|
|
20566
|
+
},
|
|
20567
|
+
{
|
|
20568
|
+
name: "permissions",
|
|
20569
|
+
type: "uint192",
|
|
20570
|
+
internalType: "uint192"
|
|
20571
|
+
}
|
|
20572
|
+
],
|
|
20573
|
+
outputs: [],
|
|
20574
|
+
stateMutability: "nonpayable"
|
|
20575
|
+
},
|
|
20576
|
+
{
|
|
20577
|
+
type: "function",
|
|
20578
|
+
name: "setFullCheckParams",
|
|
20579
|
+
inputs: [
|
|
20580
|
+
{
|
|
20581
|
+
name: "collateralHints",
|
|
20582
|
+
type: "uint256[]",
|
|
20583
|
+
internalType: "uint256[]"
|
|
20584
|
+
},
|
|
20585
|
+
{
|
|
20586
|
+
name: "minHealthFactor",
|
|
20587
|
+
type: "uint16",
|
|
20588
|
+
internalType: "uint16"
|
|
20589
|
+
}
|
|
20590
|
+
],
|
|
20591
|
+
outputs: [],
|
|
20592
|
+
stateMutability: "nonpayable"
|
|
20593
|
+
},
|
|
20594
|
+
{
|
|
20595
|
+
type: "function",
|
|
20596
|
+
name: "storeExpectedBalances",
|
|
20597
|
+
inputs: [
|
|
20598
|
+
{
|
|
20599
|
+
name: "balanceDeltas",
|
|
20600
|
+
type: "tuple[]",
|
|
20601
|
+
internalType: "struct BalanceDelta[]",
|
|
20602
|
+
components: [
|
|
20603
|
+
{
|
|
20604
|
+
name: "token",
|
|
20605
|
+
type: "address",
|
|
20606
|
+
internalType: "address"
|
|
20607
|
+
},
|
|
20608
|
+
{
|
|
20609
|
+
name: "amount",
|
|
20610
|
+
type: "int256",
|
|
20611
|
+
internalType: "int256"
|
|
20612
|
+
}
|
|
20613
|
+
]
|
|
20614
|
+
}
|
|
20615
|
+
],
|
|
20616
|
+
outputs: [],
|
|
20617
|
+
stateMutability: "nonpayable"
|
|
20618
|
+
},
|
|
20619
|
+
{
|
|
20620
|
+
type: "function",
|
|
20621
|
+
name: "updateQuota",
|
|
20622
|
+
inputs: [
|
|
20623
|
+
{
|
|
20624
|
+
name: "token",
|
|
20625
|
+
type: "address",
|
|
20626
|
+
internalType: "address"
|
|
20627
|
+
},
|
|
20628
|
+
{
|
|
20629
|
+
name: "quotaChange",
|
|
20630
|
+
type: "int96",
|
|
20631
|
+
internalType: "int96"
|
|
20632
|
+
},
|
|
20633
|
+
{
|
|
20634
|
+
name: "minQuota",
|
|
20635
|
+
type: "uint96",
|
|
20636
|
+
internalType: "uint96"
|
|
20637
|
+
}
|
|
20638
|
+
],
|
|
20639
|
+
outputs: [],
|
|
20640
|
+
stateMutability: "nonpayable"
|
|
20641
|
+
},
|
|
20642
|
+
{
|
|
20643
|
+
type: "function",
|
|
20644
|
+
name: "withdrawCollateral",
|
|
20645
|
+
inputs: [
|
|
20646
|
+
{
|
|
20647
|
+
name: "token",
|
|
20648
|
+
type: "address",
|
|
20649
|
+
internalType: "address"
|
|
20650
|
+
},
|
|
20651
|
+
{
|
|
20652
|
+
name: "amount",
|
|
20653
|
+
type: "uint256",
|
|
20654
|
+
internalType: "uint256"
|
|
20655
|
+
},
|
|
20656
|
+
{
|
|
20657
|
+
name: "to",
|
|
20658
|
+
type: "address",
|
|
20659
|
+
internalType: "address"
|
|
20660
|
+
}
|
|
20661
|
+
],
|
|
20662
|
+
outputs: [],
|
|
20663
|
+
stateMutability: "nonpayable"
|
|
20664
|
+
}
|
|
20665
|
+
];
|
|
20666
|
+
var iMarketConfiguratorV310Abi = [
|
|
20667
|
+
{
|
|
20668
|
+
type: "function",
|
|
20669
|
+
name: "adapterFactory",
|
|
20670
|
+
inputs: [],
|
|
20671
|
+
outputs: [
|
|
20672
|
+
{
|
|
20673
|
+
name: "",
|
|
20674
|
+
type: "address",
|
|
20675
|
+
internalType: "address"
|
|
20676
|
+
}
|
|
20677
|
+
],
|
|
20678
|
+
stateMutability: "view"
|
|
20679
|
+
},
|
|
20680
|
+
{
|
|
20681
|
+
type: "function",
|
|
20682
|
+
name: "addressProvider",
|
|
20683
|
+
inputs: [],
|
|
20684
|
+
outputs: [
|
|
20685
|
+
{
|
|
20686
|
+
name: "",
|
|
20687
|
+
type: "address",
|
|
20688
|
+
internalType: "address"
|
|
20689
|
+
}
|
|
20690
|
+
],
|
|
20691
|
+
stateMutability: "view"
|
|
20692
|
+
},
|
|
20693
|
+
{
|
|
20694
|
+
type: "function",
|
|
20695
|
+
name: "contractType",
|
|
20696
|
+
inputs: [],
|
|
20697
|
+
outputs: [
|
|
20698
|
+
{
|
|
20699
|
+
name: "",
|
|
20700
|
+
type: "bytes32",
|
|
20701
|
+
internalType: "bytes32"
|
|
20702
|
+
}
|
|
20703
|
+
],
|
|
20704
|
+
stateMutability: "view"
|
|
20705
|
+
},
|
|
20706
|
+
{
|
|
20707
|
+
type: "function",
|
|
20708
|
+
name: "contractsRegister",
|
|
20709
|
+
inputs: [],
|
|
20710
|
+
outputs: [
|
|
20711
|
+
{
|
|
20712
|
+
name: "",
|
|
20713
|
+
type: "address",
|
|
20714
|
+
internalType: "address"
|
|
20715
|
+
}
|
|
20716
|
+
],
|
|
20717
|
+
stateMutability: "view"
|
|
20718
|
+
},
|
|
20719
|
+
{
|
|
20720
|
+
type: "function",
|
|
20721
|
+
name: "controller",
|
|
20722
|
+
inputs: [],
|
|
20723
|
+
outputs: [
|
|
20724
|
+
{
|
|
20725
|
+
name: "",
|
|
20726
|
+
type: "address",
|
|
20727
|
+
internalType: "address"
|
|
20728
|
+
}
|
|
20729
|
+
],
|
|
20730
|
+
stateMutability: "view"
|
|
20731
|
+
},
|
|
20732
|
+
{
|
|
20733
|
+
type: "function",
|
|
20734
|
+
name: "creditFactory",
|
|
20735
|
+
inputs: [],
|
|
20736
|
+
outputs: [
|
|
20737
|
+
{
|
|
20738
|
+
name: "",
|
|
20739
|
+
type: "address",
|
|
20740
|
+
internalType: "address"
|
|
20741
|
+
}
|
|
20742
|
+
],
|
|
20743
|
+
stateMutability: "view"
|
|
20744
|
+
},
|
|
20745
|
+
{
|
|
20746
|
+
type: "function",
|
|
20747
|
+
name: "interestModelFactory",
|
|
20748
|
+
inputs: [],
|
|
20749
|
+
outputs: [
|
|
20750
|
+
{
|
|
20751
|
+
name: "",
|
|
20752
|
+
type: "address",
|
|
20753
|
+
internalType: "address"
|
|
20754
|
+
}
|
|
20755
|
+
],
|
|
20756
|
+
stateMutability: "view"
|
|
20757
|
+
},
|
|
20758
|
+
{
|
|
20759
|
+
type: "function",
|
|
20760
|
+
name: "owner",
|
|
20761
|
+
inputs: [],
|
|
20762
|
+
outputs: [
|
|
20763
|
+
{
|
|
20764
|
+
name: "",
|
|
20765
|
+
type: "address",
|
|
20766
|
+
internalType: "address"
|
|
20767
|
+
}
|
|
20768
|
+
],
|
|
20769
|
+
stateMutability: "view"
|
|
20770
|
+
},
|
|
20771
|
+
{
|
|
20772
|
+
type: "function",
|
|
20773
|
+
name: "poolFactory",
|
|
20774
|
+
inputs: [],
|
|
20775
|
+
outputs: [
|
|
20776
|
+
{
|
|
20777
|
+
name: "",
|
|
20778
|
+
type: "address",
|
|
20779
|
+
internalType: "address"
|
|
20780
|
+
}
|
|
20781
|
+
],
|
|
20782
|
+
stateMutability: "view"
|
|
20783
|
+
},
|
|
20784
|
+
{
|
|
20785
|
+
type: "function",
|
|
20786
|
+
name: "pools",
|
|
20787
|
+
inputs: [],
|
|
20788
|
+
outputs: [
|
|
20789
|
+
{
|
|
20790
|
+
name: "",
|
|
20791
|
+
type: "address[]",
|
|
20792
|
+
internalType: "address[]"
|
|
20793
|
+
}
|
|
20794
|
+
],
|
|
20795
|
+
stateMutability: "view"
|
|
20796
|
+
},
|
|
20797
|
+
{
|
|
20798
|
+
type: "function",
|
|
20799
|
+
name: "priceOracleFactory",
|
|
20800
|
+
inputs: [],
|
|
20801
|
+
outputs: [
|
|
20802
|
+
{
|
|
20803
|
+
name: "",
|
|
20804
|
+
type: "address",
|
|
20805
|
+
internalType: "address"
|
|
20806
|
+
}
|
|
20807
|
+
],
|
|
20808
|
+
stateMutability: "view"
|
|
20809
|
+
},
|
|
20810
|
+
{
|
|
20811
|
+
type: "function",
|
|
20812
|
+
name: "treasury",
|
|
20813
|
+
inputs: [],
|
|
20814
|
+
outputs: [
|
|
20815
|
+
{
|
|
20816
|
+
name: "",
|
|
20817
|
+
type: "address",
|
|
20818
|
+
internalType: "address"
|
|
20819
|
+
}
|
|
20820
|
+
],
|
|
20821
|
+
stateMutability: "view"
|
|
20822
|
+
},
|
|
20823
|
+
{
|
|
20824
|
+
type: "function",
|
|
20825
|
+
name: "version",
|
|
20826
|
+
inputs: [],
|
|
20827
|
+
outputs: [
|
|
20828
|
+
{
|
|
20829
|
+
name: "",
|
|
20830
|
+
type: "uint256",
|
|
20831
|
+
internalType: "uint256"
|
|
20832
|
+
}
|
|
20833
|
+
],
|
|
20834
|
+
stateMutability: "view"
|
|
20835
|
+
},
|
|
20836
|
+
{
|
|
20837
|
+
type: "event",
|
|
20838
|
+
name: "CreateMarket",
|
|
20839
|
+
inputs: [
|
|
20840
|
+
{
|
|
20841
|
+
name: "pool",
|
|
20842
|
+
type: "address",
|
|
20843
|
+
indexed: true,
|
|
20844
|
+
internalType: "address"
|
|
20845
|
+
},
|
|
20846
|
+
{
|
|
20847
|
+
name: "underlying",
|
|
20848
|
+
type: "address",
|
|
20849
|
+
indexed: true,
|
|
20850
|
+
internalType: "address"
|
|
20851
|
+
},
|
|
20852
|
+
{
|
|
20853
|
+
name: "_name",
|
|
20854
|
+
type: "string",
|
|
20855
|
+
indexed: false,
|
|
20856
|
+
internalType: "string"
|
|
20857
|
+
},
|
|
20858
|
+
{
|
|
20859
|
+
name: "_symbol",
|
|
20860
|
+
type: "string",
|
|
20861
|
+
indexed: false,
|
|
20862
|
+
internalType: "string"
|
|
20863
|
+
}
|
|
20864
|
+
],
|
|
20865
|
+
anonymous: false
|
|
20866
|
+
},
|
|
20867
|
+
{
|
|
20868
|
+
type: "event",
|
|
20869
|
+
name: "DeployDegenNFT",
|
|
20870
|
+
inputs: [
|
|
20871
|
+
{
|
|
20872
|
+
name: "",
|
|
20873
|
+
type: "address",
|
|
20874
|
+
indexed: false,
|
|
20875
|
+
internalType: "address"
|
|
20876
|
+
}
|
|
20877
|
+
],
|
|
20878
|
+
anonymous: false
|
|
20879
|
+
},
|
|
20880
|
+
{
|
|
20881
|
+
type: "event",
|
|
20882
|
+
name: "RemoveMarket",
|
|
20883
|
+
inputs: [
|
|
20884
|
+
{
|
|
20885
|
+
name: "pool",
|
|
20886
|
+
type: "address",
|
|
20887
|
+
indexed: true,
|
|
20888
|
+
internalType: "address"
|
|
20889
|
+
}
|
|
20890
|
+
],
|
|
20891
|
+
anonymous: false
|
|
20892
|
+
},
|
|
20893
|
+
{
|
|
20894
|
+
type: "event",
|
|
20895
|
+
name: "SetName",
|
|
20896
|
+
inputs: [
|
|
20897
|
+
{
|
|
20898
|
+
name: "name",
|
|
20899
|
+
type: "string",
|
|
20900
|
+
indexed: false,
|
|
20901
|
+
internalType: "string"
|
|
20902
|
+
}
|
|
20903
|
+
],
|
|
20904
|
+
anonymous: false
|
|
20905
|
+
},
|
|
20906
|
+
{
|
|
20907
|
+
type: "event",
|
|
20908
|
+
name: "SetPriceFeedFromStore",
|
|
20909
|
+
inputs: [
|
|
20910
|
+
{
|
|
20911
|
+
name: "token",
|
|
20912
|
+
type: "address",
|
|
20913
|
+
indexed: true,
|
|
20914
|
+
internalType: "address"
|
|
20915
|
+
},
|
|
20916
|
+
{
|
|
20917
|
+
name: "priceFeed",
|
|
20918
|
+
type: "address",
|
|
20919
|
+
indexed: true,
|
|
20920
|
+
internalType: "address"
|
|
20921
|
+
},
|
|
20922
|
+
{
|
|
20923
|
+
name: "trusted",
|
|
20924
|
+
type: "bool",
|
|
20925
|
+
indexed: false,
|
|
20926
|
+
internalType: "bool"
|
|
20927
|
+
}
|
|
20928
|
+
],
|
|
20929
|
+
anonymous: false
|
|
20930
|
+
},
|
|
20931
|
+
{
|
|
20932
|
+
type: "event",
|
|
20933
|
+
name: "SetReservePriceFeedFromStore",
|
|
20934
|
+
inputs: [
|
|
20935
|
+
{
|
|
20936
|
+
name: "token",
|
|
20937
|
+
type: "address",
|
|
20938
|
+
indexed: true,
|
|
20939
|
+
internalType: "address"
|
|
20940
|
+
},
|
|
20941
|
+
{
|
|
20942
|
+
name: "priceFeedd",
|
|
20943
|
+
type: "address",
|
|
20944
|
+
indexed: true,
|
|
20945
|
+
internalType: "address"
|
|
20946
|
+
}
|
|
20947
|
+
],
|
|
20948
|
+
anonymous: false
|
|
20949
|
+
}
|
|
20950
|
+
];
|
|
20951
|
+
var iCreditConfiguratorV310Abi = [
|
|
20952
|
+
{
|
|
20953
|
+
type: "function",
|
|
20954
|
+
name: "acl",
|
|
20955
|
+
inputs: [],
|
|
20956
|
+
outputs: [
|
|
20957
|
+
{
|
|
20958
|
+
name: "",
|
|
20959
|
+
type: "address",
|
|
20960
|
+
internalType: "address"
|
|
20961
|
+
}
|
|
20962
|
+
],
|
|
20963
|
+
stateMutability: "view"
|
|
20964
|
+
},
|
|
20965
|
+
{
|
|
20966
|
+
type: "function",
|
|
20967
|
+
name: "addCollateralToken",
|
|
20968
|
+
inputs: [
|
|
20969
|
+
{
|
|
20970
|
+
name: "token",
|
|
20971
|
+
type: "address",
|
|
20972
|
+
internalType: "address"
|
|
20973
|
+
},
|
|
20974
|
+
{
|
|
20975
|
+
name: "liquidationThreshold",
|
|
20976
|
+
type: "uint16",
|
|
20977
|
+
internalType: "uint16"
|
|
20978
|
+
}
|
|
20979
|
+
],
|
|
20980
|
+
outputs: [],
|
|
20981
|
+
stateMutability: "nonpayable"
|
|
20982
|
+
},
|
|
20983
|
+
{
|
|
20984
|
+
type: "function",
|
|
20985
|
+
name: "addEmergencyLiquidator",
|
|
20986
|
+
inputs: [
|
|
20987
|
+
{
|
|
20988
|
+
name: "liquidator",
|
|
20989
|
+
type: "address",
|
|
20990
|
+
internalType: "address"
|
|
20991
|
+
}
|
|
20992
|
+
],
|
|
20993
|
+
outputs: [],
|
|
20994
|
+
stateMutability: "nonpayable"
|
|
20995
|
+
},
|
|
20996
|
+
{
|
|
20997
|
+
type: "function",
|
|
20998
|
+
name: "allowAdapter",
|
|
20999
|
+
inputs: [
|
|
21000
|
+
{
|
|
21001
|
+
name: "adapter",
|
|
21002
|
+
type: "address",
|
|
21003
|
+
internalType: "address"
|
|
21004
|
+
}
|
|
21005
|
+
],
|
|
21006
|
+
outputs: [],
|
|
21007
|
+
stateMutability: "nonpayable"
|
|
21008
|
+
},
|
|
21009
|
+
{
|
|
21010
|
+
type: "function",
|
|
21011
|
+
name: "allowToken",
|
|
21012
|
+
inputs: [
|
|
21013
|
+
{
|
|
21014
|
+
name: "token",
|
|
21015
|
+
type: "address",
|
|
21016
|
+
internalType: "address"
|
|
21017
|
+
}
|
|
21018
|
+
],
|
|
21019
|
+
outputs: [],
|
|
21020
|
+
stateMutability: "nonpayable"
|
|
21021
|
+
},
|
|
21022
|
+
{
|
|
21023
|
+
type: "function",
|
|
21024
|
+
name: "allowedAdapters",
|
|
21025
|
+
inputs: [],
|
|
21026
|
+
outputs: [
|
|
21027
|
+
{
|
|
21028
|
+
name: "",
|
|
21029
|
+
type: "address[]",
|
|
21030
|
+
internalType: "address[]"
|
|
21031
|
+
}
|
|
21032
|
+
],
|
|
21033
|
+
stateMutability: "view"
|
|
21034
|
+
},
|
|
21035
|
+
{
|
|
21036
|
+
type: "function",
|
|
21037
|
+
name: "contractType",
|
|
21038
|
+
inputs: [],
|
|
21039
|
+
outputs: [
|
|
21040
|
+
{
|
|
21041
|
+
name: "",
|
|
21042
|
+
type: "bytes32",
|
|
21043
|
+
internalType: "bytes32"
|
|
21044
|
+
}
|
|
21045
|
+
],
|
|
21046
|
+
stateMutability: "view"
|
|
21047
|
+
},
|
|
21048
|
+
{
|
|
21049
|
+
type: "function",
|
|
21050
|
+
name: "controller",
|
|
21051
|
+
inputs: [],
|
|
21052
|
+
outputs: [
|
|
18637
21053
|
{
|
|
18638
|
-
name: "
|
|
21054
|
+
name: "",
|
|
18639
21055
|
type: "address",
|
|
18640
21056
|
internalType: "address"
|
|
18641
|
-
},
|
|
18642
|
-
{
|
|
18643
|
-
name: "amount",
|
|
18644
|
-
type: "uint256",
|
|
18645
|
-
internalType: "uint256"
|
|
18646
21057
|
}
|
|
18647
21058
|
],
|
|
18648
|
-
|
|
18649
|
-
stateMutability: "nonpayable"
|
|
21059
|
+
stateMutability: "view"
|
|
18650
21060
|
},
|
|
18651
21061
|
{
|
|
18652
21062
|
type: "function",
|
|
18653
|
-
name: "
|
|
18654
|
-
inputs: [
|
|
21063
|
+
name: "creditFacade",
|
|
21064
|
+
inputs: [],
|
|
21065
|
+
outputs: [
|
|
18655
21066
|
{
|
|
18656
|
-
name: "
|
|
21067
|
+
name: "",
|
|
18657
21068
|
type: "address",
|
|
18658
21069
|
internalType: "address"
|
|
18659
|
-
}
|
|
18660
|
-
|
|
18661
|
-
|
|
18662
|
-
|
|
18663
|
-
|
|
18664
|
-
|
|
18665
|
-
|
|
18666
|
-
|
|
18667
|
-
|
|
18668
|
-
internalType: "uint256"
|
|
18669
|
-
},
|
|
18670
|
-
{
|
|
18671
|
-
name: "v",
|
|
18672
|
-
type: "uint8",
|
|
18673
|
-
internalType: "uint8"
|
|
18674
|
-
},
|
|
21070
|
+
}
|
|
21071
|
+
],
|
|
21072
|
+
stateMutability: "view"
|
|
21073
|
+
},
|
|
21074
|
+
{
|
|
21075
|
+
type: "function",
|
|
21076
|
+
name: "creditManager",
|
|
21077
|
+
inputs: [],
|
|
21078
|
+
outputs: [
|
|
18675
21079
|
{
|
|
18676
|
-
name: "
|
|
18677
|
-
type: "
|
|
18678
|
-
internalType: "
|
|
18679
|
-
}
|
|
21080
|
+
name: "",
|
|
21081
|
+
type: "address",
|
|
21082
|
+
internalType: "address"
|
|
21083
|
+
}
|
|
21084
|
+
],
|
|
21085
|
+
stateMutability: "view"
|
|
21086
|
+
},
|
|
21087
|
+
{
|
|
21088
|
+
type: "function",
|
|
21089
|
+
name: "forbidAdapter",
|
|
21090
|
+
inputs: [
|
|
18680
21091
|
{
|
|
18681
|
-
name: "
|
|
18682
|
-
type: "
|
|
18683
|
-
internalType: "
|
|
21092
|
+
name: "adapter",
|
|
21093
|
+
type: "address",
|
|
21094
|
+
internalType: "address"
|
|
18684
21095
|
}
|
|
18685
21096
|
],
|
|
18686
21097
|
outputs: [],
|
|
@@ -18688,19 +21099,19 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18688
21099
|
},
|
|
18689
21100
|
{
|
|
18690
21101
|
type: "function",
|
|
18691
|
-
name: "
|
|
21102
|
+
name: "forbidBorrowing",
|
|
18692
21103
|
inputs: [],
|
|
18693
21104
|
outputs: [],
|
|
18694
21105
|
stateMutability: "nonpayable"
|
|
18695
21106
|
},
|
|
18696
21107
|
{
|
|
18697
21108
|
type: "function",
|
|
18698
|
-
name: "
|
|
21109
|
+
name: "forbidToken",
|
|
18699
21110
|
inputs: [
|
|
18700
21111
|
{
|
|
18701
|
-
name: "
|
|
18702
|
-
type: "
|
|
18703
|
-
internalType: "
|
|
21112
|
+
name: "token",
|
|
21113
|
+
type: "address",
|
|
21114
|
+
internalType: "address"
|
|
18704
21115
|
}
|
|
18705
21116
|
],
|
|
18706
21117
|
outputs: [],
|
|
@@ -18708,12 +21119,27 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18708
21119
|
},
|
|
18709
21120
|
{
|
|
18710
21121
|
type: "function",
|
|
18711
|
-
name: "
|
|
21122
|
+
name: "rampLiquidationThreshold",
|
|
18712
21123
|
inputs: [
|
|
18713
21124
|
{
|
|
18714
|
-
name: "
|
|
18715
|
-
type: "
|
|
18716
|
-
internalType: "
|
|
21125
|
+
name: "token",
|
|
21126
|
+
type: "address",
|
|
21127
|
+
internalType: "address"
|
|
21128
|
+
},
|
|
21129
|
+
{
|
|
21130
|
+
name: "liquidationThresholdFinal",
|
|
21131
|
+
type: "uint16",
|
|
21132
|
+
internalType: "uint16"
|
|
21133
|
+
},
|
|
21134
|
+
{
|
|
21135
|
+
name: "rampStart",
|
|
21136
|
+
type: "uint40",
|
|
21137
|
+
internalType: "uint40"
|
|
21138
|
+
},
|
|
21139
|
+
{
|
|
21140
|
+
name: "rampDuration",
|
|
21141
|
+
type: "uint24",
|
|
21142
|
+
internalType: "uint24"
|
|
18717
21143
|
}
|
|
18718
21144
|
],
|
|
18719
21145
|
outputs: [],
|
|
@@ -18721,24 +21147,12 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18721
21147
|
},
|
|
18722
21148
|
{
|
|
18723
21149
|
type: "function",
|
|
18724
|
-
name: "
|
|
21150
|
+
name: "removeEmergencyLiquidator",
|
|
18725
21151
|
inputs: [
|
|
18726
21152
|
{
|
|
18727
|
-
name: "
|
|
18728
|
-
type: "
|
|
18729
|
-
internalType: "
|
|
18730
|
-
components: [
|
|
18731
|
-
{
|
|
18732
|
-
name: "priceFeed",
|
|
18733
|
-
type: "address",
|
|
18734
|
-
internalType: "address"
|
|
18735
|
-
},
|
|
18736
|
-
{
|
|
18737
|
-
name: "data",
|
|
18738
|
-
type: "bytes",
|
|
18739
|
-
internalType: "bytes"
|
|
18740
|
-
}
|
|
18741
|
-
]
|
|
21153
|
+
name: "liquidator",
|
|
21154
|
+
type: "address",
|
|
21155
|
+
internalType: "address"
|
|
18742
21156
|
}
|
|
18743
21157
|
],
|
|
18744
21158
|
outputs: [],
|
|
@@ -18746,17 +21160,30 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18746
21160
|
},
|
|
18747
21161
|
{
|
|
18748
21162
|
type: "function",
|
|
18749
|
-
name: "
|
|
21163
|
+
name: "setController",
|
|
18750
21164
|
inputs: [
|
|
18751
21165
|
{
|
|
18752
|
-
name: "
|
|
21166
|
+
name: "",
|
|
21167
|
+
type: "address",
|
|
21168
|
+
internalType: "address"
|
|
21169
|
+
}
|
|
21170
|
+
],
|
|
21171
|
+
outputs: [],
|
|
21172
|
+
stateMutability: "nonpayable"
|
|
21173
|
+
},
|
|
21174
|
+
{
|
|
21175
|
+
type: "function",
|
|
21176
|
+
name: "setCreditFacade",
|
|
21177
|
+
inputs: [
|
|
21178
|
+
{
|
|
21179
|
+
name: "newCreditFacade",
|
|
18753
21180
|
type: "address",
|
|
18754
21181
|
internalType: "address"
|
|
18755
21182
|
},
|
|
18756
21183
|
{
|
|
18757
|
-
name: "
|
|
18758
|
-
type: "
|
|
18759
|
-
internalType: "
|
|
21184
|
+
name: "migrateParams",
|
|
21185
|
+
type: "bool",
|
|
21186
|
+
internalType: "bool"
|
|
18760
21187
|
}
|
|
18761
21188
|
],
|
|
18762
21189
|
outputs: [],
|
|
@@ -18764,17 +21191,17 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18764
21191
|
},
|
|
18765
21192
|
{
|
|
18766
21193
|
type: "function",
|
|
18767
|
-
name: "
|
|
21194
|
+
name: "setDebtLimits",
|
|
18768
21195
|
inputs: [
|
|
18769
21196
|
{
|
|
18770
|
-
name: "
|
|
18771
|
-
type: "
|
|
18772
|
-
internalType: "
|
|
21197
|
+
name: "newMinDebt",
|
|
21198
|
+
type: "uint128",
|
|
21199
|
+
internalType: "uint128"
|
|
18773
21200
|
},
|
|
18774
21201
|
{
|
|
18775
|
-
name: "
|
|
18776
|
-
type: "
|
|
18777
|
-
internalType: "
|
|
21202
|
+
name: "newMaxDebt",
|
|
21203
|
+
type: "uint128",
|
|
21204
|
+
internalType: "uint128"
|
|
18778
21205
|
}
|
|
18779
21206
|
],
|
|
18780
21207
|
outputs: [],
|
|
@@ -18782,24 +21209,12 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18782
21209
|
},
|
|
18783
21210
|
{
|
|
18784
21211
|
type: "function",
|
|
18785
|
-
name: "
|
|
21212
|
+
name: "setExpirationDate",
|
|
18786
21213
|
inputs: [
|
|
18787
21214
|
{
|
|
18788
|
-
name: "
|
|
18789
|
-
type: "
|
|
18790
|
-
internalType: "
|
|
18791
|
-
components: [
|
|
18792
|
-
{
|
|
18793
|
-
name: "token",
|
|
18794
|
-
type: "address",
|
|
18795
|
-
internalType: "address"
|
|
18796
|
-
},
|
|
18797
|
-
{
|
|
18798
|
-
name: "amount",
|
|
18799
|
-
type: "int256",
|
|
18800
|
-
internalType: "int256"
|
|
18801
|
-
}
|
|
18802
|
-
]
|
|
21215
|
+
name: "newExpirationDate",
|
|
21216
|
+
type: "uint40",
|
|
21217
|
+
internalType: "uint40"
|
|
18803
21218
|
}
|
|
18804
21219
|
],
|
|
18805
21220
|
outputs: [],
|
|
@@ -18807,22 +21222,27 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18807
21222
|
},
|
|
18808
21223
|
{
|
|
18809
21224
|
type: "function",
|
|
18810
|
-
name: "
|
|
21225
|
+
name: "setFees",
|
|
18811
21226
|
inputs: [
|
|
18812
21227
|
{
|
|
18813
|
-
name: "
|
|
18814
|
-
type: "
|
|
18815
|
-
internalType: "
|
|
21228
|
+
name: "feeLiquidation",
|
|
21229
|
+
type: "uint16",
|
|
21230
|
+
internalType: "uint16"
|
|
18816
21231
|
},
|
|
18817
21232
|
{
|
|
18818
|
-
name: "
|
|
18819
|
-
type: "
|
|
18820
|
-
internalType: "
|
|
21233
|
+
name: "liquidationPremium",
|
|
21234
|
+
type: "uint16",
|
|
21235
|
+
internalType: "uint16"
|
|
18821
21236
|
},
|
|
18822
21237
|
{
|
|
18823
|
-
name: "
|
|
18824
|
-
type: "
|
|
18825
|
-
internalType: "
|
|
21238
|
+
name: "feeLiquidationExpired",
|
|
21239
|
+
type: "uint16",
|
|
21240
|
+
internalType: "uint16"
|
|
21241
|
+
},
|
|
21242
|
+
{
|
|
21243
|
+
name: "liquidationPremiumExpired",
|
|
21244
|
+
type: "uint16",
|
|
21245
|
+
internalType: "uint16"
|
|
18826
21246
|
}
|
|
18827
21247
|
],
|
|
18828
21248
|
outputs: [],
|
|
@@ -18830,7 +21250,7 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18830
21250
|
},
|
|
18831
21251
|
{
|
|
18832
21252
|
type: "function",
|
|
18833
|
-
name: "
|
|
21253
|
+
name: "setLiquidationThreshold",
|
|
18834
21254
|
inputs: [
|
|
18835
21255
|
{
|
|
18836
21256
|
name: "token",
|
|
@@ -18838,63 +21258,56 @@ var iCreditFacadeV310MulticallAbi = [
|
|
|
18838
21258
|
internalType: "address"
|
|
18839
21259
|
},
|
|
18840
21260
|
{
|
|
18841
|
-
name: "
|
|
18842
|
-
type: "
|
|
18843
|
-
internalType: "
|
|
18844
|
-
},
|
|
18845
|
-
{
|
|
18846
|
-
name: "to",
|
|
18847
|
-
type: "address",
|
|
18848
|
-
internalType: "address"
|
|
21261
|
+
name: "liquidationThreshold",
|
|
21262
|
+
type: "uint16",
|
|
21263
|
+
internalType: "uint16"
|
|
18849
21264
|
}
|
|
18850
21265
|
],
|
|
18851
21266
|
outputs: [],
|
|
18852
21267
|
stateMutability: "nonpayable"
|
|
18853
|
-
}
|
|
18854
|
-
];
|
|
18855
|
-
var iMarketConfiguratorV310Abi = [
|
|
21268
|
+
},
|
|
18856
21269
|
{
|
|
18857
21270
|
type: "function",
|
|
18858
|
-
name: "
|
|
18859
|
-
inputs: [
|
|
18860
|
-
outputs: [
|
|
21271
|
+
name: "setLossLiquidator",
|
|
21272
|
+
inputs: [
|
|
18861
21273
|
{
|
|
18862
|
-
name: "",
|
|
21274
|
+
name: "newLossLiquidator",
|
|
18863
21275
|
type: "address",
|
|
18864
21276
|
internalType: "address"
|
|
18865
21277
|
}
|
|
18866
21278
|
],
|
|
18867
|
-
|
|
21279
|
+
outputs: [],
|
|
21280
|
+
stateMutability: "nonpayable"
|
|
18868
21281
|
},
|
|
18869
21282
|
{
|
|
18870
21283
|
type: "function",
|
|
18871
|
-
name: "
|
|
18872
|
-
inputs: [
|
|
18873
|
-
outputs: [
|
|
21284
|
+
name: "setMaxDebtPerBlockMultiplier",
|
|
21285
|
+
inputs: [
|
|
18874
21286
|
{
|
|
18875
|
-
name: "",
|
|
18876
|
-
type: "
|
|
18877
|
-
internalType: "
|
|
21287
|
+
name: "newMaxDebtLimitPerBlockMultiplier",
|
|
21288
|
+
type: "uint8",
|
|
21289
|
+
internalType: "uint8"
|
|
18878
21290
|
}
|
|
18879
21291
|
],
|
|
18880
|
-
|
|
21292
|
+
outputs: [],
|
|
21293
|
+
stateMutability: "nonpayable"
|
|
18881
21294
|
},
|
|
18882
21295
|
{
|
|
18883
21296
|
type: "function",
|
|
18884
|
-
name: "
|
|
18885
|
-
inputs: [
|
|
18886
|
-
outputs: [
|
|
21297
|
+
name: "setPriceOracle",
|
|
21298
|
+
inputs: [
|
|
18887
21299
|
{
|
|
18888
|
-
name: "",
|
|
18889
|
-
type: "
|
|
18890
|
-
internalType: "
|
|
21300
|
+
name: "newPriceOracle",
|
|
21301
|
+
type: "address",
|
|
21302
|
+
internalType: "address"
|
|
18891
21303
|
}
|
|
18892
21304
|
],
|
|
18893
|
-
|
|
21305
|
+
outputs: [],
|
|
21306
|
+
stateMutability: "nonpayable"
|
|
18894
21307
|
},
|
|
18895
21308
|
{
|
|
18896
21309
|
type: "function",
|
|
18897
|
-
name: "
|
|
21310
|
+
name: "underlying",
|
|
18898
21311
|
inputs: [],
|
|
18899
21312
|
outputs: [
|
|
18900
21313
|
{
|
|
@@ -18907,171 +21320,221 @@ var iMarketConfiguratorV310Abi = [
|
|
|
18907
21320
|
},
|
|
18908
21321
|
{
|
|
18909
21322
|
type: "function",
|
|
18910
|
-
name: "
|
|
18911
|
-
inputs: [
|
|
18912
|
-
outputs: [
|
|
21323
|
+
name: "upgradeCreditConfigurator",
|
|
21324
|
+
inputs: [
|
|
18913
21325
|
{
|
|
18914
|
-
name: "",
|
|
21326
|
+
name: "newCreditConfigurator",
|
|
18915
21327
|
type: "address",
|
|
18916
21328
|
internalType: "address"
|
|
18917
21329
|
}
|
|
18918
21330
|
],
|
|
18919
|
-
|
|
21331
|
+
outputs: [],
|
|
21332
|
+
stateMutability: "nonpayable"
|
|
18920
21333
|
},
|
|
18921
21334
|
{
|
|
18922
21335
|
type: "function",
|
|
18923
|
-
name: "
|
|
21336
|
+
name: "version",
|
|
18924
21337
|
inputs: [],
|
|
18925
21338
|
outputs: [
|
|
18926
21339
|
{
|
|
18927
21340
|
name: "",
|
|
21341
|
+
type: "uint256",
|
|
21342
|
+
internalType: "uint256"
|
|
21343
|
+
}
|
|
21344
|
+
],
|
|
21345
|
+
stateMutability: "view"
|
|
21346
|
+
},
|
|
21347
|
+
{
|
|
21348
|
+
type: "event",
|
|
21349
|
+
name: "AddCollateralToken",
|
|
21350
|
+
inputs: [
|
|
21351
|
+
{
|
|
21352
|
+
name: "token",
|
|
18928
21353
|
type: "address",
|
|
21354
|
+
indexed: true,
|
|
18929
21355
|
internalType: "address"
|
|
18930
21356
|
}
|
|
18931
21357
|
],
|
|
18932
|
-
|
|
21358
|
+
anonymous: false
|
|
18933
21359
|
},
|
|
18934
21360
|
{
|
|
18935
|
-
type: "
|
|
18936
|
-
name: "
|
|
18937
|
-
inputs: [
|
|
18938
|
-
outputs: [
|
|
21361
|
+
type: "event",
|
|
21362
|
+
name: "AddEmergencyLiquidator",
|
|
21363
|
+
inputs: [
|
|
18939
21364
|
{
|
|
18940
|
-
name: "",
|
|
21365
|
+
name: "liquidator",
|
|
18941
21366
|
type: "address",
|
|
21367
|
+
indexed: true,
|
|
18942
21368
|
internalType: "address"
|
|
18943
21369
|
}
|
|
18944
21370
|
],
|
|
18945
|
-
|
|
21371
|
+
anonymous: false
|
|
18946
21372
|
},
|
|
18947
21373
|
{
|
|
18948
|
-
type: "
|
|
18949
|
-
name: "
|
|
18950
|
-
inputs: [
|
|
18951
|
-
outputs: [
|
|
21374
|
+
type: "event",
|
|
21375
|
+
name: "AllowAdapter",
|
|
21376
|
+
inputs: [
|
|
18952
21377
|
{
|
|
18953
|
-
name: "",
|
|
21378
|
+
name: "targetContract",
|
|
21379
|
+
type: "address",
|
|
21380
|
+
indexed: true,
|
|
21381
|
+
internalType: "address"
|
|
21382
|
+
},
|
|
21383
|
+
{
|
|
21384
|
+
name: "adapter",
|
|
18954
21385
|
type: "address",
|
|
21386
|
+
indexed: true,
|
|
18955
21387
|
internalType: "address"
|
|
18956
21388
|
}
|
|
18957
21389
|
],
|
|
18958
|
-
|
|
21390
|
+
anonymous: false
|
|
18959
21391
|
},
|
|
18960
21392
|
{
|
|
18961
|
-
type: "
|
|
18962
|
-
name: "
|
|
18963
|
-
inputs: [
|
|
18964
|
-
outputs: [
|
|
21393
|
+
type: "event",
|
|
21394
|
+
name: "AllowToken",
|
|
21395
|
+
inputs: [
|
|
18965
21396
|
{
|
|
18966
|
-
name: "",
|
|
21397
|
+
name: "token",
|
|
18967
21398
|
type: "address",
|
|
21399
|
+
indexed: true,
|
|
18968
21400
|
internalType: "address"
|
|
18969
21401
|
}
|
|
18970
21402
|
],
|
|
18971
|
-
|
|
21403
|
+
anonymous: false
|
|
18972
21404
|
},
|
|
18973
21405
|
{
|
|
18974
|
-
type: "
|
|
18975
|
-
name: "
|
|
18976
|
-
inputs: [
|
|
18977
|
-
outputs: [
|
|
21406
|
+
type: "event",
|
|
21407
|
+
name: "CreditConfiguratorUpgraded",
|
|
21408
|
+
inputs: [
|
|
18978
21409
|
{
|
|
18979
|
-
name: "",
|
|
18980
|
-
type: "address
|
|
18981
|
-
|
|
21410
|
+
name: "creditConfigurator",
|
|
21411
|
+
type: "address",
|
|
21412
|
+
indexed: true,
|
|
21413
|
+
internalType: "address"
|
|
18982
21414
|
}
|
|
18983
21415
|
],
|
|
18984
|
-
|
|
21416
|
+
anonymous: false
|
|
18985
21417
|
},
|
|
18986
21418
|
{
|
|
18987
|
-
type: "
|
|
18988
|
-
name: "
|
|
18989
|
-
inputs: [
|
|
18990
|
-
outputs: [
|
|
21419
|
+
type: "event",
|
|
21420
|
+
name: "ForbidAdapter",
|
|
21421
|
+
inputs: [
|
|
18991
21422
|
{
|
|
18992
|
-
name: "",
|
|
21423
|
+
name: "targetContract",
|
|
21424
|
+
type: "address",
|
|
21425
|
+
indexed: true,
|
|
21426
|
+
internalType: "address"
|
|
21427
|
+
},
|
|
21428
|
+
{
|
|
21429
|
+
name: "adapter",
|
|
18993
21430
|
type: "address",
|
|
21431
|
+
indexed: true,
|
|
18994
21432
|
internalType: "address"
|
|
18995
21433
|
}
|
|
18996
21434
|
],
|
|
18997
|
-
|
|
21435
|
+
anonymous: false
|
|
18998
21436
|
},
|
|
18999
21437
|
{
|
|
19000
|
-
type: "
|
|
19001
|
-
name: "
|
|
19002
|
-
inputs: [
|
|
19003
|
-
outputs: [
|
|
21438
|
+
type: "event",
|
|
21439
|
+
name: "ForbidToken",
|
|
21440
|
+
inputs: [
|
|
19004
21441
|
{
|
|
19005
|
-
name: "",
|
|
21442
|
+
name: "token",
|
|
19006
21443
|
type: "address",
|
|
21444
|
+
indexed: true,
|
|
19007
21445
|
internalType: "address"
|
|
19008
21446
|
}
|
|
19009
21447
|
],
|
|
19010
|
-
|
|
21448
|
+
anonymous: false
|
|
19011
21449
|
},
|
|
19012
21450
|
{
|
|
19013
|
-
type: "
|
|
19014
|
-
name: "
|
|
19015
|
-
inputs: [
|
|
19016
|
-
outputs: [
|
|
21451
|
+
type: "event",
|
|
21452
|
+
name: "NewController",
|
|
21453
|
+
inputs: [
|
|
19017
21454
|
{
|
|
19018
|
-
name: "",
|
|
19019
|
-
type: "
|
|
19020
|
-
|
|
21455
|
+
name: "newController",
|
|
21456
|
+
type: "address",
|
|
21457
|
+
indexed: true,
|
|
21458
|
+
internalType: "address"
|
|
19021
21459
|
}
|
|
19022
21460
|
],
|
|
19023
|
-
|
|
21461
|
+
anonymous: false
|
|
19024
21462
|
},
|
|
19025
21463
|
{
|
|
19026
21464
|
type: "event",
|
|
19027
|
-
name: "
|
|
21465
|
+
name: "RemoveEmergencyLiquidator",
|
|
19028
21466
|
inputs: [
|
|
19029
21467
|
{
|
|
19030
|
-
name: "
|
|
21468
|
+
name: "liquidator",
|
|
19031
21469
|
type: "address",
|
|
19032
21470
|
indexed: true,
|
|
19033
21471
|
internalType: "address"
|
|
19034
|
-
}
|
|
21472
|
+
}
|
|
21473
|
+
],
|
|
21474
|
+
anonymous: false
|
|
21475
|
+
},
|
|
21476
|
+
{
|
|
21477
|
+
type: "event",
|
|
21478
|
+
name: "ScheduleTokenLiquidationThresholdRamp",
|
|
21479
|
+
inputs: [
|
|
19035
21480
|
{
|
|
19036
|
-
name: "
|
|
21481
|
+
name: "token",
|
|
19037
21482
|
type: "address",
|
|
19038
21483
|
indexed: true,
|
|
19039
21484
|
internalType: "address"
|
|
19040
21485
|
},
|
|
19041
21486
|
{
|
|
19042
|
-
name: "
|
|
19043
|
-
type: "
|
|
21487
|
+
name: "liquidationThresholdInitial",
|
|
21488
|
+
type: "uint16",
|
|
19044
21489
|
indexed: false,
|
|
19045
|
-
internalType: "
|
|
21490
|
+
internalType: "uint16"
|
|
19046
21491
|
},
|
|
19047
21492
|
{
|
|
19048
|
-
name: "
|
|
19049
|
-
type: "
|
|
21493
|
+
name: "liquidationThresholdFinal",
|
|
21494
|
+
type: "uint16",
|
|
19050
21495
|
indexed: false,
|
|
19051
|
-
internalType: "
|
|
21496
|
+
internalType: "uint16"
|
|
21497
|
+
},
|
|
21498
|
+
{
|
|
21499
|
+
name: "timestampRampStart",
|
|
21500
|
+
type: "uint40",
|
|
21501
|
+
indexed: false,
|
|
21502
|
+
internalType: "uint40"
|
|
21503
|
+
},
|
|
21504
|
+
{
|
|
21505
|
+
name: "timestampRampEnd",
|
|
21506
|
+
type: "uint40",
|
|
21507
|
+
indexed: false,
|
|
21508
|
+
internalType: "uint40"
|
|
19052
21509
|
}
|
|
19053
21510
|
],
|
|
19054
21511
|
anonymous: false
|
|
19055
21512
|
},
|
|
19056
21513
|
{
|
|
19057
21514
|
type: "event",
|
|
19058
|
-
name: "
|
|
21515
|
+
name: "SetBorrowingLimits",
|
|
19059
21516
|
inputs: [
|
|
19060
21517
|
{
|
|
19061
|
-
name: "",
|
|
19062
|
-
type: "
|
|
21518
|
+
name: "minDebt",
|
|
21519
|
+
type: "uint256",
|
|
19063
21520
|
indexed: false,
|
|
19064
|
-
internalType: "
|
|
21521
|
+
internalType: "uint256"
|
|
21522
|
+
},
|
|
21523
|
+
{
|
|
21524
|
+
name: "maxDebt",
|
|
21525
|
+
type: "uint256",
|
|
21526
|
+
indexed: false,
|
|
21527
|
+
internalType: "uint256"
|
|
19065
21528
|
}
|
|
19066
21529
|
],
|
|
19067
21530
|
anonymous: false
|
|
19068
21531
|
},
|
|
19069
21532
|
{
|
|
19070
21533
|
type: "event",
|
|
19071
|
-
name: "
|
|
21534
|
+
name: "SetCreditFacade",
|
|
19072
21535
|
inputs: [
|
|
19073
21536
|
{
|
|
19074
|
-
name: "
|
|
21537
|
+
name: "creditFacade",
|
|
19075
21538
|
type: "address",
|
|
19076
21539
|
indexed: true,
|
|
19077
21540
|
internalType: "address"
|
|
@@ -19081,45 +21544,59 @@ var iMarketConfiguratorV310Abi = [
|
|
|
19081
21544
|
},
|
|
19082
21545
|
{
|
|
19083
21546
|
type: "event",
|
|
19084
|
-
name: "
|
|
21547
|
+
name: "SetExpirationDate",
|
|
19085
21548
|
inputs: [
|
|
19086
21549
|
{
|
|
19087
|
-
name: "
|
|
19088
|
-
type: "
|
|
21550
|
+
name: "expirationDate",
|
|
21551
|
+
type: "uint40",
|
|
19089
21552
|
indexed: false,
|
|
19090
|
-
internalType: "
|
|
21553
|
+
internalType: "uint40"
|
|
19091
21554
|
}
|
|
19092
21555
|
],
|
|
19093
21556
|
anonymous: false
|
|
19094
21557
|
},
|
|
19095
21558
|
{
|
|
19096
21559
|
type: "event",
|
|
19097
|
-
name: "
|
|
21560
|
+
name: "SetLossLiquidator",
|
|
19098
21561
|
inputs: [
|
|
19099
21562
|
{
|
|
19100
|
-
name: "
|
|
21563
|
+
name: "liquidator",
|
|
19101
21564
|
type: "address",
|
|
19102
21565
|
indexed: true,
|
|
19103
21566
|
internalType: "address"
|
|
19104
|
-
}
|
|
21567
|
+
}
|
|
21568
|
+
],
|
|
21569
|
+
anonymous: false
|
|
21570
|
+
},
|
|
21571
|
+
{
|
|
21572
|
+
type: "event",
|
|
21573
|
+
name: "SetMaxDebtPerBlockMultiplier",
|
|
21574
|
+
inputs: [
|
|
19105
21575
|
{
|
|
19106
|
-
name: "
|
|
21576
|
+
name: "maxDebtPerBlockMultiplier",
|
|
21577
|
+
type: "uint8",
|
|
21578
|
+
indexed: false,
|
|
21579
|
+
internalType: "uint8"
|
|
21580
|
+
}
|
|
21581
|
+
],
|
|
21582
|
+
anonymous: false
|
|
21583
|
+
},
|
|
21584
|
+
{
|
|
21585
|
+
type: "event",
|
|
21586
|
+
name: "SetPriceOracle",
|
|
21587
|
+
inputs: [
|
|
21588
|
+
{
|
|
21589
|
+
name: "priceOracle",
|
|
19107
21590
|
type: "address",
|
|
19108
21591
|
indexed: true,
|
|
19109
21592
|
internalType: "address"
|
|
19110
|
-
},
|
|
19111
|
-
{
|
|
19112
|
-
name: "trusted",
|
|
19113
|
-
type: "bool",
|
|
19114
|
-
indexed: false,
|
|
19115
|
-
internalType: "bool"
|
|
19116
21593
|
}
|
|
19117
21594
|
],
|
|
19118
21595
|
anonymous: false
|
|
19119
21596
|
},
|
|
19120
21597
|
{
|
|
19121
21598
|
type: "event",
|
|
19122
|
-
name: "
|
|
21599
|
+
name: "SetTokenLiquidationThreshold",
|
|
19123
21600
|
inputs: [
|
|
19124
21601
|
{
|
|
19125
21602
|
name: "token",
|
|
@@ -19128,10 +21605,41 @@ var iMarketConfiguratorV310Abi = [
|
|
|
19128
21605
|
internalType: "address"
|
|
19129
21606
|
},
|
|
19130
21607
|
{
|
|
19131
|
-
name: "
|
|
19132
|
-
type: "
|
|
19133
|
-
indexed:
|
|
19134
|
-
internalType: "
|
|
21608
|
+
name: "liquidationThreshold",
|
|
21609
|
+
type: "uint16",
|
|
21610
|
+
indexed: false,
|
|
21611
|
+
internalType: "uint16"
|
|
21612
|
+
}
|
|
21613
|
+
],
|
|
21614
|
+
anonymous: false
|
|
21615
|
+
},
|
|
21616
|
+
{
|
|
21617
|
+
type: "event",
|
|
21618
|
+
name: "UpdateFees",
|
|
21619
|
+
inputs: [
|
|
21620
|
+
{
|
|
21621
|
+
name: "feeLiquidation",
|
|
21622
|
+
type: "uint16",
|
|
21623
|
+
indexed: false,
|
|
21624
|
+
internalType: "uint16"
|
|
21625
|
+
},
|
|
21626
|
+
{
|
|
21627
|
+
name: "liquidationPremium",
|
|
21628
|
+
type: "uint16",
|
|
21629
|
+
indexed: false,
|
|
21630
|
+
internalType: "uint16"
|
|
21631
|
+
},
|
|
21632
|
+
{
|
|
21633
|
+
name: "feeLiquidationExpired",
|
|
21634
|
+
type: "uint16",
|
|
21635
|
+
indexed: false,
|
|
21636
|
+
internalType: "uint16"
|
|
21637
|
+
},
|
|
21638
|
+
{
|
|
21639
|
+
name: "liquidationPremiumExpired",
|
|
21640
|
+
type: "uint16",
|
|
21641
|
+
indexed: false,
|
|
21642
|
+
internalType: "uint16"
|
|
19135
21643
|
}
|
|
19136
21644
|
],
|
|
19137
21645
|
anonymous: false
|
|
@@ -19389,12 +21897,12 @@ var json_parse = (s) => {
|
|
|
19389
21897
|
function createRawTx(to, parameters, description) {
|
|
19390
21898
|
const { args } = parameters;
|
|
19391
21899
|
const fname = parameters.functionName;
|
|
19392
|
-
const { abi:
|
|
21900
|
+
const { abi: abi26, functionName } = (() => {
|
|
19393
21901
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
19394
21902
|
return parameters;
|
|
19395
21903
|
return viem.prepareEncodeFunctionData(parameters);
|
|
19396
21904
|
})();
|
|
19397
|
-
const abiItem =
|
|
21905
|
+
const abiItem = abi26[0];
|
|
19398
21906
|
const signature = functionName;
|
|
19399
21907
|
const data = "inputs" in abiItem && abiItem.inputs ? viem.encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
|
|
19400
21908
|
const functionEncodedData = viem.concatHex([signature, data ?? "0x"]);
|
|
@@ -20131,15 +22639,16 @@ function createAdapter(sdk, args) {
|
|
|
20131
22639
|
}
|
|
20132
22640
|
}
|
|
20133
22641
|
|
|
20134
|
-
// src/sdk/market/
|
|
20135
|
-
var
|
|
22642
|
+
// src/sdk/market/CreditConfiguratorV300Contract.ts
|
|
22643
|
+
var abi18 = creditConfiguratorV3Abi;
|
|
22644
|
+
var CreditConfiguratorV300Contract = class extends BaseContract {
|
|
20136
22645
|
adapters = [];
|
|
20137
22646
|
isPaused = false;
|
|
20138
22647
|
constructor(sdk, { creditConfigurator, creditManager }) {
|
|
20139
22648
|
super(sdk, {
|
|
20140
22649
|
...creditConfigurator.baseParams,
|
|
20141
22650
|
name: `CreditConfigurator(${creditManager.name})`,
|
|
20142
|
-
abi:
|
|
22651
|
+
abi: abi18
|
|
20143
22652
|
});
|
|
20144
22653
|
}
|
|
20145
22654
|
processLog(log) {
|
|
@@ -20238,7 +22747,103 @@ var CreditConfiguratorContract = class extends BaseContract {
|
|
|
20238
22747
|
}
|
|
20239
22748
|
}
|
|
20240
22749
|
};
|
|
20241
|
-
|
|
22750
|
+
|
|
22751
|
+
// src/sdk/market/CreditConfiguratorV310Contract.ts
|
|
22752
|
+
var abi19 = iCreditConfiguratorV310Abi;
|
|
22753
|
+
var CreditConfiguratorV310Contract = class extends BaseContract {
|
|
22754
|
+
adapters = [];
|
|
22755
|
+
isPaused = false;
|
|
22756
|
+
constructor(sdk, { creditConfigurator, creditManager }) {
|
|
22757
|
+
super(sdk, {
|
|
22758
|
+
...creditConfigurator.baseParams,
|
|
22759
|
+
name: `CreditConfigurator(${creditManager.name})`,
|
|
22760
|
+
abi: abi19
|
|
22761
|
+
});
|
|
22762
|
+
}
|
|
22763
|
+
processLog(log) {
|
|
22764
|
+
switch (log.eventName) {
|
|
22765
|
+
case "AddCollateralToken":
|
|
22766
|
+
case "AddEmergencyLiquidator":
|
|
22767
|
+
case "AllowAdapter":
|
|
22768
|
+
case "AllowToken":
|
|
22769
|
+
case "CreditConfiguratorUpgraded":
|
|
22770
|
+
case "ForbidAdapter":
|
|
22771
|
+
case "ForbidToken":
|
|
22772
|
+
case "NewController":
|
|
22773
|
+
case "RemoveEmergencyLiquidator":
|
|
22774
|
+
case "ScheduleTokenLiquidationThresholdRamp":
|
|
22775
|
+
case "SetBorrowingLimits":
|
|
22776
|
+
case "SetCreditFacade":
|
|
22777
|
+
case "SetExpirationDate":
|
|
22778
|
+
case "SetLossLiquidator":
|
|
22779
|
+
case "SetMaxDebtPerBlockMultiplier":
|
|
22780
|
+
case "SetPriceOracle":
|
|
22781
|
+
case "SetTokenLiquidationThreshold":
|
|
22782
|
+
case "UpdateFees":
|
|
22783
|
+
this.dirty = true;
|
|
22784
|
+
}
|
|
22785
|
+
}
|
|
22786
|
+
async checkRamps() {
|
|
22787
|
+
let fromBlock = this.sdk.currentBlock - RAMP_DURATION_BY_NETWORK[this.sdk.provider.networkType];
|
|
22788
|
+
fromBlock = fromBlock < 0n ? 0n : fromBlock;
|
|
22789
|
+
const logs = await this.provider.publicClient.getContractEvents({
|
|
22790
|
+
address: this.address,
|
|
22791
|
+
abi: this.abi,
|
|
22792
|
+
fromBlock,
|
|
22793
|
+
eventName: "ScheduleTokenLiquidationThresholdRamp",
|
|
22794
|
+
strict: true
|
|
22795
|
+
});
|
|
22796
|
+
return logs.map(({ args }) => args);
|
|
22797
|
+
}
|
|
22798
|
+
parseFunctionParams(params) {
|
|
22799
|
+
switch (params.functionName) {
|
|
22800
|
+
case "addCollateralToken":
|
|
22801
|
+
case "setLiquidationThreshold": {
|
|
22802
|
+
const [token, lt] = params.args;
|
|
22803
|
+
return [this.labelAddress(token), percentFmt(lt)];
|
|
22804
|
+
}
|
|
22805
|
+
case "setExpirationDate": {
|
|
22806
|
+
const [expirationDate] = params.args;
|
|
22807
|
+
return [`${expirationDate}`];
|
|
22808
|
+
}
|
|
22809
|
+
case "setFees": {
|
|
22810
|
+
const [
|
|
22811
|
+
feeLiquidation,
|
|
22812
|
+
liquidationPremium,
|
|
22813
|
+
feeLiquidationExpired,
|
|
22814
|
+
liquidationPremiumExpired
|
|
22815
|
+
] = params.args;
|
|
22816
|
+
return [
|
|
22817
|
+
percentFmt(feeLiquidation),
|
|
22818
|
+
percentFmt(liquidationPremium),
|
|
22819
|
+
percentFmt(feeLiquidationExpired),
|
|
22820
|
+
percentFmt(liquidationPremiumExpired)
|
|
22821
|
+
];
|
|
22822
|
+
}
|
|
22823
|
+
// case "setMinDebtLimit":
|
|
22824
|
+
// case "setMaxDebtLimit": {
|
|
22825
|
+
// const [debt] = params.args;
|
|
22826
|
+
// return [this.factory.convertUnderlying(debt)];
|
|
22827
|
+
// }
|
|
22828
|
+
case "setCreditFacade": {
|
|
22829
|
+
const [newCreditFacade, migrateParams] = params.args;
|
|
22830
|
+
return [this.labelAddress(newCreditFacade), `${migrateParams}`];
|
|
22831
|
+
}
|
|
22832
|
+
case "rampLiquidationThreshold": {
|
|
22833
|
+
const [token, liquidationThresholdFinal, rampStart, rampDuration] = params.args;
|
|
22834
|
+
return [
|
|
22835
|
+
this.labelAddress(token),
|
|
22836
|
+
percentFmt(liquidationThresholdFinal),
|
|
22837
|
+
`${rampStart}`,
|
|
22838
|
+
formatDuration(rampDuration)
|
|
22839
|
+
];
|
|
22840
|
+
}
|
|
22841
|
+
default:
|
|
22842
|
+
return void 0;
|
|
22843
|
+
}
|
|
22844
|
+
}
|
|
22845
|
+
};
|
|
22846
|
+
var abi20 = [...creditFacadeV3Abi, ...iCreditFacadeV3MulticallAbi];
|
|
20242
22847
|
var CreditFacadeV300Contract = class extends BaseContract {
|
|
20243
22848
|
underlying;
|
|
20244
22849
|
constructor(sdk, { creditFacade, creditManager }) {
|
|
@@ -20246,7 +22851,7 @@ var CreditFacadeV300Contract = class extends BaseContract {
|
|
|
20246
22851
|
super(sdk, {
|
|
20247
22852
|
...baseParams,
|
|
20248
22853
|
name: `CreditFacadeV3(${creditManager.name})`,
|
|
20249
|
-
abi:
|
|
22854
|
+
abi: abi20
|
|
20250
22855
|
});
|
|
20251
22856
|
Object.assign(this, rest);
|
|
20252
22857
|
this.underlying = creditManager.underlying;
|
|
@@ -20375,7 +22980,7 @@ var CreditFacadeV300Contract = class extends BaseContract {
|
|
|
20375
22980
|
}
|
|
20376
22981
|
}
|
|
20377
22982
|
};
|
|
20378
|
-
var
|
|
22983
|
+
var abi21 = [...iCreditFacadeV310Abi, ...iCreditFacadeV310MulticallAbi];
|
|
20379
22984
|
var CreditFacadeV310Contract = class extends BaseContract {
|
|
20380
22985
|
underlying;
|
|
20381
22986
|
constructor(sdk, { creditFacade, creditManager }) {
|
|
@@ -20383,7 +22988,7 @@ var CreditFacadeV310Contract = class extends BaseContract {
|
|
|
20383
22988
|
super(sdk, {
|
|
20384
22989
|
...baseParams,
|
|
20385
22990
|
name: `CreditFacadeV310(${creditManager.name})`,
|
|
20386
|
-
abi:
|
|
22991
|
+
abi: abi21
|
|
20387
22992
|
});
|
|
20388
22993
|
Object.assign(this, rest);
|
|
20389
22994
|
this.underlying = creditManager.underlying;
|
|
@@ -20503,8 +23108,91 @@ var CreditFacadeV310Contract = class extends BaseContract {
|
|
|
20503
23108
|
}
|
|
20504
23109
|
};
|
|
20505
23110
|
|
|
20506
|
-
// src/sdk/market/
|
|
20507
|
-
var
|
|
23111
|
+
// src/sdk/market/CreditManagerV300Contract.ts
|
|
23112
|
+
var abi22 = creditManagerV3Abi;
|
|
23113
|
+
var CreditManagerV300Contract = class extends BaseContract {
|
|
23114
|
+
/**
|
|
23115
|
+
* Mapping targetContract => adapter
|
|
23116
|
+
*/
|
|
23117
|
+
adapters;
|
|
23118
|
+
/**
|
|
23119
|
+
* Mapping token address => liquidation threshold
|
|
23120
|
+
*/
|
|
23121
|
+
liquidationThresholds;
|
|
23122
|
+
constructor(sdk, { creditManager, adapters }) {
|
|
23123
|
+
const { baseParams, collateralTokens, liquidationThresholds, ...rest } = creditManager;
|
|
23124
|
+
super(sdk, {
|
|
23125
|
+
...baseParams,
|
|
23126
|
+
name: `CreditManagerV300(${creditManager.name})`,
|
|
23127
|
+
abi: abi22
|
|
23128
|
+
});
|
|
23129
|
+
Object.assign(this, rest);
|
|
23130
|
+
this.liquidationThresholds = new AddressMap(
|
|
23131
|
+
collateralTokens.map((t, i) => [t, liquidationThresholds[i]])
|
|
23132
|
+
);
|
|
23133
|
+
this.adapters = new AddressMap();
|
|
23134
|
+
for (const adapterData of adapters) {
|
|
23135
|
+
try {
|
|
23136
|
+
const adapter = createAdapter(this.sdk, adapterData);
|
|
23137
|
+
adapter.name = `${adapter.name}(${this.name})`;
|
|
23138
|
+
this.adapters.upsert(adapter.targetContract, adapter);
|
|
23139
|
+
} catch (e) {
|
|
23140
|
+
throw new Error(`cannot attach adapter: ${e}`, { cause: e });
|
|
23141
|
+
}
|
|
23142
|
+
}
|
|
23143
|
+
}
|
|
23144
|
+
stateHuman(raw) {
|
|
23145
|
+
return {
|
|
23146
|
+
...super.stateHuman(raw),
|
|
23147
|
+
name: this.name,
|
|
23148
|
+
accountFactory: this.labelAddress(this.accountFactory),
|
|
23149
|
+
underlying: this.labelAddress(this.underlying),
|
|
23150
|
+
pool: this.labelAddress(this.pool),
|
|
23151
|
+
creditFacade: this.labelAddress(this.creditFacade),
|
|
23152
|
+
creditConfigurator: this.labelAddress(this.creditConfigurator),
|
|
23153
|
+
priceOracle: this.labelAddress(this.priceOracle),
|
|
23154
|
+
maxEnabledTokens: this.maxEnabledTokens,
|
|
23155
|
+
collateralTokens: Object.fromEntries(
|
|
23156
|
+
this.liquidationThresholds.entries().map(([k, v]) => [
|
|
23157
|
+
this.labelAddress(k),
|
|
23158
|
+
percentFmt(v, raw)
|
|
23159
|
+
])
|
|
23160
|
+
),
|
|
23161
|
+
feeInterest: percentFmt(this.feeInterest, raw),
|
|
23162
|
+
feeLiquidation: percentFmt(this.feeLiquidation, raw),
|
|
23163
|
+
liquidationDiscount: percentFmt(this.liquidationDiscount, raw),
|
|
23164
|
+
feeLiquidationExpired: percentFmt(this.feeLiquidationExpired, raw),
|
|
23165
|
+
liquidationDiscountExpired: percentFmt(
|
|
23166
|
+
this.liquidationDiscountExpired,
|
|
23167
|
+
raw
|
|
23168
|
+
),
|
|
23169
|
+
quotedTokensMask: fmtBinaryMask(0n),
|
|
23170
|
+
// TODO: ?
|
|
23171
|
+
contractsToAdapters: Object.fromEntries(
|
|
23172
|
+
this.adapters.entries().map(([k, v]) => [
|
|
23173
|
+
this.labelAddress(k),
|
|
23174
|
+
this.labelAddress(v.address)
|
|
23175
|
+
])
|
|
23176
|
+
),
|
|
23177
|
+
creditAccounts: []
|
|
23178
|
+
// TODO: ?
|
|
23179
|
+
};
|
|
23180
|
+
}
|
|
23181
|
+
get collateralTokens() {
|
|
23182
|
+
return this.liquidationThresholds.keys();
|
|
23183
|
+
}
|
|
23184
|
+
processLog(log) {
|
|
23185
|
+
switch (log.eventName) {
|
|
23186
|
+
case "SetCreditConfigurator":
|
|
23187
|
+
this.dirty = true;
|
|
23188
|
+
break;
|
|
23189
|
+
}
|
|
23190
|
+
}
|
|
23191
|
+
};
|
|
23192
|
+
|
|
23193
|
+
// src/sdk/market/CreditManagerV310Contract.ts
|
|
23194
|
+
var abi23 = iCreditManagerV310Abi;
|
|
23195
|
+
var CreditManagerV310Contract = class extends BaseContract {
|
|
20508
23196
|
/**
|
|
20509
23197
|
* Mapping targetContract => adapter
|
|
20510
23198
|
*/
|
|
@@ -20517,8 +23205,8 @@ var CreditManagerContract = class extends BaseContract {
|
|
|
20517
23205
|
const { baseParams, collateralTokens, liquidationThresholds, ...rest } = creditManager;
|
|
20518
23206
|
super(sdk, {
|
|
20519
23207
|
...baseParams,
|
|
20520
|
-
name: `
|
|
20521
|
-
abi:
|
|
23208
|
+
name: `CreditManagerV310(${creditManager.name})`,
|
|
23209
|
+
abi: abi23
|
|
20522
23210
|
});
|
|
20523
23211
|
Object.assign(this, rest);
|
|
20524
23212
|
this.liquidationThresholds = new AddressMap(
|
|
@@ -20607,16 +23295,27 @@ var CreditFactory = class extends SDKConstruct {
|
|
|
20607
23295
|
this.collateralTokens = Object.fromEntries(
|
|
20608
23296
|
collateralTokens.map((t, i) => [t, liquidationThresholds[i]])
|
|
20609
23297
|
);
|
|
20610
|
-
|
|
23298
|
+
if (creditManager.creditManager.baseParams.version < 310) {
|
|
23299
|
+
this.creditManager = new CreditManagerV300Contract(sdk, creditManager);
|
|
23300
|
+
} else {
|
|
23301
|
+
this.creditManager = new CreditManagerV310Contract(sdk, creditManager);
|
|
23302
|
+
}
|
|
20611
23303
|
if (creditManager.creditFacade.baseParams.version < 310) {
|
|
20612
23304
|
this.creditFacade = new CreditFacadeV300Contract(sdk, creditManager);
|
|
20613
23305
|
} else {
|
|
20614
23306
|
this.creditFacade = new CreditFacadeV310Contract(sdk, creditManager);
|
|
20615
23307
|
}
|
|
20616
|
-
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
23308
|
+
if (creditManager.creditConfigurator.baseParams.version < 310) {
|
|
23309
|
+
this.creditConfigurator = new CreditConfiguratorV300Contract(
|
|
23310
|
+
sdk,
|
|
23311
|
+
creditManager
|
|
23312
|
+
);
|
|
23313
|
+
} else {
|
|
23314
|
+
this.creditConfigurator = new CreditConfiguratorV310Contract(
|
|
23315
|
+
sdk,
|
|
23316
|
+
creditManager
|
|
23317
|
+
);
|
|
23318
|
+
}
|
|
20620
23319
|
}
|
|
20621
23320
|
async tvl() {
|
|
20622
23321
|
const tvl = 0n;
|
|
@@ -20771,7 +23470,7 @@ var LinearModelContract = class extends BaseContract {
|
|
|
20771
23470
|
};
|
|
20772
23471
|
|
|
20773
23472
|
// src/sdk/market/PoolContract.ts
|
|
20774
|
-
var
|
|
23473
|
+
var abi24 = poolV3Abi;
|
|
20775
23474
|
var PoolContract = class extends BaseContract {
|
|
20776
23475
|
creditManagerDebtParams;
|
|
20777
23476
|
constructor(sdk, data) {
|
|
@@ -20779,7 +23478,7 @@ var PoolContract = class extends BaseContract {
|
|
|
20779
23478
|
super(sdk, {
|
|
20780
23479
|
...data.baseParams,
|
|
20781
23480
|
name: `PoolV3(${data.name})`,
|
|
20782
|
-
abi:
|
|
23481
|
+
abi: abi24
|
|
20783
23482
|
});
|
|
20784
23483
|
Object.assign(this, rest);
|
|
20785
23484
|
this.creditManagerDebtParams = new AddressMap(
|
|
@@ -21792,8 +24491,8 @@ function rawTxToMulticallPriceUpdate(tx) {
|
|
|
21792
24491
|
};
|
|
21793
24492
|
}
|
|
21794
24493
|
|
|
21795
|
-
// src/sdk/market/
|
|
21796
|
-
var
|
|
24494
|
+
// src/sdk/market/PriceOracleBaseContract.ts
|
|
24495
|
+
var PriceOracleBaseContract = class extends BaseContract {
|
|
21797
24496
|
/**
|
|
21798
24497
|
* Underlying token of market to which this price oracle belongs
|
|
21799
24498
|
*/
|
|
@@ -21815,28 +24514,12 @@ var PriceOracleContract = class extends BaseContract {
|
|
|
21815
24514
|
*/
|
|
21816
24515
|
reservePrices = new AddressMap();
|
|
21817
24516
|
#priceFeedTree = [];
|
|
21818
|
-
constructor(sdk, data, underlying) {
|
|
21819
|
-
super(sdk,
|
|
21820
|
-
...data.baseParams,
|
|
21821
|
-
name: "PriceOracleV3",
|
|
21822
|
-
abi: priceOracleV3Abi
|
|
21823
|
-
});
|
|
24517
|
+
constructor(sdk, args, data, underlying) {
|
|
24518
|
+
super(sdk, args);
|
|
21824
24519
|
this.underlying = underlying;
|
|
21825
24520
|
const { priceFeedMapping, priceFeedStructure } = data;
|
|
21826
24521
|
this.#loadState(priceFeedMapping, priceFeedStructure);
|
|
21827
24522
|
}
|
|
21828
|
-
processLog(log) {
|
|
21829
|
-
switch (log.eventName) {
|
|
21830
|
-
case "NewController":
|
|
21831
|
-
case "Paused":
|
|
21832
|
-
case "SetPriceFeed":
|
|
21833
|
-
case "SetReservePriceFeed":
|
|
21834
|
-
case "SetReservePriceFeedStatus":
|
|
21835
|
-
case "Unpaused":
|
|
21836
|
-
this.dirty = true;
|
|
21837
|
-
break;
|
|
21838
|
-
}
|
|
21839
|
-
}
|
|
21840
24523
|
/**
|
|
21841
24524
|
* Returns main and reserve price feeds for given tokens
|
|
21842
24525
|
* @param tokens
|
|
@@ -21878,7 +24561,7 @@ var PriceOracleContract = class extends BaseContract {
|
|
|
21878
24561
|
const { txs } = updates;
|
|
21879
24562
|
for (const tx of txs) {
|
|
21880
24563
|
const { to: priceFeed, callData } = tx;
|
|
21881
|
-
const [token, reserve] = this
|
|
24564
|
+
const [token, reserve] = this.findTokenForPriceFeed(priceFeed);
|
|
21882
24565
|
if (!token) {
|
|
21883
24566
|
continue;
|
|
21884
24567
|
}
|
|
@@ -22006,7 +24689,7 @@ var PriceOracleContract = class extends BaseContract {
|
|
|
22006
24689
|
* @param priceFeed
|
|
22007
24690
|
* @returns
|
|
22008
24691
|
*/
|
|
22009
|
-
|
|
24692
|
+
findTokenForPriceFeed(priceFeed) {
|
|
22010
24693
|
for (const [token, pf] of this.mainPriceFeeds.entries()) {
|
|
22011
24694
|
if (pf.address === priceFeed) {
|
|
22012
24695
|
return [token, false];
|
|
@@ -22017,10 +24700,6 @@ var PriceOracleContract = class extends BaseContract {
|
|
|
22017
24700
|
return [token, true];
|
|
22018
24701
|
}
|
|
22019
24702
|
}
|
|
22020
|
-
const ticker = priceFeedToTicker[this.sdk.provider.networkType][priceFeed];
|
|
22021
|
-
if (ticker) {
|
|
22022
|
-
return [ticker, false];
|
|
22023
|
-
}
|
|
22024
24703
|
return [void 0, false];
|
|
22025
24704
|
}
|
|
22026
24705
|
stateHuman(raw = true) {
|
|
@@ -22040,6 +24719,49 @@ var PriceOracleContract = class extends BaseContract {
|
|
|
22040
24719
|
)
|
|
22041
24720
|
};
|
|
22042
24721
|
}
|
|
24722
|
+
get priceFeedTree() {
|
|
24723
|
+
return this.#priceFeedTree;
|
|
24724
|
+
}
|
|
24725
|
+
};
|
|
24726
|
+
|
|
24727
|
+
// src/sdk/market/PriceOracleV300Contract.ts
|
|
24728
|
+
var PriceOracleV300Contract = class extends PriceOracleBaseContract {
|
|
24729
|
+
constructor(sdk, data, underlying) {
|
|
24730
|
+
super(
|
|
24731
|
+
sdk,
|
|
24732
|
+
{
|
|
24733
|
+
...data.baseParams,
|
|
24734
|
+
name: "PriceOracleV3",
|
|
24735
|
+
abi: priceOracleV3Abi
|
|
24736
|
+
},
|
|
24737
|
+
data,
|
|
24738
|
+
underlying
|
|
24739
|
+
);
|
|
24740
|
+
}
|
|
24741
|
+
processLog(log) {
|
|
24742
|
+
switch (log.eventName) {
|
|
24743
|
+
case "Paused":
|
|
24744
|
+
case "Unpaused":
|
|
24745
|
+
break;
|
|
24746
|
+
case "NewController":
|
|
24747
|
+
case "SetPriceFeed":
|
|
24748
|
+
case "SetReservePriceFeed":
|
|
24749
|
+
case "SetReservePriceFeedStatus":
|
|
24750
|
+
this.dirty = true;
|
|
24751
|
+
break;
|
|
24752
|
+
}
|
|
24753
|
+
}
|
|
24754
|
+
findTokenForPriceFeed(priceFeed) {
|
|
24755
|
+
const [token, reserve] = super.findTokenForPriceFeed(priceFeed);
|
|
24756
|
+
if (token) {
|
|
24757
|
+
return [token, reserve];
|
|
24758
|
+
}
|
|
24759
|
+
const ticker = priceFeedToTicker[this.sdk.provider.networkType][priceFeed];
|
|
24760
|
+
if (ticker) {
|
|
24761
|
+
return [ticker, false];
|
|
24762
|
+
}
|
|
24763
|
+
return [void 0, false];
|
|
24764
|
+
}
|
|
22043
24765
|
};
|
|
22044
24766
|
var priceFeedToTicker = {
|
|
22045
24767
|
Mainnet: {
|
|
@@ -22078,6 +24800,32 @@ var tokenToTicker = {
|
|
|
22078
24800
|
Base: {}
|
|
22079
24801
|
};
|
|
22080
24802
|
|
|
24803
|
+
// src/sdk/market/PriceOracleV310Contract.ts
|
|
24804
|
+
var PriceOracleV310Contract = class extends PriceOracleBaseContract {
|
|
24805
|
+
constructor(sdk, data, underlying) {
|
|
24806
|
+
super(
|
|
24807
|
+
sdk,
|
|
24808
|
+
{
|
|
24809
|
+
...data.baseParams,
|
|
24810
|
+
name: "PriceOracleV3",
|
|
24811
|
+
abi: iPriceOracleV310Abi
|
|
24812
|
+
},
|
|
24813
|
+
data,
|
|
24814
|
+
underlying
|
|
24815
|
+
);
|
|
24816
|
+
}
|
|
24817
|
+
processLog(log) {
|
|
24818
|
+
switch (log.eventName) {
|
|
24819
|
+
case "AddUpdatablePriceFeed":
|
|
24820
|
+
case "NewController":
|
|
24821
|
+
case "SetPriceFeed":
|
|
24822
|
+
case "SetReservePriceFeed":
|
|
24823
|
+
this.dirty = true;
|
|
24824
|
+
break;
|
|
24825
|
+
}
|
|
24826
|
+
}
|
|
24827
|
+
};
|
|
24828
|
+
|
|
22081
24829
|
// src/sdk/market/MarketFactory.ts
|
|
22082
24830
|
var MarketFactory = class extends SDKConstruct {
|
|
22083
24831
|
acl;
|
|
@@ -22104,11 +24852,19 @@ var MarketFactory = class extends SDKConstruct {
|
|
|
22104
24852
|
for (let i = 0; i < marketData.creditManagers.length; i++) {
|
|
22105
24853
|
this.creditManagers.push(new CreditFactory(sdk, marketData, i));
|
|
22106
24854
|
}
|
|
22107
|
-
|
|
22108
|
-
|
|
22109
|
-
|
|
22110
|
-
|
|
22111
|
-
|
|
24855
|
+
if (marketData.priceOracleData.baseParams.version < 310) {
|
|
24856
|
+
this.priceOracle = new PriceOracleV300Contract(
|
|
24857
|
+
sdk,
|
|
24858
|
+
marketData.priceOracleData,
|
|
24859
|
+
marketData.pool.underlying
|
|
24860
|
+
);
|
|
24861
|
+
} else {
|
|
24862
|
+
this.priceOracle = new PriceOracleV310Contract(
|
|
24863
|
+
sdk,
|
|
24864
|
+
marketData.priceOracleData,
|
|
24865
|
+
marketData.pool.underlying
|
|
24866
|
+
);
|
|
24867
|
+
}
|
|
22112
24868
|
}
|
|
22113
24869
|
get dirty() {
|
|
22114
24870
|
return this.poolFactory.dirty || this.priceOracle.dirty || this.creditManagers.some((cm) => cm.dirty);
|
|
@@ -22223,9 +24979,9 @@ async function simulateMulticall(client, parameters) {
|
|
|
22223
24979
|
let currentChunk = 0;
|
|
22224
24980
|
let currentChunkSize = 0;
|
|
22225
24981
|
for (const contract of contracts) {
|
|
22226
|
-
const { abi:
|
|
24982
|
+
const { abi: abi26, address, args, functionName } = contract;
|
|
22227
24983
|
try {
|
|
22228
|
-
const callData = viem.encodeFunctionData({ abi:
|
|
24984
|
+
const callData = viem.encodeFunctionData({ abi: abi26, args, functionName });
|
|
22229
24985
|
currentChunkSize += (callData.length - 2) / 2;
|
|
22230
24986
|
if (
|
|
22231
24987
|
// Check if batching is enabled.
|
|
@@ -22247,7 +25003,7 @@ async function simulateMulticall(client, parameters) {
|
|
|
22247
25003
|
];
|
|
22248
25004
|
} catch (err) {
|
|
22249
25005
|
const error = viem.getContractError(err, {
|
|
22250
|
-
abi:
|
|
25006
|
+
abi: abi26,
|
|
22251
25007
|
address,
|
|
22252
25008
|
args,
|
|
22253
25009
|
docsPath: "/docs/contract/multicall",
|
|
@@ -22304,12 +25060,12 @@ async function simulateMulticall(client, parameters) {
|
|
|
22304
25060
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
22305
25061
|
const { returnData, success } = aggregate3Result[j];
|
|
22306
25062
|
const { callData } = chunkedCalls[i][j];
|
|
22307
|
-
const { abi:
|
|
25063
|
+
const { abi: abi26, address, functionName, args } = contracts[results.length];
|
|
22308
25064
|
try {
|
|
22309
25065
|
if (callData === "0x") throw new viem.AbiDecodingZeroDataError();
|
|
22310
25066
|
if (!success) throw new viem.RawContractError({ data: returnData });
|
|
22311
25067
|
const result2 = viem.decodeFunctionResult({
|
|
22312
|
-
abi:
|
|
25068
|
+
abi: abi26,
|
|
22313
25069
|
args,
|
|
22314
25070
|
data: returnData,
|
|
22315
25071
|
functionName
|
|
@@ -22317,7 +25073,7 @@ async function simulateMulticall(client, parameters) {
|
|
|
22317
25073
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
22318
25074
|
} catch (err) {
|
|
22319
25075
|
const error = viem.getContractError(err, {
|
|
22320
|
-
abi:
|
|
25076
|
+
abi: abi26,
|
|
22321
25077
|
address,
|
|
22322
25078
|
args,
|
|
22323
25079
|
docsPath: "/docs/contract/multicall",
|
|
@@ -22334,11 +25090,11 @@ async function simulateMulticall(client, parameters) {
|
|
|
22334
25090
|
}
|
|
22335
25091
|
|
|
22336
25092
|
// src/sdk/market/MarketConfiguratorContract.ts
|
|
22337
|
-
var
|
|
25093
|
+
var abi25 = iMarketConfiguratorV310Abi;
|
|
22338
25094
|
var MarketConfiguratorContract = class extends BaseContract {
|
|
22339
25095
|
constructor(sdk, address) {
|
|
22340
25096
|
super(sdk, {
|
|
22341
|
-
abi:
|
|
25097
|
+
abi: abi25,
|
|
22342
25098
|
addr: address,
|
|
22343
25099
|
contractType: AP_MARKET_CONFIGURATOR,
|
|
22344
25100
|
version: 0
|
|
@@ -23420,9 +26176,9 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
23420
26176
|
}
|
|
23421
26177
|
}
|
|
23422
26178
|
const priceFeeds = [];
|
|
23423
|
-
for (const [pool2,
|
|
26179
|
+
for (const [pool2, oracle] of oracleByPool.entries()) {
|
|
23424
26180
|
const tokens = Array.from(tokensByPool.get(pool2) ?? []);
|
|
23425
|
-
priceFeeds.push(...
|
|
26181
|
+
priceFeeds.push(...oracle.priceFeedsForTokens(tokens));
|
|
23426
26182
|
}
|
|
23427
26183
|
return this.sdk.priceFeeds.generatePriceFeedsUpdateTxs(
|
|
23428
26184
|
priceFeeds,
|
|
@@ -24150,11 +26906,13 @@ exports.CompositePriceFeedContract = CompositePriceFeedContract;
|
|
|
24150
26906
|
exports.ConvexV1BaseRewardPoolAdapterContract = ConvexV1BaseRewardPoolAdapterContract;
|
|
24151
26907
|
exports.ConvexV1BoosterAdapterContract = ConvexV1BoosterAdapterContract;
|
|
24152
26908
|
exports.CreditAccountsService = CreditAccountsService;
|
|
24153
|
-
exports.
|
|
26909
|
+
exports.CreditConfiguratorV300Contract = CreditConfiguratorV300Contract;
|
|
26910
|
+
exports.CreditConfiguratorV310Contract = CreditConfiguratorV310Contract;
|
|
24154
26911
|
exports.CreditFacadeV300Contract = CreditFacadeV300Contract;
|
|
24155
26912
|
exports.CreditFacadeV310Contract = CreditFacadeV310Contract;
|
|
24156
26913
|
exports.CreditFactory = CreditFactory;
|
|
24157
|
-
exports.
|
|
26914
|
+
exports.CreditManagerV300Contract = CreditManagerV300Contract;
|
|
26915
|
+
exports.CreditManagerV310Contract = CreditManagerV310Contract;
|
|
24158
26916
|
exports.Curve2AssetsAdapterContract = Curve2AssetsAdapterContract;
|
|
24159
26917
|
exports.Curve3AssetsAdapterContract = Curve3AssetsAdapterContract;
|
|
24160
26918
|
exports.Curve4AssetsAdapterContract = Curve4AssetsAdapterContract;
|
|
@@ -24186,7 +26944,8 @@ exports.PoolFactory = PoolFactory;
|
|
|
24186
26944
|
exports.PoolQuotaKeeperContract = PoolQuotaKeeperContract;
|
|
24187
26945
|
exports.PriceFeedRef = PriceFeedRef;
|
|
24188
26946
|
exports.PriceFeedRegister = PriceFeedRegister;
|
|
24189
|
-
exports.
|
|
26947
|
+
exports.PriceOracleV300Contract = PriceOracleV300Contract;
|
|
26948
|
+
exports.PriceOracleV310Contract = PriceOracleV310Contract;
|
|
24190
26949
|
exports.Provider = Provider;
|
|
24191
26950
|
exports.RAMP_DURATION_BY_NETWORK = RAMP_DURATION_BY_NETWORK;
|
|
24192
26951
|
exports.RAY = RAY;
|