@bouncetech/contracts 1.3.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abis/erc20-abi.js +88 -86
- package/dist/abis/factory-abi.js +115 -115
- package/dist/abis/global-storage-abi.js +733 -733
- package/dist/abis/global-storage-helper-abi.js +75 -75
- package/dist/abis/hype-balance-helper-abi.d.ts +24 -0
- package/dist/abis/hype-balance-helper-abi.js +36 -0
- package/dist/abis/hyperliquid-handler-abi.js +75 -75
- package/dist/abis/leveraged-token-abi.js +812 -812
- package/dist/abis/leveraged-token-helper-abi.d.ts +48 -1
- package/dist/abis/leveraged-token-helper-abi.js +345 -285
- package/dist/abis/referrals-abi.js +253 -253
- package/dist/index.d.ts +50 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/abis/erc20-abi.js
CHANGED
|
@@ -3,129 +3,131 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.erc20Abi = void 0;
|
|
4
4
|
exports.erc20Abi = [
|
|
5
5
|
{
|
|
6
|
-
type: "function",
|
|
7
|
-
name: "allowance",
|
|
8
|
-
inputs: [
|
|
9
|
-
{ name: "owner", type: "address", internalType: "address" },
|
|
10
|
-
{ name: "spender", type: "address", internalType: "address" },
|
|
6
|
+
"type": "function",
|
|
7
|
+
"name": "allowance",
|
|
8
|
+
"inputs": [
|
|
9
|
+
{ "name": "owner", "type": "address", "internalType": "address" },
|
|
10
|
+
{ "name": "spender", "type": "address", "internalType": "address" },
|
|
11
11
|
],
|
|
12
|
-
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
13
|
-
stateMutability: "view",
|
|
12
|
+
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
|
|
13
|
+
"stateMutability": "view",
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
type: "function",
|
|
17
|
-
name: "approve",
|
|
18
|
-
inputs: [
|
|
19
|
-
{ name: "spender", type: "address", internalType: "address" },
|
|
20
|
-
{ name: "value", type: "uint256", internalType: "uint256" },
|
|
16
|
+
"type": "function",
|
|
17
|
+
"name": "approve",
|
|
18
|
+
"inputs": [
|
|
19
|
+
{ "name": "spender", "type": "address", "internalType": "address" },
|
|
20
|
+
{ "name": "value", "type": "uint256", "internalType": "uint256" },
|
|
21
21
|
],
|
|
22
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
23
|
-
stateMutability: "nonpayable",
|
|
22
|
+
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
|
|
23
|
+
"stateMutability": "nonpayable",
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
type: "function",
|
|
27
|
-
name: "balanceOf",
|
|
28
|
-
inputs: [
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
"type": "function",
|
|
27
|
+
"name": "balanceOf",
|
|
28
|
+
"inputs": [
|
|
29
|
+
{ "name": "account", "type": "address", "internalType": "address" },
|
|
30
|
+
],
|
|
31
|
+
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
|
|
32
|
+
"stateMutability": "view",
|
|
31
33
|
},
|
|
32
34
|
{
|
|
33
|
-
type: "function",
|
|
34
|
-
name: "decimals",
|
|
35
|
-
inputs: [],
|
|
36
|
-
outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
|
|
37
|
-
stateMutability: "view",
|
|
35
|
+
"type": "function",
|
|
36
|
+
"name": "decimals",
|
|
37
|
+
"inputs": [],
|
|
38
|
+
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
|
|
39
|
+
"stateMutability": "view",
|
|
38
40
|
},
|
|
39
41
|
{
|
|
40
|
-
type: "function",
|
|
41
|
-
name: "name",
|
|
42
|
-
inputs: [],
|
|
43
|
-
outputs: [{ name: "", type: "string", internalType: "string" }],
|
|
44
|
-
stateMutability: "view",
|
|
42
|
+
"type": "function",
|
|
43
|
+
"name": "name",
|
|
44
|
+
"inputs": [],
|
|
45
|
+
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
|
|
46
|
+
"stateMutability": "view",
|
|
45
47
|
},
|
|
46
48
|
{
|
|
47
|
-
type: "function",
|
|
48
|
-
name: "symbol",
|
|
49
|
-
inputs: [],
|
|
50
|
-
outputs: [{ name: "", type: "string", internalType: "string" }],
|
|
51
|
-
stateMutability: "view",
|
|
49
|
+
"type": "function",
|
|
50
|
+
"name": "symbol",
|
|
51
|
+
"inputs": [],
|
|
52
|
+
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
|
|
53
|
+
"stateMutability": "view",
|
|
52
54
|
},
|
|
53
55
|
{
|
|
54
|
-
type: "function",
|
|
55
|
-
name: "totalSupply",
|
|
56
|
-
inputs: [],
|
|
57
|
-
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
58
|
-
stateMutability: "view",
|
|
56
|
+
"type": "function",
|
|
57
|
+
"name": "totalSupply",
|
|
58
|
+
"inputs": [],
|
|
59
|
+
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
|
|
60
|
+
"stateMutability": "view",
|
|
59
61
|
},
|
|
60
62
|
{
|
|
61
|
-
type: "function",
|
|
62
|
-
name: "transfer",
|
|
63
|
-
inputs: [
|
|
64
|
-
{ name: "to", type: "address", internalType: "address" },
|
|
65
|
-
{ name: "value", type: "uint256", internalType: "uint256" },
|
|
63
|
+
"type": "function",
|
|
64
|
+
"name": "transfer",
|
|
65
|
+
"inputs": [
|
|
66
|
+
{ "name": "to", "type": "address", "internalType": "address" },
|
|
67
|
+
{ "name": "value", "type": "uint256", "internalType": "uint256" },
|
|
66
68
|
],
|
|
67
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
68
|
-
stateMutability: "nonpayable",
|
|
69
|
+
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
|
|
70
|
+
"stateMutability": "nonpayable",
|
|
69
71
|
},
|
|
70
72
|
{
|
|
71
|
-
type: "function",
|
|
72
|
-
name: "transferFrom",
|
|
73
|
-
inputs: [
|
|
74
|
-
{ name: "from", type: "address", internalType: "address" },
|
|
75
|
-
{ name: "to", type: "address", internalType: "address" },
|
|
76
|
-
{ name: "value", type: "uint256", internalType: "uint256" },
|
|
73
|
+
"type": "function",
|
|
74
|
+
"name": "transferFrom",
|
|
75
|
+
"inputs": [
|
|
76
|
+
{ "name": "from", "type": "address", "internalType": "address" },
|
|
77
|
+
{ "name": "to", "type": "address", "internalType": "address" },
|
|
78
|
+
{ "name": "value", "type": "uint256", "internalType": "uint256" },
|
|
77
79
|
],
|
|
78
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
79
|
-
stateMutability: "nonpayable",
|
|
80
|
+
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
|
|
81
|
+
"stateMutability": "nonpayable",
|
|
80
82
|
},
|
|
81
83
|
{
|
|
82
|
-
type: "event",
|
|
83
|
-
name: "Approval",
|
|
84
|
-
inputs: [
|
|
84
|
+
"type": "event",
|
|
85
|
+
"name": "Approval",
|
|
86
|
+
"inputs": [
|
|
85
87
|
{
|
|
86
|
-
name: "owner",
|
|
87
|
-
type: "address",
|
|
88
|
-
indexed: true,
|
|
89
|
-
internalType: "address",
|
|
88
|
+
"name": "owner",
|
|
89
|
+
"type": "address",
|
|
90
|
+
"indexed": true,
|
|
91
|
+
"internalType": "address",
|
|
90
92
|
},
|
|
91
93
|
{
|
|
92
|
-
name: "spender",
|
|
93
|
-
type: "address",
|
|
94
|
-
indexed: true,
|
|
95
|
-
internalType: "address",
|
|
94
|
+
"name": "spender",
|
|
95
|
+
"type": "address",
|
|
96
|
+
"indexed": true,
|
|
97
|
+
"internalType": "address",
|
|
96
98
|
},
|
|
97
99
|
{
|
|
98
|
-
name: "value",
|
|
99
|
-
type: "uint256",
|
|
100
|
-
indexed: false,
|
|
101
|
-
internalType: "uint256",
|
|
100
|
+
"name": "value",
|
|
101
|
+
"type": "uint256",
|
|
102
|
+
"indexed": false,
|
|
103
|
+
"internalType": "uint256",
|
|
102
104
|
},
|
|
103
105
|
],
|
|
104
|
-
anonymous: false,
|
|
106
|
+
"anonymous": false,
|
|
105
107
|
},
|
|
106
108
|
{
|
|
107
|
-
type: "event",
|
|
108
|
-
name: "Transfer",
|
|
109
|
-
inputs: [
|
|
109
|
+
"type": "event",
|
|
110
|
+
"name": "Transfer",
|
|
111
|
+
"inputs": [
|
|
110
112
|
{
|
|
111
|
-
name: "from",
|
|
112
|
-
type: "address",
|
|
113
|
-
indexed: true,
|
|
114
|
-
internalType: "address",
|
|
113
|
+
"name": "from",
|
|
114
|
+
"type": "address",
|
|
115
|
+
"indexed": true,
|
|
116
|
+
"internalType": "address",
|
|
115
117
|
},
|
|
116
118
|
{
|
|
117
|
-
name: "to",
|
|
118
|
-
type: "address",
|
|
119
|
-
indexed: true,
|
|
120
|
-
internalType: "address",
|
|
119
|
+
"name": "to",
|
|
120
|
+
"type": "address",
|
|
121
|
+
"indexed": true,
|
|
122
|
+
"internalType": "address",
|
|
121
123
|
},
|
|
122
124
|
{
|
|
123
|
-
name: "value",
|
|
124
|
-
type: "uint256",
|
|
125
|
-
indexed: false,
|
|
126
|
-
internalType: "uint256",
|
|
125
|
+
"name": "value",
|
|
126
|
+
"type": "uint256",
|
|
127
|
+
"indexed": false,
|
|
128
|
+
"internalType": "uint256",
|
|
127
129
|
},
|
|
128
130
|
],
|
|
129
|
-
anonymous: false,
|
|
131
|
+
"anonymous": false,
|
|
130
132
|
},
|
|
131
133
|
];
|
package/dist/abis/factory-abi.js
CHANGED
|
@@ -3,195 +3,195 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.factoryAbi = void 0;
|
|
4
4
|
exports.factoryAbi = [
|
|
5
5
|
{
|
|
6
|
-
type: "constructor",
|
|
7
|
-
inputs: [
|
|
6
|
+
"type": "constructor",
|
|
7
|
+
"inputs": [
|
|
8
8
|
{
|
|
9
|
-
name: "globalStorage_",
|
|
10
|
-
type: "address",
|
|
11
|
-
internalType: "address",
|
|
9
|
+
"name": "globalStorage_",
|
|
10
|
+
"type": "address",
|
|
11
|
+
"internalType": "address",
|
|
12
12
|
},
|
|
13
13
|
],
|
|
14
|
-
stateMutability: "nonpayable",
|
|
14
|
+
"stateMutability": "nonpayable",
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
type: "function",
|
|
18
|
-
name: "createLt",
|
|
19
|
-
inputs: [
|
|
17
|
+
"type": "function",
|
|
18
|
+
"name": "createLt",
|
|
19
|
+
"inputs": [
|
|
20
20
|
{
|
|
21
|
-
name: "marketId_",
|
|
22
|
-
type: "uint32",
|
|
23
|
-
internalType: "uint32",
|
|
21
|
+
"name": "marketId_",
|
|
22
|
+
"type": "uint32",
|
|
23
|
+
"internalType": "uint32",
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
name: "targetLeverage_",
|
|
27
|
-
type: "uint256",
|
|
28
|
-
internalType: "uint256",
|
|
26
|
+
"name": "targetLeverage_",
|
|
27
|
+
"type": "uint256",
|
|
28
|
+
"internalType": "uint256",
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
name: "isLong_",
|
|
32
|
-
type: "bool",
|
|
33
|
-
internalType: "bool",
|
|
31
|
+
"name": "isLong_",
|
|
32
|
+
"type": "bool",
|
|
33
|
+
"internalType": "bool",
|
|
34
34
|
},
|
|
35
35
|
],
|
|
36
|
-
outputs: [
|
|
36
|
+
"outputs": [
|
|
37
37
|
{
|
|
38
|
-
name: "",
|
|
39
|
-
type: "address",
|
|
40
|
-
internalType: "address",
|
|
38
|
+
"name": "",
|
|
39
|
+
"type": "address",
|
|
40
|
+
"internalType": "address",
|
|
41
41
|
},
|
|
42
42
|
],
|
|
43
|
-
stateMutability: "nonpayable",
|
|
43
|
+
"stateMutability": "nonpayable",
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
type: "function",
|
|
47
|
-
name: "lt",
|
|
48
|
-
inputs: [
|
|
46
|
+
"type": "function",
|
|
47
|
+
"name": "lt",
|
|
48
|
+
"inputs": [
|
|
49
49
|
{
|
|
50
|
-
name: "",
|
|
51
|
-
type: "uint32",
|
|
52
|
-
internalType: "uint32",
|
|
50
|
+
"name": "",
|
|
51
|
+
"type": "uint32",
|
|
52
|
+
"internalType": "uint32",
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
name: "",
|
|
56
|
-
type: "uint256",
|
|
57
|
-
internalType: "uint256",
|
|
55
|
+
"name": "",
|
|
56
|
+
"type": "uint256",
|
|
57
|
+
"internalType": "uint256",
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
name: "",
|
|
61
|
-
type: "bool",
|
|
62
|
-
internalType: "bool",
|
|
60
|
+
"name": "",
|
|
61
|
+
"type": "bool",
|
|
62
|
+
"internalType": "bool",
|
|
63
63
|
},
|
|
64
64
|
],
|
|
65
|
-
outputs: [
|
|
65
|
+
"outputs": [
|
|
66
66
|
{
|
|
67
|
-
name: "",
|
|
68
|
-
type: "address",
|
|
69
|
-
internalType: "address",
|
|
67
|
+
"name": "",
|
|
68
|
+
"type": "address",
|
|
69
|
+
"internalType": "address",
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
|
-
stateMutability: "view",
|
|
72
|
+
"stateMutability": "view",
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
type: "function",
|
|
76
|
-
name: "ltExists",
|
|
77
|
-
inputs: [
|
|
75
|
+
"type": "function",
|
|
76
|
+
"name": "ltExists",
|
|
77
|
+
"inputs": [
|
|
78
78
|
{
|
|
79
|
-
name: "",
|
|
80
|
-
type: "address",
|
|
81
|
-
internalType: "address",
|
|
79
|
+
"name": "",
|
|
80
|
+
"type": "address",
|
|
81
|
+
"internalType": "address",
|
|
82
82
|
},
|
|
83
83
|
],
|
|
84
|
-
outputs: [
|
|
84
|
+
"outputs": [
|
|
85
85
|
{
|
|
86
|
-
name: "",
|
|
87
|
-
type: "bool",
|
|
88
|
-
internalType: "bool",
|
|
86
|
+
"name": "",
|
|
87
|
+
"type": "bool",
|
|
88
|
+
"internalType": "bool",
|
|
89
89
|
},
|
|
90
90
|
],
|
|
91
|
-
stateMutability: "view",
|
|
91
|
+
"stateMutability": "view",
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
type: "function",
|
|
95
|
-
name: "lts",
|
|
96
|
-
inputs: [],
|
|
97
|
-
outputs: [
|
|
94
|
+
"type": "function",
|
|
95
|
+
"name": "lts",
|
|
96
|
+
"inputs": [],
|
|
97
|
+
"outputs": [
|
|
98
98
|
{
|
|
99
|
-
name: "",
|
|
100
|
-
type: "address[]",
|
|
101
|
-
internalType: "address[]",
|
|
99
|
+
"name": "",
|
|
100
|
+
"type": "address[]",
|
|
101
|
+
"internalType": "address[]",
|
|
102
102
|
},
|
|
103
103
|
],
|
|
104
|
-
stateMutability: "view",
|
|
104
|
+
"stateMutability": "view",
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
type: "function",
|
|
108
|
-
name: "redeployLt",
|
|
109
|
-
inputs: [
|
|
107
|
+
"type": "function",
|
|
108
|
+
"name": "redeployLt",
|
|
109
|
+
"inputs": [
|
|
110
110
|
{
|
|
111
|
-
name: "ltAddress_",
|
|
112
|
-
type: "address",
|
|
113
|
-
internalType: "address",
|
|
111
|
+
"name": "ltAddress_",
|
|
112
|
+
"type": "address",
|
|
113
|
+
"internalType": "address",
|
|
114
114
|
},
|
|
115
115
|
],
|
|
116
|
-
outputs: [],
|
|
117
|
-
stateMutability: "nonpayable",
|
|
116
|
+
"outputs": [],
|
|
117
|
+
"stateMutability": "nonpayable",
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
|
-
type: "event",
|
|
121
|
-
name: "CreateLeveragedToken",
|
|
122
|
-
inputs: [
|
|
120
|
+
"type": "event",
|
|
121
|
+
"name": "CreateLeveragedToken",
|
|
122
|
+
"inputs": [
|
|
123
123
|
{
|
|
124
|
-
name: "creator",
|
|
125
|
-
type: "address",
|
|
126
|
-
indexed: true,
|
|
127
|
-
internalType: "address",
|
|
124
|
+
"name": "creator",
|
|
125
|
+
"type": "address",
|
|
126
|
+
"indexed": true,
|
|
127
|
+
"internalType": "address",
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
|
-
name: "token",
|
|
131
|
-
type: "address",
|
|
132
|
-
indexed: true,
|
|
133
|
-
internalType: "address",
|
|
130
|
+
"name": "token",
|
|
131
|
+
"type": "address",
|
|
132
|
+
"indexed": true,
|
|
133
|
+
"internalType": "address",
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
|
-
name: "marketId",
|
|
137
|
-
type: "uint32",
|
|
138
|
-
indexed: true,
|
|
139
|
-
internalType: "uint32",
|
|
136
|
+
"name": "marketId",
|
|
137
|
+
"type": "uint32",
|
|
138
|
+
"indexed": true,
|
|
139
|
+
"internalType": "uint32",
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
|
-
name: "targetLeverage",
|
|
143
|
-
type: "uint256",
|
|
144
|
-
indexed: false,
|
|
145
|
-
internalType: "uint256",
|
|
142
|
+
"name": "targetLeverage",
|
|
143
|
+
"type": "uint256",
|
|
144
|
+
"indexed": false,
|
|
145
|
+
"internalType": "uint256",
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
|
-
name: "isLong",
|
|
149
|
-
type: "bool",
|
|
150
|
-
indexed: false,
|
|
151
|
-
internalType: "bool",
|
|
148
|
+
"name": "isLong",
|
|
149
|
+
"type": "bool",
|
|
150
|
+
"indexed": false,
|
|
151
|
+
"internalType": "bool",
|
|
152
152
|
},
|
|
153
153
|
],
|
|
154
|
-
anonymous: false,
|
|
154
|
+
"anonymous": false,
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
|
-
type: "error",
|
|
158
|
-
name: "AlreadyCreated",
|
|
159
|
-
inputs: [],
|
|
157
|
+
"type": "error",
|
|
158
|
+
"name": "AlreadyCreated",
|
|
159
|
+
"inputs": [],
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
|
-
type: "error",
|
|
163
|
-
name: "InvalidLeverage",
|
|
164
|
-
inputs: [],
|
|
162
|
+
"type": "error",
|
|
163
|
+
"name": "InvalidLeverage",
|
|
164
|
+
"inputs": [],
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
|
-
type: "error",
|
|
168
|
-
name: "NotLeveragedToken",
|
|
169
|
-
inputs: [],
|
|
167
|
+
"type": "error",
|
|
168
|
+
"name": "NotLeveragedToken",
|
|
169
|
+
"inputs": [],
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
|
-
type: "error",
|
|
173
|
-
name: "NotOwner",
|
|
174
|
-
inputs: [],
|
|
172
|
+
"type": "error",
|
|
173
|
+
"name": "NotOwner",
|
|
174
|
+
"inputs": [],
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
type: "error",
|
|
178
|
-
name: "PrecompileLib__PerpAssetInfoPrecompileFailed",
|
|
179
|
-
inputs: [],
|
|
177
|
+
"type": "error",
|
|
178
|
+
"name": "PrecompileLib__PerpAssetInfoPrecompileFailed",
|
|
179
|
+
"inputs": [],
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
|
-
type: "error",
|
|
183
|
-
name: "SafeERC20FailedOperation",
|
|
184
|
-
inputs: [
|
|
182
|
+
"type": "error",
|
|
183
|
+
"name": "SafeERC20FailedOperation",
|
|
184
|
+
"inputs": [
|
|
185
185
|
{
|
|
186
|
-
name: "token",
|
|
187
|
-
type: "address",
|
|
188
|
-
internalType: "address",
|
|
186
|
+
"name": "token",
|
|
187
|
+
"type": "address",
|
|
188
|
+
"internalType": "address",
|
|
189
189
|
},
|
|
190
190
|
],
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
|
-
type: "error",
|
|
194
|
-
name: "StillHasMargin",
|
|
195
|
-
inputs: [],
|
|
193
|
+
"type": "error",
|
|
194
|
+
"name": "StillHasMargin",
|
|
195
|
+
"inputs": [],
|
|
196
196
|
},
|
|
197
197
|
];
|