@ohlabs/configuration 1.0.0 → 1.1.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/chain-slugs.js +12 -0
- package/chain.js +78 -12
- package/contract-index.js +33 -8
- package/package.json +7 -3
- package/token.js +5 -4
package/chain-slugs.js
ADDED
package/chain.js
CHANGED
|
@@ -1,16 +1,82 @@
|
|
|
1
|
+
const { CHAIN_SLUGS } = require('@ohlabs/configuration/chain-slugs');
|
|
2
|
+
|
|
1
3
|
const chains = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
production: {
|
|
5
|
+
[CHAIN_SLUGS.Arbitrum]: {
|
|
6
|
+
chainId: 42161,
|
|
7
|
+
rpc: "https://arb1.arbitrum.io/rpc",
|
|
8
|
+
explorer: "https://arbiscan.io"
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
[CHAIN_SLUGS.B3]: {
|
|
12
|
+
chainId: 8333,
|
|
13
|
+
rpc: "https://mainnet-rpc.b3.fun",
|
|
14
|
+
explorer: "https://explorer.b3.fun"
|
|
9
15
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
|
|
17
|
+
[CHAIN_SLUGS.Base]: {
|
|
18
|
+
chainId: 8453,
|
|
19
|
+
rpc: "https://mainnet.base.org",
|
|
20
|
+
explorer: "https://basescan.org"
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
[CHAIN_SLUGS.Blast]: {
|
|
24
|
+
chainId: 81457,
|
|
25
|
+
rpc: "https://rpc.blast.io",
|
|
26
|
+
explorer: "https://blastscan.io"
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
[CHAIN_SLUGS.BNB]: {
|
|
30
|
+
chainId: 56,
|
|
31
|
+
rpc: "https://bsc-dataseed.binance.org",
|
|
32
|
+
explorer: "https://bscscan.com"
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
[CHAIN_SLUGS.Ethereum]: {
|
|
36
|
+
chainId: 1,
|
|
37
|
+
rpc: "https://rpc.ankr.com/eth",
|
|
38
|
+
explorer: "https://etherscan.io"
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
test: {
|
|
44
|
+
[CHAIN_SLUGS.Arbitrum]: {
|
|
45
|
+
chainId: 421614,
|
|
46
|
+
rpc: "https://sepolia-rollup.arbitrum.io/rpc",
|
|
47
|
+
explorer: "https://sepolia.arbiscan.io"
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
[CHAIN_SLUGS.B3]: {
|
|
51
|
+
chainId: 1993,
|
|
52
|
+
rpc: "https://testnet-rpc.b3.fun",
|
|
53
|
+
explorer: "https://testnet-explorer.b3.fun"
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
[CHAIN_SLUGS.Base]: {
|
|
57
|
+
chainId: 84532,
|
|
58
|
+
rpc: "https://sepolia.base.org",
|
|
59
|
+
explorer: "https://sepolia.basescan.org"
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
[CHAIN_SLUGS.Blast]: {
|
|
63
|
+
chainId: 168587773,
|
|
64
|
+
rpc: "https://sepolia.blast.io",
|
|
65
|
+
explorer: "https://testnet.blastscan.io"
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
[CHAIN_SLUGS.BNB]: {
|
|
69
|
+
chainId: 97,
|
|
70
|
+
rpc: "https://data-seed-prebsc-1-s1.bnbchain.org:8545",
|
|
71
|
+
explorer: "https://testnet.bscscan.com"
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
[CHAIN_SLUGS.Ethereum]: {
|
|
75
|
+
chainId: 11155111,
|
|
76
|
+
rpc: "https://rpc.sepolia.org",
|
|
77
|
+
explorer: "https://sepolia.etherscan.io"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
15
81
|
|
|
16
82
|
exports.chains = chains;
|
package/contract-index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
const { CHAIN_SLUGS } = require("@ohlabs/configuration/chain-slugs");
|
|
2
|
+
|
|
1
3
|
var contractIndex = {
|
|
2
4
|
production: {
|
|
3
|
-
B3: {
|
|
5
|
+
[CHAIN_SLUGS.B3]: {
|
|
4
6
|
Native: {
|
|
5
7
|
WETH_ADDRESS: '',
|
|
6
8
|
},
|
|
@@ -20,7 +22,30 @@ var contractIndex = {
|
|
|
20
22
|
REWARDS_POOL_ADDRESS: '',
|
|
21
23
|
}
|
|
22
24
|
},
|
|
23
|
-
|
|
25
|
+
[CHAIN_SLUGS.Base]: {
|
|
26
|
+
Native: {
|
|
27
|
+
WETH_ADDRESS: '',
|
|
28
|
+
},
|
|
29
|
+
Uniswap: {
|
|
30
|
+
V2_FACTORY_ADDRESS: '',
|
|
31
|
+
V2_ROUTER_ADDRESS: '',
|
|
32
|
+
},
|
|
33
|
+
OHL: {
|
|
34
|
+
VAULT_ADDRESS: '',
|
|
35
|
+
},
|
|
36
|
+
MasterBlaster: {
|
|
37
|
+
X9_ADDRESS: '',
|
|
38
|
+
HANGAR_ADDRESS: '',
|
|
39
|
+
GAME_SCORES_ADDRESS: '',
|
|
40
|
+
GAME_REWARDS_ADDRESS: '',
|
|
41
|
+
PRESALE_ADDRESS: '',
|
|
42
|
+
REWARDS_POOL_ADDRESS: '',
|
|
43
|
+
},
|
|
44
|
+
WalkThePlanck: {
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
[CHAIN_SLUGS.Arbitrum]: {
|
|
24
49
|
Native: {
|
|
25
50
|
WETH_ADDRESS: '',
|
|
26
51
|
},
|
|
@@ -40,7 +65,7 @@ var contractIndex = {
|
|
|
40
65
|
REWARDS_POOL_ADDRESS: '',
|
|
41
66
|
}
|
|
42
67
|
},
|
|
43
|
-
Story: {
|
|
68
|
+
[CHAIN_SLUGS.Story]: {
|
|
44
69
|
Native: {
|
|
45
70
|
WETH_ADDRESS: '',
|
|
46
71
|
},
|
|
@@ -60,7 +85,7 @@ var contractIndex = {
|
|
|
60
85
|
REWARDS_POOL_ADDRESS: '',
|
|
61
86
|
}
|
|
62
87
|
},
|
|
63
|
-
Monad: {
|
|
88
|
+
[CHAIN_SLUGS.Monad]: {
|
|
64
89
|
Native: {
|
|
65
90
|
WETH_ADDRESS: '',
|
|
66
91
|
},
|
|
@@ -82,7 +107,7 @@ var contractIndex = {
|
|
|
82
107
|
}
|
|
83
108
|
},
|
|
84
109
|
test: {
|
|
85
|
-
B3:{
|
|
110
|
+
[CHAIN_SLUGS.B3]:{
|
|
86
111
|
Native: {
|
|
87
112
|
WETH_ADDRESS: '0x518e89F88d6bb1331d22d6222D7eb72Fe58a74EC',
|
|
88
113
|
},
|
|
@@ -102,7 +127,7 @@ var contractIndex = {
|
|
|
102
127
|
REWARDS_POOL_ADDRESS: '0x518C1295796336032d8F2e8344385714D40027D2',
|
|
103
128
|
}
|
|
104
129
|
},
|
|
105
|
-
Arbitrum: {
|
|
130
|
+
[CHAIN_SLUGS.Arbitrum]: {
|
|
106
131
|
Native: {
|
|
107
132
|
WETH_ADDRESS: '',
|
|
108
133
|
},
|
|
@@ -122,7 +147,7 @@ var contractIndex = {
|
|
|
122
147
|
REWARDS_POOL_ADDRESS: '',
|
|
123
148
|
}
|
|
124
149
|
},
|
|
125
|
-
Story: {
|
|
150
|
+
[CHAIN_SLUGS.Story]: {
|
|
126
151
|
Native: {
|
|
127
152
|
WETH_ADDRESS: '',
|
|
128
153
|
},
|
|
@@ -142,7 +167,7 @@ var contractIndex = {
|
|
|
142
167
|
REWARDS_POOL_ADDRESS: '',
|
|
143
168
|
}
|
|
144
169
|
},
|
|
145
|
-
Monad: {
|
|
170
|
+
[CHAIN_SLUGS.Monad]: {
|
|
146
171
|
Native: {
|
|
147
172
|
WETH_ADDRESS: '',
|
|
148
173
|
},
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohlabs/configuration",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Configuration data",
|
|
5
|
-
"main": "index.js",
|
|
6
5
|
"scripts": {
|
|
7
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
7
|
},
|
|
9
8
|
"author": "Gargyle",
|
|
10
|
-
"license": "MIT"
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"type":"commonjs",
|
|
11
|
+
"exports": {
|
|
12
|
+
"./*": "./*.js",
|
|
13
|
+
"./*.js": "./*.js"
|
|
14
|
+
}
|
|
11
15
|
}
|
package/token.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
const { CHAIN_SLUGS } = require("@ohlabs/configuration/chain-slugs");
|
|
2
|
+
const { contractIndex } = require("@ohlabs/configuration/contract-index");
|
|
2
3
|
|
|
3
4
|
const tokenIndex = {
|
|
4
5
|
production : {},
|
|
5
6
|
test : {
|
|
6
|
-
B3 : {
|
|
7
|
+
[CHAIN_SLUGS.B3] : {
|
|
7
8
|
'Xraxion-9' : {
|
|
8
9
|
native : false,
|
|
9
10
|
name : 'X9',
|
|
10
|
-
address : contractIndex.test.B3.X9_ADDRESS,
|
|
11
|
+
address : contractIndex.test[CHAIN_SLUGS.B3].MasterBlaster.X9_ADDRESS,
|
|
11
12
|
logoURI : '/resources/X9-32.png',
|
|
12
13
|
},
|
|
13
14
|
'Wrapped Ether' : {
|
|
14
15
|
native : true,
|
|
15
16
|
name : 'Eth',
|
|
16
|
-
address : contractIndex.test.B3.WETH_ADDRESS,
|
|
17
|
+
address : contractIndex.test[CHAIN_SLUGS.B3].Native.WETH_ADDRESS,
|
|
17
18
|
logoURI : 'https://ethereum-optimism.github.io/data/WETH/logo.png',
|
|
18
19
|
},
|
|
19
20
|
}
|