Skip to content

Commit bfaae36

Browse files
committed
feat: b3 deployment
1 parent ab3e3ff commit bfaae36

15 files changed

+180
-5
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ forge test
167167
Use these faucets to receive test tokens on Arbitrum Sepolia and Optimism Sepolia testnets. Each request will send you 1000 units of the requested tokens (adjusted for token decimals). These can be used on the demo projects deployed when adding a new chain.
168168

169169
### Faucet Addresses
170+
170171
- Arbitrum Sepolia: [0x406c77947d91f965f09b458c07a66a033c3efea4](https://sepolia.arbiscan.io/address/0x406c77947d91f965f09b458c07a66a033c3efea4)
171172
- Optimism Sepolia: [0xbebfcb5a41836490c6449ce755c8dc361c175aa3](https://sepolia-optimism.etherscan.io/address/0xbebfcb5a41836490c6449ce755c8dc361c175aa3)
172173

@@ -179,12 +180,15 @@ cast send 0x406c77947d91f965f09b458c07a66a033c3efea4 "getTokens(address,address[
179180
```
180181

181182
#### Example
183+
182184
To get test USDC on Arbitrum Sepolia:
185+
183186
```bash
184187
cast send 0x406c77947d91f965f09b458c07a66a033c3efea4 "getTokens(address,address[])" YOUR_ADDRESS "[0x8537307810fC40F4073A12a38554D4Ff78EfFf41]" --rpc-url https://sepolia-rollup.arbitrum.io/rpc --private-key $YOUR_PRIVATE_KEY
185188
```
186189

187190
Replace:
191+
188192
- `YOUR_ADDRESS` with your wallet address
189193
- `$YOUR_PRIVATE_KEY` with your private key environment variable
190194

deployments/superbridge/prod_addresses.json

+28
Original file line numberDiff line numberDiff line change
@@ -2404,5 +2404,33 @@
24042404
}
24052405
}
24062406
}
2407+
},
2408+
"b3_mainnet": {
2409+
"8333": {
2410+
"B3": {
2411+
"isAppChain": true,
2412+
"MintableToken": "0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3",
2413+
"Controller": "0x6873ED2dda63e44C2F655Dd093ceb6DCA96e5Fc3",
2414+
"LimitHook": "0x4F1505f9615D94651FD3Ca5aD8910875E9aA2854",
2415+
"connectors": {
2416+
"8453": {
2417+
"FAST": "0xf5BDA9694F6f155348144faA6A1961D1a22C2Db4"
2418+
}
2419+
}
2420+
}
2421+
},
2422+
"8453": {
2423+
"B3": {
2424+
"isAppChain": false,
2425+
"NonMintableToken": "0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3",
2426+
"Vault": "0x5D6689B75A3019712A93aD866f119b66D664E198",
2427+
"LimitHook": "0x1a0dfde3FE4f15119bC750414A3457BF5E9E8C25",
2428+
"connectors": {
2429+
"8333": {
2430+
"FAST": "0x20bDD81FeA5A5e6a539Be17d2029204b16626624"
2431+
}
2432+
}
2433+
}
2434+
}
24072435
}
24082436
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"8333": {
3+
"B3": {
4+
"isAppChain": true,
5+
"MintableToken": "0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3",
6+
"Controller": "0x6873ED2dda63e44C2F655Dd093ceb6DCA96e5Fc3",
7+
"LimitHook": "0x4F1505f9615D94651FD3Ca5aD8910875E9aA2854",
8+
"connectors": {
9+
"8453": {
10+
"FAST": "0xf5BDA9694F6f155348144faA6A1961D1a22C2Db4"
11+
}
12+
}
13+
}
14+
},
15+
"8453": {
16+
"B3": {
17+
"isAppChain": false,
18+
"NonMintableToken": "0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3",
19+
"Vault": "0x5D6689B75A3019712A93aD866f119b66D664E198",
20+
"LimitHook": "0x1a0dfde3FE4f15119bC750414A3457BF5E9E8C25",
21+
"connectors": {
22+
"8333": {
23+
"FAST": "0x20bDD81FeA5A5e6a539Be17d2029204b16626624"
24+
}
25+
}
26+
}
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"8333": [
3+
[
4+
"0xf5BDA9694F6f155348144faA6A1961D1a22C2Db4",
5+
"ConnectorPlug",
6+
"contracts/ConnectorPlug.sol",
7+
[
8+
"0x6873ED2dda63e44C2F655Dd093ceb6DCA96e5Fc3",
9+
"0x0CC93650bF4D98237628DACf87f94E443956D8dF",
10+
8453,
11+
"0x0000000000000000000000000000000000000000000000000000000000000000"
12+
]
13+
],
14+
[
15+
"0x4F1505f9615D94651FD3Ca5aD8910875E9aA2854",
16+
"LimitHook",
17+
"contracts/hooks/LimitHook.sol",
18+
[
19+
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
20+
"0x6873ED2dda63e44C2F655Dd093ceb6DCA96e5Fc3",
21+
true
22+
]
23+
],
24+
[
25+
"0x6873ED2dda63e44C2F655Dd093ceb6DCA96e5Fc3",
26+
"FiatTokenV2_1_Controller",
27+
"contracts/bridge/FiatTokenV2_1/FiatTokenV2_1_Controller.sol",
28+
["0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3"]
29+
]
30+
],
31+
"8453": [
32+
[
33+
"0x20bDD81FeA5A5e6a539Be17d2029204b16626624",
34+
"ConnectorPlug",
35+
"contracts/ConnectorPlug.sol",
36+
[
37+
"0x5D6689B75A3019712A93aD866f119b66D664E198",
38+
"0x12E6e58864cE4402cF2B4B8a8E9c75eAD7280156",
39+
8333,
40+
"0x0000000000000000000000000000000000000000000000000000000000000000"
41+
]
42+
],
43+
[
44+
"0x1a0dfde3FE4f15119bC750414A3457BF5E9E8C25",
45+
"LimitHook",
46+
"contracts/hooks/LimitHook.sol",
47+
[
48+
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
49+
"0x5D6689B75A3019712A93aD866f119b66D664E198",
50+
false
51+
]
52+
],
53+
[
54+
"0x5D6689B75A3019712A93aD866f119b66D664E198",
55+
"Vault",
56+
"contracts/bridge/Vault.sol",
57+
["0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3"]
58+
]
59+
]
60+
}

hardhat.config.ts

+10
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const liveNetworks = [
8484
HardhatChainName.REYA,
8585
HardhatChainName.SYNDR_SEPOLIA_L3,
8686
CustomNetworks.POLTER_DEVNET,
87+
HardhatChainName.B3,
8788
];
8889

8990
let hardhatNetworkDetails = {};
@@ -117,6 +118,7 @@ const config: HardhatUserConfig = {
117118
[HardhatChainName.REYA]: "none",
118119
[HardhatChainName.AEVO]: "none",
119120
[CustomNetworks.POLTER_DEVNET]: "none",
121+
[HardhatChainName.B3]: "none",
120122
},
121123
// Custom chains for verification. These are only for verification to work. The hardhat etherscan plugin does not support these chains.
122124
customChains: [
@@ -202,6 +204,14 @@ const config: HardhatUserConfig = {
202204
browserURL: "https://polter-sepolia-explorer.devnet.alchemy.com/",
203205
},
204206
},
207+
{
208+
network: HardhatChainName.B3,
209+
chainId: ChainSlugToId[hardhatChainNameToSlug[HardhatChainName.B3]],
210+
urls: {
211+
apiURL: "https://explorer.b3.fun/api",
212+
browserURL: "https://explorer.b3.fun/",
213+
},
214+
},
205215
],
206216
},
207217
networks: {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"dependencies": {
6565
"@arbitrum/sdk": "^3.7.0",
6666
"@eth-optimism/sdk": "^3.3.2",
67-
"@socket.tech/dl-core": "^2.35.0",
67+
"@socket.tech/dl-core": "^2.39.0",
6868
"lodash": "^4.17.21",
6969
"prompts": "^2.4.2"
7070
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import {
2+
ChainSlug,
3+
DeploymentMode,
4+
IntegrationTypes,
5+
} from "@socket.tech/dl-core";
6+
import { Hooks, ProjectConstants } from "../../../../src";
7+
import { Tokens } from "../../../../src/enums";
8+
9+
// For testnet deployments, ChainSlug enum may not have some chains, therefore some keys will look like {421614:{}} instead of {[ChainSlug.ARBITRUM_SEPOLIA]:{}}. This wont affect the functionality of the project.
10+
export const pc: ProjectConstants = {
11+
[DeploymentMode.PROD]: {
12+
[Tokens.B3]: {
13+
vaultChains: [ChainSlug.BASE],
14+
controllerChains: [ChainSlug.B3],
15+
isFiatTokenV2_1: true,
16+
hook: {
17+
hookType: Hooks.LIMIT_HOOK,
18+
limitsAndPoolId: {
19+
[ChainSlug.B3]: {
20+
[IntegrationTypes.fast]: {
21+
sendingLimit: "1000000000",
22+
receivingLimit: "1000000000",
23+
},
24+
},
25+
[ChainSlug.BASE]: {
26+
[IntegrationTypes.fast]: {
27+
sendingLimit: "1000000000",
28+
receivingLimit: "1000000000",
29+
},
30+
},
31+
},
32+
},
33+
},
34+
},
35+
};

src/enums/existing-token-addresses.ts

+4
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@ export const ExistingTokenAddresses: {
4343
[Tokens.WETH]: "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
4444
[Tokens.WBTC]: "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
4545
},
46+
[ChainSlug.B3]: {
47+
[Tokens.B3]: "0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3",
48+
},
4649
[ChainSlug.BASE]: {
4750
[Tokens.USDC]: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
4851
[Tokens.WETH]: "0x4200000000000000000000000000000000000006",
4952
[Tokens.WSTETH]: "0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452",
5053
[Tokens.DAI]: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
5154
[Tokens.ETH]: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
5255
[Tokens.SUSDE]: "0x211Cc4DD073734dA055fbF44a2b4667d5E5fE5d2",
56+
[Tokens.B3]: "0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3",
5357
},
5458
[ChainSlug.ARBITRUM]: {
5559
[Tokens.USDC]: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",

src/enums/projectType.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ export const ProjectTypeMap: Record<Project, ProjectType> = {
2323
[Project.TESTING_TESTNET]: ProjectType.SUPERTOKEN,
2424
[Project.MAGIC_MAINNET]: ProjectType.SUPERTOKEN,
2525
[Project.POLTER_TESTNET]: ProjectType.SUPERBRIDGE,
26+
[Project.B3_MAINNET]: ProjectType.SUPERBRIDGE,
2627
};

src/enums/projects.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ export enum Project {
2020
TESTING_TESTNET = "testing_testnet",
2121
MAGIC_MAINNET = "magic_mainnet",
2222
POLTER_TESTNET = "polter_testnet",
23+
B3_MAINNET = "b3_mainnet",
2324
}

src/enums/tokenDecimals.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ export const tokenDecimals: { [key in Tokens]: number } = {
2424
[Tokens.SUSDE]: 18,
2525
[Tokens.SDEUSD]: 18,
2626
[Tokens.DEUSD]: 18,
27+
[Tokens.B3]: 18,
2728
};

src/enums/tokenName.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ export const tokenName: { [key in Tokens]: string } = {
2424
[Tokens.SUSDE]: "Staked USDe",
2525
[Tokens.SDEUSD]: "Staked deUSD",
2626
[Tokens.DEUSD]: "deUSD",
27+
[Tokens.B3]: "B3",
2728
};

src/enums/tokenSymbol.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ export const tokenSymbol: { [key in Tokens]: string } = {
2424
[Tokens.SUSDE]: "SUSDE",
2525
[Tokens.SDEUSD]: "SDEUSD",
2626
[Tokens.DEUSD]: "DEUSD",
27+
[Tokens.B3]: "B3",
2728
};

src/enums/tokens.ts

+1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ export enum Tokens {
2222
SUSDE = "SUSDE",
2323
SDEUSD = "SDEUSD",
2424
DEUSD = "DEUSD",
25+
B3 = "B3",
2526
}

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -774,10 +774,10 @@
774774
"@sentry/types" "5.30.0"
775775
tslib "^1.9.3"
776776

777-
"@socket.tech/dl-core@^2.35.0":
778-
version "2.35.0"
779-
resolved "https://registry.yarnpkg.com/@socket.tech/dl-core/-/dl-core-2.35.0.tgz#154120d222e095db812423f3b1e748fecdeb8815"
780-
integrity sha512-VH3I4lfCFRpF0ovaYACfd3Fhq2DAtWYcL45xUUHMNVII/EbBl3F7jB10ztWime+0l5sWXVP3o0R8bMnkrotw3w==
777+
"@socket.tech/dl-core@^2.39.0":
778+
version "2.39.0"
779+
resolved "https://registry.yarnpkg.com/@socket.tech/dl-core/-/dl-core-2.39.0.tgz#7286d760d0d3c0233d0139ac2a5ee99eba3cf47c"
780+
integrity sha512-QRJTEifveDtuKlfzJjoxuK0TI8Zo0Xm7tX7hHn1DNn5dG3OnnZuFKKrHS7573eoLv//2pLM/rkT7ZB9BpF1XiQ==
781781
dependencies:
782782
axios "^1.3.6"
783783
prompts "^2.4.2"

0 commit comments

Comments
 (0)