carbon-js-sdk 0.3.37-dev.2 → 0.3.38-beta.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.
@@ -441,7 +441,7 @@ class TokenClient {
441
441
  }
442
442
  getUSDValuesFromCoinGecko(geckoIds) {
443
443
  return __awaiter(this, void 0, void 0, function* () {
444
- const response = yield util_1.FetchUtils.fetch(`https://api.coingecko.com/api/v3/simple/price?ids=${geckoIds.join(",")}&vs_currencies=usd`);
444
+ const response = yield util_1.FetchUtils.fetch(`https://coingecko-proxy.dem.exchange/price?ids=${geckoIds.join(",")}&vs_currencies=usd`);
445
445
  return yield response.json();
446
446
  });
447
447
  }
@@ -38,7 +38,7 @@ export declare class MetaMask {
38
38
  readonly network: Network;
39
39
  private blockchain;
40
40
  static getNetworkParams(network: Network, blockchain?: EVMChain): MetaMaskChangeNetworkParam;
41
- static getRequiredChainId(network: Network, blockchain?: Blockchain): 1 | 4 | 56 | 97 | 42161 | 421611;
41
+ static getRequiredChainId(network: Network, blockchain?: Blockchain): 1 | 5 | 56 | 97 | 42161 | 421611;
42
42
  constructor(network: Network);
43
43
  private checkProvider;
44
44
  getBlockchain(): Blockchain;
@@ -37,9 +37,9 @@ const ethSignUtils = __importStar(require("eth-sig-util"));
37
37
  const CONTRACT_HASH = {
38
38
  [blockchain_1.Blockchain.Ethereum]: {
39
39
  // use same rinkeby contract for all non-mainnet uses
40
- [constant_1.Network.TestNet]: "0xec8BC20687FfA944F57EB1aAa6F98FEDA30bcA65",
41
- [constant_1.Network.DevNet]: "0xec8BC20687FfA944F57EB1aAa6F98FEDA30bcA65",
42
- [constant_1.Network.LocalHost]: "0xec8BC20687FfA944F57EB1aAa6F98FEDA30bcA65",
40
+ [constant_1.Network.TestNet]: "0x086e1b5f67c0f7ca8eb202d35553e27e964899e2",
41
+ [constant_1.Network.DevNet]: "0x086e1b5f67c0f7ca8eb202d35553e27e964899e2",
42
+ [constant_1.Network.LocalHost]: "0x086e1b5f67c0f7ca8eb202d35553e27e964899e2",
43
43
  [constant_1.Network.MainNet]: "0xf4552877A40c1527D38970F170993660084D4541",
44
44
  },
45
45
  [blockchain_1.Blockchain.BinanceSmartChain]: {
@@ -118,8 +118,8 @@ const ETH_MAINNET = {
118
118
  rpcUrls: ["https://mainnet.infura.io/v3/"],
119
119
  };
120
120
  const ETH_TESTNET = {
121
- chainId: "0x4",
122
- rpcUrls: ["https://rinkeby.infura.io/v3/"],
121
+ chainId: "0x5",
122
+ rpcUrls: ["https://goerli.infura.io/v3/"],
123
123
  };
124
124
  const ARBITRUM_MAINNET = {
125
125
  chainId: "0xA4B1",
@@ -190,7 +190,7 @@ class MetaMask {
190
190
  case blockchain_1.Blockchain.Arbitrum:
191
191
  return 421611;
192
192
  default:
193
- return 4;
193
+ return 5;
194
194
  }
195
195
  }
196
196
  checkProvider(blockchain = this.blockchain) {
@@ -365,7 +365,7 @@ class MetaMask {
365
365
  }
366
366
  return 1;
367
367
  }
368
- if (currentChainId === 4) {
368
+ if (currentChainId === 5) {
369
369
  this.blockchain = blockchain_1.Blockchain.Ethereum;
370
370
  return currentChainId;
371
371
  }
@@ -381,7 +381,7 @@ class MetaMask {
381
381
  if (currentChainId === 56) {
382
382
  return 97;
383
383
  }
384
- return 4;
384
+ return 5;
385
385
  }
386
386
  getContractHash(blockchain = this.blockchain) {
387
387
  const contractHash = CONTRACT_HASH[blockchain][this.network];
@@ -41,6 +41,7 @@ export declare const ChainNames: {
41
41
  readonly 1: "MainNet";
42
42
  readonly 3: "Ropsten";
43
43
  readonly 4: "Rinkeby";
44
+ readonly 5: "Goerli";
44
45
  readonly 56: "BSC MainNet";
45
46
  readonly 97: "BSC TestNet";
46
47
  readonly 110: "ZIL DevNet";
@@ -43,6 +43,7 @@ exports.ChainNames = {
43
43
  1: "MainNet",
44
44
  3: "Ropsten",
45
45
  4: "Rinkeby",
46
+ 5: "Goerli",
46
47
  56: "BSC MainNet",
47
48
  97: "BSC TestNet",
48
49
  110: "ZIL DevNet",
@@ -113,6 +114,7 @@ const getBlockchainFromChain = (chainId) => {
113
114
  case 1:
114
115
  case 3:
115
116
  case 4:
117
+ case 5:
116
118
  return Blockchain.Ethereum;
117
119
  case 56:
118
120
  case 97:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-js-sdk",
3
- "version": "0.3.37-dev.2+18512988ac7f",
3
+ "version": "0.3.38-beta.1",
4
4
  "description": "TypeScript SDK for Carbon blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",