@bouncetech/contracts 1.4.0 → 1.4.2
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/hype-balance-helper-abi.d.ts +24 -0
- package/dist/abis/hype-balance-helper-abi.js +36 -0
- package/dist/abis/leveraged-token-helper-abi.d.ts +47 -0
- package/dist/abis/leveraged-token-helper-abi.js +60 -0
- package/dist/index.d.ts +73 -1
- package/dist/index.js +5 -2
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const hypeBalanceHelperAbi: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly name: "getHypeBalances";
|
|
4
|
+
readonly inputs: readonly [{
|
|
5
|
+
readonly name: "users_";
|
|
6
|
+
readonly type: "address[]";
|
|
7
|
+
readonly internalType: "address[]";
|
|
8
|
+
}];
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly name: "";
|
|
11
|
+
readonly type: "tuple[]";
|
|
12
|
+
readonly internalType: "struct IHypeBalanceHelper.UserBalance[]";
|
|
13
|
+
readonly components: readonly [{
|
|
14
|
+
readonly name: "user";
|
|
15
|
+
readonly type: "address";
|
|
16
|
+
readonly internalType: "address";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "balance";
|
|
19
|
+
readonly type: "uint256";
|
|
20
|
+
readonly internalType: "uint256";
|
|
21
|
+
}];
|
|
22
|
+
}];
|
|
23
|
+
readonly stateMutability: "view";
|
|
24
|
+
}];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hypeBalanceHelperAbi = void 0;
|
|
4
|
+
exports.hypeBalanceHelperAbi = [
|
|
5
|
+
{
|
|
6
|
+
"type": "function",
|
|
7
|
+
"name": "getHypeBalances",
|
|
8
|
+
"inputs": [
|
|
9
|
+
{
|
|
10
|
+
"name": "users_",
|
|
11
|
+
"type": "address[]",
|
|
12
|
+
"internalType": "address[]",
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
"outputs": [
|
|
16
|
+
{
|
|
17
|
+
"name": "",
|
|
18
|
+
"type": "tuple[]",
|
|
19
|
+
"internalType": "struct IHypeBalanceHelper.UserBalance[]",
|
|
20
|
+
"components": [
|
|
21
|
+
{
|
|
22
|
+
"name": "user",
|
|
23
|
+
"type": "address",
|
|
24
|
+
"internalType": "address",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "balance",
|
|
28
|
+
"type": "uint256",
|
|
29
|
+
"internalType": "uint256",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
"stateMutability": "view",
|
|
35
|
+
},
|
|
36
|
+
];
|
|
@@ -71,6 +71,53 @@ export declare const leveragedTokenHelperAbi: readonly [{
|
|
|
71
71
|
}];
|
|
72
72
|
}];
|
|
73
73
|
readonly stateMutability: "view";
|
|
74
|
+
}, {
|
|
75
|
+
readonly type: "function";
|
|
76
|
+
readonly name: "getLeveragedTokenPositionData";
|
|
77
|
+
readonly inputs: readonly [];
|
|
78
|
+
readonly outputs: readonly [{
|
|
79
|
+
readonly name: "";
|
|
80
|
+
readonly type: "tuple[]";
|
|
81
|
+
readonly internalType: "struct ILeveragedTokenHelper.LeveragedTokenPositionData[]";
|
|
82
|
+
readonly components: readonly [{
|
|
83
|
+
readonly name: "leveragedToken";
|
|
84
|
+
readonly type: "address";
|
|
85
|
+
readonly internalType: "address";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "baseAssetContractBalance";
|
|
88
|
+
readonly type: "uint256";
|
|
89
|
+
readonly internalType: "uint256";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "leveragedTokenCredit";
|
|
92
|
+
readonly type: "uint256";
|
|
93
|
+
readonly internalType: "uint256";
|
|
94
|
+
}, {
|
|
95
|
+
readonly name: "usdcSpotBalance";
|
|
96
|
+
readonly type: "uint256";
|
|
97
|
+
readonly internalType: "uint256";
|
|
98
|
+
}, {
|
|
99
|
+
readonly name: "usdcPerpBalance";
|
|
100
|
+
readonly type: "uint256";
|
|
101
|
+
readonly internalType: "uint256";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "usdcMargin";
|
|
104
|
+
readonly type: "uint256";
|
|
105
|
+
readonly internalType: "uint256";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "notionalValue";
|
|
108
|
+
readonly type: "uint256";
|
|
109
|
+
readonly internalType: "uint256";
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "effectiveLeverage";
|
|
112
|
+
readonly type: "uint256";
|
|
113
|
+
readonly internalType: "uint256";
|
|
114
|
+
}, {
|
|
115
|
+
readonly name: "targetLeverage";
|
|
116
|
+
readonly type: "uint256";
|
|
117
|
+
readonly internalType: "uint256";
|
|
118
|
+
}];
|
|
119
|
+
}];
|
|
120
|
+
readonly stateMutability: "view";
|
|
74
121
|
}, {
|
|
75
122
|
readonly type: "function";
|
|
76
123
|
readonly name: "getLeveragedTokens";
|
|
@@ -98,6 +98,66 @@ exports.leveragedTokenHelperAbi = [
|
|
|
98
98
|
],
|
|
99
99
|
"stateMutability": "view",
|
|
100
100
|
},
|
|
101
|
+
{
|
|
102
|
+
"type": "function",
|
|
103
|
+
"name": "getLeveragedTokenPositionData",
|
|
104
|
+
"inputs": [],
|
|
105
|
+
"outputs": [
|
|
106
|
+
{
|
|
107
|
+
"name": "",
|
|
108
|
+
"type": "tuple[]",
|
|
109
|
+
"internalType": "struct ILeveragedTokenHelper.LeveragedTokenPositionData[]",
|
|
110
|
+
"components": [
|
|
111
|
+
{
|
|
112
|
+
"name": "leveragedToken",
|
|
113
|
+
"type": "address",
|
|
114
|
+
"internalType": "address",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "baseAssetContractBalance",
|
|
118
|
+
"type": "uint256",
|
|
119
|
+
"internalType": "uint256",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "leveragedTokenCredit",
|
|
123
|
+
"type": "uint256",
|
|
124
|
+
"internalType": "uint256",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "usdcSpotBalance",
|
|
128
|
+
"type": "uint256",
|
|
129
|
+
"internalType": "uint256",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "usdcPerpBalance",
|
|
133
|
+
"type": "uint256",
|
|
134
|
+
"internalType": "uint256",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "usdcMargin",
|
|
138
|
+
"type": "uint256",
|
|
139
|
+
"internalType": "uint256",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "notionalValue",
|
|
143
|
+
"type": "uint256",
|
|
144
|
+
"internalType": "uint256",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "effectiveLeverage",
|
|
148
|
+
"type": "uint256",
|
|
149
|
+
"internalType": "uint256",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "targetLeverage",
|
|
153
|
+
"type": "uint256",
|
|
154
|
+
"internalType": "uint256",
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
"stateMutability": "view",
|
|
160
|
+
},
|
|
101
161
|
{
|
|
102
162
|
"type": "function",
|
|
103
163
|
"name": "getLeveragedTokens",
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ export declare const FACTORY_ADDRESS = "0xeD8bCDe433EB7c4B69DB1235483bf0Edb726Fc
|
|
|
3
3
|
export declare const GLOBAL_STORAGE_ADDRESS = "0xa07d06383c1863c8A54d427aC890643d76cc03ff";
|
|
4
4
|
export declare const GLOBAL_STORAGE_HELPER_ADDRESS = "0x99836aCBD207d5BCa57E3Fe0448bD1AB0A4BDf5C";
|
|
5
5
|
export declare const HYPERLIQUID_HANDLER_ADDRESS = "0x0f1365392EA9Df901dEb94d100679E7440E499bc";
|
|
6
|
-
export declare const LEVERAGED_TOKEN_HELPER_ADDRESS = "
|
|
6
|
+
export declare const LEVERAGED_TOKEN_HELPER_ADDRESS = "0x4a548ad41888B023850130Bf931453Bb7d07aD23";
|
|
7
7
|
export declare const LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS = "0x126e039f97Dd34fa64E685Ba4b37ca97b1a03DcB";
|
|
8
8
|
export declare const REFERRALS_ADDRESS = "0xfD3A6323878Fc991447CcDd4c644ab419afC6f76";
|
|
9
9
|
export declare const USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba630f";
|
|
10
|
+
export declare const HYPE_BALANCE_HELPER_ADDRESS = "0x7B8CFf7E3b8Be150e735f2AF56DBB69ec44d91b3";
|
|
10
11
|
export declare const FACTORY_ABI: readonly [{
|
|
11
12
|
readonly type: "constructor";
|
|
12
13
|
readonly inputs: readonly [{
|
|
@@ -2383,6 +2384,53 @@ export declare const LEVERAGED_TOKEN_HELPER_ABI: readonly [{
|
|
|
2383
2384
|
}];
|
|
2384
2385
|
}];
|
|
2385
2386
|
readonly stateMutability: "view";
|
|
2387
|
+
}, {
|
|
2388
|
+
readonly type: "function";
|
|
2389
|
+
readonly name: "getLeveragedTokenPositionData";
|
|
2390
|
+
readonly inputs: readonly [];
|
|
2391
|
+
readonly outputs: readonly [{
|
|
2392
|
+
readonly name: "";
|
|
2393
|
+
readonly type: "tuple[]";
|
|
2394
|
+
readonly internalType: "struct ILeveragedTokenHelper.LeveragedTokenPositionData[]";
|
|
2395
|
+
readonly components: readonly [{
|
|
2396
|
+
readonly name: "leveragedToken";
|
|
2397
|
+
readonly type: "address";
|
|
2398
|
+
readonly internalType: "address";
|
|
2399
|
+
}, {
|
|
2400
|
+
readonly name: "baseAssetContractBalance";
|
|
2401
|
+
readonly type: "uint256";
|
|
2402
|
+
readonly internalType: "uint256";
|
|
2403
|
+
}, {
|
|
2404
|
+
readonly name: "leveragedTokenCredit";
|
|
2405
|
+
readonly type: "uint256";
|
|
2406
|
+
readonly internalType: "uint256";
|
|
2407
|
+
}, {
|
|
2408
|
+
readonly name: "usdcSpotBalance";
|
|
2409
|
+
readonly type: "uint256";
|
|
2410
|
+
readonly internalType: "uint256";
|
|
2411
|
+
}, {
|
|
2412
|
+
readonly name: "usdcPerpBalance";
|
|
2413
|
+
readonly type: "uint256";
|
|
2414
|
+
readonly internalType: "uint256";
|
|
2415
|
+
}, {
|
|
2416
|
+
readonly name: "usdcMargin";
|
|
2417
|
+
readonly type: "uint256";
|
|
2418
|
+
readonly internalType: "uint256";
|
|
2419
|
+
}, {
|
|
2420
|
+
readonly name: "notionalValue";
|
|
2421
|
+
readonly type: "uint256";
|
|
2422
|
+
readonly internalType: "uint256";
|
|
2423
|
+
}, {
|
|
2424
|
+
readonly name: "effectiveLeverage";
|
|
2425
|
+
readonly type: "uint256";
|
|
2426
|
+
readonly internalType: "uint256";
|
|
2427
|
+
}, {
|
|
2428
|
+
readonly name: "targetLeverage";
|
|
2429
|
+
readonly type: "uint256";
|
|
2430
|
+
readonly internalType: "uint256";
|
|
2431
|
+
}];
|
|
2432
|
+
}];
|
|
2433
|
+
readonly stateMutability: "view";
|
|
2386
2434
|
}, {
|
|
2387
2435
|
readonly type: "function";
|
|
2388
2436
|
readonly name: "getLeveragedTokens";
|
|
@@ -3178,3 +3226,27 @@ export declare const USDC_ABI: readonly [{
|
|
|
3178
3226
|
}];
|
|
3179
3227
|
readonly anonymous: false;
|
|
3180
3228
|
}];
|
|
3229
|
+
export declare const HYPE_BALANCE_HELPER_ABI: readonly [{
|
|
3230
|
+
readonly type: "function";
|
|
3231
|
+
readonly name: "getHypeBalances";
|
|
3232
|
+
readonly inputs: readonly [{
|
|
3233
|
+
readonly name: "users_";
|
|
3234
|
+
readonly type: "address[]";
|
|
3235
|
+
readonly internalType: "address[]";
|
|
3236
|
+
}];
|
|
3237
|
+
readonly outputs: readonly [{
|
|
3238
|
+
readonly name: "";
|
|
3239
|
+
readonly type: "tuple[]";
|
|
3240
|
+
readonly internalType: "struct IHypeBalanceHelper.UserBalance[]";
|
|
3241
|
+
readonly components: readonly [{
|
|
3242
|
+
readonly name: "user";
|
|
3243
|
+
readonly type: "address";
|
|
3244
|
+
readonly internalType: "address";
|
|
3245
|
+
}, {
|
|
3246
|
+
readonly name: "balance";
|
|
3247
|
+
readonly type: "uint256";
|
|
3248
|
+
readonly internalType: "uint256";
|
|
3249
|
+
}];
|
|
3250
|
+
}];
|
|
3251
|
+
readonly stateMutability: "view";
|
|
3252
|
+
}];
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.USDC_ABI = exports.REFERRALS_ABI = exports.LEVERAGED_TOKEN_HELPER_ABI = exports.LEVERAGED_TOKEN_ABI = exports.HYPERLIQUID_HANDLER_ABI = exports.GLOBAL_STORAGE_HELPER_ABI = exports.GLOBAL_STORAGE_ABI = exports.FACTORY_ABI = exports.USDC_ADDRESS = exports.REFERRALS_ADDRESS = exports.LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS = exports.LEVERAGED_TOKEN_HELPER_ADDRESS = exports.HYPERLIQUID_HANDLER_ADDRESS = exports.GLOBAL_STORAGE_HELPER_ADDRESS = exports.GLOBAL_STORAGE_ADDRESS = exports.FACTORY_ADDRESS = void 0;
|
|
3
|
+
exports.HYPE_BALANCE_HELPER_ABI = exports.USDC_ABI = exports.REFERRALS_ABI = exports.LEVERAGED_TOKEN_HELPER_ABI = exports.LEVERAGED_TOKEN_ABI = exports.HYPERLIQUID_HANDLER_ABI = exports.GLOBAL_STORAGE_HELPER_ABI = exports.GLOBAL_STORAGE_ABI = exports.FACTORY_ABI = exports.HYPE_BALANCE_HELPER_ADDRESS = exports.USDC_ADDRESS = exports.REFERRALS_ADDRESS = exports.LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS = exports.LEVERAGED_TOKEN_HELPER_ADDRESS = exports.HYPERLIQUID_HANDLER_ADDRESS = exports.GLOBAL_STORAGE_HELPER_ADDRESS = exports.GLOBAL_STORAGE_ADDRESS = exports.FACTORY_ADDRESS = void 0;
|
|
4
4
|
const leveraged_token_abi_1 = require("./abis/leveraged-token-abi");
|
|
5
5
|
const factory_abi_1 = require("./abis/factory-abi");
|
|
6
6
|
const global_storage_abi_1 = require("./abis/global-storage-abi");
|
|
@@ -9,15 +9,17 @@ const hyperliquid_handler_abi_1 = require("./abis/hyperliquid-handler-abi");
|
|
|
9
9
|
const leveraged_token_helper_abi_1 = require("./abis/leveraged-token-helper-abi");
|
|
10
10
|
const referrals_abi_1 = require("./abis/referrals-abi");
|
|
11
11
|
const erc20_abi_1 = require("./abis/erc20-abi");
|
|
12
|
+
const hype_balance_helper_abi_1 = require("./abis/hype-balance-helper-abi");
|
|
12
13
|
// Addresses
|
|
13
14
|
exports.FACTORY_ADDRESS = "0xeD8bCDe433EB7c4B69DB1235483bf0Edb726Fc1B";
|
|
14
15
|
exports.GLOBAL_STORAGE_ADDRESS = "0xa07d06383c1863c8A54d427aC890643d76cc03ff";
|
|
15
16
|
exports.GLOBAL_STORAGE_HELPER_ADDRESS = "0x99836aCBD207d5BCa57E3Fe0448bD1AB0A4BDf5C";
|
|
16
17
|
exports.HYPERLIQUID_HANDLER_ADDRESS = "0x0f1365392EA9Df901dEb94d100679E7440E499bc";
|
|
17
|
-
exports.LEVERAGED_TOKEN_HELPER_ADDRESS = "
|
|
18
|
+
exports.LEVERAGED_TOKEN_HELPER_ADDRESS = "0x4a548ad41888B023850130Bf931453Bb7d07aD23";
|
|
18
19
|
exports.LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS = "0x126e039f97Dd34fa64E685Ba4b37ca97b1a03DcB";
|
|
19
20
|
exports.REFERRALS_ADDRESS = "0xfD3A6323878Fc991447CcDd4c644ab419afC6f76";
|
|
20
21
|
exports.USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba630f";
|
|
22
|
+
exports.HYPE_BALANCE_HELPER_ADDRESS = "0x7B8CFf7E3b8Be150e735f2AF56DBB69ec44d91b3";
|
|
21
23
|
// ABIs
|
|
22
24
|
exports.FACTORY_ABI = factory_abi_1.factoryAbi;
|
|
23
25
|
exports.GLOBAL_STORAGE_ABI = global_storage_abi_1.globalStorageAbi;
|
|
@@ -27,3 +29,4 @@ exports.LEVERAGED_TOKEN_ABI = leveraged_token_abi_1.leveragedTokenAbi;
|
|
|
27
29
|
exports.LEVERAGED_TOKEN_HELPER_ABI = leveraged_token_helper_abi_1.leveragedTokenHelperAbi;
|
|
28
30
|
exports.REFERRALS_ABI = referrals_abi_1.referralsAbi;
|
|
29
31
|
exports.USDC_ABI = erc20_abi_1.erc20Abi;
|
|
32
|
+
exports.HYPE_BALANCE_HELPER_ABI = hype_balance_helper_abi_1.hypeBalanceHelperAbi;
|
package/package.json
CHANGED