@bouncetech/contracts 1.0.0
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/README.md +81 -0
- package/abis/factory-abi.json +44 -0
- package/abis/leveraged-token-abi.json +34 -0
- package/addresses.json +9 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +24 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# @bouncetech/contracts
|
|
2
|
+
|
|
3
|
+
Smart contract addresses and ABIs for [Bounce Tech](https://bouncetech.io) - DeFi Leveraged Token Protocol built on HyperEVM.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @bouncetech/contracts
|
|
9
|
+
# or
|
|
10
|
+
yarn add @bouncetech/contracts
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @bouncetech/contracts
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Import Contract Addresses
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import {
|
|
21
|
+
ALL_ADDRESSES,
|
|
22
|
+
FACTORY_ADDRESS,
|
|
23
|
+
LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS,
|
|
24
|
+
} from "@bouncetech/contracts";
|
|
25
|
+
|
|
26
|
+
// Use all addresses
|
|
27
|
+
console.log(ALL_ADDRESSES.Factory);
|
|
28
|
+
|
|
29
|
+
// Or import specific addresses
|
|
30
|
+
const factoryAddress = FACTORY_ADDRESS;
|
|
31
|
+
const leveragedTokenAddress = LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Import Contract ABIs
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { FACTORY_ABI, LEVERAGED_TOKEN_ABI } from "@bouncetech/contracts";
|
|
38
|
+
|
|
39
|
+
// Use with ethers.js
|
|
40
|
+
import { Contract } from "ethers";
|
|
41
|
+
const factoryContract = new Contract(FACTORY_ADDRESS, FACTORY_ABI, provider);
|
|
42
|
+
|
|
43
|
+
// Use with viem
|
|
44
|
+
import { createPublicClient, http } from "viem";
|
|
45
|
+
const client = createPublicClient({
|
|
46
|
+
transport: http(),
|
|
47
|
+
});
|
|
48
|
+
const result = await client.readContract({
|
|
49
|
+
address: FACTORY_ADDRESS,
|
|
50
|
+
abi: FACTORY_ABI,
|
|
51
|
+
functionName: "createLeveragedToken",
|
|
52
|
+
args: [assetAddress, leverage],
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Available Contracts
|
|
57
|
+
|
|
58
|
+
- **Factory**: `0xeD8bCDe433EB7c4B69DB1235483bf0Edb726Fc1B`
|
|
59
|
+
- **GlobalStorage**: `0xa07d06383c1863c8A54d427aC890643d76cc03ff`
|
|
60
|
+
- **GlobalStorageHelper**: `0x99836aCBD207d5BCa57E3Fe0448bD1AB0A4BDf5C`
|
|
61
|
+
- **HyperliquidHandler**: `0xE57F983f3F317b2feF5585E660ed24980Ba7C3dA`
|
|
62
|
+
- **LeveragedTokenHelper**: `0x74dd1ecdA4fA350Ee67Ab4103C8728d8C2983802`
|
|
63
|
+
- **LeveragedTokenImplementation**: `0x20132f1804Df40Acc9b5115F47191016a5258721`
|
|
64
|
+
- **Referrals**: `0xfD3A6323878Fc991447CcDd4c644ab419afC6f76`
|
|
65
|
+
|
|
66
|
+
### Available ABIs
|
|
67
|
+
|
|
68
|
+
- `FACTORY_ABI` - Factory contract ABI
|
|
69
|
+
- `LEVERAGED_TOKEN_ABI` - Leveraged Token contract ABI
|
|
70
|
+
|
|
71
|
+
## Updating
|
|
72
|
+
|
|
73
|
+
When new contract addresses or ABIs are added, simply update your package:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm update @bouncetech/contracts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
MIT
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "createLeveragedToken",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "asset",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "leverage",
|
|
13
|
+
"type": "uint256",
|
|
14
|
+
"internalType": "uint256"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"outputs": [
|
|
18
|
+
{
|
|
19
|
+
"name": "",
|
|
20
|
+
"type": "address",
|
|
21
|
+
"internalType": "address"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"stateMutability": "nonpayable"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "event",
|
|
28
|
+
"name": "LeveragedTokenCreated",
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"name": "token",
|
|
32
|
+
"type": "address",
|
|
33
|
+
"indexed": true,
|
|
34
|
+
"internalType": "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "asset",
|
|
38
|
+
"type": "address",
|
|
39
|
+
"indexed": false,
|
|
40
|
+
"internalType": "address"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "balanceOf",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "account",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "address"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "",
|
|
15
|
+
"type": "uint256",
|
|
16
|
+
"internalType": "uint256"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "view"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "function",
|
|
23
|
+
"name": "totalSupply",
|
|
24
|
+
"inputs": [],
|
|
25
|
+
"outputs": [
|
|
26
|
+
{
|
|
27
|
+
"name": "",
|
|
28
|
+
"type": "uint256",
|
|
29
|
+
"internalType": "uint256"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"stateMutability": "view"
|
|
33
|
+
}
|
|
34
|
+
]
|
package/addresses.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Factory": "0xeD8bCDe433EB7c4B69DB1235483bf0Edb726Fc1B",
|
|
3
|
+
"GlobalStorage": "0xa07d06383c1863c8A54d427aC890643d76cc03ff",
|
|
4
|
+
"GlobalStorageHelper": "0x99836aCBD207d5BCa57E3Fe0448bD1AB0A4BDf5C",
|
|
5
|
+
"HyperliquidHandler": "0xE57F983f3F317b2feF5585E660ed24980Ba7C3dA",
|
|
6
|
+
"LeveragedTokenHelper": "0x74dd1ecdA4fA350Ee67Ab4103C8728d8C2983802",
|
|
7
|
+
"LeveragedTokenImplementation": "0x20132f1804Df40Acc9b5115F47191016a5258721",
|
|
8
|
+
"Referrals": "0xfD3A6323878Fc991447CcDd4c644ab419afC6f76"
|
|
9
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const ALL_ADDRESSES: {
|
|
2
|
+
Factory: string;
|
|
3
|
+
GlobalStorage: string;
|
|
4
|
+
GlobalStorageHelper: string;
|
|
5
|
+
HyperliquidHandler: string;
|
|
6
|
+
LeveragedTokenHelper: string;
|
|
7
|
+
LeveragedTokenImplementation: string;
|
|
8
|
+
Referrals: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const FACTORY_ADDRESS: string;
|
|
11
|
+
export declare const GLOBAL_STORAGE_ADDRESS: string;
|
|
12
|
+
export declare const GLOBAL_STORAGE_HELPER_ADDRESS: string;
|
|
13
|
+
export declare const HYPERLIQUID_HANDLER_ADDRESS: string;
|
|
14
|
+
export declare const LEVERAGED_TOKEN_HELPER_ADDRESS: string;
|
|
15
|
+
export declare const LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS: string;
|
|
16
|
+
export declare const REFERRALS_ADDRESS: string;
|
|
17
|
+
export declare const LEVERAGED_TOKEN_ABI: {
|
|
18
|
+
type: string;
|
|
19
|
+
name: string;
|
|
20
|
+
inputs: {
|
|
21
|
+
name: string;
|
|
22
|
+
type: string;
|
|
23
|
+
internalType: string;
|
|
24
|
+
}[];
|
|
25
|
+
outputs: {
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
internalType: string;
|
|
29
|
+
}[];
|
|
30
|
+
stateMutability: string;
|
|
31
|
+
}[];
|
|
32
|
+
export declare const FACTORY_ABI: ({
|
|
33
|
+
type: string;
|
|
34
|
+
name: string;
|
|
35
|
+
inputs: {
|
|
36
|
+
name: string;
|
|
37
|
+
type: string;
|
|
38
|
+
internalType: string;
|
|
39
|
+
}[];
|
|
40
|
+
outputs: {
|
|
41
|
+
name: string;
|
|
42
|
+
type: string;
|
|
43
|
+
internalType: string;
|
|
44
|
+
}[];
|
|
45
|
+
stateMutability: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: string;
|
|
48
|
+
name: string;
|
|
49
|
+
inputs: {
|
|
50
|
+
name: string;
|
|
51
|
+
type: string;
|
|
52
|
+
indexed: boolean;
|
|
53
|
+
internalType: string;
|
|
54
|
+
}[];
|
|
55
|
+
outputs?: undefined;
|
|
56
|
+
stateMutability?: undefined;
|
|
57
|
+
})[];
|
|
58
|
+
export default ALL_ADDRESSES;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FACTORY_ABI = exports.LEVERAGED_TOKEN_ABI = 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 = exports.ALL_ADDRESSES = void 0;
|
|
7
|
+
const addresses_json_1 = __importDefault(require("../addresses.json"));
|
|
8
|
+
const leveraged_token_abi_json_1 = __importDefault(require("../abis/leveraged-token-abi.json"));
|
|
9
|
+
const factory_abi_json_1 = __importDefault(require("../abis/factory-abi.json"));
|
|
10
|
+
// Export all contract addresses
|
|
11
|
+
exports.ALL_ADDRESSES = addresses_json_1.default;
|
|
12
|
+
// Export individual addresses for convenience
|
|
13
|
+
exports.FACTORY_ADDRESS = exports.ALL_ADDRESSES.Factory;
|
|
14
|
+
exports.GLOBAL_STORAGE_ADDRESS = exports.ALL_ADDRESSES.GlobalStorage;
|
|
15
|
+
exports.GLOBAL_STORAGE_HELPER_ADDRESS = exports.ALL_ADDRESSES.GlobalStorageHelper;
|
|
16
|
+
exports.HYPERLIQUID_HANDLER_ADDRESS = exports.ALL_ADDRESSES.HyperliquidHandler;
|
|
17
|
+
exports.LEVERAGED_TOKEN_HELPER_ADDRESS = exports.ALL_ADDRESSES.LeveragedTokenHelper;
|
|
18
|
+
exports.LEVERAGED_TOKEN_IMPLEMENTATION_ADDRESS = exports.ALL_ADDRESSES.LeveragedTokenImplementation;
|
|
19
|
+
exports.REFERRALS_ADDRESS = exports.ALL_ADDRESSES.Referrals;
|
|
20
|
+
// Export ABIs
|
|
21
|
+
exports.LEVERAGED_TOKEN_ABI = leveraged_token_abi_json_1.default;
|
|
22
|
+
exports.FACTORY_ABI = factory_abi_json_1.default;
|
|
23
|
+
// Export addresses as default for convenience
|
|
24
|
+
exports.default = exports.ALL_ADDRESSES;
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bouncetech/contracts",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Smart contract addresses and ABIs for Bounce Tech - DeFi Leveraged Token Protocol on HyperEVM",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"abis",
|
|
10
|
+
"addresses.json"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"defi",
|
|
18
|
+
"leveraged-tokens",
|
|
19
|
+
"hyperevm",
|
|
20
|
+
"bounce-tech",
|
|
21
|
+
"ethereum",
|
|
22
|
+
"smart-contracts"
|
|
23
|
+
],
|
|
24
|
+
"author": "Bounce Tech",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/bouncetech/bounce-npm.git"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"typescript": "^5.3.3"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=16.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|