example-js-sdk 0.0.5 → 0.0.6

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.
@@ -13,7 +13,7 @@ const number_1 = require("../util/number");
13
13
  const long_1 = __importDefault(require("long"));
14
14
  const InsightsQueryClient_1 = __importDefault(require("./InsightsQueryClient"));
15
15
  const SYMBOL_OVERRIDE = {
16
- swth: "SWTH",
16
+ fee: "FEE",
17
17
  NNEO: "nNEO",
18
18
  YAM1: "YAM",
19
19
  YAM2: "YAM",
@@ -22,7 +22,7 @@ const SYMBOL_OVERRIDE = {
22
22
  DBC1: "DBC",
23
23
  DBC2: "DBC",
24
24
  AVA1: "AVA",
25
- TSWTH: "tSWTH",
25
+ TSWTH: "tFEE",
26
26
  "cibStride Liquid Staked LUNA": "cibstLUNA",
27
27
  };
28
28
  const regexCdpDenom = RegExp(`^${constant_1.DenomPrefix.CDPToken}/`, "i");
@@ -93,7 +93,7 @@ class TokenClient {
93
93
  // chainId defaults to 3 so that blockchain will be undefined
94
94
  let chainId = tokenData?.chainId?.toNumber() ?? 3;
95
95
  if (this.isNativeToken(denom) || this.isNativeStablecoin(denom) || TokenClient.isPoolToken(denom) || TokenClient.isCdpToken(denom) || TokenClient.isVaultToken(denom)) {
96
- // native denoms "swth" and "usc" should be native.
96
+ // native denoms "fee" and "usc" should be native.
97
97
  // pool and cdp tokens are on the Native blockchain, hence 0
98
98
  chainId = 0;
99
99
  }
@@ -322,13 +322,13 @@ class TokenClient {
322
322
  return null;
323
323
  }
324
324
  getNativeToken() {
325
- return this.tokenForId("swth");
325
+ return this.tokenForId("fee");
326
326
  }
327
327
  getNativeStablecoin() {
328
328
  return this.tokenForId("usc");
329
329
  }
330
330
  isNativeToken(denom) {
331
- return denom === "swth";
331
+ return denom === "fee";
332
332
  }
333
333
  isNativeStablecoin(denom) {
334
334
  return denom === "usc";
@@ -362,7 +362,7 @@ class TokenClient {
362
362
  else {
363
363
  targetChain = this.getBlockchainV2(token.denom);
364
364
  }
365
- const isSourceToken = targetChain === chain && token.denom !== "swth";
365
+ const isSourceToken = targetChain === chain && token.denom !== "fee";
366
366
  // if not source token find wrapped token for chain
367
367
  const depositToken = isSourceToken ? token : this.getWrappedToken(token.denom, chain, version);
368
368
  if (!depositToken) {
@@ -698,7 +698,7 @@ class TokenClient {
698
698
  const currencies = util_1.IBCUtils.EmbedChainInfos[chainId].currencies;
699
699
  const channelObj = ibc_1.swthChannels[chainId]?.ibc;
700
700
  currencies.forEach((asset) => {
701
- const channel = asset.coinMinimalDenom !== "swth" ? channelObj?.sourceChannel ?? "channel-0" : channelObj?.dstChannel ?? "channel-0";
701
+ const channel = asset.coinMinimalDenom !== "fee" ? channelObj?.sourceChannel ?? "channel-0" : channelObj?.dstChannel ?? "channel-0";
702
702
  const assetDenom = TokenClient.isIBCDenom(asset.coinMinimalDenom)
703
703
  ? asset.coinMinimalDenom
704
704
  : util_1.IBCUtils.makeIBCMinimalDenom(channel, asset.coinMinimalDenom);
@@ -9,12 +9,11 @@ const proto_signing_1 = require("@cosmjs/proto-signing");
9
9
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
10
10
  const long_1 = __importDefault(require("long"));
11
11
  exports.DEFAULT_FEE_DENOM = "fee";
12
- // 0.0000001 SWTH
13
12
  exports.DEFAULT_GAS_PRICE = new bignumber_js_1.default(10);
14
13
  exports.DEFAULT_GAS = new bignumber_js_1.default(100000000);
15
14
  exports.PAGINATE_10K = pagination_1.PageRequest.fromPartial({ limit: new long_1.default(10000) });
16
15
  exports.DEFAULT_FEE = {
17
- amount: (0, proto_signing_1.coins)(exports.DEFAULT_GAS_PRICE.times(exports.DEFAULT_GAS).dp(0).toString(), "fee"),
16
+ amount: (0, proto_signing_1.coins)(exports.DEFAULT_GAS_PRICE.times(exports.DEFAULT_GAS).dp(0).toString(), exports.DEFAULT_FEE_DENOM),
18
17
  gas: exports.DEFAULT_GAS.toString(10),
19
18
  };
20
19
  exports.CARBON_GAS_PRICE = {
@@ -1556,33 +1556,30 @@ exports.EmbedChainInfosInit = {
1556
1556
  [ChainIds.Carbon]: {
1557
1557
  feeCurrencies: [
1558
1558
  {
1559
- coinDenom: "SWTH",
1560
- coinMinimalDenom: "swth",
1559
+ coinDenom: "FEE",
1560
+ coinMinimalDenom: "fee",
1561
1561
  coinDecimals: 8,
1562
- coinGeckoId: "switcheo",
1563
1562
  gasPriceStep: generic_1.CARBON_GAS_PRICE,
1564
1563
  },
1565
1564
  ],
1566
1565
  bip44: { coinType: 118 },
1567
1566
  currencies: [
1568
1567
  {
1569
- coinDenom: "SWTH",
1570
- coinMinimalDenom: "swth",
1568
+ coinDenom: "FEE",
1569
+ coinMinimalDenom: "fee",
1571
1570
  coinDecimals: 8,
1572
- coinGeckoId: "switcheo",
1573
1571
  },
1574
1572
  ],
1575
1573
  stakeCurrency: {
1576
- coinDenom: "SWTH",
1577
- coinMinimalDenom: "swth",
1574
+ coinDenom: "FEE",
1575
+ coinMinimalDenom: "fee",
1578
1576
  coinDecimals: 8,
1579
- coinGeckoId: "switcheo",
1580
1577
  },
1581
1578
  rest: "https://api.carbon.network",
1582
1579
  rpc: "https://tm-api.carbon.network/",
1583
1580
  chainName: "Carbon",
1584
1581
  chainId: "carbon-1",
1585
- bech32Config: exports.IBCAddress.defaultBech32Config("swth"),
1582
+ bech32Config: exports.IBCAddress.defaultBech32Config("meme"),
1586
1583
  features: ["ibc-transfer", "ibc-go"],
1587
1584
  explorerUrlToTx: "https://scan.carbon.network/transaction/{txHash}?net=main",
1588
1585
  },
@@ -7,16 +7,16 @@ export declare enum Network {
7
7
  export declare const CarbonChainIDs: {
8
8
  readonly mainnet: "orbix-1";
9
9
  readonly testnet: "orbix-testnet-42071";
10
- readonly devnet: "orbix-devnet-39911";
11
- readonly localhost: "orbix-localhost";
10
+ readonly devnet: "orbix-testnet-42071";
11
+ readonly localhost: "orbix-testnet-42071";
12
12
  };
13
13
  export declare const CarbonEvmChainIDs: {
14
14
  readonly mainnet: "orbix_9792-1";
15
15
  readonly testnet: "orbix_9792-1";
16
- readonly devnet: "orbix_9791-1";
17
- readonly localhost: "orbix_9999-1";
16
+ readonly devnet: "orbix_9792-1";
17
+ readonly localhost: "orbix_9792-1";
18
18
  };
19
- export declare const DEFAULT_NETWORK = Network.MainNet;
19
+ export declare const DEFAULT_NETWORK = Network.TestNet;
20
20
  export interface BasicNetworkConfig {
21
21
  rpcURL: string;
22
22
  }
@@ -11,16 +11,16 @@ var Network;
11
11
  exports.CarbonChainIDs = {
12
12
  [Network.MainNet]: "orbix-1",
13
13
  [Network.TestNet]: "orbix-testnet-42071",
14
- [Network.DevNet]: "orbix-devnet-39911",
15
- [Network.LocalHost]: "orbix-localhost",
14
+ [Network.DevNet]: "orbix-testnet-42071",
15
+ [Network.LocalHost]: "orbix-testnet-42071",
16
16
  };
17
17
  exports.CarbonEvmChainIDs = {
18
18
  [Network.MainNet]: "orbix_9792-1",
19
19
  [Network.TestNet]: "orbix_9792-1",
20
- [Network.DevNet]: "orbix_9791-1",
21
- [Network.LocalHost]: "orbix_9999-1",
20
+ [Network.DevNet]: "orbix_9792-1",
21
+ [Network.LocalHost]: "orbix_9792-1",
22
22
  };
23
- exports.DEFAULT_NETWORK = Network.MainNet;
23
+ exports.DEFAULT_NETWORK = Network.TestNet;
24
24
  const EthNetworkConfigFallback = {
25
25
  rpcURL: "",
26
26
  wsURL: "",
@@ -30,400 +30,45 @@ const EthNetworkConfigFallback = {
30
30
  balanceReader: "",
31
31
  byteCodeHash: "",
32
32
  };
33
+ const OrbixTestnetConfig = {
34
+ network: Network.TestNet,
35
+ chainId: "orbix-testnet-42071",
36
+ tmRpcUrl: "http://18.138.255.144:26657/",
37
+ restUrl: "http://18.138.255.144:1318",
38
+ grpcUrl: "18.138.255.144:9093",
39
+ wsUrl: "ws://18.138.255.144:5000/ws",
40
+ tmWsUrl: "ws://18.138.255.144:26657/",
41
+ evmJsonRpcUrl: "http://18.138.255.144:8545/",
42
+ evmWsUrl: "ws://18.138.255.144:8546/",
43
+ insightsUrl: "",
44
+ hydrogenUrl: "",
45
+ authUrl: "",
46
+ faucetUrl: "",
47
+ Bech32Prefix: "tmeme",
48
+ feeAddress: "08d8f59e475830d9a1bb97d74285c4d34c6dac08",
49
+ eth: EthNetworkConfigFallback,
50
+ bsc: EthNetworkConfigFallback,
51
+ arbitrum: EthNetworkConfigFallback,
52
+ polygon: EthNetworkConfigFallback,
53
+ okc: EthNetworkConfigFallback,
54
+ neo: { rpcURL: "", wrapperScriptHash: "" },
55
+ n3: { rpcURL: "", networkMagic: 0 },
56
+ zil: { rpcURL: "", lockProxyAddr: "", bridgeEntranceAddr: "", chainId: 0 },
57
+ mantle: EthNetworkConfigFallback,
58
+ optimism: EthNetworkConfigFallback,
59
+ base: EthNetworkConfigFallback,
60
+ avax: EthNetworkConfigFallback,
61
+ monad: EthNetworkConfigFallback,
62
+ };
63
+ const OrbixMainnetConfig = {
64
+ ...OrbixTestnetConfig,
65
+ network: Network.MainNet,
66
+ chainId: "orbix-1",
67
+ Bech32Prefix: "meme",
68
+ };
33
69
  exports.NetworkConfigs = {
34
- [Network.MainNet]: {
35
- network: Network.MainNet,
36
- chainId: "orbix-testnet-42071",
37
- tmRpcUrl: "http://18.138.255.144:26657/",
38
- restUrl: "http://18.138.255.144:1318",
39
- grpcUrl: "18.138.255.144:9093",
40
- wsUrl: "ws://18.138.255.144:5000/ws",
41
- tmWsUrl: "ws://18.138.255.144:26657/",
42
- evmJsonRpcUrl: "http://18.138.255.144:8545/",
43
- evmWsUrl: "ws://18.138.255.144:8546/",
44
- insightsUrl: "https://api-insights.carbon.network",
45
- hydrogenUrl: "https://hydrogen-api.carbon.network",
46
- authUrl: "https://auth.dem.exchange/oauth/access_token",
47
- faucetUrl: "",
48
- Bech32Prefix: "tmeme",
49
- feeAddress: "08d8f59e475830d9a1bb97d74285c4d34c6dac08", // swth1prv0t8j8tqcdngdmjlt59pwy6dxxmtqgycy2h7
50
- eth: {
51
- rpcURL: "https://ethereum-rpc.publicnode.com",
52
- wsURL: "wss://mainnet.dagger.matic.network",
53
- payerURL: "https://payer.carbon.network",
54
- bridgeEntranceAddr: "0x93fd29ff3b662c9e5e15681bb3b139d6ce2ca9c5",
55
- lockProxyAddr: "0x9a016ce184a22dbf6c17daa59eb7d3140dbd1c54",
56
- balanceReader: "0xe5e83cdba612672785d835714af26707f98030c3",
57
- byteCodeHash: "0xc77e5709a69e94d310a6dfb700801758c4caed0385b25bdf82bbdf954e4dd0c3",
58
- },
59
- bsc: {
60
- rpcURL: "https://bsc-dataseed2.binance.org/",
61
- wsURL: "",
62
- payerURL: "https://payer.carbon.network",
63
- bridgeEntranceAddr: "0x93fd29ff3b662c9e5e15681bb3b139d6ce2ca9c5",
64
- lockProxyAddr: "0xb5d4f343412dc8efb6ff599d790074d0f1e8d430",
65
- balanceReader: "0x2b18c5e1edaa7e27d40fec8d0b7d96c5eefa35df",
66
- byteCodeHash: "0x1b147c1cef546fcbcc1284df778073d65b90f80d5b649a69d5f8a01e186c0ec1",
67
- },
68
- arbitrum: {
69
- rpcURL: "https://arb1.arbitrum.io/rpc",
70
- wsURL: "",
71
- payerURL: "https://payer.carbon.network",
72
- bridgeEntranceAddr: "0x7b1c7216c117cc62d875e3086518b238392cf04d",
73
- lockProxyAddr: "0xb1e6f8820826491fcc5519f84ff4e2bdbb6e3cad",
74
- balanceReader: "0x7e8d8c98a016877cb3103e837fc71d41b155af70",
75
- byteCodeHash: "", // TODO: update when byteCodeHash is added
76
- },
77
- polygon: {
78
- rpcURL: "https://polygon-rpc.com",
79
- wsURL: "",
80
- payerURL: "https://payer.carbon.network",
81
- bridgeEntranceAddr: "0x75d302266926CB34B7564AAF3102c258234A35F2",
82
- lockProxyAddr: "0x43138036d1283413035B8eca403559737E8f7980",
83
- balanceReader: "0x7F31D17944a3147C31C3b55B71ebDcC57B6aCC84",
84
- byteCodeHash: "", // TODO: update when byteCodeHash is added
85
- },
86
- okc: {
87
- rpcURL: "https://exchainrpc.okex.org",
88
- wsURL: "",
89
- payerURL: "https://payer.carbon.network",
90
- bridgeEntranceAddr: "0x7b1c7216c117cc62d875e3086518b238392cf04d",
91
- lockProxyAddr: "0xb1e6f8820826491fcc5519f84ff4e2bdbb6e3cad",
92
- balanceReader: "0x43138036d1283413035B8eca403559737E8f7980",
93
- byteCodeHash: "", // TODO: update when byteCodeHash is added
94
- },
95
- neo: {
96
- rpcURL: "https://mainnet2.neo2.coz.io:443",
97
- wrapperScriptHash: "f46719e2d16bf50cddcef9d4bbfece901f73cbb6",
98
- },
99
- n3: {
100
- rpcURL: "https://n3-rpc.dem.exchange",
101
- networkMagic: 860833102,
102
- },
103
- zil: {
104
- rpcURL: "https://api.zilliqa.com",
105
- lockProxyAddr: "0xd73c6b871b4d0e130d64581993b745fc938a5be7",
106
- bridgeEntranceAddr: "0x5d78b51a1ceae202a793f4e87478253f41a22956",
107
- chainId: 1,
108
- },
109
- mantle: {
110
- ...EthNetworkConfigFallback,
111
- rpcURL: "https://rpc.mantle.xyz",
112
- },
113
- optimism: {
114
- ...EthNetworkConfigFallback,
115
- rpcURL: "https://mainnet.optimism.io",
116
- },
117
- base: {
118
- ...EthNetworkConfigFallback,
119
- rpcURL: "https://base-rpc.publicnode.com",
120
- },
121
- avax: {
122
- ...EthNetworkConfigFallback,
123
- rpcURL: "https://api.avax.network/ext/bc/C/rpc",
124
- },
125
- monad: {
126
- ...EthNetworkConfigFallback,
127
- rpcURL: "",
128
- },
129
- },
130
- [Network.TestNet]: {
131
- network: Network.TestNet,
132
- chainId: "carbon-testnet-42071",
133
- tmRpcUrl: "https://test-tm-api.carbon.network",
134
- tmWsUrl: "wss://test-tm-api.carbon.network",
135
- restUrl: "https://test-api.carbon.network",
136
- grpcUrl: "test-grpc.carbon.network",
137
- evmJsonRpcUrl: "https://test-evm-api.carbon.network/",
138
- evmWsUrl: "wss://test-evm-ws.carbon.network/",
139
- insightsUrl: "https://test-api-insights.carbon.network",
140
- hydrogenUrl: "https://test-hydrogen-api.carbon.network",
141
- wsUrl: "wss://test-ws-api.carbon.network/ws",
142
- authUrl: "https://test-auth.dem.exchange/oauth/access_token",
143
- faucetUrl: "https://test-faucet.carbon.network",
144
- Bech32Prefix: "tobx",
145
- feeAddress: "989761fb0c0eb0c05605e849cae77d239f98ac7f", // swth1nztkr7cvp6cvq4s9apyu4emayw0e3trl9ezyzs
146
- eth: {
147
- rpcURL: "https://sepolia.drpc.org",
148
- wsURL: "",
149
- payerURL: `https://dev-payer.carbon.network`,
150
- lockProxyAddr: "0xa06569e48fed18ed840c3f064ffd9bbf95debce7",
151
- bridgeEntranceAddr: "0x23D969345788bE24e5110F4c5D7B978DacDe8B1C",
152
- balanceReader: "0xf6fBa7Bbc806F55dA52af17203d84C61FfFa18c2",
153
- byteCodeHash: "0xeb1f732f12a0448d8692018a6d6d381cc7afc84d7e0729007931d966c0c9dc6d",
154
- },
155
- bsc: {
156
- rpcURL: "https://data-seed-prebsc-1-s2.binance.org:8545/",
157
- wsURL: "",
158
- payerURL: `https://test-payer.carbon.network`,
159
- bridgeEntranceAddr: "",
160
- lockProxyAddr: "0x7c2b13d656d222cb79670e301dd826dc5b8dc20c",
161
- balanceReader: "0x25c22f65cb820e787a13951f295d0b86db7b07b5",
162
- byteCodeHash: "0x1b147c1cef546fcbcc1284df778073d65b90f80d5b649a69d5f8a01e186c0ec1",
163
- },
164
- arbitrum: {
165
- rpcURL: "https://rinkeby.arbitrum.io/rpc",
166
- wsURL: "",
167
- payerURL: "https://test-payer.carbon.network",
168
- bridgeEntranceAddr: "",
169
- lockProxyAddr: "",
170
- balanceReader: "",
171
- byteCodeHash: "",
172
- },
173
- polygon: {
174
- rpcURL: "https://rpc-mumbai.maticvigil.com",
175
- wsURL: "",
176
- payerURL: "https://test-payer.carbon.network",
177
- bridgeEntranceAddr: "",
178
- lockProxyAddr: "",
179
- balanceReader: "",
180
- byteCodeHash: "",
181
- },
182
- okc: {
183
- rpcURL: "https://exchaintestrpc.okex.org",
184
- wsURL: "",
185
- payerURL: "https://test-payer.carbon.network",
186
- bridgeEntranceAddr: "",
187
- lockProxyAddr: "",
188
- balanceReader: "",
189
- byteCodeHash: "",
190
- },
191
- neo: {
192
- rpcURL: "https://g30trj885e.execute-api.ap-southeast-1.amazonaws.com",
193
- wrapperScriptHash: "f46719e2d16bf50cddcef9d4bbfece901f73cbb6",
194
- },
195
- n3: {
196
- rpcURL: "https://test-n3-rpc.dem.exchange",
197
- networkMagic: 877933390,
198
- },
199
- zil: {
200
- rpcURL: "https://dev-api.zilliqa.com",
201
- lockProxyAddr: "0xe7bef341044f1b8d5ab1a25172e2678a1e75479a",
202
- bridgeEntranceAddr: "0xccf798e633d6fb6505b494fc010903f9be3bc99b",
203
- chainId: 111,
204
- },
205
- mantle: {
206
- ...EthNetworkConfigFallback,
207
- rpcURL: "https://rpc.sepolia.mantle.xyz",
208
- },
209
- optimism: {
210
- ...EthNetworkConfigFallback,
211
- rpcURL: "https://sepolia.optimism.io",
212
- },
213
- base: {
214
- ...EthNetworkConfigFallback,
215
- rpcURL: "https://base-sepolia-rpc.publicnode.com",
216
- },
217
- avax: {
218
- ...EthNetworkConfigFallback,
219
- rpcURL: "https://ava-testnet.public.blastapi.io/ext/bc/C/rpc",
220
- },
221
- monad: {
222
- ...EthNetworkConfigFallback,
223
- rpcURL: "https://testnet-rpc.monad.xyz",
224
- },
225
- },
226
- [Network.DevNet]: {
227
- network: Network.DevNet,
228
- chainId: "carbon-devnet-39911",
229
- tmRpcUrl: "https://dev-tm-api.carbon.network",
230
- tmWsUrl: "wss://dev-tm-api.carbon.network",
231
- restUrl: "https://dev-api.carbon.network",
232
- grpcUrl: "dev-grpc.carbon.network",
233
- evmJsonRpcUrl: "https://dev-evm-api.carbon.network/",
234
- evmWsUrl: "wss://dev-evm-ws.carbon.network/",
235
- insightsUrl: "https://dev-api-insights.carbon.network",
236
- hydrogenUrl: "https://dev-hydrogen-api.carbon.network",
237
- wsUrl: "wss://dev-ws-api.carbon.network/ws",
238
- authUrl: "https://dev-auth.dem.exchange/oauth/access_token",
239
- faucetUrl: "https://dev-faucet.carbon.network",
240
- //* OnPrem network params for running locally
241
- // tmRpcUrl: "http://202.156.63.105:30007",
242
- // tmWsUrl: "ws://202.156.63.105:30007",
243
- // restUrl: "http://202.156.63.105:30002",
244
- // grpcUrl: "http://202.156.63.105:30005",
245
- // evmJsonRpcUrl: "http://202.156.63.105:30008",
246
- // evmWsUrl: "ws://202.156.63.105:30009/ws",
247
- // insightsUrl: "https://dev-api-insights.carbon.network",
248
- // hydrogenUrl: "https://dev-hydrogen-api.carbon.network",
249
- // wsUrl: "ws://202.156.63.105:30004/ws",
250
- // faucetUrl: "http://202.156.63.105:30003",
251
- Bech32Prefix: "obx",
252
- feeAddress: "989761fb0c0eb0c05605e849cae77d239f98ac7f", // swth1nztkr7cvp6cvq4s9apyu4emayw0e3trl9ezyzs
253
- eth: {
254
- rpcURL: "https://sepolia.drpc.org",
255
- wsURL: "",
256
- payerURL: `https://dev-payer.carbon.network`,
257
- lockProxyAddr: "0x7f7317167e90afa38972e46b031bb4da0b1f6f73",
258
- bridgeEntranceAddr: "0xd942ba20a58543878335108aac8c811f1f92fa33",
259
- balanceReader: "0xf6fBa7Bbc806F55dA52af17203d84C61FfFa18c2",
260
- byteCodeHash: "0xeb1f732f12a0448d8692018a6d6d381cc7afc84d7e0729007931d966c0c9dc6d",
261
- },
262
- bsc: {
263
- rpcURL: "https://data-seed-prebsc-1-s2.binance.org:8545/",
264
- wsURL: "",
265
- payerURL: `https://dev-payer.carbon.network`,
266
- bridgeEntranceAddr: "",
267
- lockProxyAddr: "0x7c2b13d656d222cb79670e301dd826dc5b8dc20c",
268
- balanceReader: "0x25c22f65cb820e787a13951f295d0b86db7b07b5",
269
- byteCodeHash: "0x1b147c1cef546fcbcc1284df778073d65b90f80d5b649a69d5f8a01e186c0ec1",
270
- },
271
- arbitrum: {
272
- rpcURL: "https://rinkeby.arbitrum.io/rpc",
273
- wsURL: "",
274
- payerURL: "https://test-payer.carbon.network",
275
- bridgeEntranceAddr: "",
276
- lockProxyAddr: "",
277
- balanceReader: "",
278
- byteCodeHash: "",
279
- },
280
- polygon: {
281
- rpcURL: "https://rpc-mumbai.maticvigil.com",
282
- wsURL: "",
283
- payerURL: "https://test-payer.carbon.network",
284
- bridgeEntranceAddr: "",
285
- lockProxyAddr: "",
286
- balanceReader: "",
287
- byteCodeHash: "",
288
- },
289
- okc: {
290
- rpcURL: "https://exchaintestrpc.okex.org",
291
- wsURL: "",
292
- payerURL: "https://test-payer.carbon.network",
293
- bridgeEntranceAddr: "",
294
- lockProxyAddr: "",
295
- balanceReader: "",
296
- byteCodeHash: "",
297
- },
298
- neo: {
299
- rpcURL: "https://g30trj885e.execute-api.ap-southeast-1.amazonaws.com",
300
- wrapperScriptHash: "f46719e2d16bf50cddcef9d4bbfece901f73cbb6",
301
- },
302
- n3: {
303
- rpcURL: "https://test-n3-rpc.dem.exchange",
304
- networkMagic: 877933390,
305
- },
306
- zil: {
307
- rpcURL: "https://dev-api.zilliqa.com",
308
- lockProxyAddr: "0xa5a43eecd29534edf80792a9889f52c77455245d",
309
- bridgeEntranceAddr: "0xbbe98D54689c96D0278a1222594533e8C5fa551e",
310
- chainId: 333,
311
- },
312
- mantle: {
313
- ...EthNetworkConfigFallback,
314
- rpcURL: "https://rpc.sepolia.mantle.xyz",
315
- },
316
- optimism: {
317
- ...EthNetworkConfigFallback,
318
- rpcURL: "https://sepolia.optimism.io",
319
- },
320
- base: {
321
- ...EthNetworkConfigFallback,
322
- rpcURL: "https://base-sepolia-rpc.publicnode.com",
323
- },
324
- avax: {
325
- ...EthNetworkConfigFallback,
326
- rpcURL: "https://ava-testnet.public.blastapi.io/ext/bc/C/rpc",
327
- },
328
- monad: {
329
- ...EthNetworkConfigFallback,
330
- rpcURL: "https://testnet-rpc.monad.xyz",
331
- },
332
- },
333
- [Network.LocalHost]: {
334
- network: Network.LocalHost,
335
- chainId: "carbon-localhost",
336
- tmRpcUrl: "http://localhost:26657",
337
- tmWsUrl: "ws://localhost:26657",
338
- restUrl: "http://localhost:1317",
339
- grpcUrl: "localhost:9090",
340
- evmJsonRpcUrl: "http://localhost:8545/",
341
- evmWsUrl: "ws://localhost:8546/",
342
- insightsUrl: "http://localhost:8181",
343
- hydrogenUrl: "",
344
- wsUrl: "ws://localhost:5001/ws",
345
- authUrl: "http://localhost:9794/oauth/access_token",
346
- faucetUrl: "http://localhost:4500",
347
- Bech32Prefix: "tobx",
348
- feeAddress: "989761fb0c0eb0c05605e849cae77d239f98ac7f",
349
- eth: {
350
- rpcURL: "https://sepolia.drpc.org",
351
- wsURL: "wss://ropsten.dagger.matic.network",
352
- payerURL: `http://localhost:8001`,
353
- bridgeEntranceAddr: "",
354
- lockProxyAddr: "",
355
- balanceReader: "",
356
- byteCodeHash: "",
357
- },
358
- bsc: {
359
- rpcURL: "https://data-seed-prebsc-1-s2.binance.org:8545/",
360
- wsURL: "",
361
- payerURL: `http://localhost:8001`,
362
- bridgeEntranceAddr: "",
363
- lockProxyAddr: "",
364
- balanceReader: "",
365
- byteCodeHash: "",
366
- },
367
- arbitrum: {
368
- rpcURL: "https://rinkeby.arbitrum.io/rpc",
369
- wsURL: "",
370
- payerURL: "https://test-payer.carbon.network",
371
- bridgeEntranceAddr: "",
372
- lockProxyAddr: "",
373
- balanceReader: "",
374
- byteCodeHash: "",
375
- },
376
- polygon: {
377
- rpcURL: "https://rpc-mumbai.maticvigil.com",
378
- wsURL: "",
379
- payerURL: "https://test-payer.carbon.network",
380
- bridgeEntranceAddr: "",
381
- lockProxyAddr: "",
382
- balanceReader: "",
383
- byteCodeHash: "",
384
- },
385
- okc: {
386
- rpcURL: "https://exchaintestrpc.okex.org",
387
- wsURL: "",
388
- payerURL: "https://test-payer.carbon.network",
389
- bridgeEntranceAddr: "",
390
- lockProxyAddr: "",
391
- balanceReader: "",
392
- byteCodeHash: "",
393
- },
394
- neo: {
395
- rpcURL: "https://g30trj885e.execute-api.ap-southeast-1.amazonaws.com",
396
- wrapperScriptHash: "f46719e2d16bf50cddcef9d4bbfece901f73cbb6",
397
- },
398
- n3: {
399
- rpcURL: "https://test-n3-rpc.dem.exchange",
400
- networkMagic: 877933390,
401
- },
402
- zil: {
403
- rpcURL: "",
404
- lockProxyAddr: "",
405
- bridgeEntranceAddr: "",
406
- chainId: 1,
407
- },
408
- mantle: {
409
- ...EthNetworkConfigFallback,
410
- rpcURL: "https://rpc.sepolia.mantle.xyz",
411
- },
412
- optimism: {
413
- ...EthNetworkConfigFallback,
414
- rpcURL: "https://sepolia.optimism.io",
415
- },
416
- base: {
417
- ...EthNetworkConfigFallback,
418
- rpcURL: "https://base-sepolia-rpc.publicnode.com",
419
- },
420
- avax: {
421
- ...EthNetworkConfigFallback,
422
- rpcURL: "https://ava-testnet.public.blastapi.io/ext/bc/C/rpc",
423
- },
424
- monad: {
425
- ...EthNetworkConfigFallback,
426
- rpcURL: "https://testnet-rpc.monad.xyz",
427
- },
428
- },
70
+ [Network.MainNet]: OrbixMainnetConfig,
71
+ [Network.TestNet]: OrbixTestnetConfig,
72
+ [Network.DevNet]: OrbixTestnetConfig,
73
+ [Network.LocalHost]: OrbixTestnetConfig,
429
74
  };
@@ -15,10 +15,10 @@ exports.DenomPrefix = {
15
15
  };
16
16
  exports.uscUsdValue = new bignumber_js_1.default(1);
17
17
  exports.CommonAssetName = {
18
- swth: "swth",
19
- "swth-n": "swth",
20
- "swth-b": "swth",
21
- "swth-e": "swth",
18
+ fee: "fee",
19
+ "swth-n": "fee",
20
+ "swth-b": "fee",
21
+ "swth-e": "fee",
22
22
  dai: "dai",
23
23
  "dai.1.2.0fdfd1": "dai",
24
24
  flm1: "flm",
@@ -189,7 +189,7 @@ exports.CommonAssetName = {
189
189
  // devnet tokens
190
190
  "one.1.2.0c4e3f": "one",
191
191
  "one.1.2.2ce83e": "one",
192
- "swth-e-test": "swth",
192
+ "swth-e-test": "fee",
193
193
  ewnxm1: "nxm",
194
194
  "wnxm.b.1": "nxm",
195
195
  "wnxm.e.1": "nxm",
@@ -245,7 +245,7 @@ exports.CommonAssetName = {
245
245
  zusdt99: "usdt",
246
246
  };
247
247
  exports.CoinGeckoTokenNames = {
248
- swth: "switcheo",
248
+ fee: "fee",
249
249
  btc: "bitcoin",
250
250
  dai: "dai",
251
251
  uni: "uniswap",
@@ -5,8 +5,8 @@ const constant_1 = require("../constant");
5
5
  const ethermint_1 = require("../util/ethermint");
6
6
  exports.CarbonEvmNativeCurrency = {
7
7
  decimals: 18,
8
- name: "SWTH",
9
- symbol: "SWTH",
8
+ name: "FEE",
9
+ symbol: "FEE",
10
10
  };
11
11
  exports.CARBON_EVM_LOCALHOST = {
12
12
  chainId: `0x${Number((0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[constant_1.Network.LocalHost])).toString(16)}`,
@@ -16,7 +16,7 @@ class StakingModule extends base_1.default {
16
16
  validatorAddress: params.validatorAddress,
17
17
  amount: {
18
18
  amount: params.amount.toString(10),
19
- denom: "swth",
19
+ denom: "fee",
20
20
  },
21
21
  });
22
22
  return wallet.sendTx({
@@ -31,7 +31,7 @@ class StakingModule extends base_1.default {
31
31
  validatorAddress: params.validatorAddress,
32
32
  amount: {
33
33
  amount: params.amount.toString(10),
34
- denom: "swth",
34
+ denom: "fee",
35
35
  },
36
36
  });
37
37
  return wallet.sendTx({
@@ -47,7 +47,7 @@ class StakingModule extends base_1.default {
47
47
  validatorDstAddress: params.validatorDstAddress,
48
48
  amount: {
49
49
  amount: params.amount.toString(10),
50
- denom: "swth",
50
+ denom: "fee",
51
51
  },
52
52
  });
53
53
  return wallet.sendTx({
@@ -13,8 +13,8 @@ const provider_1 = require("../../util/provider");
13
13
  const error_1 = require("../metamask/error");
14
14
  const long_1 = __importDefault(require("long"));
15
15
  const SWTH = {
16
- coinDenom: "SWTH",
17
- coinMinimalDenom: "swth",
16
+ coinDenom: "FEE",
17
+ coinMinimalDenom: "fee",
18
18
  coinDecimals: 8,
19
19
  coinGeckoId: "switcheo",
20
20
  gasPriceStep: constant_1.CARBON_GAS_PRICE,
@@ -128,7 +128,7 @@ class KeplrAccount {
128
128
  const gasPricesResult = await configProvider.query.fee.MinGasPriceAll({});
129
129
  const feeCurrencies = gasPricesResult.minGasPrices.reduce((result, price) => {
130
130
  const token = tokenClient.tokenForDenom(price.denom);
131
- if (!token || token.denom === "swth")
131
+ if (!token || token.denom === "fee")
132
132
  return result;
133
133
  // Check if gas price is valid, else add default
134
134
  const gasPriceAdjusted = util_1.NumberUtils.bnOrZero(price.gasPrice).shiftedBy(-constant_1.decTypeDecimals);
@@ -13,8 +13,8 @@ const ethers_1 = require("ethers");
13
13
  const error_1 = require("../metamask/error");
14
14
  const long_1 = __importDefault(require("long"));
15
15
  const SWTH = {
16
- coinDenom: "SWTH",
17
- coinMinimalDenom: "swth",
16
+ coinDenom: "FEE",
17
+ coinMinimalDenom: "fee",
18
18
  coinDecimals: 8,
19
19
  coinGeckoId: "switcheo",
20
20
  gasPriceStep: constant_1.CARBON_GAS_PRICE,
@@ -152,7 +152,7 @@ class LeapAccount {
152
152
  const coingeckoIdMap = tokenClient.geckoTokenNames;
153
153
  const feeCurrencies = gasPricesResult.minGasPrices.reduce((result, price) => {
154
154
  const token = tokenClient.tokenForDenom(price.denom);
155
- if (!token || token.denom === "swth")
155
+ if (!token || token.denom === "fee")
156
156
  return result;
157
157
  // Check if gas price is valid, else add default
158
158
  const gasPriceAdjusted = util_1.NumberUtils.bnOrZero(price.gasPrice).shiftedBy(-constant_1.decTypeDecimals);
@@ -4,7 +4,7 @@ exports.getRewardWithdrawalMsg = void 0;
4
4
  const codec_1 = require("../codec");
5
5
  const tx_1 = require("cosmjs-types/cosmos/distribution/v1beta1/tx");
6
6
  const getRewardWithdrawalMsg = (walletAddress, denom, validatorAddress, delegatorAddress) => {
7
- if (denom === "swth") {
7
+ if (denom === "fee") {
8
8
  return {
9
9
  typeUrl: codec_1.TxTypes.MsgWithdrawDelegatorReward,
10
10
  value: tx_1.MsgWithdrawDelegatorReward.fromPartial({
package/lib/util/ibc.js CHANGED
@@ -36,7 +36,7 @@ exports.totalAssetObj = Object.values(exports.EmbedChainInfos).reduce((prev, cha
36
36
  const channelSet = ("type" in currency) && channelsObj.cw20
37
37
  ? channelsObj.cw20
38
38
  : channelsObj.ibc;
39
- let ibcAddr = currency.coinDenom.toLowerCase() === "swth"
39
+ let ibcAddr = currency.coinDenom.toLowerCase() === "fee"
40
40
  ? currency.coinMinimalDenom
41
41
  : makeIBCMinimalDenom(channelSet?.sourceChannel ?? "channel-0", currency.coinMinimalDenom);
42
42
  // TODO: Remove when implementing dynamic ibc chain info
@@ -109,7 +109,7 @@ exports.BlockchainMap = Object.values(exports.EmbedChainInfos).reduce((prev, cha
109
109
  newPrev["ibc/7FBDBEEEBA9C50C4BCDF7BF438EAB99E64360833D240B32655C96E319559E911"] = exports.ChainIdBlockchainMap[chainInfo.chainId];
110
110
  return;
111
111
  }
112
- if (currency.coinDenom.toLowerCase() === "swth") {
112
+ if (currency.coinDenom.toLowerCase() === "fee") {
113
113
  newPrev[currency.coinMinimalDenom] = exports.ChainIdBlockchainMap[chainInfo.chainId];
114
114
  }
115
115
  else {
@@ -10,7 +10,7 @@ export declare enum MainNetDefaultTokens {
10
10
  USC = "usc",
11
11
  OSMO = "ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518",
12
12
  STOSMO = "ibc/75249A18DEFBEFE55F83B1C70CAD234DF164F174C6BC51682EE92C2C81C18C93",
13
- SWTH = "swth",
13
+ SWTH = "fee",
14
14
  ZIL = "zil.1.18.1a4a06",
15
15
  BNB = "bnb.1.6.773edb"
16
16
  }
package/lib/util/token.js CHANGED
@@ -17,7 +17,7 @@ var MainNetDefaultTokens;
17
17
  MainNetDefaultTokens["USC"] = "usc";
18
18
  MainNetDefaultTokens["OSMO"] = "ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518";
19
19
  MainNetDefaultTokens["STOSMO"] = "ibc/75249A18DEFBEFE55F83B1C70CAD234DF164F174C6BC51682EE92C2C81C18C93";
20
- MainNetDefaultTokens["SWTH"] = "swth";
20
+ MainNetDefaultTokens["SWTH"] = "fee";
21
21
  MainNetDefaultTokens["ZIL"] = "zil.1.18.1a4a06";
22
22
  MainNetDefaultTokens["BNB"] = "bnb.1.6.773edb";
23
23
  })(MainNetDefaultTokens || (exports.MainNetDefaultTokens = MainNetDefaultTokens = {}));
package/lib/util/tx.d.ts CHANGED
@@ -553,7 +553,7 @@ export declare const Types: {
553
553
  };
554
554
  export declare const DEFAULT_SIGN_OPTS: SignTxOpts;
555
555
  export declare const TxGasCostTypeDefaultKey = "default_fee";
556
- export declare const TxMinGasPriceTypeDefaultKey = "swth";
556
+ export declare const TxMinGasPriceTypeDefaultKey = "fee";
557
557
  export declare const TxGasCostTypeMap: {};
558
558
  export declare const useSignDirectForMetamask: (messages: readonly EncodeObject[]) => boolean;
559
559
  export declare const isLibMsg: (typeUrl: string) => boolean;
package/lib/util/tx.js CHANGED
@@ -139,7 +139,7 @@ exports.DEFAULT_SIGN_OPTS = {
139
139
  memo: "",
140
140
  };
141
141
  exports.TxGasCostTypeDefaultKey = "default_fee";
142
- exports.TxMinGasPriceTypeDefaultKey = "swth";
142
+ exports.TxMinGasPriceTypeDefaultKey = "fee";
143
143
  exports.TxGasCostTypeMap = {};
144
144
  const LibPackages = ['ibc', 'cosmos', 'alliance'];
145
145
  const BacklistedMessages = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-js-sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "TypeScript SDK for Mememax Orbix blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -87,4 +87,4 @@
87
87
  "prettier": "2.5.1"
88
88
  },
89
89
  "packageManager": "yarn@1.22.19"
90
- }
90
+ }