@0xsequence/network
Advanced tools
Comparing version 0.0.0-20241114193556 to 0.0.0-20241216114019
@@ -38,2 +38,3 @@ 'use strict'; | ||
ChainId[ChainId["TELOS"] = 40] = "TELOS"; | ||
ChainId[ChainId["TELOS_TESTNET"] = 41] = "TELOS_TESTNET"; | ||
ChainId[ChainId["B3"] = 8333] = "B3"; | ||
@@ -49,2 +50,3 @@ ChainId[ChainId["B3_SEPOLIA"] = 1993] = "B3_SEPOLIA"; | ||
ChainId[ChainId["SONEIUM_MINATO"] = 1946] = "SONEIUM_MINATO"; | ||
ChainId[ChainId["SONEIUM"] = 1868] = "SONEIUM"; | ||
ChainId[ChainId["TOY_TESTNET"] = 21000000] = "TOY_TESTNET"; | ||
@@ -55,2 +57,4 @@ ChainId[ChainId["IMMUTABLE_ZKEVM"] = 13371] = "IMMUTABLE_ZKEVM"; | ||
ChainId[ChainId["ROOT_NETWORK_PORCINI"] = 7672] = "ROOT_NETWORK_PORCINI"; | ||
ChainId[ChainId["LAOS"] = 6283] = "LAOS"; | ||
ChainId[ChainId["LAOS_SIGMA_TESTNET"] = 62850] = "LAOS_SIGMA_TESTNET"; | ||
ChainId[ChainId["HARDHAT"] = 31337] = "HARDHAT"; | ||
@@ -703,3 +707,3 @@ ChainId[ChainId["HARDHAT_2"] = 31338] = "HARDHAT_2"; | ||
name: 'Telos Explorer', | ||
rootUrl: 'https://explorer.telos.net/network/' | ||
rootUrl: 'https://www.teloscan.io/' | ||
}, | ||
@@ -712,2 +716,18 @@ nativeToken: { | ||
}, | ||
[ChainId.TELOS_TESTNET]: { | ||
chainId: ChainId.TELOS_TESTNET, | ||
type: NetworkType.TESTNET, | ||
name: 'telos-testnet', | ||
title: 'Telos Testnet', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.TELOS_TESTNET}.webp`, | ||
blockExplorer: { | ||
name: 'Telos Testnet Explorer', | ||
rootUrl: 'https://testnet.teloscan.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'TLOS', | ||
name: 'TLOS', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.BORNE_TESTNET]: { | ||
@@ -764,2 +784,19 @@ chainId: ChainId.BORNE_TESTNET, | ||
}, | ||
[ChainId.SONEIUM]: { | ||
chainId: ChainId.SONEIUM, | ||
type: NetworkType.MAINNET, | ||
name: 'soneium', | ||
title: 'Soneium', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SONEIUM}.webp`, | ||
testnet: false, | ||
blockExplorer: { | ||
name: 'Soneium Explorer', | ||
rootUrl: 'https://vk9a3tgpne6qmub8.blockscout.com/' | ||
}, | ||
nativeToken: { | ||
symbol: 'ETH', | ||
name: 'Ether', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.SONEIUM_MINATO]: { | ||
@@ -867,2 +904,36 @@ chainId: ChainId.SONEIUM_MINATO, | ||
}, | ||
[ChainId.LAOS]: { | ||
chainId: ChainId.LAOS, | ||
type: NetworkType.MAINNET, | ||
name: 'laos', | ||
title: 'LAOS', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS}.webp`, | ||
testnet: false, | ||
blockExplorer: { | ||
name: 'LAOS Explorer', | ||
rootUrl: 'https://blockscout.laos.laosfoundation.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'LAOS', | ||
name: 'LAOS', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.LAOS_SIGMA_TESTNET]: { | ||
chainId: ChainId.LAOS_SIGMA_TESTNET, | ||
type: NetworkType.TESTNET, | ||
name: 'laos-sigma-testnet', | ||
title: 'LAOS Sigma Testnet', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS_SIGMA_TESTNET}.webp`, | ||
testnet: true, | ||
blockExplorer: { | ||
name: 'LAOS Sigma Testnet Explorer', | ||
rootUrl: 'https://sigma.explorer.laosnetwork.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'SIGMA', | ||
name: 'SIGMA', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.HARDHAT]: { | ||
@@ -869,0 +940,0 @@ chainId: ChainId.HARDHAT, |
@@ -38,2 +38,3 @@ 'use strict'; | ||
ChainId[ChainId["TELOS"] = 40] = "TELOS"; | ||
ChainId[ChainId["TELOS_TESTNET"] = 41] = "TELOS_TESTNET"; | ||
ChainId[ChainId["B3"] = 8333] = "B3"; | ||
@@ -49,2 +50,3 @@ ChainId[ChainId["B3_SEPOLIA"] = 1993] = "B3_SEPOLIA"; | ||
ChainId[ChainId["SONEIUM_MINATO"] = 1946] = "SONEIUM_MINATO"; | ||
ChainId[ChainId["SONEIUM"] = 1868] = "SONEIUM"; | ||
ChainId[ChainId["TOY_TESTNET"] = 21000000] = "TOY_TESTNET"; | ||
@@ -55,2 +57,4 @@ ChainId[ChainId["IMMUTABLE_ZKEVM"] = 13371] = "IMMUTABLE_ZKEVM"; | ||
ChainId[ChainId["ROOT_NETWORK_PORCINI"] = 7672] = "ROOT_NETWORK_PORCINI"; | ||
ChainId[ChainId["LAOS"] = 6283] = "LAOS"; | ||
ChainId[ChainId["LAOS_SIGMA_TESTNET"] = 62850] = "LAOS_SIGMA_TESTNET"; | ||
ChainId[ChainId["HARDHAT"] = 31337] = "HARDHAT"; | ||
@@ -703,3 +707,3 @@ ChainId[ChainId["HARDHAT_2"] = 31338] = "HARDHAT_2"; | ||
name: 'Telos Explorer', | ||
rootUrl: 'https://explorer.telos.net/network/' | ||
rootUrl: 'https://www.teloscan.io/' | ||
}, | ||
@@ -712,2 +716,18 @@ nativeToken: { | ||
}, | ||
[ChainId.TELOS_TESTNET]: { | ||
chainId: ChainId.TELOS_TESTNET, | ||
type: NetworkType.TESTNET, | ||
name: 'telos-testnet', | ||
title: 'Telos Testnet', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.TELOS_TESTNET}.webp`, | ||
blockExplorer: { | ||
name: 'Telos Testnet Explorer', | ||
rootUrl: 'https://testnet.teloscan.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'TLOS', | ||
name: 'TLOS', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.BORNE_TESTNET]: { | ||
@@ -764,2 +784,19 @@ chainId: ChainId.BORNE_TESTNET, | ||
}, | ||
[ChainId.SONEIUM]: { | ||
chainId: ChainId.SONEIUM, | ||
type: NetworkType.MAINNET, | ||
name: 'soneium', | ||
title: 'Soneium', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SONEIUM}.webp`, | ||
testnet: false, | ||
blockExplorer: { | ||
name: 'Soneium Explorer', | ||
rootUrl: 'https://vk9a3tgpne6qmub8.blockscout.com/' | ||
}, | ||
nativeToken: { | ||
symbol: 'ETH', | ||
name: 'Ether', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.SONEIUM_MINATO]: { | ||
@@ -867,2 +904,36 @@ chainId: ChainId.SONEIUM_MINATO, | ||
}, | ||
[ChainId.LAOS]: { | ||
chainId: ChainId.LAOS, | ||
type: NetworkType.MAINNET, | ||
name: 'laos', | ||
title: 'LAOS', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS}.webp`, | ||
testnet: false, | ||
blockExplorer: { | ||
name: 'LAOS Explorer', | ||
rootUrl: 'https://blockscout.laos.laosfoundation.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'LAOS', | ||
name: 'LAOS', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.LAOS_SIGMA_TESTNET]: { | ||
chainId: ChainId.LAOS_SIGMA_TESTNET, | ||
type: NetworkType.TESTNET, | ||
name: 'laos-sigma-testnet', | ||
title: 'LAOS Sigma Testnet', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS_SIGMA_TESTNET}.webp`, | ||
testnet: true, | ||
blockExplorer: { | ||
name: 'LAOS Sigma Testnet Explorer', | ||
rootUrl: 'https://sigma.explorer.laosnetwork.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'SIGMA', | ||
name: 'SIGMA', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.HARDHAT]: { | ||
@@ -869,0 +940,0 @@ chainId: ChainId.HARDHAT, |
@@ -34,2 +34,3 @@ let ChainId = /*#__PURE__*/function (ChainId) { | ||
ChainId[ChainId["TELOS"] = 40] = "TELOS"; | ||
ChainId[ChainId["TELOS_TESTNET"] = 41] = "TELOS_TESTNET"; | ||
ChainId[ChainId["B3"] = 8333] = "B3"; | ||
@@ -45,2 +46,3 @@ ChainId[ChainId["B3_SEPOLIA"] = 1993] = "B3_SEPOLIA"; | ||
ChainId[ChainId["SONEIUM_MINATO"] = 1946] = "SONEIUM_MINATO"; | ||
ChainId[ChainId["SONEIUM"] = 1868] = "SONEIUM"; | ||
ChainId[ChainId["TOY_TESTNET"] = 21000000] = "TOY_TESTNET"; | ||
@@ -51,2 +53,4 @@ ChainId[ChainId["IMMUTABLE_ZKEVM"] = 13371] = "IMMUTABLE_ZKEVM"; | ||
ChainId[ChainId["ROOT_NETWORK_PORCINI"] = 7672] = "ROOT_NETWORK_PORCINI"; | ||
ChainId[ChainId["LAOS"] = 6283] = "LAOS"; | ||
ChainId[ChainId["LAOS_SIGMA_TESTNET"] = 62850] = "LAOS_SIGMA_TESTNET"; | ||
ChainId[ChainId["HARDHAT"] = 31337] = "HARDHAT"; | ||
@@ -699,3 +703,3 @@ ChainId[ChainId["HARDHAT_2"] = 31338] = "HARDHAT_2"; | ||
name: 'Telos Explorer', | ||
rootUrl: 'https://explorer.telos.net/network/' | ||
rootUrl: 'https://www.teloscan.io/' | ||
}, | ||
@@ -708,2 +712,18 @@ nativeToken: { | ||
}, | ||
[ChainId.TELOS_TESTNET]: { | ||
chainId: ChainId.TELOS_TESTNET, | ||
type: NetworkType.TESTNET, | ||
name: 'telos-testnet', | ||
title: 'Telos Testnet', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.TELOS_TESTNET}.webp`, | ||
blockExplorer: { | ||
name: 'Telos Testnet Explorer', | ||
rootUrl: 'https://testnet.teloscan.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'TLOS', | ||
name: 'TLOS', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.BORNE_TESTNET]: { | ||
@@ -760,2 +780,19 @@ chainId: ChainId.BORNE_TESTNET, | ||
}, | ||
[ChainId.SONEIUM]: { | ||
chainId: ChainId.SONEIUM, | ||
type: NetworkType.MAINNET, | ||
name: 'soneium', | ||
title: 'Soneium', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SONEIUM}.webp`, | ||
testnet: false, | ||
blockExplorer: { | ||
name: 'Soneium Explorer', | ||
rootUrl: 'https://vk9a3tgpne6qmub8.blockscout.com/' | ||
}, | ||
nativeToken: { | ||
symbol: 'ETH', | ||
name: 'Ether', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.SONEIUM_MINATO]: { | ||
@@ -863,2 +900,36 @@ chainId: ChainId.SONEIUM_MINATO, | ||
}, | ||
[ChainId.LAOS]: { | ||
chainId: ChainId.LAOS, | ||
type: NetworkType.MAINNET, | ||
name: 'laos', | ||
title: 'LAOS', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS}.webp`, | ||
testnet: false, | ||
blockExplorer: { | ||
name: 'LAOS Explorer', | ||
rootUrl: 'https://blockscout.laos.laosfoundation.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'LAOS', | ||
name: 'LAOS', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.LAOS_SIGMA_TESTNET]: { | ||
chainId: ChainId.LAOS_SIGMA_TESTNET, | ||
type: NetworkType.TESTNET, | ||
name: 'laos-sigma-testnet', | ||
title: 'LAOS Sigma Testnet', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS_SIGMA_TESTNET}.webp`, | ||
testnet: true, | ||
blockExplorer: { | ||
name: 'LAOS Sigma Testnet Explorer', | ||
rootUrl: 'https://sigma.explorer.laosnetwork.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'SIGMA', | ||
name: 'SIGMA', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.HARDHAT]: { | ||
@@ -865,0 +936,0 @@ chainId: ChainId.HARDHAT, |
@@ -10,9 +10,14 @@ 'use strict'; | ||
function _extends() { | ||
return _extends = Object.assign ? Object.assign.bind() : function (n) { | ||
for (var e = 1; e < arguments.length; e++) { | ||
var t = arguments[e]; | ||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | ||
_extends = Object.assign ? Object.assign.bind() : function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return n; | ||
}, _extends.apply(null, arguments); | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
@@ -267,3 +272,3 @@ | ||
disabled: true | ||
}), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.POLYGON_AMOY), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BSC_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ARBITRUM_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BASE), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BASE_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.HOMEVERSE), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.HOMEVERSE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XAI), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XAI_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.AVALANCHE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XR_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.B3), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.B3_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.APECHAIN), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.APECHAIN_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BLAST), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BLAST_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TELOS), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BORNE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SKALE_NEBULA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SKALE_NEBULA_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SONEIUM_MINATO), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TOY_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.IMMUTABLE_ZKEVM), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.IMMUTABLE_ZKEVM_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ROOT_NETWORK), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ROOT_NETWORK_PORCINI), ...hardhatNetworks]); | ||
}), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.POLYGON_AMOY), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BSC_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ARBITRUM_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BASE), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BASE_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.HOMEVERSE), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.HOMEVERSE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XAI), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XAI_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.AVALANCHE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XR_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.B3), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.B3_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.APECHAIN), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.APECHAIN_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BLAST), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BLAST_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TELOS), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TELOS_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BORNE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SKALE_NEBULA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SKALE_NEBULA_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SONEIUM), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SONEIUM_MINATO), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TOY_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.IMMUTABLE_ZKEVM), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.IMMUTABLE_ZKEVM_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ROOT_NETWORK), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ROOT_NETWORK_PORCINI), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.LAOS), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.LAOS_SIGMA_TESTNET), ...hardhatNetworks]); | ||
@@ -720,15 +725,2 @@ class JsonRpcRouter { | ||
function _classPrivateFieldLooseBase(e, t) { | ||
if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); | ||
return e; | ||
} | ||
var id = 0; | ||
function _classPrivateFieldLooseKey(e) { | ||
return "__private_" + id++ + "_" + e; | ||
} | ||
var _chainId = /*#__PURE__*/_classPrivateFieldLooseKey("chainId"); | ||
var _nextId = /*#__PURE__*/_classPrivateFieldLooseKey("nextId"); | ||
var _sender = /*#__PURE__*/_classPrivateFieldLooseKey("sender"); | ||
// JsonRpcProvider with a middleware stack. By default it will use a simple caching middleware. | ||
@@ -741,14 +733,5 @@ class JsonRpcProvider extends ethers.ethers.JsonRpcProvider { | ||
this.url = url; | ||
Object.defineProperty(this, _chainId, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, _nextId, { | ||
writable: true, | ||
value: 1 | ||
}); | ||
Object.defineProperty(this, _sender, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
this.chainId = void 0; | ||
this.nextId = 1; | ||
this.sender = void 0; | ||
this.fetch = async function (request) { | ||
@@ -765,3 +748,3 @@ if (_this.url === undefined) { | ||
params, | ||
id: _classPrivateFieldLooseBase(_this, _nextId)[_nextId]++, | ||
id: _this.nextId++, | ||
jsonrpc: '2.0' | ||
@@ -807,3 +790,3 @@ }; | ||
const blockCache = options == null ? void 0 : options.blockCache; | ||
_classPrivateFieldLooseBase(this, _chainId)[_chainId] = chainId; | ||
this.chainId = chainId; | ||
@@ -822,6 +805,6 @@ // NOTE: it will either use the middleware stack passed to the constructor | ||
})], new JsonRpcHandler(this.fetch, chainId)); | ||
_classPrivateFieldLooseBase(this, _sender)[_sender] = router; | ||
this.sender = router; | ||
} | ||
async request(request) { | ||
return _classPrivateFieldLooseBase(this, _sender)[_sender].request(request); | ||
return this.sender.request(request); | ||
} | ||
@@ -836,3 +819,3 @@ async send(method, params, chainId) { | ||
async getNetwork() { | ||
const chainId = _classPrivateFieldLooseBase(this, _chainId)[_chainId]; | ||
const chainId = this.chainId; | ||
if (chainId) { | ||
@@ -849,3 +832,3 @@ const network = constants_dist_0xsequenceNetworkConstants.networks[chainId]; | ||
const chainIdHex = await this.send('eth_chainId', []); | ||
_classPrivateFieldLooseBase(this, _chainId)[_chainId] = Number(chainIdHex); | ||
this.chainId = Number(chainIdHex); | ||
return this.getNetwork(); | ||
@@ -852,0 +835,0 @@ } |
@@ -10,9 +10,14 @@ 'use strict'; | ||
function _extends() { | ||
return _extends = Object.assign ? Object.assign.bind() : function (n) { | ||
for (var e = 1; e < arguments.length; e++) { | ||
var t = arguments[e]; | ||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | ||
_extends = Object.assign ? Object.assign.bind() : function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return n; | ||
}, _extends.apply(null, arguments); | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
@@ -267,3 +272,3 @@ | ||
disabled: true | ||
}), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.POLYGON_AMOY), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BSC_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ARBITRUM_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BASE), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BASE_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.HOMEVERSE), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.HOMEVERSE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XAI), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XAI_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.AVALANCHE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XR_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.B3), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.B3_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.APECHAIN), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.APECHAIN_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BLAST), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BLAST_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TELOS), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BORNE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SKALE_NEBULA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SKALE_NEBULA_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SONEIUM_MINATO), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TOY_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.IMMUTABLE_ZKEVM), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.IMMUTABLE_ZKEVM_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ROOT_NETWORK), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ROOT_NETWORK_PORCINI), ...hardhatNetworks]); | ||
}), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.POLYGON_AMOY), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BSC_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ARBITRUM_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BASE), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BASE_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.HOMEVERSE), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.HOMEVERSE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XAI), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XAI_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.AVALANCHE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.XR_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.B3), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.B3_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.APECHAIN), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.APECHAIN_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BLAST), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BLAST_SEPOLIA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TELOS), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TELOS_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.BORNE_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SKALE_NEBULA), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SKALE_NEBULA_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SONEIUM), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.SONEIUM_MINATO), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.TOY_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.IMMUTABLE_ZKEVM), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.IMMUTABLE_ZKEVM_TESTNET), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ROOT_NETWORK), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.ROOT_NETWORK_PORCINI), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.LAOS), createNetworkConfig(constants_dist_0xsequenceNetworkConstants.ChainId.LAOS_SIGMA_TESTNET), ...hardhatNetworks]); | ||
@@ -720,15 +725,2 @@ class JsonRpcRouter { | ||
function _classPrivateFieldLooseBase(e, t) { | ||
if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); | ||
return e; | ||
} | ||
var id = 0; | ||
function _classPrivateFieldLooseKey(e) { | ||
return "__private_" + id++ + "_" + e; | ||
} | ||
var _chainId = /*#__PURE__*/_classPrivateFieldLooseKey("chainId"); | ||
var _nextId = /*#__PURE__*/_classPrivateFieldLooseKey("nextId"); | ||
var _sender = /*#__PURE__*/_classPrivateFieldLooseKey("sender"); | ||
// JsonRpcProvider with a middleware stack. By default it will use a simple caching middleware. | ||
@@ -741,14 +733,5 @@ class JsonRpcProvider extends ethers.ethers.JsonRpcProvider { | ||
this.url = url; | ||
Object.defineProperty(this, _chainId, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, _nextId, { | ||
writable: true, | ||
value: 1 | ||
}); | ||
Object.defineProperty(this, _sender, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
this.chainId = void 0; | ||
this.nextId = 1; | ||
this.sender = void 0; | ||
this.fetch = async function (request) { | ||
@@ -765,3 +748,3 @@ if (_this.url === undefined) { | ||
params, | ||
id: _classPrivateFieldLooseBase(_this, _nextId)[_nextId]++, | ||
id: _this.nextId++, | ||
jsonrpc: '2.0' | ||
@@ -807,3 +790,3 @@ }; | ||
const blockCache = options == null ? void 0 : options.blockCache; | ||
_classPrivateFieldLooseBase(this, _chainId)[_chainId] = chainId; | ||
this.chainId = chainId; | ||
@@ -822,6 +805,6 @@ // NOTE: it will either use the middleware stack passed to the constructor | ||
})], new JsonRpcHandler(this.fetch, chainId)); | ||
_classPrivateFieldLooseBase(this, _sender)[_sender] = router; | ||
this.sender = router; | ||
} | ||
async request(request) { | ||
return _classPrivateFieldLooseBase(this, _sender)[_sender].request(request); | ||
return this.sender.request(request); | ||
} | ||
@@ -836,3 +819,3 @@ async send(method, params, chainId) { | ||
async getNetwork() { | ||
const chainId = _classPrivateFieldLooseBase(this, _chainId)[_chainId]; | ||
const chainId = this.chainId; | ||
if (chainId) { | ||
@@ -849,3 +832,3 @@ const network = constants_dist_0xsequenceNetworkConstants.networks[chainId]; | ||
const chainIdHex = await this.send('eth_chainId', []); | ||
_classPrivateFieldLooseBase(this, _chainId)[_chainId] = Number(chainIdHex); | ||
this.chainId = Number(chainIdHex); | ||
return this.getNetwork(); | ||
@@ -852,0 +835,0 @@ } |
@@ -7,9 +7,14 @@ import { networks, ChainId } from '../constants/dist/0xsequence-network-constants.esm.js'; | ||
function _extends() { | ||
return _extends = Object.assign ? Object.assign.bind() : function (n) { | ||
for (var e = 1; e < arguments.length; e++) { | ||
var t = arguments[e]; | ||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | ||
_extends = Object.assign ? Object.assign.bind() : function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return n; | ||
}, _extends.apply(null, arguments); | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
@@ -264,3 +269,3 @@ | ||
disabled: true | ||
}), createNetworkConfig(ChainId.POLYGON_AMOY), createNetworkConfig(ChainId.BSC_TESTNET), createNetworkConfig(ChainId.ARBITRUM_SEPOLIA), createNetworkConfig(ChainId.BASE), createNetworkConfig(ChainId.BASE_SEPOLIA), createNetworkConfig(ChainId.HOMEVERSE), createNetworkConfig(ChainId.HOMEVERSE_TESTNET), createNetworkConfig(ChainId.XAI), createNetworkConfig(ChainId.XAI_SEPOLIA), createNetworkConfig(ChainId.AVALANCHE_TESTNET), createNetworkConfig(ChainId.XR_SEPOLIA), createNetworkConfig(ChainId.B3), createNetworkConfig(ChainId.B3_SEPOLIA), createNetworkConfig(ChainId.APECHAIN), createNetworkConfig(ChainId.APECHAIN_TESTNET), createNetworkConfig(ChainId.BLAST), createNetworkConfig(ChainId.BLAST_SEPOLIA), createNetworkConfig(ChainId.TELOS), createNetworkConfig(ChainId.BORNE_TESTNET), createNetworkConfig(ChainId.SKALE_NEBULA), createNetworkConfig(ChainId.SKALE_NEBULA_TESTNET), createNetworkConfig(ChainId.SONEIUM_MINATO), createNetworkConfig(ChainId.TOY_TESTNET), createNetworkConfig(ChainId.IMMUTABLE_ZKEVM), createNetworkConfig(ChainId.IMMUTABLE_ZKEVM_TESTNET), createNetworkConfig(ChainId.ROOT_NETWORK), createNetworkConfig(ChainId.ROOT_NETWORK_PORCINI), ...hardhatNetworks]); | ||
}), createNetworkConfig(ChainId.POLYGON_AMOY), createNetworkConfig(ChainId.BSC_TESTNET), createNetworkConfig(ChainId.ARBITRUM_SEPOLIA), createNetworkConfig(ChainId.BASE), createNetworkConfig(ChainId.BASE_SEPOLIA), createNetworkConfig(ChainId.HOMEVERSE), createNetworkConfig(ChainId.HOMEVERSE_TESTNET), createNetworkConfig(ChainId.XAI), createNetworkConfig(ChainId.XAI_SEPOLIA), createNetworkConfig(ChainId.AVALANCHE_TESTNET), createNetworkConfig(ChainId.XR_SEPOLIA), createNetworkConfig(ChainId.B3), createNetworkConfig(ChainId.B3_SEPOLIA), createNetworkConfig(ChainId.APECHAIN), createNetworkConfig(ChainId.APECHAIN_TESTNET), createNetworkConfig(ChainId.BLAST), createNetworkConfig(ChainId.BLAST_SEPOLIA), createNetworkConfig(ChainId.TELOS), createNetworkConfig(ChainId.TELOS_TESTNET), createNetworkConfig(ChainId.BORNE_TESTNET), createNetworkConfig(ChainId.SKALE_NEBULA), createNetworkConfig(ChainId.SKALE_NEBULA_TESTNET), createNetworkConfig(ChainId.SONEIUM), createNetworkConfig(ChainId.SONEIUM_MINATO), createNetworkConfig(ChainId.TOY_TESTNET), createNetworkConfig(ChainId.IMMUTABLE_ZKEVM), createNetworkConfig(ChainId.IMMUTABLE_ZKEVM_TESTNET), createNetworkConfig(ChainId.ROOT_NETWORK), createNetworkConfig(ChainId.ROOT_NETWORK_PORCINI), createNetworkConfig(ChainId.LAOS), createNetworkConfig(ChainId.LAOS_SIGMA_TESTNET), ...hardhatNetworks]); | ||
@@ -717,15 +722,2 @@ class JsonRpcRouter { | ||
function _classPrivateFieldLooseBase(e, t) { | ||
if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); | ||
return e; | ||
} | ||
var id = 0; | ||
function _classPrivateFieldLooseKey(e) { | ||
return "__private_" + id++ + "_" + e; | ||
} | ||
var _chainId = /*#__PURE__*/_classPrivateFieldLooseKey("chainId"); | ||
var _nextId = /*#__PURE__*/_classPrivateFieldLooseKey("nextId"); | ||
var _sender = /*#__PURE__*/_classPrivateFieldLooseKey("sender"); | ||
// JsonRpcProvider with a middleware stack. By default it will use a simple caching middleware. | ||
@@ -738,14 +730,5 @@ class JsonRpcProvider extends ethers.JsonRpcProvider { | ||
this.url = url; | ||
Object.defineProperty(this, _chainId, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, _nextId, { | ||
writable: true, | ||
value: 1 | ||
}); | ||
Object.defineProperty(this, _sender, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
this.chainId = void 0; | ||
this.nextId = 1; | ||
this.sender = void 0; | ||
this.fetch = async function (request) { | ||
@@ -762,3 +745,3 @@ if (_this.url === undefined) { | ||
params, | ||
id: _classPrivateFieldLooseBase(_this, _nextId)[_nextId]++, | ||
id: _this.nextId++, | ||
jsonrpc: '2.0' | ||
@@ -804,3 +787,3 @@ }; | ||
const blockCache = options == null ? void 0 : options.blockCache; | ||
_classPrivateFieldLooseBase(this, _chainId)[_chainId] = chainId; | ||
this.chainId = chainId; | ||
@@ -819,6 +802,6 @@ // NOTE: it will either use the middleware stack passed to the constructor | ||
})], new JsonRpcHandler(this.fetch, chainId)); | ||
_classPrivateFieldLooseBase(this, _sender)[_sender] = router; | ||
this.sender = router; | ||
} | ||
async request(request) { | ||
return _classPrivateFieldLooseBase(this, _sender)[_sender].request(request); | ||
return this.sender.request(request); | ||
} | ||
@@ -833,3 +816,3 @@ async send(method, params, chainId) { | ||
async getNetwork() { | ||
const chainId = _classPrivateFieldLooseBase(this, _chainId)[_chainId]; | ||
const chainId = this.chainId; | ||
if (chainId) { | ||
@@ -846,3 +829,3 @@ const network = networks[chainId]; | ||
const chainIdHex = await this.send('eth_chainId', []); | ||
_classPrivateFieldLooseBase(this, _chainId)[_chainId] = Number(chainIdHex); | ||
this.chainId = Number(chainIdHex); | ||
return this.getNetwork(); | ||
@@ -849,0 +832,0 @@ } |
@@ -34,2 +34,3 @@ export declare enum ChainId { | ||
TELOS = 40, | ||
TELOS_TESTNET = 41, | ||
B3 = 8333, | ||
@@ -45,2 +46,3 @@ B3_SEPOLIA = 1993, | ||
SONEIUM_MINATO = 1946, | ||
SONEIUM = 1868, | ||
TOY_TESTNET = 21000000, | ||
@@ -51,2 +53,4 @@ IMMUTABLE_ZKEVM = 13371, | ||
ROOT_NETWORK_PORCINI = 7672, | ||
LAOS = 6283, | ||
LAOS_SIGMA_TESTNET = 62850, | ||
HARDHAT = 31337, | ||
@@ -53,0 +57,0 @@ HARDHAT_2 = 31338 |
@@ -9,4 +9,6 @@ import { ethers } from 'ethers'; | ||
export declare class JsonRpcProvider extends ethers.JsonRpcProvider implements EIP1193Provider, JsonRpcSender { | ||
#private; | ||
url: string | ethers.FetchRequest | undefined; | ||
private chainId?; | ||
private nextId; | ||
private sender; | ||
constructor(url: string | ethers.FetchRequest | undefined, options?: JsonRpcProviderOptions, jsonRpcApiProviderOptions?: ethers.JsonRpcApiProviderOptions); | ||
@@ -13,0 +15,0 @@ request(request: { |
{ | ||
"name": "@0xsequence/network", | ||
"version": "0.0.0-20241114193556", | ||
"version": "0.0.0-20241216114019", | ||
"description": "network sub-package for Sequence", | ||
@@ -15,6 +15,6 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/network", | ||
"dependencies": { | ||
"@0xsequence/core": "0.0.0-20241114193556", | ||
"@0xsequence/indexer": "0.0.0-20241114193556", | ||
"@0xsequence/relayer": "0.0.0-20241114193556", | ||
"@0xsequence/utils": "0.0.0-20241114193556" | ||
"@0xsequence/core": "0.0.0-20241216114019", | ||
"@0xsequence/utils": "0.0.0-20241216114019", | ||
"@0xsequence/indexer": "0.0.0-20241216114019", | ||
"@0xsequence/relayer": "0.0.0-20241216114019" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
@@ -126,5 +126,7 @@ import { ethers } from 'ethers' | ||
createNetworkConfig(ChainId.TELOS), | ||
createNetworkConfig(ChainId.TELOS_TESTNET), | ||
createNetworkConfig(ChainId.BORNE_TESTNET), | ||
createNetworkConfig(ChainId.SKALE_NEBULA), | ||
createNetworkConfig(ChainId.SKALE_NEBULA_TESTNET), | ||
createNetworkConfig(ChainId.SONEIUM), | ||
createNetworkConfig(ChainId.SONEIUM_MINATO), | ||
@@ -136,3 +138,5 @@ createNetworkConfig(ChainId.TOY_TESTNET), | ||
createNetworkConfig(ChainId.ROOT_NETWORK_PORCINI), | ||
createNetworkConfig(ChainId.LAOS), | ||
createNetworkConfig(ChainId.LAOS_SIGMA_TESTNET), | ||
...hardhatNetworks | ||
]) |
@@ -59,2 +59,3 @@ export enum ChainId { | ||
TELOS = 40, | ||
TELOS_TESTNET = 41, | ||
@@ -82,2 +83,3 @@ // B3 Sepolia | ||
SONEIUM_MINATO = 1946, | ||
SONEIUM = 1868, | ||
@@ -95,2 +97,6 @@ // TOY Testnet | ||
// LAOS | ||
LAOS = 6283, | ||
LAOS_SIGMA_TESTNET = 62850, | ||
// HARDHAT TESTNETS | ||
@@ -768,3 +774,3 @@ HARDHAT = 31337, | ||
name: 'Telos Explorer', | ||
rootUrl: 'https://explorer.telos.net/network/' | ||
rootUrl: 'https://www.teloscan.io/' | ||
}, | ||
@@ -777,2 +783,18 @@ nativeToken: { | ||
}, | ||
[ChainId.TELOS_TESTNET]: { | ||
chainId: ChainId.TELOS_TESTNET, | ||
type: NetworkType.TESTNET, | ||
name: 'telos-testnet', | ||
title: 'Telos Testnet', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.TELOS_TESTNET}.webp`, | ||
blockExplorer: { | ||
name: 'Telos Testnet Explorer', | ||
rootUrl: 'https://testnet.teloscan.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'TLOS', | ||
name: 'TLOS', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.BORNE_TESTNET]: { | ||
@@ -829,2 +851,19 @@ chainId: ChainId.BORNE_TESTNET, | ||
}, | ||
[ChainId.SONEIUM]: { | ||
chainId: ChainId.SONEIUM, | ||
type: NetworkType.MAINNET, | ||
name: 'soneium', | ||
title: 'Soneium', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SONEIUM}.webp`, | ||
testnet: false, | ||
blockExplorer: { | ||
name: 'Soneium Explorer', | ||
rootUrl: 'https://vk9a3tgpne6qmub8.blockscout.com/' | ||
}, | ||
nativeToken: { | ||
symbol: 'ETH', | ||
name: 'Ether', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.SONEIUM_MINATO]: { | ||
@@ -932,2 +971,36 @@ chainId: ChainId.SONEIUM_MINATO, | ||
}, | ||
[ChainId.LAOS]: { | ||
chainId: ChainId.LAOS, | ||
type: NetworkType.MAINNET, | ||
name: 'laos', | ||
title: 'LAOS', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS}.webp`, | ||
testnet: false, | ||
blockExplorer: { | ||
name: 'LAOS Explorer', | ||
rootUrl: 'https://blockscout.laos.laosfoundation.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'LAOS', | ||
name: 'LAOS', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.LAOS_SIGMA_TESTNET]: { | ||
chainId: ChainId.LAOS_SIGMA_TESTNET, | ||
type: NetworkType.TESTNET, | ||
name: 'laos-sigma-testnet', | ||
title: 'LAOS Sigma Testnet', | ||
logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS_SIGMA_TESTNET}.webp`, | ||
testnet: true, | ||
blockExplorer: { | ||
name: 'LAOS Sigma Testnet Explorer', | ||
rootUrl: 'https://sigma.explorer.laosnetwork.io/' | ||
}, | ||
nativeToken: { | ||
symbol: 'SIGMA', | ||
name: 'SIGMA', | ||
decimals: 18 | ||
} | ||
}, | ||
[ChainId.HARDHAT]: { | ||
@@ -934,0 +1007,0 @@ chainId: ChainId.HARDHAT, |
@@ -29,5 +29,5 @@ import { ethers } from 'ethers' | ||
export class JsonRpcProvider extends ethers.JsonRpcProvider implements EIP1193Provider, JsonRpcSender { | ||
#chainId?: number | ||
#nextId: number = 1 | ||
#sender: EIP1193Provider | ||
private chainId?: number | ||
private nextId: number = 1 | ||
private sender: EIP1193Provider | ||
@@ -45,3 +45,3 @@ constructor( | ||
this.#chainId = chainId | ||
this.chainId = chainId | ||
@@ -62,7 +62,7 @@ // NOTE: it will either use the middleware stack passed to the constructor | ||
this.#sender = router | ||
this.sender = router | ||
} | ||
async request(request: { method: string; params?: any[]; chainId?: number }): Promise<any> { | ||
return this.#sender.request(request) | ||
return this.sender.request(request) | ||
} | ||
@@ -75,3 +75,3 @@ | ||
async getNetwork(): Promise<ethers.Network> { | ||
const chainId = this.#chainId | ||
const chainId = this.chainId | ||
if (chainId) { | ||
@@ -88,3 +88,3 @@ const network = networks[chainId as ChainId] | ||
const chainIdHex = await this.send('eth_chainId', []) | ||
this.#chainId = Number(chainIdHex) | ||
this.chainId = Number(chainIdHex) | ||
return this.getNetwork() | ||
@@ -104,3 +104,3 @@ } | ||
params, | ||
id: this.#nextId++, | ||
id: this.nextId++, | ||
jsonrpc: '2.0' | ||
@@ -107,0 +107,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
271380
7720
+ Added@0xsequence/abi@0.0.0-20241216114019(transitive)
+ Added@0xsequence/core@0.0.0-20241216114019(transitive)
+ Added@0xsequence/indexer@0.0.0-20241216114019(transitive)
+ Added@0xsequence/relayer@0.0.0-20241216114019(transitive)
+ Added@0xsequence/utils@0.0.0-20241216114019(transitive)
- Removed@0xsequence/abi@0.0.0-20241114193556(transitive)
- Removed@0xsequence/core@0.0.0-20241114193556(transitive)
- Removed@0xsequence/indexer@0.0.0-20241114193556(transitive)
- Removed@0xsequence/relayer@0.0.0-20241114193556(transitive)
- Removed@0xsequence/utils@0.0.0-20241114193556(transitive)