Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04c607ccde | ||
|
|
926dd7b03f | ||
|
|
e00dd12357 | ||
|
|
cdc08c5528 | ||
|
|
4df0c2ee10 | ||
|
|
48a8f9385e | ||
|
|
a91776e121 | ||
|
|
f5aed34d3c | ||
|
|
0f02706906 | ||
|
|
eb463735e2 | ||
|
|
adec589ead | ||
|
|
e5246f2667 | ||
|
|
b29ec675f9 | ||
|
|
b30566c684 | ||
|
|
182a4e7e8f | ||
|
|
8b82f3c59c | ||
|
|
f59b729f8b | ||
|
|
387dddbd87 | ||
|
|
911e14fcac | ||
|
|
cd6b07b591 | ||
|
|
154c55add5 | ||
|
|
f202f597ca | ||
|
|
91f0245be7 | ||
|
|
ae74b8ef62 | ||
|
|
5a373a7509 | ||
|
|
088547f763 | ||
|
|
586e91dbe6 | ||
|
|
f65578d637 | ||
|
|
447d984653 | ||
|
|
34a3bb8ae3 | ||
|
|
bc003c2fef | ||
|
|
c88fa57591 | ||
|
|
c12f0874b4 | ||
|
|
184c325ab2 | ||
|
|
046c9ad604 | ||
|
|
2a7bbf8665 | ||
|
|
f97ddf4c7f | ||
|
|
66c53360cd | ||
|
|
bd1fcbae32 | ||
|
|
e196264172 |
@@ -1,5 +1,54 @@
|
|||||||
# @thirdweb-dev/auth
|
# @thirdweb-dev/auth
|
||||||
|
|
||||||
|
## 3.2.39
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/wallets@1.1.22
|
||||||
|
|
||||||
|
## 3.2.38
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`eb463735`](https://github.com/thirdweb-dev/js/commit/eb463735e2f784cd1d212a982835af95cf60766b), [`0f027069`](https://github.com/thirdweb-dev/js/commit/0f027069064bebe647f9235fa86ef7f165ffc7b3)]:
|
||||||
|
- @thirdweb-dev/wallets@1.1.21
|
||||||
|
|
||||||
|
## 3.2.37
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/wallets@1.1.20
|
||||||
|
|
||||||
|
## 3.2.36
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/wallets@1.1.19
|
||||||
|
|
||||||
|
## 3.2.35
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/wallets@1.1.18
|
||||||
|
|
||||||
|
## 3.2.34
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/wallets@1.1.17
|
||||||
|
|
||||||
|
## 3.2.33
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/wallets@1.1.16
|
||||||
|
|
||||||
## 3.2.32
|
## 3.2.32
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/auth",
|
"name": "@thirdweb-dev/auth",
|
||||||
"version": "3.2.32",
|
"version": "3.2.39",
|
||||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
|
|||||||
@@ -1,5 +1,48 @@
|
|||||||
# @thirdweb-dev/chains
|
# @thirdweb-dev/chains
|
||||||
|
|
||||||
|
## 0.1.50
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1558](https://github.com/thirdweb-dev/js/pull/1558) [`926dd7b0`](https://github.com/thirdweb-dev/js/commit/926dd7b03f38ed25ca303dc23d3323d5edd28005) Thanks [@Marfuen](https://github.com/Marfuen)! - Updating chains list
|
||||||
|
|
||||||
|
## 0.1.49
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1540](https://github.com/thirdweb-dev/js/pull/1540) [`b30566c6`](https://github.com/thirdweb-dev/js/commit/b30566c68436ad94ddc938a380eccc13a8a7147d) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - updated chains
|
||||||
|
|
||||||
|
- [#1422](https://github.com/thirdweb-dev/js/pull/1422) [`0f027069`](https://github.com/thirdweb-dev/js/commit/0f027069064bebe647f9235fa86ef7f165ffc7b3) Thanks [@Marfuen](https://github.com/Marfuen)! - CLI will now use an OAuth like login flow to authenticate the device with the wallet on the dashboard.
|
||||||
|
Any actions performed by the CLI will be linked to your account / wallet on the dashboard, including but not limited to tracking your usage, and billing as needed.
|
||||||
|
|
||||||
|
- [#1551](https://github.com/thirdweb-dev/js/pull/1551) [`f5aed34d`](https://github.com/thirdweb-dev/js/commit/f5aed34d3c71065c3f45df2c1eb84ba9c36162d5) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update chains
|
||||||
|
|
||||||
|
## 0.1.48
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1530](https://github.com/thirdweb-dev/js/pull/1530) [`911e14fc`](https://github.com/thirdweb-dev/js/commit/911e14fcac743b07fa1a66440c72d662c08e971c) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Add Chiliz Spicy testnet
|
||||||
|
|
||||||
|
## 0.1.47
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1518](https://github.com/thirdweb-dev/js/pull/1518) [`34a3bb8a`](https://github.com/thirdweb-dev/js/commit/34a3bb8ae3c1d7a506e5568a9e79ab7e469557a8) Thanks [@nkrishang](https://github.com/nkrishang)! - Update contracts package
|
||||||
|
|
||||||
|
## 0.1.46
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1508](https://github.com/thirdweb-dev/js/pull/1508) [`184c325a`](https://github.com/thirdweb-dev/js/commit/184c325ab2ef028022a050c4274f2ab12b1a3a7f) Thanks [@jnsdls](https://github.com/jnsdls)! - update xpla chain icons
|
||||||
|
|
||||||
|
- [#1513](https://github.com/thirdweb-dev/js/pull/1513) [`c12f0874`](https://github.com/thirdweb-dev/js/commit/c12f0874b4dac43c263c7edb20d0343c16381c34) Thanks [@jnsdls](https://github.com/jnsdls)! - add additonal chains
|
||||||
|
|
||||||
|
## 0.1.45
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1506](https://github.com/thirdweb-dev/js/pull/1506) [`f97ddf4c`](https://github.com/thirdweb-dev/js/commit/f97ddf4c7f14854f3b204ad9741b52ddb8dac736) Thanks [@jnsdls](https://github.com/jnsdls)! - add xpla chains & update chains
|
||||||
|
|
||||||
## 0.1.44
|
## 0.1.44
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ export default {
|
|||||||
"https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
"https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com"
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
|
"wss://mainnet.gateway.tenderly.co"
|
||||||
],
|
],
|
||||||
"features": [
|
"features": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ export default {
|
|||||||
"https://optimism-mainnet.infura.io/v3/${INFURA_API_KEY}",
|
"https://optimism-mainnet.infura.io/v3/${INFURA_API_KEY}",
|
||||||
"https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
"https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||||
"https://mainnet.optimism.io",
|
"https://mainnet.optimism.io",
|
||||||
"https://optimism.publicnode.com"
|
"https://optimism.publicnode.com",
|
||||||
|
"https://optimism.gateway.tenderly.co",
|
||||||
|
"wss://optimism.gateway.tenderly.co"
|
||||||
],
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export default {
|
|||||||
"https://gnosis.api.onfinality.io/public",
|
"https://gnosis.api.onfinality.io/public",
|
||||||
"https://gnosis.blockpi.network/v1/rpc/public",
|
"https://gnosis.blockpi.network/v1/rpc/public",
|
||||||
"https://web3endpoints.com/gnosischain-mainnet",
|
"https://web3endpoints.com/gnosischain-mainnet",
|
||||||
|
"https://gnosis.oat.farm",
|
||||||
"wss://rpc.gnosischain.com/wss"
|
"wss://rpc.gnosischain.com/wss"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Arthera Testnet",
|
||||||
|
"chain": "AA",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmYQp3e52KjkT4bYdAvB6ACEEpXs2D8DozsDitaADRY2Ak",
|
||||||
|
"width": 1024,
|
||||||
|
"height": 998,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://arthera-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc-test.arthera.net"
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://faucet.arthera.net"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Arthera",
|
||||||
|
"symbol": "AA",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://docs.arthera.net",
|
||||||
|
"shortName": "aa",
|
||||||
|
"chainId": 10243,
|
||||||
|
"networkId": 10243,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "blockscout",
|
||||||
|
"url": "https://explorer-test.arthera.net",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||||
|
"width": 551,
|
||||||
|
"height": 540,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "arthera-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -10,7 +10,9 @@ export default {
|
|||||||
"https://rpc.sepolia.org",
|
"https://rpc.sepolia.org",
|
||||||
"https://rpc2.sepolia.org",
|
"https://rpc2.sepolia.org",
|
||||||
"https://rpc-sepolia.rockx.com",
|
"https://rpc-sepolia.rockx.com",
|
||||||
"https://rpc.sepolia.ethpandaops.io"
|
"https://rpc.sepolia.ethpandaops.io",
|
||||||
|
"https://sepolia.gateway.tenderly.co",
|
||||||
|
"wss://sepolia.gateway.tenderly.co"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"http://fauceth.komputing.org?chain=11155111&address=${ADDRESS}"
|
"http://fauceth.komputing.org?chain=11155111&address=${ADDRESS}"
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
import type { Chain } from "../src/types";
|
|
||||||
export default {
|
|
||||||
"name": "DeBank Testnet",
|
|
||||||
"chain": "DeBank",
|
|
||||||
"rpc": [],
|
|
||||||
"faucets": [],
|
|
||||||
"icon": {
|
|
||||||
"url": "ipfs://QmW9pBps8WHRRWmyXhjLZrjZJUe8F48hUu7z98bu2RVsjN",
|
|
||||||
"width": 400,
|
|
||||||
"height": 400,
|
|
||||||
"format": "png"
|
|
||||||
},
|
|
||||||
"nativeCurrency": {
|
|
||||||
"name": "Ether",
|
|
||||||
"symbol": "ETH",
|
|
||||||
"decimals": 18
|
|
||||||
},
|
|
||||||
"infoURL": "https://debank.com",
|
|
||||||
"shortName": "debank-testnet",
|
|
||||||
"chainId": 115,
|
|
||||||
"networkId": 115,
|
|
||||||
"explorers": [],
|
|
||||||
"testnet": true,
|
|
||||||
"slug": "debank-testnet"
|
|
||||||
} as const satisfies Chain;
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import type { Chain } from "../src/types";
|
|
||||||
export default {
|
|
||||||
"name": "DeBank Mainnet",
|
|
||||||
"chain": "DeBank",
|
|
||||||
"rpc": [],
|
|
||||||
"faucets": [],
|
|
||||||
"icon": {
|
|
||||||
"url": "ipfs://QmW9pBps8WHRRWmyXhjLZrjZJUe8F48hUu7z98bu2RVsjN",
|
|
||||||
"width": 400,
|
|
||||||
"height": 400,
|
|
||||||
"format": "png"
|
|
||||||
},
|
|
||||||
"nativeCurrency": {
|
|
||||||
"name": "Ether",
|
|
||||||
"symbol": "ETH",
|
|
||||||
"decimals": 18
|
|
||||||
},
|
|
||||||
"infoURL": "https://debank.com",
|
|
||||||
"shortName": "debank-mainnet",
|
|
||||||
"chainId": 116,
|
|
||||||
"networkId": 116,
|
|
||||||
"explorers": [],
|
|
||||||
"testnet": false,
|
|
||||||
"slug": "debank"
|
|
||||||
} as const satisfies Chain;
|
|
||||||
@@ -17,8 +17,14 @@ export default {
|
|||||||
"symbol": "MC",
|
"symbol": "MC",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://gaming.meritcircle.io",
|
"infoURL": "https://www.onbeam.com",
|
||||||
"shortName": "BEAM",
|
"shortName": "beam-testnet",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmQJ21NWyGGDraicVEzS1Uqq1yXahM9NCuNZgnfYvtspdt",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
"chainId": 13337,
|
"chainId": 13337,
|
||||||
"networkId": 13337,
|
"networkId": 13337,
|
||||||
"explorers": [
|
"explorers": [
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ export default {
|
|||||||
"https://rpc-mainnet.maticvigil.com",
|
"https://rpc-mainnet.maticvigil.com",
|
||||||
"https://rpc-mainnet.matic.quiknode.pro",
|
"https://rpc-mainnet.matic.quiknode.pro",
|
||||||
"https://matic-mainnet-full-rpc.bwarelabs.com",
|
"https://matic-mainnet-full-rpc.bwarelabs.com",
|
||||||
"https://polygon-bor.publicnode.com"
|
"https://polygon-bor.publicnode.com",
|
||||||
|
"https://polygon.gateway.tenderly.co",
|
||||||
|
"wss://polygon.gateway.tenderly.co"
|
||||||
],
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ export default {
|
|||||||
"https://t.me/HumanodeTestnet5FaucetBot"
|
"https://t.me/HumanodeTestnet5FaucetBot"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "HMND",
|
"name": "eHMND",
|
||||||
"symbol": "HMND",
|
"symbol": "eHMND",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://humanode.io",
|
"infoURL": "https://humanode.io",
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Redbelly Network Mainnet",
|
||||||
|
"shortName": "rbn",
|
||||||
|
"chain": "RBN",
|
||||||
|
"chainId": 151,
|
||||||
|
"networkId": 151,
|
||||||
|
"rpc": [],
|
||||||
|
"faucets": [],
|
||||||
|
"infoURL": "https://redbelly.network",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Redbelly Network Coin",
|
||||||
|
"symbol": "RBNT",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"status": "incubating",
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "redbelly-network"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Redbelly Network Devnet",
|
||||||
|
"shortName": "rbn-devnet",
|
||||||
|
"chain": "RBN",
|
||||||
|
"chainId": 152,
|
||||||
|
"networkId": 152,
|
||||||
|
"rpc": [],
|
||||||
|
"faucets": [],
|
||||||
|
"infoURL": "https://redbelly.network",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Redbelly Network Coin",
|
||||||
|
"symbol": "RBNT",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"status": "incubating",
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "redbelly-network-devnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Redbelly Network Testnet",
|
||||||
|
"shortName": "rbn-testnet",
|
||||||
|
"chain": "RBN",
|
||||||
|
"chainId": 153,
|
||||||
|
"networkId": 153,
|
||||||
|
"rpc": [],
|
||||||
|
"faucets": [],
|
||||||
|
"infoURL": "https://redbelly.network",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Redbelly Network Coin",
|
||||||
|
"symbol": "RBNT",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"status": "incubating",
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "redbelly-network-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Redbelly Network TGE",
|
||||||
|
"shortName": "rbn-tge",
|
||||||
|
"chain": "RBN",
|
||||||
|
"chainId": 154,
|
||||||
|
"networkId": 154,
|
||||||
|
"rpc": [],
|
||||||
|
"faucets": [],
|
||||||
|
"infoURL": "https://redbelly.network",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Redbelly Network Coin",
|
||||||
|
"symbol": "RBNT",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "redbelly-network-tge"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Omni Testnet 1",
|
"name": "Omni Testnet",
|
||||||
"chain": "Omni",
|
"chain": "Omni",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://omni-testnet-1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://omni-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://testnet-1.omni.network"
|
"https://testnet.omni.network"
|
||||||
],
|
],
|
||||||
"features": [
|
"features": [
|
||||||
{
|
{
|
||||||
@@ -24,10 +24,10 @@ export default {
|
|||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "Omni Explorer",
|
"name": "Omni Explorer",
|
||||||
"url": "https://testnet-1.explorer.omni.network",
|
"url": "https://testnet.explorer.omni.network",
|
||||||
"standard": "EIP3091"
|
"standard": "EIP3091"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"slug": "omni-testnet-1"
|
"slug": "omni-testnet"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -11,8 +11,8 @@ export default {
|
|||||||
},
|
},
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://horizen-gobi-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://horizen-gobi-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://gobi-testnet.horizenlabs.io/ethv1",
|
"https://gobi-rpc.horizenlabs.io/ethv1",
|
||||||
"https://rpc.ankr.com/horizen_testnet_evm"
|
"https://rpc.ankr.com/horizen_gobi_testnet"
|
||||||
],
|
],
|
||||||
"features": [
|
"features": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Bitchain Mainnet",
|
||||||
|
"chain": "Bit",
|
||||||
|
"rpc": [
|
||||||
|
"https://bitchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.bitchain.biz/"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Bitcoin",
|
||||||
|
"symbol": "BTC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.bitchain.biz/",
|
||||||
|
"shortName": "bit",
|
||||||
|
"chainId": 198,
|
||||||
|
"networkId": 198,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Bitchain Scan",
|
||||||
|
"url": "https://explorer.bitchain.biz",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "bitchain"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "DeBank Testnet",
|
||||||
|
"chain": "DeBank",
|
||||||
|
"rpc": [
|
||||||
|
"https://debank-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"http://rpc.testnet.debank.com"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmW9pBps8WHRRWmyXhjLZrjZJUe8F48hUu7z98bu2RVsjN",
|
||||||
|
"width": 400,
|
||||||
|
"height": 400,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "DeBank USD",
|
||||||
|
"symbol": "USD",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://debank.com",
|
||||||
|
"shortName": "dbk",
|
||||||
|
"chainId": 2021398,
|
||||||
|
"networkId": 2021398,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "DeBank Chain Explorer",
|
||||||
|
"url": "https://explorer.testnet.debank.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "debank-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Centrifuge",
|
||||||
|
"chain": "CFG",
|
||||||
|
"rpc": [
|
||||||
|
"wss://fullnode.parachain.centrifuge.io"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Centrifuge",
|
||||||
|
"symbol": "CFG",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://centrifuge.io",
|
||||||
|
"shortName": "cfg",
|
||||||
|
"chainId": 2031,
|
||||||
|
"networkId": 2031,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "subscan",
|
||||||
|
"url": "https://centrifuge.subscan.io",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "centrifuge"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Catalyst",
|
||||||
|
"chain": "CFG",
|
||||||
|
"rpc": [
|
||||||
|
"wss://fullnode.catalyst.cntrfg.com"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Catalyst CFG",
|
||||||
|
"symbol": "NCFG",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://centrifuge.io",
|
||||||
|
"shortName": "ncfg",
|
||||||
|
"chainId": 2032,
|
||||||
|
"networkId": 2032,
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "catalyst"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Kiwi Subnet",
|
||||||
|
"chain": "KIWI",
|
||||||
|
"rpc": [
|
||||||
|
"https://kiwi-subnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/kiwi/testnet/rpc"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Shrapgas",
|
||||||
|
"symbol": "SHRAP",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "",
|
||||||
|
"shortName": "kiwi",
|
||||||
|
"chainId": 2037,
|
||||||
|
"networkId": 2037,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "KIWI Explorer",
|
||||||
|
"url": "https://subnets-test.avax.network/kiwi",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "kiwi-subnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "opBNB Mainnet",
|
||||||
|
"chain": "opBNB",
|
||||||
|
"rpc": [
|
||||||
|
"https://opbnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://opbnb-mainnet-rpc.bnbchain.org"
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://free-online-app.com/faucet-for-eth-evm-chains"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "BNB Chain Native Token",
|
||||||
|
"symbol": "BNB",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://opbnb.bnbchain.org/en",
|
||||||
|
"shortName": "obnb",
|
||||||
|
"chainId": 204,
|
||||||
|
"networkId": 204,
|
||||||
|
"slip44": 714,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "opbnbscan",
|
||||||
|
"url": "http://mainnet.opbnbscan.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "opbnb"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Altair",
|
||||||
|
"chain": "AIR",
|
||||||
|
"rpc": [
|
||||||
|
"wss://fullnode.altair.centrifuge.io"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Altair",
|
||||||
|
"symbol": "AIR",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://centrifuge.io",
|
||||||
|
"shortName": "air",
|
||||||
|
"chainId": 2088,
|
||||||
|
"networkId": 2088,
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "altair"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Algol",
|
||||||
|
"chain": "algol",
|
||||||
|
"rpc": [
|
||||||
|
"wss://fullnode.algol.cntrfg.com"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Algol",
|
||||||
|
"symbol": "ALGL",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://centrifuge.io",
|
||||||
|
"shortName": "algl",
|
||||||
|
"chainId": 2089,
|
||||||
|
"networkId": 2089,
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "algol"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Kava EVM Testnet",
|
"name": "Kava Testnet",
|
||||||
"chain": "KAVA",
|
"chain": "KAVA",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://kava-evm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://kava-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://evm.testnet.kava.io",
|
"https://evm.testnet.kava.io",
|
||||||
|
"https://kava-evm-testnet.rpc.thirdweb.com",
|
||||||
"wss://wevm.testnet.kava.io"
|
"wss://wevm.testnet.kava.io"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
@@ -28,7 +29,7 @@ export default {
|
|||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "Kava Testnet Explorer",
|
"name": "Kava Testnet Explorer",
|
||||||
"url": "https://explorer.testnet.kava.io",
|
"url": "http://testnet.kavascan.com",
|
||||||
"standard": "EIP3091",
|
"standard": "EIP3091",
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmdpRTk6oL1HRW9xC6cAc4Rnf9gs6zgdAcr4Z3HcLztusm",
|
"url": "ipfs://QmdpRTk6oL1HRW9xC6cAc4Rnf9gs6zgdAcr4Z3HcLztusm",
|
||||||
@@ -39,5 +40,5 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"slug": "kava-evm-testnet"
|
"slug": "kava-testnet"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Kava EVM",
|
"name": "Kava",
|
||||||
"chain": "KAVA",
|
"chain": "KAVA",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://kava-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://kava.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://evm.kava.io",
|
"https://evm.kava.io",
|
||||||
"https://evm2.kava.io",
|
"https://evm2.kava.io",
|
||||||
|
"https://kava-rpc.gateway.pokt.network",
|
||||||
|
"https://kava-evm.rpc.thirdweb.com",
|
||||||
"wss://wevm.kava.io",
|
"wss://wevm.kava.io",
|
||||||
"wss://wevm2.kava.io",
|
"wss://wevm2.kava.io",
|
||||||
"https://kava-evm.publicnode.com"
|
"https://kava-evm.publicnode.com"
|
||||||
@@ -29,7 +31,7 @@ export default {
|
|||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "Kava EVM Explorer",
|
"name": "Kava EVM Explorer",
|
||||||
"url": "https://explorer.kava.io",
|
"url": "https://kavascan.com",
|
||||||
"standard": "EIP3091",
|
"standard": "EIP3091",
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmdpRTk6oL1HRW9xC6cAc4Rnf9gs6zgdAcr4Z3HcLztusm",
|
"url": "ipfs://QmdpRTk6oL1HRW9xC6cAc4Rnf9gs6zgdAcr4Z3HcLztusm",
|
||||||
@@ -40,5 +42,5 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"testnet": false,
|
"testnet": false,
|
||||||
"slug": "kava-evm"
|
"slug": "kava"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Nautilus Mainnet",
|
||||||
|
"chain": "ETH",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmNutSgM7n6aJPPDiofe9Dm1epy1RcYTMvugukLUK2vmPM",
|
||||||
|
"width": 500,
|
||||||
|
"height": 500,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://nautilus.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://api.nautilus.nautchain.xyz"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Zebec",
|
||||||
|
"symbol": "ZBC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://docs.nautchain.xyz",
|
||||||
|
"shortName": "NAUTCHAIN",
|
||||||
|
"chainId": 22222,
|
||||||
|
"networkId": 22222,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Nautscan",
|
||||||
|
"url": "https://nautscan.com",
|
||||||
|
"standard": "EIP3091",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmNutSgM7n6aJPPDiofe9Dm1epy1RcYTMvugukLUK2vmPM",
|
||||||
|
"width": 500,
|
||||||
|
"height": 500,
|
||||||
|
"format": "png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "nautilus"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -4,7 +4,11 @@ export default {
|
|||||||
"chain": "SOMA",
|
"chain": "SOMA",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://soma-network-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://soma-network-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://data-testnet-v1.somanetwork.io/"
|
"https://data-testnet-v1.somanetwork.io/",
|
||||||
|
"https://testnet-au-server-2.somanetwork.io",
|
||||||
|
"https://testnet-au-server-1.somanetwork.io",
|
||||||
|
"https://testnet-sg-server-1.somanetwork.io",
|
||||||
|
"https://testnet-sg-server-2.somanetwork.io"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://faucet.somanetwork.io"
|
"https://faucet.somanetwork.io"
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ export default {
|
|||||||
"chain": "SOMA",
|
"chain": "SOMA",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://soma-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://soma-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://data-mainnet-v1.somanetwork.io/"
|
"https://data-mainnet-v1.somanetwork.io/",
|
||||||
|
"https://id-mainnet.somanetwork.io",
|
||||||
|
"https://hk-mainnet.somanetwork.io",
|
||||||
|
"https://sg-mainnet.somanetwork.io"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://airdrop.somanetwork.io"
|
"https://airdrop.somanetwork.io"
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Morphism Testnet",
|
||||||
|
"chain": "ETH",
|
||||||
|
"rpc": [
|
||||||
|
"https://morphism-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc-testnet.morphism.xyz"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Ether",
|
||||||
|
"symbol": "ETH",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://morphism.xyz",
|
||||||
|
"shortName": "tmorph",
|
||||||
|
"chainId": 2710,
|
||||||
|
"networkId": 2710,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Morphism Testnet Explorer",
|
||||||
|
"url": "https://explorer-testnet.morphism.xyz",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-1",
|
||||||
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://bridge-testnet.morphism.xyz"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "morphism-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Ancient8 Testnet",
|
||||||
|
"chain": "Ancient8",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmSX8sHToRzyFupT8BvPQjVsegRWFYz2mdnLkVnqBFKohY",
|
||||||
|
"width": 901,
|
||||||
|
"height": 901,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://ancient8-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc-testnet.ancient8.gg"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Ether",
|
||||||
|
"symbol": "ETH",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://ancient8.gg/",
|
||||||
|
"shortName": "a8",
|
||||||
|
"chainId": 2863311531,
|
||||||
|
"networkId": 2863311531,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "a8scan-testnet",
|
||||||
|
"url": "https://testnet.a8scan.io",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "ancient8-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -6,8 +6,8 @@ export default {
|
|||||||
"https://boba-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://boba-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://mainnet.boba.network",
|
"https://mainnet.boba.network",
|
||||||
"https://replica.boba.network",
|
"https://replica.boba.network",
|
||||||
"http://boba-ethereum.gateway.tenderly.co",
|
"https://boba-ethereum.gateway.tenderly.co",
|
||||||
"http://gateway.tenderly.co/public/boba-ethereum",
|
"https://gateway.tenderly.co/public/boba-ethereum",
|
||||||
"wss://boba-ethereum.gateway.tenderly.co/",
|
"wss://boba-ethereum.gateway.tenderly.co/",
|
||||||
"wss://gateway.tenderly.co/public/boba-ethereum"
|
"wss://gateway.tenderly.co/public/boba-ethereum"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Dubxcoin network",
|
||||||
|
"chain": "DUBX",
|
||||||
|
"rpc": [
|
||||||
|
"https://dubxcoin-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpcmain.arabianchain.org"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Dubxcoin mainnet",
|
||||||
|
"symbol": "DUBX",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://arabianchain.org",
|
||||||
|
"shortName": "dubx",
|
||||||
|
"chainId": 3269,
|
||||||
|
"networkId": 3269,
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "dubxcoin-network"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Dubxcoin testnet",
|
||||||
|
"chain": "TESTDUBX",
|
||||||
|
"rpc": [
|
||||||
|
"https://dubxcoin-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpctestnet.arabianchain.org"
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://faucet.arabianchain.org/"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Dubxcoin testnet",
|
||||||
|
"symbol": "TDUBX",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://arabianchain.org",
|
||||||
|
"shortName": "testdubx",
|
||||||
|
"chainId": 3270,
|
||||||
|
"networkId": 3270,
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "dubxcoin-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -5,6 +5,12 @@ export default {
|
|||||||
"shortName": "POPTestnet",
|
"shortName": "POPTestnet",
|
||||||
"chainId": 331769,
|
"chainId": 331769,
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
|
"icon": {
|
||||||
|
"format": "png",
|
||||||
|
"url": "ipfs://QmP8rYvcc7aJB3c2YZxjxaySvHapHnoK8MnxuSuDT4PtF2",
|
||||||
|
"height": 400,
|
||||||
|
"width": 400
|
||||||
|
},
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://proofofpepe-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://proofofpepe-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://testnet01.proofofpepe.tech"
|
"https://testnet01.proofofpepe.tech"
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "POP Mainnet",
|
||||||
|
"chain": "POP",
|
||||||
|
"shortName": "POP",
|
||||||
|
"chainId": 331771,
|
||||||
|
"testnet": false,
|
||||||
|
"icon": {
|
||||||
|
"format": "png",
|
||||||
|
"url": "ipfs://QmP8rYvcc7aJB3c2YZxjxaySvHapHnoK8MnxuSuDT4PtF2",
|
||||||
|
"height": 400,
|
||||||
|
"width": 400
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://pop.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc00.proofofpepe.tech",
|
||||||
|
"https://rpc01.proofofpepe.tech",
|
||||||
|
"https://rpc02.proofofpepe.tech"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Pepe",
|
||||||
|
"symbol": "PEPE",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Pepescan",
|
||||||
|
"url": "https://pepescan.app",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"slug": "pop"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Yooldo Verse Mainnet",
|
||||||
|
"chain": "Yooldo Verse",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmWvfA2usnYp1ktzLcqFS8eTLgdp4ifrxjiify46KyG9NZ",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://yooldo-verse.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.yooldo-verse.xyz/"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "OAS",
|
||||||
|
"symbol": "OAS",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://yooldo.gg/",
|
||||||
|
"shortName": "YVM",
|
||||||
|
"chainId": 345,
|
||||||
|
"networkId": 345,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Yooldo Verse Explorer",
|
||||||
|
"url": "https://explorer.yooldo-verse.xyz",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-248"
|
||||||
|
},
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "yooldo-verse"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -1,27 +1,35 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "SeedCoin-Network",
|
"name": "Xpla Mainnet",
|
||||||
"chain": "SeedCoin-Network",
|
"chain": "XPLA",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://seedcoin-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://xpla.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://node.seedcoin.network"
|
"https://dimension-evm-rpc.xpla.dev"
|
||||||
],
|
],
|
||||||
"faucets": [],
|
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "SeedCoin",
|
"name": "XPLA",
|
||||||
"symbol": "SEED",
|
"symbol": "XPLA",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://www.seedcoin.network/",
|
"infoURL": "https://xpla.io/",
|
||||||
"shortName": "SEED",
|
"shortName": "xpla",
|
||||||
|
"chainId": 37,
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmSchLvCCZjBzcv5n22v1oFDAc2yHJ42NERyjZeL9hBgrh",
|
"url": "ipfs://QmbvEAKZfgJckEziU3mpCwz6jqMeWRcLgd8TNsWA7g8sD9/xpla.png",
|
||||||
"width": 64,
|
"width": 512,
|
||||||
"height": 64,
|
"height": 512,
|
||||||
"format": "png"
|
"format": "png"
|
||||||
},
|
},
|
||||||
"chainId": 37,
|
"explorers": [
|
||||||
"networkId": 37,
|
{
|
||||||
|
"name": "XPLA Explorer",
|
||||||
|
"url": "https://explorer.xpla.io",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
"testnet": false,
|
"testnet": false,
|
||||||
"slug": "seedcoin-network"
|
"redFlags": [
|
||||||
|
"reusedChainId"
|
||||||
|
],
|
||||||
|
"slug": "xpla"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Xpla Testnet",
|
||||||
|
"chain": "XPLATest",
|
||||||
|
"rpc": [
|
||||||
|
"https://xpla-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://dimension-rpc.xpla.dev"
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://faucet.xpla.io"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "XPLA",
|
||||||
|
"symbol": "XPLA",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://xpla.io",
|
||||||
|
"shortName": "xplatest",
|
||||||
|
"chainId": 3701,
|
||||||
|
"networkId": 3701,
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://Qmf4GoxfpeA5VGqu7KP5eyv1WKaCpNDbvMxq1MjQBwFWxq",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "XPLA Explorer",
|
||||||
|
"url": "https://explorer.xpla.io",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"redFlags": [
|
||||||
|
"reusedChainId"
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "xpla-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "KalyChain Mainnet",
|
||||||
|
"chain": "KLC",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmUaXcPewLuQtY5a7xPTzJyVdjkH487VfV7gSR8UXrbxQ3",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://kalychain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.kalychain.io/rpc"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "KalyCoin",
|
||||||
|
"symbol": "KLC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://kalychain.io",
|
||||||
|
"shortName": "kalymainnet",
|
||||||
|
"chainId": 3888,
|
||||||
|
"networkId": 3888,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "KalyScan",
|
||||||
|
"url": "https://kalyscan.io",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "kalychain"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "KalyChain Testnet",
|
||||||
|
"chain": "KLC",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmUaXcPewLuQtY5a7xPTzJyVdjkH487VfV7gSR8UXrbxQ3",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://kalychain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://testnetrpc.kalychain.io/rpc"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "KalyCoin",
|
||||||
|
"symbol": "KLC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://kalychain.io",
|
||||||
|
"shortName": "kalytestnet",
|
||||||
|
"chainId": 3889,
|
||||||
|
"networkId": 3889,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "KalyScan",
|
||||||
|
"url": "https://testnet.kalyscan.io",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "kalychain-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Unicorn Ultra Testnet",
|
"name": "U2U Solaris Mainnet",
|
||||||
"chain": "u2u",
|
"chain": "u2u",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://unicorn-ultra-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://u2u-solaris.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://rpc-testnet.uniultra.xyz"
|
"https://rpc-mainnet.uniultra.xyz"
|
||||||
],
|
|
||||||
"faucets": [
|
|
||||||
"https://faucet.uniultra.xyz"
|
|
||||||
],
|
],
|
||||||
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Unicorn Ultra",
|
"name": "Unicorn Ultra",
|
||||||
"symbol": "U2U",
|
"symbol": "U2U",
|
||||||
@@ -33,10 +31,10 @@ export default {
|
|||||||
"format": "png"
|
"format": "png"
|
||||||
},
|
},
|
||||||
"name": "U2U Explorer",
|
"name": "U2U Explorer",
|
||||||
"url": "https://testnet.uniultra.xyz",
|
"url": "https://u2uscan.xyz",
|
||||||
"standard": "EIP3091"
|
"standard": "EIP3091"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"testnet": true,
|
"testnet": false,
|
||||||
"slug": "unicorn-ultra-testnet"
|
"slug": "u2u-solaris"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -7,7 +7,9 @@ export default {
|
|||||||
"https://optimism-goerli.infura.io/v3/${INFURA_API_KEY}",
|
"https://optimism-goerli.infura.io/v3/${INFURA_API_KEY}",
|
||||||
"https://opt-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
"https://opt-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||||
"https://goerli.optimism.io",
|
"https://goerli.optimism.io",
|
||||||
"https://optimism-goerli.publicnode.com"
|
"https://optimism-goerli.publicnode.com",
|
||||||
|
"https://optimism-goerli.gateway.tenderly.co",
|
||||||
|
"wss://optimism-goerli.gateway.tenderly.co"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://coinbase.com/faucets/optimism-goerli-faucet"
|
"https://coinbase.com/faucets/optimism-goerli-faucet"
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Alterium L2 Testnet",
|
||||||
|
"chain": "ALT",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://bafkreid3v7ow4c4t3ljya6aouiwvqbtssb2lzmkwt2eghryk234g7yynrq",
|
||||||
|
"width": 756,
|
||||||
|
"height": 756,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://alterium-l2-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://l2-testnet-rpc.altscan.org"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Alterium ETH",
|
||||||
|
"symbol": "AltETH",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://alteriumprotocol.org",
|
||||||
|
"shortName": "alterium",
|
||||||
|
"chainId": 420692,
|
||||||
|
"networkId": 420692,
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-5",
|
||||||
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://testnet-bridge.alteriumprotocol.org"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Alterium L2 Testnet Explorer",
|
||||||
|
"url": "https://l2-testnet.altscan.org",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "alterium-l2-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Beam",
|
||||||
|
"chain": "BEAM",
|
||||||
|
"rpc": [
|
||||||
|
"https://beam.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/beam/mainnet/rpc"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Merit Circle",
|
||||||
|
"symbol": "MC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.onbeam.com",
|
||||||
|
"shortName": "beam",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmQJ21NWyGGDraicVEzS1Uqq1yXahM9NCuNZgnfYvtspdt",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"chainId": 4337,
|
||||||
|
"networkId": 4337,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Beam Explorer",
|
||||||
|
"url": "https://subnets.avax.network/beam",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "beam"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -1,36 +1,38 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Acria IntelliChain",
|
"name": "Xpla Testnet",
|
||||||
"chain": "AIC",
|
"chain": "XPLA",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://acria-intellichain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://xpla-testnet-xpla-test.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://aic.acria.ai"
|
"https://cube-evm-rpc.xpla.dev"
|
||||||
],
|
],
|
||||||
"faucets": [],
|
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "ACRIA",
|
"name": "XPLA",
|
||||||
"symbol": "ACRIA",
|
"symbol": "XPLA",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"features": [
|
"faucets": [
|
||||||
{
|
"https://faucet.xpla.io/"
|
||||||
"name": "EIP155"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "EIP1559"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"infoURL": "https://acria.ai",
|
"infoURL": "https://xpla.io/",
|
||||||
"shortName": "aic",
|
"shortName": "xpla-test",
|
||||||
"chainId": 47,
|
"chainId": 47,
|
||||||
"networkId": 47,
|
"icon": {
|
||||||
|
"url": "ipfs://QmbvEAKZfgJckEziU3mpCwz6jqMeWRcLgd8TNsWA7g8sD9/xpla.png",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "Acria IntelliChain-Explorer",
|
"name": "XPLA Explorer",
|
||||||
"url": "https://explorer.acria.ai",
|
"url": "https://explorer.xpla.io/testnet",
|
||||||
"standard": "EIP3091"
|
"standard": "none"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"testnet": false,
|
"testnet": true,
|
||||||
"slug": "acria-intellichain"
|
"redFlags": [
|
||||||
|
"reusedChainId"
|
||||||
|
],
|
||||||
|
"slug": "xpla-testnet-xpla-test"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -9,7 +9,9 @@ export default {
|
|||||||
"wss://goerli.infura.io/v3/${INFURA_API_KEY}",
|
"wss://goerli.infura.io/v3/${INFURA_API_KEY}",
|
||||||
"https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
"https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||||
"https://rpc.goerli.mudit.blog/",
|
"https://rpc.goerli.mudit.blog/",
|
||||||
"https://ethereum-goerli.publicnode.com"
|
"https://ethereum-goerli.publicnode.com",
|
||||||
|
"https://goerli.gateway.tenderly.co",
|
||||||
|
"wss://goerli.gateway.tenderly.co"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://faucet.paradigm.xyz/",
|
"https://faucet.paradigm.xyz/",
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ export default {
|
|||||||
],
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "HMND",
|
"name": "eHMND",
|
||||||
"symbol": "HMND",
|
"symbol": "eHMND",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://humanode.io",
|
"infoURL": "https://humanode.io",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "opBNB",
|
"name": "Opbnb Testnet",
|
||||||
"chain": "opBNB",
|
"chain": "opBNB",
|
||||||
"shortName": "opBNB",
|
"shortName": "opBNB",
|
||||||
"chainId": 5611,
|
"chainId": 5611,
|
||||||
@@ -11,7 +11,7 @@ export default {
|
|||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://opbnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://opbnb-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://opbnb-testnet-rpc.bnbchain.org"
|
"https://opbnb-testnet-rpc.bnbchain.org"
|
||||||
],
|
],
|
||||||
"explorers": [
|
"explorers": [
|
||||||
@@ -31,5 +31,5 @@ export default {
|
|||||||
"width": 512,
|
"width": 512,
|
||||||
"format": "svg"
|
"format": "svg"
|
||||||
},
|
},
|
||||||
"slug": "opbnb"
|
"slug": "opbnb-testnet"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -5,8 +5,8 @@ export default {
|
|||||||
"rpc": [
|
"rpc": [
|
||||||
"https://boba-bnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://boba-bnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://bnb.boba.network",
|
"https://bnb.boba.network",
|
||||||
"http://boba-bnb.gateway.tenderly.co/",
|
"https://boba-bnb.gateway.tenderly.co/",
|
||||||
"http://gateway.tenderly.co/public/boba-bnb",
|
"https://gateway.tenderly.co/public/boba-bnb",
|
||||||
"https://replica.bnb.boba.network",
|
"https://replica.bnb.boba.network",
|
||||||
"wss://boba-bnb.gateway.tenderly.co/",
|
"wss://boba-bnb.gateway.tenderly.co/",
|
||||||
"wss://gateway.tenderly.co/public/boba-bnb"
|
"wss://gateway.tenderly.co/public/boba-bnb"
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Tanssi EVM ContainerChain",
|
||||||
|
"chain": "EVMCC",
|
||||||
|
"rpc": [
|
||||||
|
"https://tanssi-evm-containerchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://fraa-dancebox-3001-rpc.a.dancebox.tanssi.network",
|
||||||
|
"wss://fraa-dancebox-3001-rpc.a.dancebox.tanssi.network"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Unit",
|
||||||
|
"symbol": "Unit",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://tanssi.network",
|
||||||
|
"shortName": "TanssiCC",
|
||||||
|
"chainId": 5678,
|
||||||
|
"networkId": 5678,
|
||||||
|
"explorers": [],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "tanssi-evm-containerchain"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "VELO Labs Mainnet",
|
||||||
|
"chain": "NOVA chain",
|
||||||
|
"rpc": [
|
||||||
|
"https://velo-labs.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://nova.velo.org"
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://nova-faucet.velo.org"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Nova",
|
||||||
|
"symbol": "NOVA",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://velo.org",
|
||||||
|
"shortName": "VELO",
|
||||||
|
"chainId": 56789,
|
||||||
|
"networkId": 56789,
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmYqvnW2jwPEKUv8BdaV4sbL8Audcwosat6SPn4GqYtKxc",
|
||||||
|
"width": 225,
|
||||||
|
"height": 225,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "novascan",
|
||||||
|
"url": "https://novascan.velo.org",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "velo-labs"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "LAOS Arrakis",
|
||||||
|
"title": "LAOS Testnet Arrakis",
|
||||||
|
"chain": "LAOS",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmZ4YYcvhcaeotMPaGXC5Vab7JFaVkka37V8TiTJpT7Mak",
|
||||||
|
"width": 586,
|
||||||
|
"height": 558,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://laos-arrakis.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://arrakis.gorengine.com/own",
|
||||||
|
"wss://arrakis.gorengine.com/own"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "LAOS",
|
||||||
|
"symbol": "LAOS",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.laosfoundation.io/",
|
||||||
|
"shortName": "laos",
|
||||||
|
"chainId": 667,
|
||||||
|
"networkId": 667,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "blockscout",
|
||||||
|
"url": "https://arrakis.gorengine.com",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmZ4YYcvhcaeotMPaGXC5Vab7JFaVkka37V8TiTJpT7Mak",
|
||||||
|
"width": 586,
|
||||||
|
"height": 558,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "laos-arrakis"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "JuncaGlobal Chain Testnet",
|
||||||
|
"chain": "JuncaGlobal Test Chain",
|
||||||
|
"rpc": [
|
||||||
|
"https://juncaglobal-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc-testnet.juncachain.com",
|
||||||
|
"wss://ws-testnet.juncachain.com"
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://faucet-testnet.juncachain.com"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "JuncaGlobal Chain Testnet Native Token",
|
||||||
|
"symbol": "JGCT",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://junca-cash.world",
|
||||||
|
"shortName": "junca",
|
||||||
|
"chainId": 669,
|
||||||
|
"networkId": 669,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "blockscout",
|
||||||
|
"url": "https://scan-testnet.juncachain.com",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||||
|
"width": 551,
|
||||||
|
"height": 540,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "juncaglobal-chain-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Horizen EON",
|
"name": "Horizen EON Mainnet",
|
||||||
"shortName": "EON",
|
"shortName": "EON",
|
||||||
"chain": "EON",
|
"chain": "EON",
|
||||||
"icon": {
|
"icon": {
|
||||||
@@ -11,7 +11,8 @@ export default {
|
|||||||
},
|
},
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://horizen-eon.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://horizen-eon.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://eon-rpc.horizenlabs.io/ethv1"
|
"https://eon-rpc.horizenlabs.io/ethv1",
|
||||||
|
"https://rpc.ankr.com/horizen_eon"
|
||||||
],
|
],
|
||||||
"features": [
|
"features": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ export default {
|
|||||||
"chain": "DSC",
|
"chain": "DSC",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://decimal-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://decimal-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://node.decimalchain.com/web3/"
|
"https://node.decimalchain.com/web3/",
|
||||||
|
"https://node1-mainnet.decimalchain.com/web3/",
|
||||||
|
"https://node2-mainnet.decimalchain.com/web3/",
|
||||||
|
"https://node3-mainnet.decimalchain.com/web3/",
|
||||||
|
"https://node4-mainnet.decimalchain.com/web3/"
|
||||||
],
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Amplify Subnet",
|
||||||
|
"chain": "AMPLIFY",
|
||||||
|
"rpc": [
|
||||||
|
"https://amplify-subnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/amplify/testnet/rpc"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "AMP",
|
||||||
|
"symbol": "AMP",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.avax.network",
|
||||||
|
"shortName": "amplify",
|
||||||
|
"chainId": 78430,
|
||||||
|
"networkId": 78430,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "AMPLIFY Explorer",
|
||||||
|
"url": "https://subnets-test.avax.network/amplify",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "amplify-subnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Bulletin Subnet",
|
||||||
|
"chain": "BULLETIN",
|
||||||
|
"rpc": [
|
||||||
|
"https://bulletin-subnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/bulletin/testnet/rpc"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "BLT",
|
||||||
|
"symbol": "BLT",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.avax.network",
|
||||||
|
"shortName": "bulletin",
|
||||||
|
"chainId": 78431,
|
||||||
|
"networkId": 78431,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "BULLETIN Explorer",
|
||||||
|
"url": "https://subnets-test.avax.network/bulletin",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "bulletin-subnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Conduit Subnet",
|
||||||
|
"chain": "CONDUIT",
|
||||||
|
"rpc": [
|
||||||
|
"https://conduit-subnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/conduit/testnet/rpc"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "CON",
|
||||||
|
"symbol": "CON",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.avax.network",
|
||||||
|
"shortName": "conduit",
|
||||||
|
"chainId": 78432,
|
||||||
|
"networkId": 78432,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "CONDUIT Explorer",
|
||||||
|
"url": "https://subnets-test.avax.network/conduit",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "conduit-subnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -16,7 +16,9 @@ export default {
|
|||||||
"https://matic-mumbai.chainstacklabs.com",
|
"https://matic-mumbai.chainstacklabs.com",
|
||||||
"https://rpc-mumbai.maticvigil.com",
|
"https://rpc-mumbai.maticvigil.com",
|
||||||
"https://matic-testnet-archive-rpc.bwarelabs.com",
|
"https://matic-testnet-archive-rpc.bwarelabs.com",
|
||||||
"https://polygon-mumbai-bor.publicnode.com"
|
"https://polygon-mumbai-bor.publicnode.com",
|
||||||
|
"https://polygon-mumbai.gateway.tenderly.co",
|
||||||
|
"wss://polygon-mumbai.gateway.tenderly.co"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://faucet.polygon.technology/"
|
"https://faucet.polygon.technology/"
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "BeOne Chain Testnet",
|
"name": "Testnet BeOne Chain",
|
||||||
"chain": "BOC",
|
"chain": "tBOC",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://beone-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://testnet-beone-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://pre-boc1.beonechain.com",
|
"https://pre-boc1.beonechain.com"
|
||||||
"https://pre-boc2.beonechain.com",
|
|
||||||
"https://pre-boc3.beonechain.com"
|
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://testnet.beonescan.com/faucet"
|
"https://testnet.beonescan.com/faucet"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "BeOne Chain Testnet",
|
"name": "Testnet BeOne Chain",
|
||||||
"symbol": "BOC",
|
"symbol": "tBOC",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://testnet.beonescan.com",
|
"infoURL": "https://testnet.beonescan.com",
|
||||||
@@ -28,7 +26,7 @@ export default {
|
|||||||
},
|
},
|
||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "BeOne Chain Testnet",
|
"name": "Testnet BeOne Chain",
|
||||||
"url": "https://testnet.beonescan.com",
|
"url": "https://testnet.beonescan.com",
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmbVLQnaMDu86bPyKgCvTGhFBeYwjr15hQnrCcsp1EkAGL",
|
"url": "ipfs://QmbVLQnaMDu86bPyKgCvTGhFBeYwjr15hQnrCcsp1EkAGL",
|
||||||
@@ -40,5 +38,5 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"slug": "beone-chain-testnet"
|
"slug": "testnet-beone-chain"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -4,7 +4,11 @@ export default {
|
|||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://mainnet.base.org/"
|
"https://mainnet.base.org/",
|
||||||
|
"https://developer-access-mainnet.base.org/",
|
||||||
|
"https://base.gateway.tenderly.co",
|
||||||
|
"wss://base.gateway.tenderly.co",
|
||||||
|
"https://base.publicnode.com"
|
||||||
],
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ export default {
|
|||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://base-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://base-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://base-goerli.publicnode.com",
|
||||||
|
"wss://base-goerli.gateway.tenderly.co",
|
||||||
|
"https://base-goerli.gateway.tenderly.co",
|
||||||
"https://goerli.base.org"
|
"https://goerli.base.org"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Aerie Network",
|
||||||
|
"chain": "Aerie",
|
||||||
|
"rpc": [
|
||||||
|
"https://aerie-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://mainnet.aerielab.io"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Aerie",
|
||||||
|
"symbol": "AER",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://aerielab.io/",
|
||||||
|
"shortName": "Aerie",
|
||||||
|
"chainId": 84886,
|
||||||
|
"networkId": 84886,
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://bafkreig54jss26xllpjbclmfgwvot72m4ku7qxignhlqei6mijvwi2m4pu",
|
||||||
|
"width": 1062,
|
||||||
|
"height": 1069,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Aerie Explorer",
|
||||||
|
"url": "https://explorer.aerielab.io",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://bafkreig54jss26xllpjbclmfgwvot72m4ku7qxignhlqei6mijvwi2m4pu",
|
||||||
|
"width": 1062,
|
||||||
|
"height": 1069,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "aerie-network"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Nautilus Proteus Testnet",
|
||||||
|
"chain": "ETH",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmNutSgM7n6aJPPDiofe9Dm1epy1RcYTMvugukLUK2vmPM",
|
||||||
|
"width": 500,
|
||||||
|
"height": 500,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://nautilus-proteus-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://api.proteus.nautchain.xyz/solana"
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://proteusfaucet.nautchain.xyz"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Zebec Test Token",
|
||||||
|
"symbol": "tZBC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://docs.nautchain.xyz",
|
||||||
|
"shortName": "NAUTTest",
|
||||||
|
"chainId": 88002,
|
||||||
|
"networkId": 88002,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Nautscan",
|
||||||
|
"url": "https://proteus.nautscan.com",
|
||||||
|
"standard": "EIP3091",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmNutSgM7n6aJPPDiofe9Dm1epy1RcYTMvugukLUK2vmPM",
|
||||||
|
"width": 500,
|
||||||
|
"height": 500,
|
||||||
|
"format": "png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "nautilus-proteus-testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Spicy Chain",
|
||||||
|
"chain": "Spicy",
|
||||||
|
"rpc": [
|
||||||
|
"https://spicy-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://spicy-rpc.chiliz.com/"
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://spicy-faucet.chiliz.com/"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Chiliz",
|
||||||
|
"symbol": "CHZ",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://chiliz.com/",
|
||||||
|
"shortName": "Spicy",
|
||||||
|
"chainId": 88882,
|
||||||
|
"networkId": 88882,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Spicy Explorer",
|
||||||
|
"url": "http://spicy-explorer.chiliz.com/",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmTGYofJ8VLkeNY4J69AvXi8e126kmbHmf34wLFoJ1FKAK",
|
||||||
|
"width": 400,
|
||||||
|
"height": 400,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "spicy-chain"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"name": "Worlds Appchain",
|
||||||
|
"chain": "WRLDS",
|
||||||
|
"shortName": "WRLDS",
|
||||||
|
"chainId": 91003,
|
||||||
|
"testnet": true,
|
||||||
|
"rpc": [
|
||||||
|
"https://worlds-appchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://api.evm.worlds.dev.eclipsenetwork.xyz/"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "WRLDS",
|
||||||
|
"symbol": "WRLDS",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"faucets": [
|
||||||
|
"https://faucet.evm.worlds.dev.eclipsenetwork.xyz/request_neon"
|
||||||
|
],
|
||||||
|
"slug": "worlds-appchain"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -7,7 +7,9 @@ export default {
|
|||||||
"https://testnet.bnb.boba.network",
|
"https://testnet.bnb.boba.network",
|
||||||
"wss://wss.testnet.bnb.boba.network",
|
"wss://wss.testnet.bnb.boba.network",
|
||||||
"https://replica.testnet.bnb.boba.network",
|
"https://replica.testnet.bnb.boba.network",
|
||||||
"wss://replica-wss.testnet.bnb.boba.network"
|
"wss://replica-wss.testnet.bnb.boba.network",
|
||||||
|
"https://boba-bnb-testnet.gateway.tenderly.co",
|
||||||
|
"wss://boba-bnb-testnet.gateway.tenderly.co"
|
||||||
],
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ export default {
|
|||||||
},
|
},
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://mind-smart-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://mind-smart-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://testnet-msc.mindchain.info/"
|
"https://testnet-msc.mindchain.info/",
|
||||||
|
"wss://testnet-msc.mindchain.info/ws"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://faucet.mindchain.info/"
|
"https://faucet.mindchain.info/"
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ export default {
|
|||||||
shortName: "POPTestnet",
|
shortName: "POPTestnet",
|
||||||
chainId: 331769,
|
chainId: 331769,
|
||||||
testnet: true,
|
testnet: true,
|
||||||
|
icon: {
|
||||||
|
format: "png",
|
||||||
|
url: "ipfs://QmP8rYvcc7aJB3c2YZxjxaySvHapHnoK8MnxuSuDT4PtF2",
|
||||||
|
height: 400,
|
||||||
|
width: 400,
|
||||||
|
},
|
||||||
rpc: ["https://testnet01.proofofpepe.tech"],
|
rpc: ["https://testnet01.proofofpepe.tech"],
|
||||||
nativeCurrency: {
|
nativeCurrency: {
|
||||||
name: "POP",
|
name: "POP",
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// @ts-check
|
||||||
|
/** @typedef { import("../../src/types").Chain } Chain */
|
||||||
|
|
||||||
|
/** @type {Omit<Chain, "slug">} */
|
||||||
|
export default {
|
||||||
|
name: "POP Mainnet",
|
||||||
|
chain: "POP",
|
||||||
|
shortName: "POP",
|
||||||
|
chainId: 331771,
|
||||||
|
testnet: false,
|
||||||
|
icon: {
|
||||||
|
format: "png",
|
||||||
|
url: "ipfs://QmP8rYvcc7aJB3c2YZxjxaySvHapHnoK8MnxuSuDT4PtF2",
|
||||||
|
height: 400,
|
||||||
|
width: 400,
|
||||||
|
},
|
||||||
|
rpc: [
|
||||||
|
"https://rpc00.proofofpepe.tech",
|
||||||
|
"https://rpc01.proofofpepe.tech",
|
||||||
|
"https://rpc02.proofofpepe.tech",
|
||||||
|
],
|
||||||
|
nativeCurrency: {
|
||||||
|
name: "Pepe",
|
||||||
|
symbol: "PEPE",
|
||||||
|
decimals: 18,
|
||||||
|
},
|
||||||
|
explorers: [
|
||||||
|
{ name: "Pepescan", url: "https://pepescan.app", standard: "none" },
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
// @ts-check
|
||||||
|
/** @typedef { import("../../src/types").Chain } Chain */
|
||||||
|
|
||||||
|
/** @type {Omit<Chain, "slug">} */
|
||||||
|
export default {
|
||||||
|
name: "Xpla Mainnet",
|
||||||
|
chain: "XPLA",
|
||||||
|
rpc: ["https://dimension-evm-rpc.xpla.dev"],
|
||||||
|
nativeCurrency: {
|
||||||
|
name: "XPLA",
|
||||||
|
symbol: "XPLA",
|
||||||
|
decimals: 18,
|
||||||
|
},
|
||||||
|
infoURL: "https://xpla.io/",
|
||||||
|
shortName: "xpla",
|
||||||
|
chainId: 37,
|
||||||
|
icon: {
|
||||||
|
url: "ipfs://QmbvEAKZfgJckEziU3mpCwz6jqMeWRcLgd8TNsWA7g8sD9/xpla.png",
|
||||||
|
width: 512,
|
||||||
|
height: 512,
|
||||||
|
format: "png",
|
||||||
|
},
|
||||||
|
explorers: [
|
||||||
|
{
|
||||||
|
name: "XPLA Explorer",
|
||||||
|
url: "https://explorer.xpla.io",
|
||||||
|
standard: "none",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
testnet: false,
|
||||||
|
redFlags: ["reusedChainId"],
|
||||||
|
};
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// @ts-check
|
||||||
|
/** @typedef { import("../../src/types").Chain } Chain */
|
||||||
|
|
||||||
|
/** @type {Omit<Chain, "slug">} */
|
||||||
|
export default {
|
||||||
|
name: "Xpla Testnet",
|
||||||
|
chain: "XPLA",
|
||||||
|
rpc: ["https://cube-evm-rpc.xpla.dev"],
|
||||||
|
nativeCurrency: {
|
||||||
|
name: "XPLA",
|
||||||
|
symbol: "XPLA",
|
||||||
|
decimals: 18,
|
||||||
|
},
|
||||||
|
faucets: ["https://faucet.xpla.io/"],
|
||||||
|
infoURL: "https://xpla.io/",
|
||||||
|
shortName: "xpla-test",
|
||||||
|
chainId: 47,
|
||||||
|
icon: {
|
||||||
|
url: "ipfs://QmbvEAKZfgJckEziU3mpCwz6jqMeWRcLgd8TNsWA7g8sD9/xpla.png",
|
||||||
|
width: 512,
|
||||||
|
height: 512,
|
||||||
|
format: "png",
|
||||||
|
},
|
||||||
|
explorers: [
|
||||||
|
{
|
||||||
|
name: "XPLA Explorer",
|
||||||
|
url: "https://explorer.xpla.io/testnet",
|
||||||
|
standard: "none",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
testnet: true,
|
||||||
|
redFlags: ["reusedChainId"],
|
||||||
|
};
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// @ts-check
|
||||||
|
/** @typedef { import("../../src/types").Chain } Chain */
|
||||||
|
|
||||||
|
/** @type {Omit<Chain, "slug">} */
|
||||||
|
export default {
|
||||||
|
name: "Spicy Chain",
|
||||||
|
chain: "Spicy",
|
||||||
|
rpc: ["https://spicy-rpc.chiliz.com/"],
|
||||||
|
faucets: ["https://spicy-faucet.chiliz.com/"],
|
||||||
|
nativeCurrency: {
|
||||||
|
name: "Chiliz",
|
||||||
|
symbol: "CHZ",
|
||||||
|
decimals: 18,
|
||||||
|
},
|
||||||
|
infoURL: "https://chiliz.com/",
|
||||||
|
shortName: "Spicy",
|
||||||
|
chainId: 88882,
|
||||||
|
networkId: 88882,
|
||||||
|
explorers: [
|
||||||
|
{
|
||||||
|
name: "Spicy Explorer",
|
||||||
|
url: "http://spicy-explorer.chiliz.com/",
|
||||||
|
standard: "none",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
icon: {
|
||||||
|
url: "ipfs://QmTGYofJ8VLkeNY4J69AvXi8e126kmbHmf34wLFoJ1FKAK",
|
||||||
|
width: 400,
|
||||||
|
height: 400,
|
||||||
|
format: "png",
|
||||||
|
},
|
||||||
|
testnet: true,
|
||||||
|
};
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// @ts-check
|
||||||
|
/** @typedef { import("../../src/types").Chain } Chain */
|
||||||
|
|
||||||
|
/** @type {Omit<Chain, "slug">} */
|
||||||
|
export default {
|
||||||
|
name: "Worlds Appchain",
|
||||||
|
chain: "WRLDS",
|
||||||
|
shortName: "WRLDS",
|
||||||
|
chainId: 91003,
|
||||||
|
testnet: true,
|
||||||
|
rpc: ["https://api.evm.worlds.dev.eclipsenetwork.xyz/"],
|
||||||
|
nativeCurrency: {
|
||||||
|
name: "WRLDS",
|
||||||
|
symbol: "WRLDS",
|
||||||
|
decimals: 18,
|
||||||
|
},
|
||||||
|
faucets: ["https://faucet.evm.worlds.dev.eclipsenetwork.xyz/request_neon"],
|
||||||
|
};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// @ts-check
|
||||||
|
/** @typedef { import("../../src/types").Chain } Chain */
|
||||||
|
|
||||||
|
/** @type {Partial<Chain>} */
|
||||||
|
export default {
|
||||||
|
name: "Opbnb Testnet",
|
||||||
|
slug: "opbnb-testnet",
|
||||||
|
};
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/chains",
|
"name": "@thirdweb-dev/chains",
|
||||||
"version": "0.1.44",
|
"version": "0.1.50",
|
||||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
|
|||||||
@@ -344,6 +344,7 @@ ${exports.join("\n")}
|
|||||||
export * from "./types";
|
export * from "./types";
|
||||||
export * from "./utils";
|
export * from "./utils";
|
||||||
export const defaultChains = [c1, c5, c8453, c84531, c137, c80001, c42161, c421613, c10, c420, c56, c97, c250, c4002, c43114, c43113, c1337];
|
export const defaultChains = [c1, c5, c8453, c84531, c137, c80001, c42161, c421613, c10, c420, c56, c97, c250, c4002, c43114, c43113, c1337];
|
||||||
|
// @ts-expect-error - TODO: fix this later
|
||||||
export const allChains: Chain[] = [${exportNames.join(", ")}];
|
export const allChains: Chain[] = [${exportNames.join(", ")}];
|
||||||
|
|
||||||
type ChainsById = {
|
type ChainsById = {
|
||||||
|
|||||||
+170
-29
File diff suppressed because one or more lines are too long
@@ -75,7 +75,6 @@ export function getChainRPCs(
|
|||||||
*
|
*
|
||||||
* @param chain - The chain config to assemble RPC URLs from
|
* @param chain - The chain config to assemble RPC URLs from
|
||||||
* @param clientId - The client id to use for the RPC URL
|
* @param clientId - The client id to use for the RPC URL
|
||||||
* @param secretKey - The secret key to use for the RPC URL
|
|
||||||
* @returns The first valid RPC URL for the chain
|
* @returns The first valid RPC URL for the chain
|
||||||
*/
|
*/
|
||||||
export function getValidChainRPCs(
|
export function getValidChainRPCs(
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ const CHAIN_RPC_TEST_CASES: [ChainRPCOptions, string[]][] = [
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -27,6 +28,7 @@ const CHAIN_RPC_TEST_CASES: [ChainRPCOptions, string[]][] = [
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -36,12 +38,16 @@ const CHAIN_RPC_TEST_CASES: [ChainRPCOptions, string[]][] = [
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
// infura is supported for both http and ws
|
// infura is supported for both http and ws
|
||||||
[
|
[
|
||||||
{ mode: "ws", infuraApiKey: "SAMPLE_KEY" },
|
{ mode: "ws", infuraApiKey: "SAMPLE_KEY" },
|
||||||
["wss://mainnet.infura.io/ws/v3/SAMPLE_KEY"],
|
[
|
||||||
|
"wss://mainnet.infura.io/ws/v3/SAMPLE_KEY",
|
||||||
|
"wss://mainnet.gateway.tenderly.co",
|
||||||
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -53,12 +59,6 @@ describe("chains/utils", () => {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
test("Should throw error if no processedRPCs (getChainRPCs(%p))", () => {
|
|
||||||
expect(() => {
|
|
||||||
getChainRPCs(Ethereum, { mode: "ws" });
|
|
||||||
}).toThrowError('No RPC available for chainId "1" with mode ws');
|
|
||||||
});
|
|
||||||
|
|
||||||
test.each([
|
test.each([
|
||||||
[
|
[
|
||||||
undefined,
|
undefined,
|
||||||
@@ -68,6 +68,7 @@ describe("chains/utils", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -78,6 +79,7 @@ describe("chains/utils", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -88,6 +90,7 @@ describe("chains/utils", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -98,24 +101,13 @@ describe("chains/utils", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
])("getValidChainRPCs(Ethereum, %s, %s) = %p", (clientId, mode, expected) => {
|
])("getValidChainRPCs(Ethereum, %s, %s) = %p", (clientId, mode, expected) => {
|
||||||
expect(getValidChainRPCs(Ethereum, clientId, mode)).toEqual(expected);
|
expect(getValidChainRPCs(Ethereum, clientId, mode)).toEqual(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
test.each([
|
|
||||||
[undefined, "ws"],
|
|
||||||
["SAMPLE_CLIENT_KEY", "ws"],
|
|
||||||
])(
|
|
||||||
"Should throw error if no processedRPCs (getValidChainRPCs(Ethereum, %s, %s))",
|
|
||||||
(clientId, mode) => {
|
|
||||||
expect(() => {
|
|
||||||
getValidChainRPCs(Ethereum, clientId, mode);
|
|
||||||
}).toThrowError('No RPC available for chainId "1" with mode ws');
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
test.each(CHAIN_RPC_TEST_CASES)(
|
test.each(CHAIN_RPC_TEST_CASES)(
|
||||||
"getChainRPC(%p) = %p",
|
"getChainRPC(%p) = %p",
|
||||||
(options, expected) => {
|
(options, expected) => {
|
||||||
@@ -174,6 +166,7 @@ describe("chains/utils", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -187,6 +180,7 @@ describe("chains/utils", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -210,6 +204,7 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -220,6 +215,7 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -230,6 +226,7 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -240,6 +237,7 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
])("getValidChainRPCs(Ethereum, %s, %s) = %p", (clientId, mode, expected) => {
|
])("getValidChainRPCs(Ethereum, %s, %s) = %p", (clientId, mode, expected) => {
|
||||||
@@ -257,6 +255,7 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -270,6 +269,7 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
|
|||||||
"https://api.mycryptoapi.com/eth",
|
"https://api.mycryptoapi.com/eth",
|
||||||
"https://cloudflare-eth.com",
|
"https://cloudflare-eth.com",
|
||||||
"https://ethereum.publicnode.com",
|
"https://ethereum.publicnode.com",
|
||||||
|
"https://mainnet.gateway.tenderly.co",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,5 +1,82 @@
|
|||||||
# thirdweb
|
# thirdweb
|
||||||
|
|
||||||
|
## 0.12.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1558](https://github.com/thirdweb-dev/js/pull/1558) [`926dd7b0`](https://github.com/thirdweb-dev/js/commit/926dd7b03f38ed25ca303dc23d3323d5edd28005) Thanks [@Marfuen](https://github.com/Marfuen)! - Updated descriptions for publish and deploy. Print out the login url for users without browsers. Remove the Release command (Use "Publish" instead).
|
||||||
|
|
||||||
|
- Updated dependencies [[`926dd7b0`](https://github.com/thirdweb-dev/js/commit/926dd7b03f38ed25ca303dc23d3323d5edd28005), [`e00dd123`](https://github.com/thirdweb-dev/js/commit/e00dd123579f75752b6fe4fcf613d2cae5419e19)]:
|
||||||
|
- @thirdweb-dev/chains@0.1.50
|
||||||
|
- @thirdweb-dev/sdk@3.10.58
|
||||||
|
- @thirdweb-dev/wallets@1.1.22
|
||||||
|
- @thirdweb-dev/auth@3.2.39
|
||||||
|
|
||||||
|
## 0.12.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- [#1422](https://github.com/thirdweb-dev/js/pull/1422) [`0f027069`](https://github.com/thirdweb-dev/js/commit/0f027069064bebe647f9235fa86ef7f165ffc7b3) Thanks [@Marfuen](https://github.com/Marfuen)! - CLI will now use an OAuth like login flow to authenticate the device with the wallet on the dashboard.
|
||||||
|
Any actions performed by the CLI will be linked to your account / wallet on the dashboard, including but not limited to tracking your usage, and billing as needed.
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`eb463735`](https://github.com/thirdweb-dev/js/commit/eb463735e2f784cd1d212a982835af95cf60766b), [`adec589e`](https://github.com/thirdweb-dev/js/commit/adec589ead8ceff1b57169e05a3e6733b4652cc7), [`b30566c6`](https://github.com/thirdweb-dev/js/commit/b30566c68436ad94ddc938a380eccc13a8a7147d), [`0f027069`](https://github.com/thirdweb-dev/js/commit/0f027069064bebe647f9235fa86ef7f165ffc7b3), [`f5aed34d`](https://github.com/thirdweb-dev/js/commit/f5aed34d3c71065c3f45df2c1eb84ba9c36162d5)]:
|
||||||
|
- @thirdweb-dev/wallets@1.1.21
|
||||||
|
- @thirdweb-dev/sdk@3.10.57
|
||||||
|
- @thirdweb-dev/chains@0.1.49
|
||||||
|
- @thirdweb-dev/storage@1.2.9
|
||||||
|
- @thirdweb-dev/auth@3.2.38
|
||||||
|
|
||||||
|
## 0.11.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1538](https://github.com/thirdweb-dev/js/pull/1538) [`8b82f3c5`](https://github.com/thirdweb-dev/js/commit/8b82f3c59cad6bd1167c13cb0b8a1cdc36475ab8) Thanks [@iketw](https://github.com/iketw)! - Adds support for creating PWA Vite apps
|
||||||
|
|
||||||
|
You can now run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx thirdweb@nightly create --template pwa-vite-typescript-starter
|
||||||
|
```
|
||||||
|
|
||||||
|
- Updated dependencies [[`f59b729f`](https://github.com/thirdweb-dev/js/commit/f59b729f8b09aa86655b8e8a70fba644fc52009b), [`911e14fc`](https://github.com/thirdweb-dev/js/commit/911e14fcac743b07fa1a66440c72d662c08e971c), [`cd6b07b5`](https://github.com/thirdweb-dev/js/commit/cd6b07b591606d2671794cebebf8edcb59076c32)]:
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
|
||||||
|
## 0.11.19
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`586e91db`](https://github.com/thirdweb-dev/js/commit/586e91dbe610588cc7b24fade59172fed6481074), [`34a3bb8a`](https://github.com/thirdweb-dev/js/commit/34a3bb8ae3c1d7a506e5568a9e79ab7e469557a8), [`91f0245b`](https://github.com/thirdweb-dev/js/commit/91f0245be78ae523e1faea26b1032bfb283467d9), [`f65578d6`](https://github.com/thirdweb-dev/js/commit/f65578d637decc8b87cada5b5b0c8c504064d9d5), [`5a373a75`](https://github.com/thirdweb-dev/js/commit/5a373a75090da7e1e05724ed1a3a3a6aa9f7fd21), [`ae74b8ef`](https://github.com/thirdweb-dev/js/commit/ae74b8ef6200dba8affa8b52e7d834c5552350d0), [`bc003c2f`](https://github.com/thirdweb-dev/js/commit/bc003c2fef33fcf7ce5981d8634911ac4bcaa927), [`447d9846`](https://github.com/thirdweb-dev/js/commit/447d984653f77af6860ae907072e768b584b263d), [`f65578d6`](https://github.com/thirdweb-dev/js/commit/f65578d637decc8b87cada5b5b0c8c504064d9d5)]:
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
|
||||||
|
## 0.11.18
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`184c325a`](https://github.com/thirdweb-dev/js/commit/184c325ab2ef028022a050c4274f2ab12b1a3a7f), [`046c9ad6`](https://github.com/thirdweb-dev/js/commit/046c9ad604587ff79bf028c4fe7b1f9c94f4ea54), [`c12f0874`](https://github.com/thirdweb-dev/js/commit/c12f0874b4dac43c263c7edb20d0343c16381c34)]:
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
|
||||||
|
## 0.11.17
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`f97ddf4c`](https://github.com/thirdweb-dev/js/commit/f97ddf4c7f14854f3b204ad9741b52ddb8dac736)]:
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
|
||||||
|
## 0.11.16
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`e1962641`](https://github.com/thirdweb-dev/js/commit/e19626417218767a0e44c00f440761d7b86d02eb), [`bd1fcbae`](https://github.com/thirdweb-dev/js/commit/bd1fcbae327e788124f5635673511f0b72e9d7ab)]:
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
|
||||||
## 0.11.15
|
## 0.11.15
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "thirdweb",
|
"name": "thirdweb",
|
||||||
"main": "dist/cli/index.js",
|
"main": "dist/cli/index.js",
|
||||||
"version": "0.11.15",
|
"version": "0.12.1",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -37,9 +37,11 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
|
"@thirdweb-dev/auth": "workspace:*",
|
||||||
"@thirdweb-dev/chains": "workspace:*",
|
"@thirdweb-dev/chains": "workspace:*",
|
||||||
"@thirdweb-dev/sdk": "workspace:*",
|
"@thirdweb-dev/sdk": "workspace:*",
|
||||||
"@thirdweb-dev/storage": "workspace:*",
|
"@thirdweb-dev/storage": "workspace:*",
|
||||||
|
"@thirdweb-dev/wallets": "workspace:*",
|
||||||
"async-retry": "^1.3.3",
|
"async-retry": "^1.3.3",
|
||||||
"commander": "^9.1.0",
|
"commander": "^9.1.0",
|
||||||
"detect-package-manager": "^2.0.1",
|
"detect-package-manager": "^2.0.1",
|
||||||
@@ -53,10 +55,10 @@
|
|||||||
"prompts": "^2.4.2",
|
"prompts": "^2.4.2",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"solc": "0.8.17",
|
"solc": "0.8.17",
|
||||||
"sync-disk-cache": "^2.1.0",
|
|
||||||
"tar": "^6.1.15",
|
"tar": "^6.1.15",
|
||||||
"update-notifier": "^6.0.2",
|
"update-notifier": "^6.0.2",
|
||||||
"validate-npm-package-name": "^4.0.0",
|
"validate-npm-package-name": "^4.0.0",
|
||||||
|
"xdg-app-paths": "^8.3.0",
|
||||||
"yaml": "^2.3.1"
|
"yaml": "^2.3.1"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
+253
-65
@@ -1,105 +1,293 @@
|
|||||||
|
import { LocalWallet } from "@thirdweb-dev/wallets";
|
||||||
|
import assert from "assert";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import prompts from "prompts";
|
import fs from "fs";
|
||||||
import Cache, { CacheEntry } from "sync-disk-cache";
|
import http from "http";
|
||||||
import { ApiResponse } from "../lib/types";
|
import open from "open";
|
||||||
import os from "os";
|
import ora from "ora";
|
||||||
|
import url from "url";
|
||||||
|
import { logger, spinner } from "../core/helpers/logger";
|
||||||
|
import { ThirdwebAuth } from "@thirdweb-dev/auth";
|
||||||
|
import { ICredsConfig } from "../lib/types";
|
||||||
|
import { generateStateParameter } from "../lib/utils";
|
||||||
|
import crypto from "node:crypto";
|
||||||
|
|
||||||
|
type LoginProps = {
|
||||||
|
browser: boolean;
|
||||||
|
configPaths: ConfigPaths;
|
||||||
|
};
|
||||||
|
|
||||||
|
const defaultLoginProps = {
|
||||||
|
browser: true,
|
||||||
|
configPaths: {
|
||||||
|
credsConfigPath: "",
|
||||||
|
cliWalletPath: "",
|
||||||
|
tokenPath: "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
type ConfigPaths = {
|
||||||
|
credsConfigPath: string;
|
||||||
|
cliWalletPath: string;
|
||||||
|
tokenPath: string;
|
||||||
|
}
|
||||||
|
|
||||||
export async function loginUser(
|
export async function loginUser(
|
||||||
cache: Cache,
|
configPaths: ConfigPaths,
|
||||||
options?: { new: boolean },
|
options?: { new: boolean },
|
||||||
showLogs?: boolean,
|
showLogs?: boolean,
|
||||||
) {
|
) {
|
||||||
const keyFound = getSession(cache);
|
const { credsConfigPath, tokenPath } = configPaths;
|
||||||
if (keyFound && !options?.new) {
|
const authToken = await getSession(tokenPath, credsConfigPath);
|
||||||
|
if (authToken && !options?.new) {
|
||||||
if (showLogs) {
|
if (showLogs) {
|
||||||
console.log(chalk.green("You are already logged in"));
|
console.log(chalk.green("You are already logged in"));
|
||||||
}
|
}
|
||||||
return keyFound;
|
globalThis["TW_AUTH_TOKEN"] = authToken;
|
||||||
|
return authToken;
|
||||||
} else {
|
} else {
|
||||||
const apiKey = await createSession(cache);
|
const token = await authenticateUser({ browser: true, configPaths });
|
||||||
return apiKey;
|
if (!token) {
|
||||||
|
throw new Error("Failed to login");
|
||||||
|
}
|
||||||
|
|
||||||
|
globalThis["TW_AUTH_TOKEN"] = token;
|
||||||
|
return token;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function logoutUser(cache: Cache) {
|
export async function logoutUser(credsConfigPath: string, tokenPath: string, cliWalletPath: string) {
|
||||||
try {
|
try {
|
||||||
cache.remove("api-secret-key");
|
ora("Logging out...").start();
|
||||||
console.log(chalk.green("You have been logged out"));
|
const dirExists = fs.existsSync(credsConfigPath) && fs.existsSync(tokenPath);
|
||||||
|
if (!dirExists) {
|
||||||
|
ora().warn(chalk.yellow("You are already logged out, did you mean to login?"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fs.unlinkSync(credsConfigPath);
|
||||||
|
fs.unlinkSync(tokenPath);
|
||||||
|
// TODO: We can consider not removing this on logout later, once we want to implement teams. For now this wallet will be ephemeral.
|
||||||
|
fs.unlinkSync(cliWalletPath);
|
||||||
|
ora().succeed(chalk.green("You have been logged out"));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(chalk.red("Something went wrong", error));
|
console.log(chalk.red("Something went wrong", error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSession(cache: Cache) {
|
export async function getSession(tokenPath: string, configCredsPath: string) {
|
||||||
|
if (!fs.existsSync(tokenPath) || !fs.existsSync(configCredsPath)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const apiKey: CacheEntry = cache.get("api-secret-key");
|
return fs.readFileSync(tokenPath, "utf8");
|
||||||
return apiKey.value;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createSession(cache: Cache) {
|
export const authenticateUser = async (
|
||||||
try {
|
props: LoginProps = defaultLoginProps,
|
||||||
const isWindows = os.type() === "Windows_NT";
|
) => {
|
||||||
if (isWindows) {
|
const { credsConfigPath, cliWalletPath, tokenPath } = props.configPaths;
|
||||||
console.log(chalk.yellow("Windows detected: if you are using powershell, there are some known issues with it that we are actively working on, please use git bash or the command prompt. Thank you for your understanding."));
|
const waitForDashboard = spinner("Waiting for a response from the dashboard").clear();
|
||||||
}
|
|
||||||
const response = await prompts({
|
// Get or generate a localwallet.
|
||||||
type: "invisible",
|
const wallet = await getOrGenerateLocalWallet(credsConfigPath, cliWalletPath);
|
||||||
name: "apiSecretKey",
|
const walletAddress = await wallet.getAddress();
|
||||||
message: `Please enter your API secret key, you can find or create it on ${chalk.blue(
|
const domain = "thirdweb.com";
|
||||||
"https://thirdweb.com/create-api-key",
|
const auth = new ThirdwebAuth(wallet, domain);
|
||||||
)}`,
|
|
||||||
|
// Generate the login payload to pass to the dashboard.
|
||||||
|
const loggedIn = await auth.login({
|
||||||
|
domain: domain,
|
||||||
|
address: walletAddress,
|
||||||
});
|
});
|
||||||
|
|
||||||
const keyPassed = response.apiSecretKey;
|
// In this case the state is the loggedIn object.
|
||||||
if (!keyPassed) {
|
const ourState = generateStateParameter(32);
|
||||||
console.log(chalk.red("You need to pass an API secret key"));
|
const payload = encodeURIComponent(JSON.stringify(loggedIn));
|
||||||
process.exit(1);
|
const urlToOpen = `https://thirdweb.com/cli/login?payload=${payload}&#${ourState}`;
|
||||||
|
|
||||||
|
let server: http.Server;
|
||||||
|
let loginTimeoutHandle: NodeJS.Timeout;
|
||||||
|
const timerPromise = new Promise<void>((resolve, reject) => {
|
||||||
|
loginTimeoutHandle = setTimeout(() => {
|
||||||
|
logger.error("Login session timed out, server didn't receive a response in 5 minutes. Please try again.");
|
||||||
|
server.close();
|
||||||
|
clearTimeout(loginTimeoutHandle);
|
||||||
|
reject(new Error("Login session timed out, server didn't receive a response in 5 minutes. Please try again."));
|
||||||
|
}, 300000);
|
||||||
|
});
|
||||||
|
|
||||||
|
const loginPromise = new Promise<string>((resolve, reject) => {
|
||||||
|
server = http.createServer(async (req, res) => {
|
||||||
|
function finish(error?: Error) {
|
||||||
|
clearTimeout(loginTimeoutHandle);
|
||||||
|
server.close((closeErr?: Error) => {
|
||||||
|
if (error || closeErr) {
|
||||||
|
reject(error || closeErr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||||
|
res.setHeader('Access-Control-Allow-Origin', "https://thirdweb.com");
|
||||||
|
res.setHeader('Access-Control-Allow-Methods', 'POST');
|
||||||
|
|
||||||
|
if (req.method === 'OPTIONS') {
|
||||||
|
res.setHeader('Access-Control-Allow-Headers', 'content-type, baggage, sentry-trace');
|
||||||
|
res.writeHead(200);
|
||||||
|
res.end();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyPassed.length === 32) {
|
assert(req.url, "This request doesn't have a URL");
|
||||||
console.log(chalk.red(`This is not a valid secret key. To get your secret key
|
const { pathname, query } = url.parse(req.url, true);
|
||||||
1. Create an API key at https://thirdweb.com/create-api-key
|
switch (pathname) {
|
||||||
2. Store and copy your Secret Key. This will be shown only once.
|
case "/auth/callback": {
|
||||||
3. Paste it in the CLI when prompted`));
|
if (query.failed) {
|
||||||
process.exit(1);
|
res.writeHead(500, "Unable to authenticate with the dashboard!");
|
||||||
|
res.end("Unable to authenticate with the dashboard!", () => {
|
||||||
|
finish(new Error("Unable to authenticate with the dashboard!"));
|
||||||
|
})
|
||||||
|
reject(chalk.red("Something went wrong! Unable to authenticate with the dashboard."));
|
||||||
|
waitForDashboard.stop();
|
||||||
}
|
}
|
||||||
|
if (query.token) {
|
||||||
|
const token = Array.isArray(query.token) ? query.token[0] : query.token;
|
||||||
|
const theirState = Array.isArray(query.state)
|
||||||
|
? query.state[0]
|
||||||
|
: query.state;
|
||||||
|
|
||||||
|
// Check if the state sent back is the same as the one we sent.
|
||||||
|
if (theirState !== ourState) {
|
||||||
|
res.writeHead(400, { "Content-Type": "text/plain" }); // send a 400 response
|
||||||
|
res.end("Unauthorized request, state mismatch", () => {
|
||||||
|
finish(new Error("Unauthorized request, state mismatch"));
|
||||||
|
});
|
||||||
|
reject(
|
||||||
|
new Error(chalk.red("\nUnauthorized request, state mismatch")),
|
||||||
|
);
|
||||||
|
waitForDashboard.stop();
|
||||||
|
} else {
|
||||||
|
// Save the token to the config file.
|
||||||
|
// eslint-disable-next-line no-unused-expressions
|
||||||
|
fs.writeFileSync(tokenPath, token), {
|
||||||
|
encoding: "utf8",
|
||||||
|
mode: 0o600,
|
||||||
|
};
|
||||||
|
res.end(() => {
|
||||||
|
waitForDashboard.clear();
|
||||||
|
console.log(chalk.green(`Successfully linked your account to this device`));
|
||||||
|
finish();
|
||||||
|
});
|
||||||
|
logger.info(chalk.green(`\nSuccessfully logged in.`));
|
||||||
|
resolve(token); // resolve promise with secretKey
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res.writeHead(400, { "Content-Type": "text/plain" });
|
||||||
|
res.end("No authToken received", () => {
|
||||||
|
finish(new Error("No authToken received"));
|
||||||
|
});
|
||||||
|
reject(new Error(chalk.red("\nNo authToken received")));
|
||||||
|
waitForDashboard.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
server.listen(8976);
|
||||||
|
});
|
||||||
|
console.log(`Automatically attempting to open a link to authenticate with our dashboard...\n`);
|
||||||
|
waitForDashboard.start();
|
||||||
|
// Adding this timeout since it feels weird for the browser to open before the spinner.
|
||||||
|
setTimeout(async () => {
|
||||||
|
await open(urlToOpen);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
console.log(chalk.yellow(`If the browser doesn't open, please use this link to authenticate:\n`));
|
||||||
|
console.log(chalk.yellow(urlToOpen + '\n'));
|
||||||
|
|
||||||
|
return Promise.race([timerPromise, loginPromise]);
|
||||||
|
};
|
||||||
|
|
||||||
|
async function getOrCreatePassword(configCredsPath: string): Promise<string> {
|
||||||
|
const passwordFileExists = fs.existsSync(configCredsPath);
|
||||||
|
if (!passwordFileExists) {
|
||||||
|
// Generate a random password for the CLI to be able to import / export the wallet.
|
||||||
|
return crypto.randomUUID();
|
||||||
|
} else {
|
||||||
|
const file = fs.readFileSync(configCredsPath, "utf8");
|
||||||
try {
|
try {
|
||||||
await validateKey(response.apiSecretKey);
|
JSON.parse(file);
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
console.log(error);
|
// If it fails to parse the password we should just delete the file and generate a new password, since this password is not shown to the user.
|
||||||
process.exit(1);
|
fs.unlinkSync(configCredsPath);
|
||||||
|
return getOrCreatePassword(configCredsPath);
|
||||||
}
|
}
|
||||||
cache.set("api-secret-key", response.apiSecretKey);
|
const { password } = JSON.parse(file) as ICredsConfig;
|
||||||
return response.apiSecretKey;
|
return password;
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function validateKey(apiSecretKey: string) {
|
async function getOrGenerateLocalWallet(configCredsPath: string, cliWalletPath: string) {
|
||||||
const fetch = (await import("node-fetch")).default;
|
// Get or prompt for password.
|
||||||
// TODO: CHANGE THIS TO PROD BEFORE MERGING!!!
|
const password = await getOrCreatePassword(configCredsPath);
|
||||||
const response = await fetch(
|
const wallet = new LocalWallet();
|
||||||
`https://api.thirdweb.com/v1/keys/use?scope=storage`,
|
const foundWallet = fs.existsSync(cliWalletPath);
|
||||||
{
|
|
||||||
|
if (foundWallet) {
|
||||||
|
const walletJson = fs.readFileSync(cliWalletPath, "utf8");
|
||||||
|
try {
|
||||||
|
// See if file is valid before proceeding.
|
||||||
|
JSON.parse(walletJson);
|
||||||
|
|
||||||
|
await wallet.import({
|
||||||
|
encryptedJson: walletJson,
|
||||||
|
password,
|
||||||
|
});
|
||||||
|
return wallet;
|
||||||
|
} catch (e) {
|
||||||
|
// Wallet file is not valid json, create a new one.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise, generate a new wallet.
|
||||||
|
wallet.generate();
|
||||||
|
const walletExported = await wallet.export({
|
||||||
|
strategy: "encryptedJson",
|
||||||
|
password,
|
||||||
|
});
|
||||||
|
|
||||||
|
// write wallet
|
||||||
|
fs.writeFileSync(cliWalletPath, walletExported, {
|
||||||
|
encoding: "utf8",
|
||||||
|
mode: 0o600,
|
||||||
|
});
|
||||||
|
|
||||||
|
// write password
|
||||||
|
fs.writeFileSync(configCredsPath, JSON.stringify({
|
||||||
|
password: password,
|
||||||
|
}), "utf8");
|
||||||
|
|
||||||
|
return wallet;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const validateKey = async (apiSecretKey: string) => {
|
||||||
|
const apiUrl = "https://api.thirdweb.com/v1/keys/use";
|
||||||
|
try {
|
||||||
|
const response = await fetch(`${apiUrl}?scope=storage`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"x-secret-key": apiSecretKey,
|
"x-secret-key": apiSecretKey,
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
const apiResponse = (await response.json()) as ApiResponse;
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
const { error } = apiResponse;
|
|
||||||
throw new Error(chalk.red(error.message));
|
|
||||||
} else {
|
|
||||||
return apiSecretKey;
|
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
|
if (response.status !== 200) {
|
||||||
|
throw new Error("Unauthorized key");
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
throw new Error(chalk.red("Unauthorized key"));
|
||||||
|
}
|
||||||
|
};
|
||||||
+102
-83
@@ -3,11 +3,11 @@ import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
|||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import { exec, spawn } from "child_process";
|
import { exec, spawn } from "child_process";
|
||||||
import { Command } from "commander";
|
import { Command } from "commander";
|
||||||
|
import fs from "fs";
|
||||||
import open from "open";
|
import open from "open";
|
||||||
import os from "os";
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import prompts from "prompts";
|
import prompts from "prompts";
|
||||||
import Cache, { CacheEntry } from "sync-disk-cache";
|
import xdgAppPaths from "xdg-app-paths";
|
||||||
import { loginUser, logoutUser, validateKey } from "../auth";
|
import { loginUser, logoutUser, validateKey } from "../auth";
|
||||||
import { detectExtensions } from "../common/feature-detector";
|
import { detectExtensions } from "../common/feature-detector";
|
||||||
import { processProject } from "../common/processor";
|
import { processProject } from "../common/processor";
|
||||||
@@ -24,11 +24,17 @@ import { upload } from "../storage/command";
|
|||||||
const main = async () => {
|
const main = async () => {
|
||||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||||
const skipIntro = process.env.THIRDWEB_CLI_SKIP_INTRO === "true";
|
const skipIntro = process.env.THIRDWEB_CLI_SKIP_INTRO === "true";
|
||||||
|
const configDir = xdgAppPaths(".thirdweb").config();
|
||||||
|
const cacheDir = xdgAppPaths(".thirdweb").cache();
|
||||||
|
const lastVersionCheckCachePath = path.join(
|
||||||
|
cacheDir,
|
||||||
|
"last-version-check.txt",
|
||||||
|
);
|
||||||
|
const credsConfigPath = path.join(configDir, "creds.json");
|
||||||
|
const cliWalletPath = path.join(configDir, "wallet.json");
|
||||||
|
const tokenPath = path.join(configDir, "auth-token.txt");
|
||||||
|
|
||||||
const program = new Command();
|
const program = new Command();
|
||||||
const cache = new Cache("thirdweb-cli", {
|
|
||||||
location: path.join(os.homedir(), ".thirdweb", "creds"),
|
|
||||||
});
|
|
||||||
|
|
||||||
// yes this has to look like this, eliminates whitespace
|
// yes this has to look like this, eliminates whitespace
|
||||||
if (!skipIntro) {
|
if (!skipIntro) {
|
||||||
@@ -41,25 +47,41 @@ const main = async () => {
|
|||||||
$$ |$$\\ $$ | $$ |$$ |$$ | $$ | $$ |$$ | $$ | $$ |$$ ____|$$ | $$ |
|
$$ |$$\\ $$ | $$ |$$ |$$ | $$ | $$ |$$ | $$ | $$ |$$ ____|$$ | $$ |
|
||||||
\\$$$$ |$$ | $$ |$$ |$$ | \\$$$$$$$ |\\$$$$$\\$$$$ |\\$$$$$$$\\ $$$$$$$ |
|
\\$$$$ |$$ | $$ |$$ |$$ | \\$$$$$$$ |\\$$$$$\\$$$$ |\\$$$$$$$\\ $$$$$$$ |
|
||||||
\\____/ \\__| \\__|\\__|\\__| \\_______| \\_____\\____/ \\_______|\\_______/ `);
|
\\____/ \\__| \\__|\\__|\\__| \\_______| \\_____\\____/ \\_______|\\_______/ `);
|
||||||
console.info(`\n 💎 thirdweb-cli v${cliVersion} 💎\n`);
|
console.info(`\n 💎 thirdweb v${cliVersion} 💎\n`);
|
||||||
}
|
}
|
||||||
|
|
||||||
program
|
program
|
||||||
.name("thirdweb-cli")
|
.name("thirdweb")
|
||||||
.description("Official thirdweb command line interface")
|
.description("Official thirdweb command line interface")
|
||||||
.version(cliVersion, "-v, --version")
|
.version(cliVersion, "-v, --version")
|
||||||
.option("--skip-update-check", "Skip check for auto updates")
|
.option("--skip-update-check", "Skip check for auto updates")
|
||||||
.hook("preAction", async () => {
|
.hook("preAction", async () => {
|
||||||
|
const regenerateConfig = !fs.existsSync(configDir);
|
||||||
|
const regenerateCache = !fs.existsSync(cacheDir);
|
||||||
|
|
||||||
|
// Create config directory if it doesn't exist
|
||||||
|
if (regenerateConfig) {
|
||||||
|
fs.mkdirSync(configDir, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create cache directory if it doesn't exist
|
||||||
|
if (regenerateCache) {
|
||||||
|
fs.mkdirSync(cacheDir, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
if (skipIntro || program.opts().skipUpdateCheck) {
|
if (skipIntro || program.opts().skipUpdateCheck) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let shouldCheckVersion = true;
|
let shouldCheckVersion = true;
|
||||||
try {
|
try {
|
||||||
const lastCheckCache: CacheEntry = cache.get("last-version-check");
|
const lastVersionCheckCache = fs.readFileSync(
|
||||||
|
lastVersionCheckCachePath,
|
||||||
|
"utf-8",
|
||||||
|
);
|
||||||
|
|
||||||
if (lastCheckCache.isCached) {
|
if (lastVersionCheckCache) {
|
||||||
const lastVersionCheck = new Date(lastCheckCache.value);
|
const lastVersionCheck = new Date(lastVersionCheckCache);
|
||||||
// Don't check for updates if already checked within past 24 hours
|
// Don't check for updates if already checked within past 24 hours
|
||||||
if (Date.now() - lastVersionCheck.getTime() < 1000 * 60 * 60 * 24) {
|
if (Date.now() - lastVersionCheck.getTime() < 1000 * 60 * 60 * 24) {
|
||||||
shouldCheckVersion = false;
|
shouldCheckVersion = false;
|
||||||
@@ -88,7 +110,14 @@ const main = async () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Set cache to prevent checking for updates again for 24 hours
|
// Set cache to prevent checking for updates again for 24 hours
|
||||||
cache.set("last-version-check", new Date().toISOString());
|
fs.writeFileSync(
|
||||||
|
lastVersionCheckCachePath,
|
||||||
|
new Date().toISOString(),
|
||||||
|
{
|
||||||
|
encoding: "utf-8",
|
||||||
|
mode: 0o600,
|
||||||
|
},
|
||||||
|
);
|
||||||
} catch {
|
} catch {
|
||||||
// no-op
|
// no-op
|
||||||
}
|
}
|
||||||
@@ -267,7 +296,7 @@ const main = async () => {
|
|||||||
|
|
||||||
program
|
program
|
||||||
.command("deploy")
|
.command("deploy")
|
||||||
.description("Deploy your (or team) contracts securely to blockchains")
|
.description("Securely deploy your contract to any EVM network without having to deal with scripts, private keys, or ABIs")
|
||||||
.option("-p, --path <project-path>", "path to project", ".")
|
.option("-p, --path <project-path>", "path to project", ".")
|
||||||
.option("--clean", "clear the cache before building")
|
.option("--clean", "clear the cache before building")
|
||||||
.option("--dry-run", "dry run (skip actually publishing)")
|
.option("--dry-run", "dry run (skip actually publishing)")
|
||||||
@@ -300,66 +329,31 @@ const main = async () => {
|
|||||||
"Deploy a dynamic smart contract made up of extensions to blockchains",
|
"Deploy a dynamic smart contract made up of extensions to blockchains",
|
||||||
)
|
)
|
||||||
.option("--zksync", "Deploy on ZKSync")
|
.option("--zksync", "Deploy on ZKSync")
|
||||||
.option("-k, --key <key>", "API key to authorize usage")
|
.option("-k, --key <key>", "API secret key to authorize usage")
|
||||||
.action(async (options) => {
|
.action(async (options) => {
|
||||||
let apiSecretKey = "";
|
let secretKey = "";
|
||||||
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
||||||
if (!options.key) {
|
if (!options.key) {
|
||||||
apiSecretKey = await loginUser(cache);
|
await loginUser({
|
||||||
|
credsConfigPath,
|
||||||
|
cliWalletPath,
|
||||||
|
tokenPath,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
|
// Don't need to validate anymore? Also, should probably rely on the underlying service to throw that error.
|
||||||
await validateKey(options.key);
|
await validateKey(options.key);
|
||||||
apiSecretKey = options.key;
|
secretKey = options.key;
|
||||||
}
|
}
|
||||||
const url = await deploy(options, apiSecretKey);
|
const url = await deploy(options, secretKey);
|
||||||
if (url && !options.ci) {
|
if (url && !options.ci) {
|
||||||
await open(url);
|
await open(url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
program
|
|
||||||
.command("release")
|
|
||||||
.description("[Deprecated] use 'publish' instead.")
|
|
||||||
.option("-p, --path <project-path>", "path to project", ".")
|
|
||||||
.option(
|
|
||||||
"-f, --file [name]",
|
|
||||||
"Filter for contract files that contain the file name",
|
|
||||||
)
|
|
||||||
.option(
|
|
||||||
"-cn, --contract-name [name]",
|
|
||||||
"Filter for contracts that contain this contract name",
|
|
||||||
)
|
|
||||||
.option("--clean", "clear the cache before building")
|
|
||||||
.option("--dry-run", "dry run (skip actually publishing)")
|
|
||||||
.option("-d, --debug", "show debug logs")
|
|
||||||
.option("--ci", "Continuous Integration mode")
|
|
||||||
.option("-k, --key <key>", "API key to authorize usage")
|
|
||||||
.action(async (options) => {
|
|
||||||
let apiSecretKey = "";
|
|
||||||
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
|
||||||
if (!options.key) {
|
|
||||||
apiSecretKey = await loginUser(cache);
|
|
||||||
} else {
|
|
||||||
await validateKey(options.key);
|
|
||||||
apiSecretKey = options.key;
|
|
||||||
}
|
|
||||||
logger.warn(
|
|
||||||
"'release' is deprecated and will be removed in a future update. Please use 'publish' instead.",
|
|
||||||
);
|
|
||||||
const url = await processProject(options, "publish", apiSecretKey);
|
|
||||||
info(
|
|
||||||
`Open this link to publish your contracts: ${chalk.blueBright(
|
|
||||||
url.toString(),
|
|
||||||
)}`,
|
|
||||||
);
|
|
||||||
if (url && !options.ci) {
|
|
||||||
await open(url.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
program
|
program
|
||||||
.command("publish")
|
.command("publish")
|
||||||
.description(
|
.description(
|
||||||
"Publish your protocol so other devs can deploy them and unlock SDKs, Dashboards and Analytics",
|
"Get a shareable page for your contract with a README, changelog, and version control. Enable one-click deploys to any EVM network",
|
||||||
)
|
)
|
||||||
.option("-p, --path <project-path>", "path to project", ".")
|
.option("-p, --path <project-path>", "path to project", ".")
|
||||||
.option(
|
.option(
|
||||||
@@ -374,17 +368,22 @@ const main = async () => {
|
|||||||
.option("--dry-run", "dry run (skip actually publishing)")
|
.option("--dry-run", "dry run (skip actually publishing)")
|
||||||
.option("-d, --debug", "show debug logs")
|
.option("-d, --debug", "show debug logs")
|
||||||
.option("--ci", "Continuous Integration mode")
|
.option("--ci", "Continuous Integration mode")
|
||||||
.option("-k, --key <key>", "API key to authorize usage")
|
.option("-k, --key <key>", "API secret key to authorize usage")
|
||||||
.action(async (options) => {
|
.action(async (options) => {
|
||||||
let apiSecretKey = "";
|
let secretKey = "";
|
||||||
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
||||||
if (!options.key) {
|
if (!options.key) {
|
||||||
apiSecretKey = await loginUser(cache);
|
await loginUser({
|
||||||
|
credsConfigPath,
|
||||||
|
cliWalletPath,
|
||||||
|
tokenPath,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
|
// Don't need to validate anymore? Also, should probably rely on the underlying service to throw that error.
|
||||||
await validateKey(options.key);
|
await validateKey(options.key);
|
||||||
apiSecretKey = options.key;
|
secretKey = options.key;
|
||||||
}
|
}
|
||||||
const url = await processProject(options, "publish", apiSecretKey);
|
const url = await processProject(options, "publish", secretKey);
|
||||||
info(
|
info(
|
||||||
`Open this link to publish your contracts: ${chalk.blueBright(
|
`Open this link to publish your contracts: ${chalk.blueBright(
|
||||||
url.toString(),
|
url.toString(),
|
||||||
@@ -399,19 +398,31 @@ const main = async () => {
|
|||||||
.command("upload")
|
.command("upload")
|
||||||
.description("Upload any file or directory to decentralized storage (IPFS)")
|
.description("Upload any file or directory to decentralized storage (IPFS)")
|
||||||
.argument("[upload]", "path to file or directory to upload")
|
.argument("[upload]", "path to file or directory to upload")
|
||||||
.option("-k, --key <key>", "API key to authorize usage")
|
.option("-k, --key <key>", "API secret key to authorize usage")
|
||||||
.action(async (_path, options) => {
|
.action(async (_path, options) => {
|
||||||
let apiSecretKey = "";
|
let secretKey = "";
|
||||||
|
let storage: ThirdwebStorage;
|
||||||
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
||||||
if (!options.key) {
|
if (!options.key) {
|
||||||
apiSecretKey = await loginUser(cache);
|
await loginUser({
|
||||||
} else {
|
credsConfigPath,
|
||||||
await validateKey(options.key);
|
cliWalletPath,
|
||||||
apiSecretKey = options.key;
|
tokenPath,
|
||||||
}
|
|
||||||
const storage = new ThirdwebStorage({
|
|
||||||
secretKey: apiSecretKey,
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// Don't need to validate anymore? Also, should probably rely on the underlying service to throw that error.
|
||||||
|
await validateKey(options.key);
|
||||||
|
secretKey = options.key;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (secretKey) {
|
||||||
|
storage = new ThirdwebStorage({
|
||||||
|
secretKey,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
storage = new ThirdwebStorage();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const uri = await upload(storage, _path);
|
const uri = await upload(storage, _path);
|
||||||
info(
|
info(
|
||||||
@@ -438,7 +449,7 @@ const main = async () => {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
logger.error(chalk.redBright("Failed to upload files"), err);
|
logger.error(chalk.redBright(err.message ? err.message : err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -460,36 +471,44 @@ const main = async () => {
|
|||||||
"Preload ABIs and generate types for your smart contract to strongly type the thirdweb SDK",
|
"Preload ABIs and generate types for your smart contract to strongly type the thirdweb SDK",
|
||||||
)
|
)
|
||||||
.option("-p, --path <project-path>", "path to project", ".")
|
.option("-p, --path <project-path>", "path to project", ".")
|
||||||
.option("-k, --key <key>", "API key to authorize usage")
|
.option("-k, --key <key>", "API secret key to authorize usage")
|
||||||
.action(async (options) => {
|
.action(async (options) => {
|
||||||
let apiSecretKey = "";
|
let secretKey = "";
|
||||||
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
// If no key is passed in, prompt the user to login. If it is passed in, use it.
|
||||||
if (!options.key) {
|
if (!options.key) {
|
||||||
apiSecretKey = await loginUser(cache);
|
await loginUser({
|
||||||
|
credsConfigPath,
|
||||||
|
cliWalletPath,
|
||||||
|
tokenPath,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
|
// Don't need to validate anymore? Also, should probably rely on the underlying service to throw that error.
|
||||||
await validateKey(options.key);
|
await validateKey(options.key);
|
||||||
apiSecretKey = options.key;
|
secretKey = options.key;
|
||||||
}
|
}
|
||||||
await generate(options, apiSecretKey);
|
await generate(options, secretKey);
|
||||||
});
|
});
|
||||||
|
|
||||||
program
|
program
|
||||||
.command("login")
|
.command("login")
|
||||||
.description(
|
.description(
|
||||||
"Authenticate with the thirdweb CLI using your API secret key or replace an existing API secret key",
|
"Authorize your device to use the thirdweb CLI by authenticating with your wallet from our dashboard",
|
||||||
)
|
)
|
||||||
.option("-n, --new", "Login with a new API secret key", false)
|
|
||||||
.action(async (options) => {
|
.action(async (options) => {
|
||||||
await loginUser(cache, options, true);
|
await loginUser({
|
||||||
|
credsConfigPath,
|
||||||
|
cliWalletPath,
|
||||||
|
tokenPath,
|
||||||
|
}, options, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
program
|
program
|
||||||
.command("logout")
|
.command("logout")
|
||||||
.description(
|
.description(
|
||||||
"Logout of the thirdweb CLI, effectively removing your API secret key from your machine",
|
"Logout of the thirdweb CLI",
|
||||||
)
|
)
|
||||||
.action(async () => {
|
.action(async () => {
|
||||||
await logoutUser(cache);
|
await logoutUser(credsConfigPath, tokenPath, cliWalletPath);
|
||||||
});
|
});
|
||||||
|
|
||||||
await program.parseAsync();
|
await program.parseAsync();
|
||||||
|
|||||||
@@ -32,12 +32,18 @@ import {
|
|||||||
export async function processProject(
|
export async function processProject(
|
||||||
options: any,
|
options: any,
|
||||||
command: "deploy" | "publish",
|
command: "deploy" | "publish",
|
||||||
apiSecretKey: string,
|
secretKey: string,
|
||||||
) {
|
) {
|
||||||
// TODO: allow overriding the default storage
|
// TODO: allow overriding the default storage
|
||||||
const storage = new ThirdwebStorage({
|
let storage: ThirdwebStorage;
|
||||||
secretKey: apiSecretKey,
|
if (secretKey) {
|
||||||
|
storage = new ThirdwebStorage({
|
||||||
|
secretKey,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// Since the auth key is being set in the global context, we don't need to pass anything here.
|
||||||
|
storage = new ThirdwebStorage();
|
||||||
|
}
|
||||||
|
|
||||||
logger.setSettings({
|
logger.setSettings({
|
||||||
minLevel: options.debug ? "debug" : "info",
|
minLevel: options.debug ? "debug" : "info",
|
||||||
@@ -240,7 +246,7 @@ export async function processProject(
|
|||||||
} else {
|
} else {
|
||||||
const deployArgs: RouterParams = await formatToExtensions(
|
const deployArgs: RouterParams = await formatToExtensions(
|
||||||
selectedContracts,
|
selectedContracts,
|
||||||
apiSecretKey,
|
secretKey,
|
||||||
);
|
);
|
||||||
|
|
||||||
const outputDeployArgs = JSON.stringify(deployArgs, undefined, 2);
|
const outputDeployArgs = JSON.stringify(deployArgs, undefined, 2);
|
||||||
@@ -345,9 +351,9 @@ export async function processProject(
|
|||||||
loader.succeed("Upload successful");
|
loader.succeed("Upload successful");
|
||||||
|
|
||||||
return getUrl(combinedURIs, command);
|
return getUrl(combinedURIs, command);
|
||||||
} catch (e) {
|
} catch (err: any) {
|
||||||
loader.fail("Error uploading metadata");
|
loader.fail("Error uploading metadata");
|
||||||
throw e;
|
throw new Error(err.message ? err.message : err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,14 +376,20 @@ export function getUrl(hashes: string[], command: string) {
|
|||||||
|
|
||||||
async function formatToExtensions(
|
async function formatToExtensions(
|
||||||
contracts: ContractPayload[],
|
contracts: ContractPayload[],
|
||||||
apiSecretKey: string,
|
secretKey: string,
|
||||||
): Promise<{
|
): Promise<{
|
||||||
extensions: Extension[];
|
extensions: Extension[];
|
||||||
extensionDeployArgs: ExtensionDeployArgs[];
|
extensionDeployArgs: ExtensionDeployArgs[];
|
||||||
}> {
|
}> {
|
||||||
const storage = new ThirdwebStorage({
|
let storage: ThirdwebStorage;
|
||||||
secretKey: apiSecretKey,
|
if (secretKey) {
|
||||||
|
storage = new ThirdwebStorage({
|
||||||
|
secretKey,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// Since the auth key is being set in the global context, we don't need to pass anything here.
|
||||||
|
storage = new ThirdwebStorage();
|
||||||
|
}
|
||||||
const extensions: Extension[] = [];
|
const extensions: Extension[] = [];
|
||||||
const extensionDeployArgs: ExtensionDeployArgs[] = [];
|
const extensionDeployArgs: ExtensionDeployArgs[] = [];
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ export async function twCreate(
|
|||||||
if (options.reactNative) {
|
if (options.reactNative) {
|
||||||
framework = "react-native";
|
framework = "react-native";
|
||||||
}
|
}
|
||||||
|
if (options.pwaVite) {
|
||||||
|
framework = "pwa-vite";
|
||||||
|
}
|
||||||
|
|
||||||
if (options.solana) {
|
if (options.solana) {
|
||||||
chain = "solana";
|
chain = "solana";
|
||||||
@@ -239,6 +242,7 @@ export async function twCreate(
|
|||||||
{ title: "Next.js", value: "next" },
|
{ title: "Next.js", value: "next" },
|
||||||
{ title: "Create React App", value: "cra" },
|
{ title: "Create React App", value: "cra" },
|
||||||
{ title: "Vite", value: "vite" },
|
{ title: "Vite", value: "vite" },
|
||||||
|
{ title: "PWA Vite", value: "pwa-vite" },
|
||||||
{ title: "React Native", value: "react-native" },
|
{ title: "React Native", value: "react-native" },
|
||||||
{ title: "Node.js", value: "node" },
|
{ title: "Node.js", value: "node" },
|
||||||
{ title: "Express", value: "express" },
|
{ title: "Express", value: "express" },
|
||||||
@@ -265,6 +269,8 @@ export async function twCreate(
|
|||||||
if (typeof res.project === "string") {
|
if (typeof res.project === "string") {
|
||||||
language = res.project.trim();
|
language = res.project.trim();
|
||||||
}
|
}
|
||||||
|
} else if (framework === "pwa-vite" || framework === "pwa-next") {
|
||||||
|
language = "typescript";
|
||||||
} else {
|
} else {
|
||||||
const res = await prompts({
|
const res = await prompts({
|
||||||
type: "select",
|
type: "select",
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ export async function createApp({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let startOrDev: string | undefined;
|
let startOrDev: string | undefined;
|
||||||
if (framework && (framework === "next" || framework === "vite")) {
|
if (framework && (framework.includes("next") || framework.includes("vite"))) {
|
||||||
startOrDev = "dev";
|
startOrDev = "dev";
|
||||||
} else if (template) {
|
} else if (template) {
|
||||||
startOrDev = await getStartOrDev(template);
|
startOrDev = await getStartOrDev(template);
|
||||||
|
|||||||
@@ -8,11 +8,17 @@ import { upload } from "../storage/command";
|
|||||||
export async function deployApp(
|
export async function deployApp(
|
||||||
distPath = "dist",
|
distPath = "dist",
|
||||||
projectPath = ".",
|
projectPath = ".",
|
||||||
apiSecretKey: string,
|
secretKey: string,
|
||||||
) {
|
) {
|
||||||
const storage = new ThirdwebStorage({
|
let storage: ThirdwebStorage;
|
||||||
secretKey: apiSecretKey,
|
if (secretKey) {
|
||||||
|
storage = new ThirdwebStorage({
|
||||||
|
secretKey,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// Since the auth key is being set in the global context, we don't need to pass anything here.
|
||||||
|
storage = new ThirdwebStorage();
|
||||||
|
}
|
||||||
const detectedPackageManager = await detectPackageManager(projectPath, {});
|
const detectedPackageManager = await detectPackageManager(projectPath, {});
|
||||||
const detectedFramework = await detectFramework(
|
const detectedFramework = await detectFramework(
|
||||||
projectPath,
|
projectPath,
|
||||||
@@ -74,8 +80,8 @@ export async function deployApp(
|
|||||||
"ipfs://",
|
"ipfs://",
|
||||||
"https://cf-ipfs.com/ipfs/",
|
"https://cf-ipfs.com/ipfs/",
|
||||||
)}`;
|
)}`;
|
||||||
} catch (err) {
|
} catch (err: any) {
|
||||||
console.error("Can't upload project", err);
|
console.error(err.message ? err.message : err);
|
||||||
return Promise.reject("Can't upload project");
|
return Promise.reject("Can't upload project");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ type DeployOptions = {
|
|||||||
distPath?: string;
|
distPath?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function deploy(options: DeployOptions, apiSecretKey: string) {
|
export async function deploy(options: DeployOptions, secretKey: string) {
|
||||||
if (options.name) {
|
if (options.name) {
|
||||||
const url = generateDashboardUrl(options.name, options.contractVersion);
|
const url = generateDashboardUrl(options.name, options.contractVersion);
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ export async function deploy(options: DeployOptions, apiSecretKey: string) {
|
|||||||
|
|
||||||
if (options.app) {
|
if (options.app) {
|
||||||
try {
|
try {
|
||||||
const url = await deployApp(options.distPath, options.path, apiSecretKey);
|
const url = await deployApp(options.distPath, options.path, secretKey);
|
||||||
info(`Here is the link to your app: ${chalk.blueBright(url.toString())}`);
|
info(`Here is the link to your app: ${chalk.blueBright(url.toString())}`);
|
||||||
return url.toString();
|
return url.toString();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -44,7 +44,7 @@ export async function deploy(options: DeployOptions, apiSecretKey: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = await processProject(options, "deploy", apiSecretKey);
|
const url = await processProject(options, "deploy", secretKey);
|
||||||
info(
|
info(
|
||||||
`Open this link to deploy your contracts: ${chalk.blueBright(
|
`Open this link to deploy your contracts: ${chalk.blueBright(
|
||||||
url.toString(),
|
url.toString(),
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { info } from "../core/helpers/logger";
|
|||||||
import { GenerateOptions, ThirdwebConfig } from "./types";
|
import { GenerateOptions, ThirdwebConfig } from "./types";
|
||||||
import { CHAIN_OPTIONS, getContractsForAddresses } from "./utils";
|
import { CHAIN_OPTIONS, getContractsForAddresses } from "./utils";
|
||||||
|
|
||||||
export async function generate(options: GenerateOptions, apiSecretKey: string) {
|
export async function generate(options: GenerateOptions, secretKey: string) {
|
||||||
const projectPath: string = options.path?.replace(/\/$/, "") || ".";
|
const projectPath: string = options.path?.replace(/\/$/, "") || ".";
|
||||||
let contracts: DeployedContract[] = [];
|
let contracts: DeployedContract[] = [];
|
||||||
|
|
||||||
@@ -55,8 +55,7 @@ export async function generate(options: GenerateOptions, apiSecretKey: string) {
|
|||||||
const numberOfNewContracts =
|
const numberOfNewContracts =
|
||||||
contracts.length - thirdwebConfig.contracts.length;
|
contracts.length - thirdwebConfig.contracts.length;
|
||||||
info(
|
info(
|
||||||
`Updated thirdweb.json with ${numberOfNewContracts} new contract${
|
`Updated thirdweb.json with ${numberOfNewContracts} new contract${numberOfNewContracts === 1 ? "" : "s"
|
||||||
numberOfNewContracts === 1 ? "" : "s"
|
|
||||||
}`,
|
}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -86,19 +85,22 @@ export async function generate(options: GenerateOptions, apiSecretKey: string) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
info(
|
info(
|
||||||
`Created a thirdweb.json file with configuration for ${
|
`Created a thirdweb.json file with configuration for ${contracts.length
|
||||||
contracts.length
|
} contract${contracts.length === 1 ? "" : "s"
|
||||||
} contract${
|
|
||||||
contracts.length === 1 ? "" : "s"
|
|
||||||
} detected in your project.\n\n - You can also update this configuration manually by editing the file.\n`,
|
} detected in your project.\n\n - You can also update this configuration manually by editing the file.\n`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attempt to download the ABI for each contract
|
// Attempt to download the ABI for each contract
|
||||||
ora(`Downloading ABIs for contracts configured in 'thirdweb.json'`).info();
|
ora(`Downloading ABIs for contracts configured in 'thirdweb.json'`).info();
|
||||||
const storage = new ThirdwebStorage({
|
let storage: ThirdwebStorage;
|
||||||
secretKey: apiSecretKey,
|
if (secretKey) {
|
||||||
|
storage = new ThirdwebStorage({
|
||||||
|
secretKey,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
storage = new ThirdwebStorage();
|
||||||
|
}
|
||||||
const metadata: {
|
const metadata: {
|
||||||
address: string;
|
address: string;
|
||||||
metadata: Awaited<ReturnType<typeof fetchContractMetadataFromAddress>>;
|
metadata: Awaited<ReturnType<typeof fetchContractMetadataFromAddress>>;
|
||||||
@@ -187,8 +189,7 @@ export async function generate(options: GenerateOptions, apiSecretKey: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ora(
|
ora(
|
||||||
`Downloaded and cached ABIs for ${metadata.length} smart contract${
|
`Downloaded and cached ABIs for ${metadata.length} smart contract${metadata.length === 1 ? "" : "s"
|
||||||
metadata.length === 1 ? "" : "s"
|
|
||||||
}`,
|
}`,
|
||||||
).succeed();
|
).succeed();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { DeployedContract } from "@thirdweb-dev/sdk";
|
import { DeployedContract } from "@thirdweb-dev/sdk";
|
||||||
|
|
||||||
|
export type AuthConfig = {
|
||||||
|
secretKey?: string;
|
||||||
|
authToken?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type ThirdwebConfig = {
|
export type ThirdwebConfig = {
|
||||||
chainIds: number[];
|
chainIds: number[];
|
||||||
contracts: DeployedContract[];
|
contracts: DeployedContract[];
|
||||||
|
|||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
declare module globalThis {
|
||||||
|
// eslint-disable-next-line no-var
|
||||||
|
var TW_AUTH_TOKEN: string;
|
||||||
|
}
|
||||||
@@ -4,6 +4,11 @@ import {
|
|||||||
PackageManagerType,
|
PackageManagerType,
|
||||||
} from "../core/types/ProjectType";
|
} from "../core/types/ProjectType";
|
||||||
|
|
||||||
|
export type ICredsConfig = {
|
||||||
|
password: string;
|
||||||
|
expiration: number;
|
||||||
|
}
|
||||||
|
|
||||||
export type IProcessContractAppTypeArgs = {
|
export type IProcessContractAppTypeArgs = {
|
||||||
detectedPackageManager: PackageManagerType;
|
detectedPackageManager: PackageManagerType;
|
||||||
thirdwebDepsToUpdate: Set<string>;
|
thirdwebDepsToUpdate: Set<string>;
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ import path from "path";
|
|||||||
import { PackageManagerType } from "../core/types/ProjectType";
|
import { PackageManagerType } from "../core/types/ProjectType";
|
||||||
import { runCommand } from "../create/helpers/run-command";
|
import { runCommand } from "../create/helpers/run-command";
|
||||||
import { IProcessAppTypeArgs, IProcessContractAppTypeArgs } from "./types";
|
import { IProcessAppTypeArgs, IProcessContractAppTypeArgs } from "./types";
|
||||||
|
import crypto from "crypto";
|
||||||
|
|
||||||
|
export function generateStateParameter(length: number) {
|
||||||
|
return crypto.randomBytes(length).toString("hex");
|
||||||
|
}
|
||||||
|
|
||||||
export function convertDependenciesToStringFormat(dependenciesObject: object) {
|
export function convertDependenciesToStringFormat(dependenciesObject: object) {
|
||||||
return Object.entries(dependenciesObject).map(([pkg, versionDetails]) => {
|
return Object.entries(dependenciesObject).map(([pkg, versionDetails]) => {
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ export async function upload(
|
|||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
uri = await storage.upload(file, { uploadWithoutDirectory: true });
|
uri = await storage.upload(file, { uploadWithoutDirectory: true });
|
||||||
} catch (err) {
|
} catch (err: any) {
|
||||||
spin.fail("Failed to upload file to IPFS.");
|
spin.fail("Failed to upload file to IPFS.");
|
||||||
return Promise.reject(err);
|
return Promise.reject(err.message ? err.message : err);
|
||||||
}
|
}
|
||||||
spin.succeed("Successfully uploaded file to IPFS.");
|
spin.succeed("Successfully uploaded file to IPFS.");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @thirdweb-dev/contracts-js
|
# @thirdweb-dev/contracts-js
|
||||||
|
|
||||||
|
## 1.3.12
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1518](https://github.com/thirdweb-dev/js/pull/1518) [`34a3bb8a`](https://github.com/thirdweb-dev/js/commit/34a3bb8ae3c1d7a506e5568a9e79ab7e469557a8) Thanks [@nkrishang](https://github.com/nkrishang)! - Update contracts package
|
||||||
|
|
||||||
## 1.3.11
|
## 1.3.11
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user