@bouncetech/contracts 1.4.2 → 1.4.4
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/LICENSE +22 -0
- package/README.md +10 -9
- package/dist/abis/leveraged-token-helper-abi.d.ts +38 -0
- package/dist/abis/leveraged-token-helper-abi.js +50 -0
- package/dist/index.d.ts +39 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bounce Tech
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @bouncetech/contracts
|
|
2
2
|
|
|
3
|
-
Smart contract addresses and ABIs for [Bounce Tech](https://
|
|
3
|
+
Smart contract addresses and ABIs for [Bounce Tech](https://bounce.tech/) - DeFi Leveraged Token Protocol built on HyperEVM.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -18,7 +18,6 @@ pnpm add @bouncetech/contracts
|
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
20
|
import {
|
|
21
|
-
ALL_ADDRESSES,
|
|
22
21
|
FACTORY_ADDRESS,
|
|
23
22
|
GLOBAL_STORAGE_ADDRESS,
|
|
24
23
|
GLOBAL_STORAGE_HELPER_ADDRESS,
|
|
@@ -27,16 +26,15 @@ import {
|
|
|
27
26
|
LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS,
|
|
28
27
|
REFERRALS_ADDRESS,
|
|
29
28
|
USDC_ADDRESS,
|
|
29
|
+
HYPE_BALANCE_HELPER_ADDRESS,
|
|
30
30
|
} from "@bouncetech/contracts";
|
|
31
31
|
|
|
32
|
-
// Use
|
|
33
|
-
console.log(ALL_ADDRESSES.Factory);
|
|
34
|
-
|
|
35
|
-
// Or import specific addresses
|
|
32
|
+
// Use specific addresses
|
|
36
33
|
const factoryAddress = FACTORY_ADDRESS;
|
|
37
34
|
const globalStorageAddress = GLOBAL_STORAGE_ADDRESS;
|
|
38
35
|
const leveragedTokenAddress = LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS;
|
|
39
36
|
const usdcAddress = USDC_ADDRESS;
|
|
37
|
+
const hypeBalanceHelperAddress = HYPE_BALANCE_HELPER_ADDRESS;
|
|
40
38
|
```
|
|
41
39
|
|
|
42
40
|
### Import Contract ABIs
|
|
@@ -51,6 +49,7 @@ import {
|
|
|
51
49
|
LEVERAGED_TOKEN_HELPER_ABI,
|
|
52
50
|
REFERRALS_ABI,
|
|
53
51
|
USDC_ABI,
|
|
52
|
+
HYPE_BALANCE_HELPER_ABI,
|
|
54
53
|
} from "@bouncetech/contracts";
|
|
55
54
|
|
|
56
55
|
// Use with ethers.js
|
|
@@ -62,11 +61,11 @@ import { createPublicClient, http } from "viem";
|
|
|
62
61
|
const client = createPublicClient({
|
|
63
62
|
transport: http(),
|
|
64
63
|
});
|
|
65
|
-
const
|
|
64
|
+
const ltExists = await client.readContract({
|
|
66
65
|
address: FACTORY_ADDRESS,
|
|
67
66
|
abi: FACTORY_ABI,
|
|
68
|
-
functionName: "
|
|
69
|
-
args: [
|
|
67
|
+
functionName: "ltExists",
|
|
68
|
+
args: [ltAddress],
|
|
70
69
|
});
|
|
71
70
|
```
|
|
72
71
|
|
|
@@ -82,6 +81,7 @@ The following contracts are available through this package:
|
|
|
82
81
|
- **LeveragedTokenImplementation**
|
|
83
82
|
- **Referrals**
|
|
84
83
|
- **USDC**
|
|
84
|
+
- **HypeBalanceHelper**
|
|
85
85
|
|
|
86
86
|
For the latest contract addresses, import them programmatically using the exported address constants.
|
|
87
87
|
|
|
@@ -97,6 +97,7 @@ The following ABIs are available:
|
|
|
97
97
|
- `LEVERAGED_TOKEN_HELPER_ABI` - LeveragedTokenHelper contract ABI
|
|
98
98
|
- `REFERRALS_ABI` - Referrals contract ABI
|
|
99
99
|
- `USDC_ABI` - USDC (ERC20) contract ABI
|
|
100
|
+
- `HYPE_BALANCE_HELPER_ABI` - HypeBalanceHelper contract ABI
|
|
100
101
|
|
|
101
102
|
## Updating
|
|
102
103
|
|
|
@@ -6,6 +6,25 @@ export declare const leveragedTokenHelperAbi: readonly [{
|
|
|
6
6
|
readonly internalType: "address";
|
|
7
7
|
}];
|
|
8
8
|
readonly stateMutability: "nonpayable";
|
|
9
|
+
}, {
|
|
10
|
+
readonly type: "function";
|
|
11
|
+
readonly name: "getExchangeRates";
|
|
12
|
+
readonly inputs: readonly [];
|
|
13
|
+
readonly outputs: readonly [{
|
|
14
|
+
readonly name: "";
|
|
15
|
+
readonly type: "tuple[]";
|
|
16
|
+
readonly internalType: "struct ILeveragedTokenHelper.ExchangeRates[]";
|
|
17
|
+
readonly components: readonly [{
|
|
18
|
+
readonly name: "leveragedTokenAddress";
|
|
19
|
+
readonly type: "address";
|
|
20
|
+
readonly internalType: "address";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "exchangeRate";
|
|
23
|
+
readonly type: "uint256";
|
|
24
|
+
readonly internalType: "uint256";
|
|
25
|
+
}];
|
|
26
|
+
}];
|
|
27
|
+
readonly stateMutability: "view";
|
|
9
28
|
}, {
|
|
10
29
|
readonly type: "function";
|
|
11
30
|
readonly name: "getLeveragedTokenBufferAssetValue";
|
|
@@ -410,6 +429,25 @@ export declare const leveragedTokenHelperAbi: readonly [{
|
|
|
410
429
|
}];
|
|
411
430
|
}];
|
|
412
431
|
readonly stateMutability: "view";
|
|
432
|
+
}, {
|
|
433
|
+
readonly type: "function";
|
|
434
|
+
readonly name: "getTotalAssets";
|
|
435
|
+
readonly inputs: readonly [];
|
|
436
|
+
readonly outputs: readonly [{
|
|
437
|
+
readonly name: "";
|
|
438
|
+
readonly type: "tuple[]";
|
|
439
|
+
readonly internalType: "struct ILeveragedTokenHelper.TotalAssets[]";
|
|
440
|
+
readonly components: readonly [{
|
|
441
|
+
readonly name: "leveragedTokenAddress";
|
|
442
|
+
readonly type: "address";
|
|
443
|
+
readonly internalType: "address";
|
|
444
|
+
}, {
|
|
445
|
+
readonly name: "totalAssets";
|
|
446
|
+
readonly type: "uint256";
|
|
447
|
+
readonly internalType: "uint256";
|
|
448
|
+
}];
|
|
449
|
+
}];
|
|
450
|
+
readonly stateMutability: "view";
|
|
413
451
|
}, {
|
|
414
452
|
readonly type: "error";
|
|
415
453
|
readonly name: "DivisionByZero";
|
|
@@ -13,6 +13,31 @@ exports.leveragedTokenHelperAbi = [
|
|
|
13
13
|
],
|
|
14
14
|
"stateMutability": "nonpayable",
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"type": "function",
|
|
18
|
+
"name": "getExchangeRates",
|
|
19
|
+
"inputs": [],
|
|
20
|
+
"outputs": [
|
|
21
|
+
{
|
|
22
|
+
"name": "",
|
|
23
|
+
"type": "tuple[]",
|
|
24
|
+
"internalType": "struct ILeveragedTokenHelper.ExchangeRates[]",
|
|
25
|
+
"components": [
|
|
26
|
+
{
|
|
27
|
+
"name": "leveragedTokenAddress",
|
|
28
|
+
"type": "address",
|
|
29
|
+
"internalType": "address",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "exchangeRate",
|
|
33
|
+
"type": "uint256",
|
|
34
|
+
"internalType": "uint256",
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
"stateMutability": "view",
|
|
40
|
+
},
|
|
16
41
|
{
|
|
17
42
|
"type": "function",
|
|
18
43
|
"name": "getLeveragedTokenBufferAssetValue",
|
|
@@ -532,6 +557,31 @@ exports.leveragedTokenHelperAbi = [
|
|
|
532
557
|
],
|
|
533
558
|
"stateMutability": "view",
|
|
534
559
|
},
|
|
560
|
+
{
|
|
561
|
+
"type": "function",
|
|
562
|
+
"name": "getTotalAssets",
|
|
563
|
+
"inputs": [],
|
|
564
|
+
"outputs": [
|
|
565
|
+
{
|
|
566
|
+
"name": "",
|
|
567
|
+
"type": "tuple[]",
|
|
568
|
+
"internalType": "struct ILeveragedTokenHelper.TotalAssets[]",
|
|
569
|
+
"components": [
|
|
570
|
+
{
|
|
571
|
+
"name": "leveragedTokenAddress",
|
|
572
|
+
"type": "address",
|
|
573
|
+
"internalType": "address",
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"name": "totalAssets",
|
|
577
|
+
"type": "uint256",
|
|
578
|
+
"internalType": "uint256",
|
|
579
|
+
},
|
|
580
|
+
],
|
|
581
|
+
},
|
|
582
|
+
],
|
|
583
|
+
"stateMutability": "view",
|
|
584
|
+
},
|
|
535
585
|
{
|
|
536
586
|
"type": "error",
|
|
537
587
|
"name": "DivisionByZero",
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ 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 = "0x31205dc06Ce1c0b3D30Fe0C0006D5A4Cb486b2FB";
|
|
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";
|
|
@@ -2319,6 +2319,25 @@ export declare const LEVERAGED_TOKEN_HELPER_ABI: readonly [{
|
|
|
2319
2319
|
readonly internalType: "address";
|
|
2320
2320
|
}];
|
|
2321
2321
|
readonly stateMutability: "nonpayable";
|
|
2322
|
+
}, {
|
|
2323
|
+
readonly type: "function";
|
|
2324
|
+
readonly name: "getExchangeRates";
|
|
2325
|
+
readonly inputs: readonly [];
|
|
2326
|
+
readonly outputs: readonly [{
|
|
2327
|
+
readonly name: "";
|
|
2328
|
+
readonly type: "tuple[]";
|
|
2329
|
+
readonly internalType: "struct ILeveragedTokenHelper.ExchangeRates[]";
|
|
2330
|
+
readonly components: readonly [{
|
|
2331
|
+
readonly name: "leveragedTokenAddress";
|
|
2332
|
+
readonly type: "address";
|
|
2333
|
+
readonly internalType: "address";
|
|
2334
|
+
}, {
|
|
2335
|
+
readonly name: "exchangeRate";
|
|
2336
|
+
readonly type: "uint256";
|
|
2337
|
+
readonly internalType: "uint256";
|
|
2338
|
+
}];
|
|
2339
|
+
}];
|
|
2340
|
+
readonly stateMutability: "view";
|
|
2322
2341
|
}, {
|
|
2323
2342
|
readonly type: "function";
|
|
2324
2343
|
readonly name: "getLeveragedTokenBufferAssetValue";
|
|
@@ -2723,6 +2742,25 @@ export declare const LEVERAGED_TOKEN_HELPER_ABI: readonly [{
|
|
|
2723
2742
|
}];
|
|
2724
2743
|
}];
|
|
2725
2744
|
readonly stateMutability: "view";
|
|
2745
|
+
}, {
|
|
2746
|
+
readonly type: "function";
|
|
2747
|
+
readonly name: "getTotalAssets";
|
|
2748
|
+
readonly inputs: readonly [];
|
|
2749
|
+
readonly outputs: readonly [{
|
|
2750
|
+
readonly name: "";
|
|
2751
|
+
readonly type: "tuple[]";
|
|
2752
|
+
readonly internalType: "struct ILeveragedTokenHelper.TotalAssets[]";
|
|
2753
|
+
readonly components: readonly [{
|
|
2754
|
+
readonly name: "leveragedTokenAddress";
|
|
2755
|
+
readonly type: "address";
|
|
2756
|
+
readonly internalType: "address";
|
|
2757
|
+
}, {
|
|
2758
|
+
readonly name: "totalAssets";
|
|
2759
|
+
readonly type: "uint256";
|
|
2760
|
+
readonly internalType: "uint256";
|
|
2761
|
+
}];
|
|
2762
|
+
}];
|
|
2763
|
+
readonly stateMutability: "view";
|
|
2726
2764
|
}, {
|
|
2727
2765
|
readonly type: "error";
|
|
2728
2766
|
readonly name: "DivisionByZero";
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.FACTORY_ADDRESS = "0xeD8bCDe433EB7c4B69DB1235483bf0Edb726Fc1B";
|
|
|
15
15
|
exports.GLOBAL_STORAGE_ADDRESS = "0xa07d06383c1863c8A54d427aC890643d76cc03ff";
|
|
16
16
|
exports.GLOBAL_STORAGE_HELPER_ADDRESS = "0x99836aCBD207d5BCa57E3Fe0448bD1AB0A4BDf5C";
|
|
17
17
|
exports.HYPERLIQUID_HANDLER_ADDRESS = "0x0f1365392EA9Df901dEb94d100679E7440E499bc";
|
|
18
|
-
exports.LEVERAGED_TOKEN_HELPER_ADDRESS = "
|
|
18
|
+
exports.LEVERAGED_TOKEN_HELPER_ADDRESS = "0x31205dc06Ce1c0b3D30Fe0C0006D5A4Cb486b2FB";
|
|
19
19
|
exports.LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS = "0x126e039f97Dd34fa64E685Ba4b37ca97b1a03DcB";
|
|
20
20
|
exports.REFERRALS_ADDRESS = "0xfD3A6323878Fc991447CcDd4c644ab419afC6f76";
|
|
21
21
|
exports.USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba630f";
|
package/package.json
CHANGED