@dhedge/backend-flatcoin-core 0.1.20 → 0.1.22
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/contracts/abi/flatcoin-errors.d.ts +9 -0
- package/dist/contracts/abi/flatcoin-errors.js +439 -0
- package/dist/contracts/abi/flatcoin-v1.d.ts +46 -0
- package/dist/contracts/abi/flatcoin-v1.js +98 -0
- package/dist/contracts/abi/viewer.d.ts +40 -0
- package/dist/contracts/abi/viewer.js +134 -0
- package/dist/contracts/index.d.ts +3 -6
- package/dist/contracts/index.js +6 -18
- package/package.json +1 -1
- package/dist/contracts/abi/FlatcoinErrors.json +0 -436
- package/dist/contracts/abi/FlatcoinV1.json +0 -95
- package/dist/contracts/abi/Viewer.json +0 -131
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [
|
|
4
|
-
{
|
|
5
|
-
"internalType": "address",
|
|
6
|
-
"name": "account",
|
|
7
|
-
"type": "address"
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
|
-
"name": "balanceOf",
|
|
11
|
-
"outputs": [
|
|
12
|
-
{
|
|
13
|
-
"internalType": "uint256",
|
|
14
|
-
"name": "",
|
|
15
|
-
"type": "uint256"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"stateMutability": "view",
|
|
19
|
-
"type": "function"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"inputs": [
|
|
23
|
-
{
|
|
24
|
-
"internalType": "address",
|
|
25
|
-
"name": "_logic",
|
|
26
|
-
"type": "address"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"internalType": "address",
|
|
30
|
-
"name": "admin_",
|
|
31
|
-
"type": "address"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"internalType": "bytes",
|
|
35
|
-
"name": "_data",
|
|
36
|
-
"type": "bytes"
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"stateMutability": "payable",
|
|
40
|
-
"type": "constructor"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"anonymous": false,
|
|
44
|
-
"inputs": [
|
|
45
|
-
{
|
|
46
|
-
"indexed": false,
|
|
47
|
-
"internalType": "address",
|
|
48
|
-
"name": "previousAdmin",
|
|
49
|
-
"type": "address"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"indexed": false,
|
|
53
|
-
"internalType": "address",
|
|
54
|
-
"name": "newAdmin",
|
|
55
|
-
"type": "address"
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"name": "AdminChanged",
|
|
59
|
-
"type": "event"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"anonymous": false,
|
|
63
|
-
"inputs": [
|
|
64
|
-
{
|
|
65
|
-
"indexed": true,
|
|
66
|
-
"internalType": "address",
|
|
67
|
-
"name": "beacon",
|
|
68
|
-
"type": "address"
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"name": "BeaconUpgraded",
|
|
72
|
-
"type": "event"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"anonymous": false,
|
|
76
|
-
"inputs": [
|
|
77
|
-
{
|
|
78
|
-
"indexed": true,
|
|
79
|
-
"internalType": "address",
|
|
80
|
-
"name": "implementation",
|
|
81
|
-
"type": "address"
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
"name": "Upgraded",
|
|
85
|
-
"type": "event"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"stateMutability": "payable",
|
|
89
|
-
"type": "fallback"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"stateMutability": "payable",
|
|
93
|
-
"type": "receive"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [
|
|
4
|
-
{
|
|
5
|
-
"internalType": "contract IFlatcoinVault",
|
|
6
|
-
"name": "_vault",
|
|
7
|
-
"type": "address"
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
|
-
"stateMutability": "nonpayable",
|
|
11
|
-
"type": "constructor"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"inputs": [
|
|
15
|
-
{
|
|
16
|
-
"internalType": "address",
|
|
17
|
-
"name": "account",
|
|
18
|
-
"type": "address"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"name": "getAccountLeveragePositionData",
|
|
22
|
-
"outputs": [
|
|
23
|
-
{
|
|
24
|
-
"components": [
|
|
25
|
-
{
|
|
26
|
-
"internalType": "uint256",
|
|
27
|
-
"name": "tokenId",
|
|
28
|
-
"type": "uint256"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"internalType": "uint256",
|
|
32
|
-
"name": "entryPrice",
|
|
33
|
-
"type": "uint256"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"internalType": "uint256",
|
|
37
|
-
"name": "marginDeposited",
|
|
38
|
-
"type": "uint256"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"internalType": "uint256",
|
|
42
|
-
"name": "additionalSize",
|
|
43
|
-
"type": "uint256"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"internalType": "int256",
|
|
47
|
-
"name": "entryCumulativeFunding",
|
|
48
|
-
"type": "int256"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"internalType": "int256",
|
|
52
|
-
"name": "profitLoss",
|
|
53
|
-
"type": "int256"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"internalType": "int256",
|
|
57
|
-
"name": "accruedFunding",
|
|
58
|
-
"type": "int256"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"internalType": "int256",
|
|
62
|
-
"name": "marginAfterSettlement",
|
|
63
|
-
"type": "int256"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"internalType": "uint256",
|
|
67
|
-
"name": "liquidationPrice",
|
|
68
|
-
"type": "uint256"
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"internalType": "struct FlatcoinStructs.LeveragePositionData[]",
|
|
72
|
-
"name": "positionData",
|
|
73
|
-
"type": "tuple[]"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"stateMutability": "view",
|
|
77
|
-
"type": "function"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"inputs": [],
|
|
81
|
-
"name": "getFlatcoinPriceInUSD",
|
|
82
|
-
"outputs": [
|
|
83
|
-
{
|
|
84
|
-
"internalType": "uint256",
|
|
85
|
-
"name": "priceInUSD",
|
|
86
|
-
"type": "uint256"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"stateMutability": "view",
|
|
90
|
-
"type": "function"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"inputs": [],
|
|
94
|
-
"name": "getFlatcoinTVL",
|
|
95
|
-
"outputs": [
|
|
96
|
-
{
|
|
97
|
-
"internalType": "uint256",
|
|
98
|
-
"name": "tvl",
|
|
99
|
-
"type": "uint256"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"stateMutability": "view",
|
|
103
|
-
"type": "function"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"inputs": [],
|
|
107
|
-
"name": "getMarketSkewPercentage",
|
|
108
|
-
"outputs": [
|
|
109
|
-
{
|
|
110
|
-
"internalType": "int256",
|
|
111
|
-
"name": "skewPercent",
|
|
112
|
-
"type": "int256"
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
"stateMutability": "view",
|
|
116
|
-
"type": "function"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"inputs": [],
|
|
120
|
-
"name": "vault",
|
|
121
|
-
"outputs": [
|
|
122
|
-
{
|
|
123
|
-
"internalType": "contract IFlatcoinVault",
|
|
124
|
-
"name": "",
|
|
125
|
-
"type": "address"
|
|
126
|
-
}
|
|
127
|
-
],
|
|
128
|
-
"stateMutability": "view",
|
|
129
|
-
"type": "function"
|
|
130
|
-
}
|
|
131
|
-
]
|