Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b4e295d885 Version Packages (#1377)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-28 13:12:02 -07:00
Jarrod WattsandGitHub fa48ab6942 fix: postinstall check keeps adding to itself (#1412) 2023-07-28 18:52:53 +00:00
YashandGitHub cbf486c210 [SDK] Queryable feature (#1408) 2023-07-28 16:34:48 +00:00
Jonas DanielsandGitHub 247cf57d37 [auth] - expose getToken() helper (#1410) 2023-07-28 02:48:59 +00:00
Jonas DanielsandGitHub b1e8c8e231 [many] - update dependencies & fix test cases (#1409) 2023-07-27 21:22:37 +00:00
06b4f29831 [WALLET + REACT] Add Blocto Wallet (#1361)
Co-authored-by: Manan Tank <[email protected]>
2023-07-27 07:12:22 -07:00
Jonas DanielsandGitHub 0a5eb19d67 [chains] - fix FTD-1952 (#1407) 2023-07-27 05:39:30 +00:00
Jonas DanielsandGitHub 4ed662e841 chore(sdk) use secret key env var in tests (#1406) 2023-07-27 05:29:05 +00:00
Jonas DanielsandGitHub 75587c8b38 refactor: sort explorers in generated packages (#1405) 2023-07-27 04:51:34 +00:00
iketwandGitHub 51b3604021 [Storage/RN] Read custom upload url from env (#1404) 2023-07-27 01:36:09 +00:00
5340085823 [CLI] Update base contract constructors (#1389)
Co-authored-by: Jonas Daniels <[email protected]>
2023-07-26 19:53:06 +00:00
iketwandGitHub aface46d74 [SDK] Check process exists before accessing it (#1398) 2023-07-26 19:17:22 +00:00
Junya KonoandGitHub 5835b62496 add packages/chains/utils test (#1401) 2023-07-26 11:23:59 -07:00
Manan TankandGitHub 7ae9f4cda1 [wallets] Fix LocalWallet's loadOrCreate method (#1390) 2023-07-26 18:05:58 +00:00
Jonas DanielsandGitHub 3152d4e9b4 [chains] - update chains (#1399) 2023-07-26 17:45:41 +00:00
Manan TankandGitHub 277cfd5ce1 [wallets] Fix rainbowWallet, trustWallet, zerionWallet connection on mobile (#1295) 2023-07-26 17:42:00 +00:00
Manan TankandGitHub 72fa3d2225 [react-core] Fix Chain override (#1397) 2023-07-26 16:45:41 +00:00
Manan TankandGitHub 9a329178ef [react] Auto select localWallet if only option in Safe/Smart wallet (#1396) 2023-07-26 13:01:49 +00:00
YashandGitHub 01cc54087b [SDK] ZKSync: Marketplace addresses (#1395) 2023-07-26 12:35:07 +00:00
YashandGitHub 09b3b339e6 Remove incorrect Royalty Engine addresses (#1394) 2023-07-26 12:34:01 +00:00
aa6bdd0809 [SDK][REACT-CORE] Simplify Account Permissions (#1387)
Co-authored-by: Joaquim Verges <[email protected]>
2023-07-26 05:24:28 +00:00
iketwandGitHub ff4fb7d360 [RN] Extend thirdweb SDK and pass the correct RN storage (#1391) 2023-07-25 19:34:07 +00:00
Manan TankandGitHub 9acf6854df [wallets, react] Add social login in Magic (#1334) 2023-07-25 16:16:01 +00:00
YashandGitHub a9f9a40345 [SDK] Royalty registry and royalty engine support (#1303) 2023-07-25 12:39:16 +00:00
YashandGitHub 8e6e55b154 [SDK] Any EVM deploys: Add chains with custom gas (#1053) 2023-07-25 08:48:07 +00:00
Joaquim VergesandGitHub 37b88e3bc3 [SDK] fix ambiguous cast (#1388) 2023-07-25 00:05:51 +00:00
385895ca92 Expose account contract in SmartWallet (#1307)
Co-authored-by: Joaquim Verges <[email protected]>
2023-07-25 00:04:27 +00:00
farhanW3andGitHub 5e58c79926 Service Utils Response Updates (#1386) 2023-07-24 23:54:16 +00:00
2025b8cb8d [Wallets] Add transfer & balance (#1369)
Co-authored-by: Joaquim Verges <[email protected]>
2023-07-24 23:43:42 +00:00
iketwandGitHub cc5e2ec51f [RN] Adds the ability to switch between the supported chains defined in the ThirdwebProvider (#1385) 2023-07-24 23:29:00 +00:00
Mariano FuentesandGitHub 0402b8bb37 CLI mask secret (#1384) 2023-07-24 19:19:32 +00:00
YashandGitHub 5fe3cec894 [SDK] Update airdrop addresses ZKSync (#1383) 2023-07-24 15:17:33 +00:00
YashandGitHub 98009cb3ca Airdrop contract addresses on ZKSync (#1380) 2023-07-23 15:59:06 +00:00
Manan TankandGitHub 60fbb767c1 [wallets, react] Match Coinbase Native modal theme to <ConnectWallet/> (#1379) 2023-07-21 22:21:49 +00:00
Manan TankandGitHub 5a02c5ec02 Add icon in MinimalChain (#1378) 2023-07-21 18:12:21 +00:00
iketwandGitHub 48ca58b7aa [Chains/SDK] Add bundleId when adding clientId (#1376) 2023-07-21 14:58:35 +00:00
304 changed files with 7967 additions and 7047 deletions
+6
View File
@@ -0,0 +1,6 @@
# rename this file to .env and fill in the values
# this is not required to build the packages but will significantly increase test performance
# used for unit tests that hit real IPFS gateway
# get a secret key from https://thirdweb.com/create-api-key
TW_SECRET_KEY=""
+1
View File
@@ -17,6 +17,7 @@ yalc.lock
build/ build/
playwright-report/ playwright-report/
.vscode/ .vscode/
.env/
# Artifacts # Artifacts
packages/cli/artifacts/ packages/cli/artifacts/
+3 -3
View File
@@ -41,12 +41,12 @@
"@manypkg/cli": "^0.21.0", "@manypkg/cli": "^0.21.0",
"@manypkg/get-packages": "^1.1.3", "@manypkg/get-packages": "^1.1.3",
"@playwright/test": "1.31.2", "@playwright/test": "1.31.2",
"@trivago/prettier-plugin-sort-imports": "^4.1.1", "@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/node": "^18.16.18", "@types/node": "^18.17.1",
"eslint": "^8.45.0", "eslint": "^8.45.0",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"turbo": "^1.10.7", "turbo": "^1.10.12",
"yalc": "1.0.0-pre.53" "yalc": "1.0.0-pre.53"
}, },
"manypkg": { "manypkg": {
+11
View File
@@ -1,5 +1,16 @@
# @thirdweb-dev/auth # @thirdweb-dev/auth
## 3.2.21
### Patch Changes
- [#1409](https://github.com/thirdweb-dev/js/pull/1409) [`b1e8c8e2`](https://github.com/thirdweb-dev/js/commit/b1e8c8e231013182eb46c16d0c441ee0f3bdfdb2) Thanks [@jnsdls](https://github.com/jnsdls)! - update dependencies
- [#1410](https://github.com/thirdweb-dev/js/pull/1410) [`247cf57d`](https://github.com/thirdweb-dev/js/commit/247cf57d375a4ec0bc6867e0b65a262c94a9e2f2) Thanks [@jnsdls](https://github.com/jnsdls)! - expose `getToken()` helper function
- Updated dependencies [[`06b4f298`](https://github.com/thirdweb-dev/js/commit/06b4f2983161fc9ff5913fd05dacf17260902576), [`b1e8c8e2`](https://github.com/thirdweb-dev/js/commit/b1e8c8e231013182eb46c16d0c441ee0f3bdfdb2), [`2025b8cb`](https://github.com/thirdweb-dev/js/commit/2025b8cb8d5157c03314e5db47a0d50382519c41), [`385895ca`](https://github.com/thirdweb-dev/js/commit/385895ca928a5276586f0a370fabdcece7620d83), [`9acf6854`](https://github.com/thirdweb-dev/js/commit/9acf6854dfdc5c0be768e660c1f174e017b06a9c), [`48ca58b7`](https://github.com/thirdweb-dev/js/commit/48ca58b7aa45348b928932b9c7b76b3dc233e429), [`60fbb767`](https://github.com/thirdweb-dev/js/commit/60fbb767c18ffe1e49792c6ac8e808792acf594c), [`277cfd5c`](https://github.com/thirdweb-dev/js/commit/277cfd5ce1f3a576d29c95492c735b46a00c164e), [`2025b8cb`](https://github.com/thirdweb-dev/js/commit/2025b8cb8d5157c03314e5db47a0d50382519c41), [`cc5e2ec5`](https://github.com/thirdweb-dev/js/commit/cc5e2ec51fce09af05be33811eb46980825829ee), [`7ae9f4cd`](https://github.com/thirdweb-dev/js/commit/7ae9f4cda1a2009dd414f836757bec8202c83172)]:
- @thirdweb-dev/wallets@1.1.4
## 3.2.20 ## 3.2.20
### Patch Changes ### Patch Changes
+12 -12
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/auth", "name": "@thirdweb-dev/auth",
"version": "3.2.20", "version": "3.2.21",
"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": {
@@ -80,16 +80,16 @@
} }
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.22.5", "@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.5", "@babel/preset-env": "^7.22.9",
"@babel/preset-typescript": "^7.22.5", "@babel/preset-typescript": "^7.22.5",
"@microsoft/api-documenter": "^7.22.21", "@microsoft/api-documenter": "^7.22.30",
"@microsoft/api-extractor": "^7.36.0", "@microsoft/api-extractor": "^7.36.3",
"@microsoft/tsdoc": "^0.14.1", "@microsoft/tsdoc": "^0.14.1",
"@preconstruct/cli": "^2.7.0", "@preconstruct/cli": "^2.8.1",
"@solana/web3.js": "^1.62.0", "@solana/web3.js": "^1.62.0",
"@swc-node/register": "^1.6.6", "@swc-node/register": "^1.6.6",
"@swc/core": "^1.3.67", "@swc/core": "^1.3.71",
"@thirdweb-dev/tsconfig": "workspace:*", "@thirdweb-dev/tsconfig": "workspace:*",
"@types/chai": "^4.3.5", "@types/chai": "^4.3.5",
"@types/cookie": "^0.5.1", "@types/cookie": "^0.5.1",
@@ -97,22 +97,22 @@
"@types/express": "^4.17.13", "@types/express": "^4.17.13",
"@types/mocha": "^10.0.0", "@types/mocha": "^10.0.0",
"@types/uuid": "^9.0.2", "@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.60.1", "@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^5.60.1", "@typescript-eslint/parser": "^6.2.0",
"chai": "^4.3.6", "chai": "^4.3.6",
"cookie-parser": "^1.4.6", "cookie-parser": "^1.4.6",
"eslint": "^8.45.0", "eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.9.0",
"eslint-config-thirdweb": "workspace:*", "eslint-config-thirdweb": "workspace:*",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-inclusive-language": "^2.2.0", "eslint-plugin-inclusive-language": "^2.2.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-tsdoc": "^0.2.16", "eslint-plugin-tsdoc": "^0.2.16",
"ethers": "^5.7.2", "ethers": "^5.7.2",
"express": "^4.18.1", "express": "^4.18.1",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"next": "^12.3.4", "next": "^12.3.4",
"next-auth": "^4.22.1", "next-auth": "^4.22.3",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
@@ -28,6 +28,11 @@ export function getActiveCookie(req: Request): string | undefined {
return THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX; return THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX;
} }
/**
* @internal
* @param req
* @returns
*/
export function getToken(req: Request): string | undefined { export function getToken(req: Request): string | undefined {
if (req.headers["authorization"]) { if (req.headers["authorization"]) {
const authorizationHeader = req.headers["authorization"].split(" "); const authorizationHeader = req.headers["authorization"].split(" ");
+1
View File
@@ -14,6 +14,7 @@ import cookieParser from "cookie-parser";
import express, { Request, Response } from "express"; import express, { Request, Response } from "express";
export * from "./types"; export * from "./types";
export { getToken } from "./helpers/user";
const asyncHandler = const asyncHandler =
(fn: CallableFunction) => (fn: CallableFunction) =>
+20
View File
@@ -1,5 +1,25 @@
# @thirdweb-dev/chains # @thirdweb-dev/chains
## 0.1.39
### Patch Changes
- [#1407](https://github.com/thirdweb-dev/js/pull/1407) [`0a5eb19d`](https://github.com/thirdweb-dev/js/commit/0a5eb19d672909027bb6c7e79ea76d431535559c) Thanks [@jnsdls](https://github.com/jnsdls)! - remove non-standard urls
- [#1409](https://github.com/thirdweb-dev/js/pull/1409) [`b1e8c8e2`](https://github.com/thirdweb-dev/js/commit/b1e8c8e231013182eb46c16d0c441ee0f3bdfdb2) Thanks [@jnsdls](https://github.com/jnsdls)! - update dependencies
- [#1376](https://github.com/thirdweb-dev/js/pull/1376) [`48ca58b7`](https://github.com/thirdweb-dev/js/commit/48ca58b7aa45348b928932b9c7b76b3dc233e429) Thanks [@iketw](https://github.com/iketw)! - Pass bundleId if present
- [#1399](https://github.com/thirdweb-dev/js/pull/1399) [`3152d4e9`](https://github.com/thirdweb-dev/js/commit/3152d4e9b42e2777316b1b58513657f4430cb79a) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
- [#1387](https://github.com/thirdweb-dev/js/pull/1387) [`aa6bdd08`](https://github.com/thirdweb-dev/js/commit/aa6bdd0809d1d5536c837c59b2d407ee974c1f9c) Thanks [@nkrishang](https://github.com/nkrishang)! - Simplify account permissions
- [#1405](https://github.com/thirdweb-dev/js/pull/1405) [`75587c8b`](https://github.com/thirdweb-dev/js/commit/75587c8b38bbbcf68d2101526e9792349cce728f) Thanks [@jnsdls](https://github.com/jnsdls)! - sort explorers (etherscan -> blockscout -> other)
- [#1385](https://github.com/thirdweb-dev/js/pull/1385) [`cc5e2ec5`](https://github.com/thirdweb-dev/js/commit/cc5e2ec51fce09af05be33811eb46980825829ee) Thanks [@iketw](https://github.com/iketw)! - Adds chains and improve error messages
- [#1378](https://github.com/thirdweb-dev/js/pull/1378) [`5a02c5ec`](https://github.com/thirdweb-dev/js/commit/5a02c5ec0288fd6dfb2b765ef70bb18e714aca19) Thanks [@MananTank](https://github.com/MananTank)! - add icon in MinimalChain
## 0.1.38 ## 0.1.38
### Patch Changes ### Patch Changes
+11
View File
@@ -44,6 +44,17 @@ export default {
"name": "etherscan", "name": "etherscan",
"url": "https://etherscan.io", "url": "https://etherscan.io",
"standard": "EIP3091" "standard": "EIP3091"
},
{
"name": "blockscout",
"url": "https://eth.blockscout.com",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
} }
], ],
"testnet": false, "testnet": false,
+13 -1
View File
@@ -6,7 +6,8 @@ export default {
"https://optimism.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://optimism.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"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"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
@@ -23,6 +24,17 @@ export default {
"name": "etherscan", "name": "etherscan",
"url": "https://optimistic.etherscan.io", "url": "https://optimistic.etherscan.io",
"standard": "EIP3091" "standard": "EIP3091"
},
{
"name": "blockscout",
"url": "https://optimism.blockscout.com",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
} }
], ],
"icon": { "icon": {
+10 -10
View File
@@ -37,19 +37,19 @@ export default {
"slip44": 700, "slip44": 700,
"explorers": [ "explorers": [
{ {
"name": "gnosisscan", "name": "blockscout",
"url": "https://gnosisscan.io", "url": "https://gnosis.blockscout.com",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091" "standard": "EIP3091"
}, },
{ {
"name": "blockscout", "name": "gnosisscan",
"url": "https://blockscout.com/xdai/mainnet", "url": "https://gnosisscan.io",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091" "standard": "EIP3091"
} }
], ],
+4 -4
View File
@@ -29,11 +29,11 @@ export default {
"explorers": [ "explorers": [
{ {
"name": "blockscout", "name": "blockscout",
"url": "https://blockscout.chiadochain.net", "url": "https://gnosis-chiado.blockscout.com",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
-11
View File
@@ -24,17 +24,6 @@ export default {
"format": "svg" "format": "svg"
}, },
"explorers": [ "explorers": [
{
"name": "Siberium Mainnet Explorer - blockscout - 1",
"url": "https://explorer.main.siberium.net",
"icon": {
"url": "ipfs://QmYeMdWDZ1iaBFeSPorRyPi7RuSXTdDKTgW3rfnUf3W5ne",
"width": 512,
"height": 512,
"format": "svg"
},
"standard": "EIP3091"
},
{ {
"name": "Siberium Mainnet Explorer - blockscout - 2", "name": "Siberium Mainnet Explorer - blockscout - 2",
"url": "https://explorer.main.siberium.net.ru", "url": "https://explorer.main.siberium.net.ru",
+4 -1
View File
@@ -5,9 +5,12 @@ export default {
"chain": "ETH", "chain": "ETH",
"rpc": [ "rpc": [
"https://sepolia.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://sepolia.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://sepolia.infura.io/v3/${INFURA_API_KEY}",
"wss://sepolia.infura.io/v3/${INFURA_API_KEY}",
"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"
], ],
"faucets": [ "faucets": [
"http://fauceth.komputing.org?chain=11155111&address=${ADDRESS}" "http://fauceth.komputing.org?chain=11155111&address=${ADDRESS}"
+3 -3
View File
@@ -27,9 +27,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://coinbit-explorer.chain.sbcrypto.app", "url": "https://coinbit-explorer.chain.sbcrypto.app",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+2 -1
View File
@@ -4,7 +4,8 @@ export default {
"chain": "Haqq", "chain": "Haqq",
"rpc": [ "rpc": [
"https://haqq-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://haqq-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.eth.haqq.network" "https://rpc.eth.haqq.network",
"https://haqq-evm.publicnode.com"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
+3 -3
View File
@@ -28,9 +28,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://explorer.metachain.one", "url": "https://explorer.metachain.one",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+3 -3
View File
@@ -27,9 +27,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://blockscout.bellecour.iex.ec", "url": "https://blockscout.bellecour.iex.ec",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+2 -1
View File
@@ -11,7 +11,8 @@ export default {
}, },
"rpc": [ "rpc": [
"https://tenet.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://tenet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.tenet.org" "https://rpc.tenet.org",
"https://tenet-evm.publicnode.com"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
-1
View File
@@ -13,7 +13,6 @@ export default {
"symbol": "GRAMS", "symbol": "GRAMS",
"decimals": 18 "decimals": 18
}, },
"infoURL": "TeaPartyCrypto.com",
"shortName": "TeaParty", "shortName": "TeaParty",
"chainId": 1773, "chainId": 1773,
"networkId": 1773, "networkId": 1773,
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "Smart Trade Networks",
"chain": "Smart Trade Networks",
"rpc": [
"https://smart-trade-networks.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://beefledgerwallet.com:8544"
],
"faucets": [],
"nativeCurrency": {
"name": "STN",
"symbol": "STN",
"decimals": 18
},
"infoURL": "https://www.smarttradenetworks.com",
"shortName": "STN",
"chainId": 18122,
"networkId": 18122,
"icon": {
"url": "ipfs://QmRgZVpjik4cH3Sb6wLRpdnfv9kiMEZ8fugfkzTgk3bpRW",
"width": 500,
"height": 500,
"format": "png"
},
"explorers": [
{
"name": "stnscan",
"url": "https://stnscan.com",
"icon": {
"url": "ipfs://QmRgZVpjik4cH3Sb6wLRpdnfv9kiMEZ8fugfkzTgk3bpRW",
"width": 500,
"height": 500,
"format": "png"
},
"standard": "none"
}
],
"testnet": false,
"slug": "smart-trade-networks"
} as const satisfies Chain;
+1 -1
View File
@@ -4,7 +4,7 @@ export default {
"chain": "tDSC", "chain": "tDSC",
"rpc": [ "rpc": [
"https://decimal-smart-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://decimal-smart-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-val.decimalchain.com/web3" "https://testnet-val.decimalchain.com/web3/"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"name": "Bitnet",
"chain": "BTN",
"icon": {
"url": "ipfs://QmS9h3nFiCzaBLnBNw8Wot4U7vvEVK45EQfi8nxH4nvrmz",
"width": 512,
"height": 512,
"format": "png"
},
"rpc": [
"https://bitnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.bitnet.money",
"https://rpc.btnscan.com"
],
"faucets": [],
"nativeCurrency": {
"name": "Bitnet",
"symbol": "BTN",
"decimals": 18
},
"infoURL": "https://bitnet.money",
"shortName": "BTN",
"chainId": 210,
"networkId": 210,
"explorers": [
{
"name": "Bitnet Explorer",
"url": "https://btnscan.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "bitnet"
} as const satisfies Chain;
+3 -3
View File
@@ -29,9 +29,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://explorer.exosama.com", "url": "https://explorer.exosama.com",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+3 -3
View File
@@ -31,9 +31,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://explorer.moonsama.com", "url": "https://explorer.moonsama.com",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+41
View File
@@ -0,0 +1,41 @@
import type { Chain } from "../src/types";
export default {
"name": "Reapchain Mainnet",
"chain": "REAP",
"rpc": [
"https://reapchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.reapchain.org"
],
"faucets": [],
"nativeCurrency": {
"name": "Reap",
"symbol": "REAP",
"decimals": 18
},
"features": [],
"infoURL": "https://reapchain.com",
"shortName": "reap",
"chainId": 221230,
"networkId": 221230,
"icon": {
"url": "ipfs://QmevQ8jmDWHmdnUQg6BpoMwVB3NhpzS75adbMnKL78Ls2h",
"width": 256,
"height": 256,
"format": "png"
},
"explorers": [
{
"name": "Reapchain Dashboard",
"url": "https://dashboard.reapchain.org",
"icon": {
"url": "ipfs://QmevQ8jmDWHmdnUQg6BpoMwVB3NhpzS75adbMnKL78Ls2h",
"width": 256,
"height": 256,
"format": "png"
},
"standard": "none"
}
],
"testnet": false,
"slug": "reapchain"
} as const satisfies Chain;
+43
View File
@@ -0,0 +1,43 @@
import type { Chain } from "../src/types";
export default {
"name": "Reapchain Testnet",
"chain": "REAP",
"rpc": [
"https://reapchain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://test-rpc.reapchain.org"
],
"faucets": [
"http://faucet.reapchain.com"
],
"nativeCurrency": {
"name": "test-Reap",
"symbol": "tREAP",
"decimals": 18
},
"features": [],
"infoURL": "https://reapchain.com",
"shortName": "reap-testnet",
"chainId": 221231,
"networkId": 221231,
"icon": {
"url": "ipfs://QmevQ8jmDWHmdnUQg6BpoMwVB3NhpzS75adbMnKL78Ls2h",
"width": 256,
"height": 256,
"format": "png"
},
"explorers": [
{
"name": "Reapchain Testnet Dashboard",
"url": "https://test-dashboard.reapchain.org",
"icon": {
"url": "ipfs://QmevQ8jmDWHmdnUQg6BpoMwVB3NhpzS75adbMnKL78Ls2h",
"width": 256,
"height": 256,
"format": "png"
},
"standard": "none"
}
],
"testnet": true,
"slug": "reapchain-testnet"
} as const satisfies Chain;
+2 -1
View File
@@ -7,7 +7,8 @@ export default {
"https://evm.kava.io", "https://evm.kava.io",
"https://evm2.kava.io", "https://evm2.kava.io",
"wss://wevm.kava.io", "wss://wevm.kava.io",
"wss://wevm2.kava.io" "wss://wevm2.kava.io",
"https://kava-evm.publicnode.com"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
+2 -2
View File
@@ -18,7 +18,7 @@ export default {
"faucets": [], "faucets": [],
"infoURL": "https://kroma.network", "infoURL": "https://kroma.network",
"icon": { "icon": {
"url": "ipfs://QmcYafk2je5rMqgnFPDZJTaLi6dgFgq96vmX2Li6DX441B", "url": "ipfs://QmVpV2WET6ZrqnvvPfE9hCwoE2y5ygbPuniuugpaRoxrho",
"width": 320, "width": 320,
"height": 320, "height": 320,
"format": "svg" "format": "svg"
@@ -28,7 +28,7 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://blockscout.sepolia.kroma.network", "url": "https://blockscout.sepolia.kroma.network",
"icon": { "icon": {
"url": "ipfs://QmcYafk2je5rMqgnFPDZJTaLi6dgFgq96vmX2Li6DX441B", "url": "ipfs://QmVpV2WET6ZrqnvvPfE9hCwoE2y5ygbPuniuugpaRoxrho",
"width": 320, "width": 320,
"height": 320, "height": 320,
"format": "svg" "format": "svg"
+11
View File
@@ -25,6 +25,17 @@ export default {
"chainId": 245022926, "chainId": 245022926,
"networkId": 245022926, "networkId": 245022926,
"explorers": [ "explorers": [
{
"name": "blockscout",
"url": "https://neon-devnet.blockscout.com",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
},
{ {
"name": "native", "name": "native",
"url": "https://devnet.explorer.neon-labs.org", "url": "https://devnet.explorer.neon-labs.org",
+11
View File
@@ -28,6 +28,17 @@ export default {
"format": "png" "format": "png"
}, },
"explorers": [ "explorers": [
{
"name": "blockscout",
"url": "https://blockscout.com/shiden",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
},
{ {
"name": "subscan", "name": "subscan",
"url": "https://shiden.subscan.io", "url": "https://shiden.subscan.io",
+3 -2
View File
@@ -8,8 +8,9 @@ export default {
"infoURL": "https://pulsechain.com/", "infoURL": "https://pulsechain.com/",
"rpc": [ "rpc": [
"https://pulsechain.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://pulsechain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.pulsechain.com/", "https://rpc.pulsechain.com",
"wss://rpc.pulsechain.com/" "wss://rpc.pulsechain.com",
"https://pulsechain.publicnode.com"
], ],
"features": [ "features": [
{ {
+3 -3
View File
@@ -35,9 +35,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://zero-explorer.alt.technology", "url": "https://zero-explorer.alt.technology",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"name": "Pepe Chain Mainnet",
"chain": "PC",
"status": "active",
"icon": {
"url": "ipfs://bafkreibjsc3gww3moti27za2hpyq552aevux3yv5y2ntdklksyr4v4uavy",
"width": 512,
"height": 512,
"format": "png"
},
"rpc": [
"https://pepe-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.pepe-chain.vip"
],
"faucets": [],
"nativeCurrency": {
"name": "Pepe",
"symbol": "PEPE",
"decimals": 18
},
"infoURL": "https://pepe-chain.vip",
"shortName": "pepe",
"chainId": 411,
"networkId": 411,
"explorers": [
{
"name": "pepechain explorer",
"url": "https://explorer.pepe-chain.vip",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "pepe-chain"
} as const satisfies Chain;
+15 -1
View File
@@ -6,7 +6,8 @@ export default {
"https://optimism-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://optimism-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"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"
], ],
"faucets": [ "faucets": [
"https://coinbase.com/faucets/optimism-goerli-faucet" "https://coinbase.com/faucets/optimism-goerli-faucet"
@@ -20,6 +21,19 @@ export default {
"shortName": "ogor", "shortName": "ogor",
"chainId": 420, "chainId": 420,
"networkId": 420, "networkId": 420,
"explorers": [
{
"name": "blockscout",
"url": "https://optimism-goerli.blockscout.com",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
}
],
"icon": { "icon": {
"url": "ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/optimism/512.png", "url": "ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/optimism/512.png",
"height": 512, "height": 512,
+2 -1
View File
@@ -14,7 +14,8 @@ export default {
"https://arbitrum.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://arbitrum.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://arbitrum-mainnet.infura.io/v3/${INFURA_API_KEY}", "https://arbitrum-mainnet.infura.io/v3/${INFURA_API_KEY}",
"https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}", "https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://arb1.arbitrum.io/rpc" "https://arb1.arbitrum.io/rpc",
"https://arbitrum-one.publicnode.com"
], ],
"faucets": [], "faucets": [],
"explorers": [ "explorers": [
+2 -1
View File
@@ -15,7 +15,8 @@ export default {
"https://arbitrum-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://arbitrum-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://arbitrum-goerli.infura.io/v3/${INFURA_API_KEY}", "https://arbitrum-goerli.infura.io/v3/${INFURA_API_KEY}",
"https://arb-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}", "https://arb-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://goerli-rollup.arbitrum.io/rpc/" "https://goerli-rollup.arbitrum.io/rpc",
"https://arbitrum-goerli.publicnode.com"
], ],
"faucets": [], "faucets": [],
"infoURL": "https://arbitrum.io/", "infoURL": "https://arbitrum.io/",
+5 -4
View File
@@ -12,7 +12,8 @@ export default {
}, },
"rpc": [ "rpc": [
"https://arbitrum-nova.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://arbitrum-nova.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://nova.arbitrum.io/rpc" "https://nova.arbitrum.io/rpc",
"https://arbitrum-nova.publicnode.com"
], ],
"faucets": [], "faucets": [],
"explorers": [ "explorers": [
@@ -20,9 +21,9 @@ export default {
"name": "Arbitrum Nova Chain Explorer", "name": "Arbitrum Nova Chain Explorer",
"url": "https://nova-explorer.arbitrum.io", "url": "https://nova-explorer.arbitrum.io",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+5 -5
View File
@@ -20,15 +20,15 @@ export default {
], ],
"infoURL": "https://docs.celo.org/", "infoURL": "https://docs.celo.org/",
"explorers": [ "explorers": [
{
"name": "Celoscan",
"url": "https://celoscan.io",
"standard": "EIP3091"
},
{ {
"name": "blockscout", "name": "blockscout",
"url": "https://explorer.celo.org", "url": "https://explorer.celo.org",
"standard": "none" "standard": "none"
},
{
"name": "Celoscan",
"url": "https://celoscan.io",
"standard": "EIP3091"
} }
], ],
"testnet": false, "testnet": false,
+3 -3
View File
@@ -35,9 +35,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://explorer.publicgoods.network", "url": "https://explorer.publicgoods.network",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+37
View File
@@ -0,0 +1,37 @@
import type { Chain } from "../src/types";
export default {
"name": "Kinto Testnet",
"title": "Kinto Testnet",
"chain": "ETH",
"rpc": [
"https://kinto-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"http://35.215.120.180:8545"
],
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"faucets": [],
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"infoURL": "https://ethereum.org",
"shortName": "keth",
"chainId": 42888,
"networkId": 42888,
"explorers": [
{
"name": "kintoscan",
"url": "http://35.215.120.180:4000",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "kinto-testnet"
} as const satisfies Chain;
+38
View File
@@ -0,0 +1,38 @@
import type { Chain } from "../src/types";
export default {
"name": "Obscuro Testnet",
"title": "Obscuro Sepolia Rollup Testnet",
"chainId": 443,
"shortName": "obs-testnet",
"chain": "ETH",
"networkId": 443,
"nativeCurrency": {
"name": "Sepolia Ether",
"symbol": "ETH",
"decimals": 18
},
"rpc": [
"https://obscuro-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.obscu.ro"
],
"faucets": [],
"infoURL": "https://obscu.ro",
"explorers": [
{
"name": "Obscuro Sepolia Rollup Explorer",
"url": "https://testnet.obscuroscan.io",
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://bridge.obscu.ro"
}
]
},
"testnet": true,
"slug": "obscuro-testnet"
} as const satisfies Chain;
+3 -3
View File
@@ -35,9 +35,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://testnet-explorer.blackfort.network", "url": "https://testnet-explorer.blackfort.network",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+3 -3
View File
@@ -38,9 +38,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://explorer.blackfort.network", "url": "https://explorer.blackfort.network",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+11
View File
@@ -34,6 +34,17 @@ export default {
"name": "etherscan-goerli", "name": "etherscan-goerli",
"url": "https://goerli.etherscan.io", "url": "https://goerli.etherscan.io",
"standard": "EIP3091" "standard": "EIP3091"
},
{
"name": "blockscout-goerli",
"url": "https://eth-goerli.blockscout.com",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
} }
], ],
"icon": { "icon": {
+2 -1
View File
@@ -10,7 +10,8 @@ export default {
}, },
"rpc": [ "rpc": [
"https://mantle.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://mantle.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.mantle.xyz" "https://rpc.mantle.xyz",
"https://mantle.publicnode.com"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
+48
View File
@@ -0,0 +1,48 @@
import type { Chain } from "../src/types";
export default {
"name": "Treasurenet Mainnet Alpha",
"chain": "Treasurenet Mainnet Alpha",
"icon": {
"url": "ipfs://QmTcNX8ukHkXiVfVah1W8Sed3vtGN95Sq2QSimfLuHva6B",
"width": 1844,
"height": 1920,
"format": "png"
},
"rpc": [
"https://treasurenet-alpha.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://node0.treasurenet.io",
"https://node1.treasurenet.io",
"https://node2.treasurenet.io",
"https://node3.treasurenet.io"
],
"features": [
{
"name": "EIP155"
}
],
"faucets": [],
"nativeCurrency": {
"name": "UNIT",
"symbol": "UNIT",
"decimals": 18
},
"infoURL": "https://www.treasurenet.io",
"shortName": "treasurenet",
"chainId": 5002,
"networkId": 5002,
"explorers": [
{
"name": "Treasurenet EVM BlockExplorer",
"url": "https://evmexplorer.treasurenet.io",
"icon": {
"url": "ipfs://QmTcNX8ukHkXiVfVah1W8Sed3vtGN95Sq2QSimfLuHva6B",
"width": 1844,
"height": 1920,
"format": "png"
},
"standard": "none"
}
],
"testnet": false,
"slug": "treasurenet-alpha"
} as const satisfies Chain;
+48
View File
@@ -0,0 +1,48 @@
import type { Chain } from "../src/types";
export default {
"name": "Treasurenet Testnet",
"chain": "Treasurenet Testnet",
"icon": {
"url": "ipfs://QmTcNX8ukHkXiVfVah1W8Sed3vtGN95Sq2QSimfLuHva6B",
"width": 1844,
"height": 1920,
"format": "png"
},
"rpc": [
"https://treasurenet-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://node0.testnet.treasurenet.io",
"https://node1.testnet.treasurenet.io",
"https://node2.testnet.treasurenet.io",
"https://node3.testnet.treasurenet.io"
],
"features": [
{
"name": "EIP155"
}
],
"faucets": [],
"nativeCurrency": {
"name": "UNIT",
"symbol": "UNIT",
"decimals": 18
},
"infoURL": "https://www.testnet.treasurenet.io",
"shortName": "tntest",
"chainId": 5005,
"networkId": 5005,
"explorers": [
{
"name": "Treasurenet EVM BlockExplorer",
"url": "https://evmexplorer.testnet.treasurenet.io",
"icon": {
"url": "ipfs://QmTcNX8ukHkXiVfVah1W8Sed3vtGN95Sq2QSimfLuHva6B",
"width": 1844,
"height": 1920,
"format": "png"
},
"standard": "none"
}
],
"testnet": true,
"slug": "treasurenet-testnet"
} as const satisfies Chain;
+6
View File
@@ -2,6 +2,12 @@ import type { Chain } from "../src/types";
export default { export default {
"name": "Shinarium Beta", "name": "Shinarium Beta",
"chain": "Shinarium", "chain": "Shinarium",
"icon": {
"url": "ipfs://bafybeiadbavrwcial76vs5ovhyykyaobteltuhliqcthdairbja4klwzhu",
"width": 1000,
"height": 1000,
"format": "png"
},
"rpc": [ "rpc": [
"https://shinarium-beta.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://shinarium-beta.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.shinarium.org" "https://rpc.shinarium.org"
+1 -4
View File
@@ -7,15 +7,12 @@ export default {
"https://beaneco-smartchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://beaneco-smartchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet-rpc.bescscan.io" "https://mainnet-rpc.bescscan.io"
], ],
"faucets": [ "faucets": [],
"faucet.bescscan.ion"
],
"nativeCurrency": { "nativeCurrency": {
"name": "BeanEco SmartChain", "name": "BeanEco SmartChain",
"symbol": "BESC", "symbol": "BESC",
"decimals": 18 "decimals": 18
}, },
"infoURL": "besceco.finance",
"shortName": "BESC", "shortName": "BESC",
"chainId": 535037, "chainId": 535037,
"networkId": 535037, "networkId": 535037,
+21
View File
@@ -0,0 +1,21 @@
import type { Chain } from "../src/types";
export default {
"name": "Arcturus Chain Testnet",
"chain": "ARCTURUS",
"rpc": [
"https://arcturus-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"http://185.99.196.3:8545"
],
"faucets": [],
"nativeCurrency": {
"name": "Test Arct",
"symbol": "tARCT",
"decimals": 18
},
"infoURL": "https://arcturuschain.io",
"shortName": "ARCT",
"chainId": 5616,
"networkId": 5616,
"testnet": true,
"slug": "arcturus-chain-testnet"
} as const satisfies Chain;
+3 -3
View File
@@ -35,9 +35,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://explorer.sepolia.publicgoods.network", "url": "https://explorer.sepolia.publicgoods.network",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+13 -2
View File
@@ -6,7 +6,7 @@ export default {
"rpc": [ "rpc": [
"https://linea-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://linea-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://linea-goerli.infura.io/v3/${INFURA_API_KEY}", "https://linea-goerli.infura.io/v3/${INFURA_API_KEY}",
"wss://linea-goerli.infura.io/v3/${INFURA_API_KEY}", "wss://linea-goerli.infura.io/ws/v3/${INFURA_API_KEY}",
"https://rpc.goerli.linea.build", "https://rpc.goerli.linea.build",
"wss://rpc.goerli.linea.build" "wss://rpc.goerli.linea.build"
], ],
@@ -39,7 +39,18 @@ export default {
}, },
"explorers": [ "explorers": [
{ {
"name": "blockscout", "name": "Etherscan",
"url": "https://goerli.lineascan.build",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
"width": 97,
"height": 102,
"format": "svg"
}
},
{
"name": "Blockscout",
"url": "https://explorer.goerli.linea.build", "url": "https://explorer.goerli.linea.build",
"standard": "EIP3091", "standard": "EIP3091",
"icon": { "icon": {
+11
View File
@@ -24,6 +24,17 @@ export default {
"format": "png" "format": "png"
}, },
"explorers": [ "explorers": [
{
"name": "blockscout",
"url": "https://blockscout.com/astar",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
},
{ {
"name": "subscan", "name": "subscan",
"url": "https://astar.subscan.io", "url": "https://astar.subscan.io",
+2 -1
View File
@@ -4,7 +4,8 @@ export default {
"chain": "IRIShub", "chain": "IRIShub",
"rpc": [ "rpc": [
"https://irishub.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://irishub.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://evmrpc.irishub-1.irisnet.org" "https://evmrpc.irishub-1.irisnet.org",
"https://iris-evm.publicnode.com"
], ],
"features": [ "features": [
{ {
+11
View File
@@ -26,6 +26,17 @@ export default {
"networkId": 7001, "networkId": 7001,
"status": "active", "status": "active",
"explorers": [ "explorers": [
{
"name": "blockscout",
"url": "https://zetachain-athens-3.blockscout.com",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
},
{ {
"name": "ZetaChain Athens Testnet Explorer", "name": "ZetaChain Athens Testnet Explorer",
"url": "https://explorer.athens.zetachain.com", "url": "https://explorer.athens.zetachain.com",
+1 -1
View File
@@ -4,7 +4,7 @@ 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/"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
+7 -1
View File
@@ -24,7 +24,13 @@ export default {
{ {
"name": "blockscout", "name": "blockscout",
"url": "https://blockscout.com/poa/sokol", "url": "https://blockscout.com/poa/sokol",
"standard": "none" "icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
} }
], ],
"testnet": false, "testnet": false,
+3 -3
View File
@@ -30,9 +30,9 @@ export default {
"name": "Dragonfly Blockscout", "name": "Dragonfly Blockscout",
"url": "https://blockscout.dragonfly.hexapod.network", "url": "https://blockscout.dragonfly.hexapod.network",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+3 -3
View File
@@ -28,9 +28,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://explorer.octa.space", "url": "https://explorer.octa.space",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+30 -16
View File
@@ -1,30 +1,44 @@
import type { Chain } from "../src/types"; import type { Chain } from "../src/types";
export default { export default {
"name": "Zenith Testnet (Vilnius)", "name": "Japan Open Chain Mainnet",
"chain": "Zenith", "chain": "JOC",
"rpc": [ "rpc": [
"https://zenith-testnet-vilnius.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://japan-open-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://vilnius.zenithchain.co/http" "https://rpc-1.japanopenchain.org:8545",
], "https://rpc-2.japanopenchain.org:8545"
"faucets": [
"https://faucet.zenithchain.co/"
], ],
"faucets": [],
"nativeCurrency": { "nativeCurrency": {
"name": "Vilnius", "name": "Japan Open Chain Token",
"symbol": "VIL", "symbol": "JOC",
"decimals": 18 "decimals": 18
}, },
"infoURL": "https://www.zenithchain.co/", "infoURL": "https://www.japanopenchain.org/",
"shortName": "joc",
"chainId": 81, "chainId": 81,
"networkId": 81, "networkId": 81,
"shortName": "VIL", "icon": {
"url": "ipfs://bafkreidhsiuqrct42bel76zhi3rx35k4lnk6aqgde27nvvxcz563ttfefy",
"width": 2000,
"height": 2000,
"format": "png"
},
"explorers": [ "explorers": [
{ {
"name": "vilnius scan", "name": "Block Explorer",
"url": "https://vilnius.scan.zenithchain.co", "url": "https://explorer.japanopenchain.org",
"standard": "EIP3091" "standard": "EIP3091",
"icon": {
"url": "ipfs://bafkreidhsiuqrct42bel76zhi3rx35k4lnk6aqgde27nvvxcz563ttfefy",
"width": 2000,
"height": 2000,
"format": "png"
}
} }
], ],
"testnet": true, "redFlags": [
"slug": "zenith-testnet-vilnius" "reusedChainId"
],
"testnet": false,
"slug": "japan-open-chain"
} as const satisfies Chain; } as const satisfies Chain;
+7 -1
View File
@@ -26,7 +26,13 @@ export default {
{ {
"name": "basescout", "name": "basescout",
"url": "https://base.blockscout.com", "url": "https://base.blockscout.com",
"standard": "none" "icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
}, },
{ {
"name": "basescan", "name": "basescan",
+7 -1
View File
@@ -28,7 +28,13 @@ export default {
{ {
"name": "basescout", "name": "basescout",
"url": "https://base-goerli.blockscout.com", "url": "https://base-goerli.blockscout.com",
"standard": "none" "icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
}, },
{ {
"name": "basescan", "name": "basescan",
+22 -20
View File
@@ -1,36 +1,38 @@
import type { Chain } from "../src/types"; import type { Chain } from "../src/types";
export default { export default {
"name": "IVAR Chain Mainnet", "name": "Chiliz Chain",
"chain": "IVAR", "chain": "CC2",
"icon": {
"url": "ipfs://QmV8UmSwqGF2fxrqVEBTHbkyZueahqyYtkfH2RBF5pNysM",
"width": 519,
"height": 519,
"format": "svg"
},
"rpc": [ "rpc": [
"https://ivar-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://chiliz-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet-rpc.ivarex.com" "https://rpc.ankr.com/chiliz",
], "https://rpc.chiliz.com"
"faucets": [
"https://faucet.ivarex.com/"
], ],
"faucets": [],
"nativeCurrency": { "nativeCurrency": {
"name": "Ivar", "name": "Chiliz",
"symbol": "IVAR", "symbol": "CHZ",
"decimals": 18 "decimals": 18
}, },
"infoURL": "https://ivarex.com", "infoURL": "https://chiliz.com/chiliz-chain-2-0/",
"shortName": "ivar", "shortName": "cc2",
"chainId": 88888, "chainId": 88888,
"networkId": 88888, "networkId": 88888,
"explorers": [ "explorers": [
{ {
"name": "ivarscan", "name": "cc2scan",
"url": "https://ivarscan.com", "url": "https://scan.chiliz.com",
"standard": "EIP3091" "standard": "EIP3091"
} }
], ],
"icon": {
"url": "ipfs://QmTGYofJ8VLkeNY4J69AvXi8e126kmbHmf34wLFoJ1FKAK",
"width": 400,
"height": 400,
"format": "png"
},
"testnet": false, "testnet": false,
"slug": "ivar-chain" "redFlags": [
"reusedChainId"
],
"slug": "chiliz-chain"
} as const satisfies Chain; } as const satisfies Chain;
+2 -1
View File
@@ -15,7 +15,8 @@ export default {
"rpc": [ "rpc": [
"https://pulsechain-testnet-v4.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://pulsechain-testnet-v4.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.v4.testnet.pulsechain.com/", "https://rpc.v4.testnet.pulsechain.com/",
"wss://rpc.v4.testnet.pulsechain.com/" "wss://rpc.v4.testnet.pulsechain.com/",
"https://pulsechain-testnet.publicnode.com"
], ],
"features": [ "features": [
{ {
+3 -3
View File
@@ -34,9 +34,9 @@ export default {
"name": "Mantis Blockscout", "name": "Mantis Blockscout",
"url": "https://blockscout.mantis.hexapod.network", "url": "https://blockscout.mantis.hexapod.network",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
-1
View File
@@ -15,7 +15,6 @@ export default {
"symbol": "CMEMO", "symbol": "CMEMO",
"decimals": 18 "decimals": 18
}, },
"infoURL": "www.memolabs.org",
"shortName": "memochain", "shortName": "memochain",
"chainId": 985, "chainId": 985,
"networkId": 985, "networkId": 985,
+7 -1
View File
@@ -21,7 +21,13 @@ export default {
{ {
"name": "blockscout", "name": "blockscout",
"url": "https://blockscout.com/poa/core", "url": "https://blockscout.com/poa/core",
"standard": "none" "icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
},
"standard": "EIP3091"
} }
], ],
"testnet": false, "testnet": false,
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "eLiberty Mainnet",
"chain": "$EL",
"icon": {
"url": "ipfs://Qmcr8US1DZcK3ooiMtE8tEQPgep12abXzxPw1jCkgZhji9",
"width": 150,
"height": 150,
"format": "png"
},
"rpc": [
"https://eliberty.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.eliberty.ngo"
],
"faucets": [
"https://faucet.eliberty.ngo"
],
"nativeCurrency": {
"name": "eLiberty",
"symbol": "$EL",
"decimals": 18
},
"infoURL": "https://eliberty.ngo",
"shortName": "ELm",
"chainId": 990,
"networkId": 990,
"explorers": [
{
"name": "eLiberty Mainnet",
"url": "https://explorer.eliberty.ngo",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "eliberty"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "eLiberty Testnet",
"chain": "$EL",
"icon": {
"url": "ipfs://Qmcr8US1DZcK3ooiMtE8tEQPgep12abXzxPw1jCkgZhji9",
"width": 150,
"height": 150,
"format": "png"
},
"rpc": [
"https://eliberty-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.eliberty.ngo"
],
"faucets": [
"https://faucet.eliberty.ngo"
],
"nativeCurrency": {
"name": "eLiberty",
"symbol": "$EL",
"decimals": 18
},
"infoURL": "https://eliberty.ngo",
"shortName": "ELt",
"chainId": 99099,
"networkId": 99099,
"explorers": [
{
"name": "eLiberty Testnet",
"url": "https://testnet.eliberty.ngo",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "eliberty-testnet"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Mind Smart Chain Testnet",
"chain": "tMIND",
"icon": {
"url": "ipfs://QmX2b4CzNyrNgy4ERBEteSS9MsuYNVYeq2sSMMiogGjbFP",
"width": 732,
"height": 732,
"format": "jpg"
},
"rpc": [
"https://mind-smart-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-msc.mindchain.info/"
],
"faucets": [
"https://faucet.mindchain.info/"
],
"nativeCurrency": {
"name": "MIND Coin",
"symbol": "tMIND",
"decimals": 18
},
"infoURL": "https://mindscan.info",
"shortName": "tMIND",
"chainId": 9977,
"networkId": 9977,
"explorers": [
{
"name": "Mind Chain explorer",
"url": "https://testnet.mindscan.info",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "mind-smart-chain-testnet"
} as const satisfies Chain;
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"name": "Mind Smart Chain Mainnet",
"chain": "MIND",
"icon": {
"url": "ipfs://QmX2b4CzNyrNgy4ERBEteSS9MsuYNVYeq2sSMMiogGjbFP",
"width": 732,
"height": 732,
"format": "jpg"
},
"rpc": [
"https://mind-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc-msc.mindchain.info/",
"https://seednode.mindchain.info"
],
"faucets": [],
"nativeCurrency": {
"name": "MIND Coin",
"symbol": "MIND",
"decimals": 18
},
"infoURL": "https://mindscan.info",
"shortName": "MIND",
"chainId": 9996,
"networkId": 9996,
"explorers": [
{
"name": "Mind Chain explorer",
"url": "https://mainnet.mindscan.info",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "mind-smart-chain"
} as const satisfies Chain;
+3 -3
View File
@@ -35,9 +35,9 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://testnet-rollup-explorer.altlayer.io", "url": "https://testnet-rollup-explorer.altlayer.io",
"icon": { "icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 512, "width": 551,
"height": 512, "height": 540,
"format": "png" "format": "png"
}, },
"standard": "EIP3091" "standard": "EIP3091"
+34
View File
@@ -0,0 +1,34 @@
// @ts-check
/** @typedef { import("../../src/types").Chain } Chain */
/** @type {Omit<Chain, "slug">} */
export default {
name: "Chiliz Chain",
chain: "CC2",
rpc: ["https://rpc.ankr.com/chiliz", "https://rpc.chiliz.com"],
faucets: [],
nativeCurrency: {
name: "Chiliz",
symbol: "CHZ",
decimals: 18,
},
infoURL: "https://chiliz.com/chiliz-chain-2-0/",
shortName: "cc2",
chainId: 88888,
networkId: 88888,
explorers: [
{
name: "cc2scan",
url: "https://scan.chiliz.com",
standard: "EIP3091",
},
],
icon: {
url: "ipfs://QmTGYofJ8VLkeNY4J69AvXi8e126kmbHmf34wLFoJ1FKAK",
width: 400,
height: 400,
format: "png",
},
testnet: false,
redFlags: ["reusedChainId"],
};
+7 -6
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/chains", "name": "@thirdweb-dev/chains",
"version": "0.1.38", "version": "0.1.39",
"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": {
@@ -23,16 +23,17 @@
}, },
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.22.5", "@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.5", "@babel/preset-env": "^7.22.9",
"@babel/preset-typescript": "^7.22.5", "@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.5", "@babel/runtime": "^7.22.6",
"@preconstruct/cli": "^2.7.0", "@preconstruct/cli": "^2.8.1",
"@thirdweb-dev/tsconfig": "workspace:*", "@thirdweb-dev/tsconfig": "workspace:*",
"@types/jest": "^29.5.3",
"axios": "^1.4.0", "axios": "^1.4.0",
"deepmerge": "^4.3.1", "deepmerge": "^4.3.1",
"eslint-config-thirdweb": "workspace:*", "eslint-config-thirdweb": "workspace:*",
"jest": "^29.4.3", "jest": "^29.6.2",
"plop": "^3.1.2", "plop": "^3.1.2",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
+76 -1
View File
@@ -17,6 +17,51 @@ const combineMerge = (target, source) => {
return destination; return destination;
}; };
/**
* @param {Chain['explorers']} explorers
*/
function sortExplorers(explorers = []) {
let etherscan = null;
let blockscout = null;
let restExplorers = [];
for (const explorer of explorers) {
if (explorer.name.includes("etherscan")) {
etherscan = explorer;
} else if (explorer.name.includes("blockscout")) {
blockscout = explorer;
} else {
restExplorers.push(explorer);
}
}
const returnExplorers = [];
if (etherscan) {
returnExplorers.push(etherscan);
}
if (blockscout) {
returnExplorers.push(blockscout);
}
return [...returnExplorers, ...restExplorers];
}
/**
* @param {readonly any[]} values
* @param {(arg0: any) => void} valueChecker
*/
function filterOutErroringValues(values, valueChecker) {
return values.filter((value) => {
try {
valueChecker(value);
return true;
} catch (e) {
return false;
}
});
}
const chainsDir = "./chains"; const chainsDir = "./chains";
const chainsJsonUrl = "https://chainid.network/chains.json"; const chainsJsonUrl = "https://chainid.network/chains.json";
@@ -74,10 +119,40 @@ chains = chains
? false ? false
: JSON.stringify(chain).toLowerCase().includes("test"); : JSON.stringify(chain).toLowerCase().includes("test");
return { const resultChain = {
...chain, ...chain,
testnet, testnet,
}; };
// only add the explroers if they were there in the first place
if (resultChain.explorers) {
resultChain.explorers = sortExplorers(resultChain.explorers);
// check every key that *could* contain a url and validate it
resultChain.explorers = filterOutErroringValues(
resultChain.explorers,
(explorer) => new URL(explorer.url),
);
}
if (resultChain.faucets) {
resultChain.faucets = filterOutErroringValues(
resultChain.faucets,
(faucet) => new URL(faucet),
);
}
if (resultChain.rpc) {
resultChain.rpc = filterOutErroringValues(
resultChain.rpc,
(rpc) => new URL(rpc),
);
}
if (resultChain.infoURL) {
try {
new URL(resultChain.infoURL);
} catch (e) {
delete resultChain.infoURL;
}
}
return resultChain;
}); });
/** /**
File diff suppressed because one or more lines are too long
+1
View File
@@ -56,4 +56,5 @@ export type MinimalChain = Pick<
| "chainId" | "chainId"
| "testnet" | "testnet"
| "slug" | "slug"
| "icon"
>; >;
+8 -1
View File
@@ -98,7 +98,13 @@ export function getValidChainRPCs(
// Replace API_KEY placeholder with value // Replace API_KEY placeholder with value
if (rpc.includes("${THIRDWEB_API_KEY}")) { if (rpc.includes("${THIRDWEB_API_KEY}")) {
if (clientId) { if (clientId) {
processedRPCs.push(rpc.replace("${THIRDWEB_API_KEY}", clientId)); processedRPCs.push(
rpc.replace("${THIRDWEB_API_KEY}", clientId) +
(typeof globalThis !== "undefined" && "APP_BUNDLE_ID" in globalThis
? // @ts-ignore
`/?bundleId=${globalThis.APP_BUNDLE_ID}`
: ""),
);
} else { } else {
// if no client id, let it through with empty string // if no client id, let it through with empty string
// if secretKey is present, it will be used in header // if secretKey is present, it will be used in header
@@ -154,6 +160,7 @@ export function minimizeChain(chain: Chain): MinimalChain {
chainId: chain.chainId, chainId: chain.chainId,
testnet: chain.testnet, testnet: chain.testnet,
slug: chain.slug, slug: chain.slug,
icon: chain.icon,
}; };
} }
+280
View File
@@ -0,0 +1,280 @@
import { afterEach, beforeEach } from "node:test";
import { Ethereum } from "../src";
import {
type ChainRPCOptions,
getChainRPC,
getChainRPCs,
minimizeChain,
configureChain,
updateChainRPCs,
getValidChainRPCs,
} from "../src/utils";
const CHAIN_RPC_TEST_CASES: [ChainRPCOptions, string[]][] = [
[
{ thirdwebApiKey: "SAMPLE_KEY" },
[
"https://ethereum.rpc.thirdweb.com/SAMPLE_KEY",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
[
{ alchemyApiKey: "SAMPLE_KEY" },
[
"https://eth-mainnet.g.alchemy.com/v2/SAMPLE_KEY",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
[
{ infuraApiKey: "SAMPLE_KEY" },
[
"https://mainnet.infura.io/v3/SAMPLE_KEY",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
// infura is supported for both http and ws
[
{ mode: "ws", infuraApiKey: "SAMPLE_KEY" },
["wss://mainnet.infura.io/ws/v3/SAMPLE_KEY"],
],
];
describe("chains/utils", () => {
test.each(CHAIN_RPC_TEST_CASES)(
"getChainRPCs(%p) = %p",
(options, expected) => {
expect(getChainRPCs(Ethereum, options)).toEqual(expected);
},
);
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([
[
undefined,
undefined,
[
"https://ethereum.rpc.thirdweb.com/",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
[
undefined,
"http",
[
"https://ethereum.rpc.thirdweb.com/",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
[
"SAMPLE_CLIENT_KEY",
undefined,
[
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
[
"SAMPLE_CLIENT_KEY",
"http",
[
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
])("getValidChainRPCs(Ethereum, %s, %s) = %p", (clientId, mode, 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)(
"getChainRPC(%p) = %p",
(options, expected) => {
expect(getChainRPC(Ethereum, options)).toEqual(expected[0]);
},
);
test("minimizeChain", () => {
expect(minimizeChain(Ethereum)).toEqual({
name: "Ethereum Mainnet",
chain: "ETH",
icon: {
url: "ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png",
height: 512,
width: 512,
format: "png",
},
rpc: ["https://ethereum.rpc.thirdweb.com/${THIRDWEB_API_KEY}"],
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18,
},
shortName: "eth",
chainId: 1,
testnet: false,
slug: "ethereum",
});
});
test.each([
[{}, Ethereum],
[
{ rpc: "https://example.com" },
{ ...Ethereum, rpc: ["https://example.com", ...Ethereum.rpc] },
],
[
{ rpc: ["https://example.com", "https://httpbin.org"] },
{
...Ethereum,
rpc: ["https://example.com", "https://httpbin.org", ...Ethereum.rpc],
},
],
])("configureChain(Ethereum, %p) = %p", (config, expected) => {
expect(configureChain(Ethereum, config)).toEqual(expected);
});
test.each([
[
Ethereum,
undefined,
{
...Ethereum,
rpc: [
"https://ethereum.rpc.thirdweb.com/",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
},
],
[
Ethereum,
"SAMPLE_CLIENT_KEY",
{
...Ethereum,
rpc: [
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
},
],
[{ ...Ethereum, rpc: [] }, "SAMPLE_CLIENT_KEY", { ...Ethereum, rpc: [] }],
])("updateChainRPCs(%p, %s) = %p", (chain, config, expected) => {
expect(updateChainRPCs(chain, config)).toEqual(expected);
});
});
describe("chains/utils with APP_BUNDLE_ID", () => {
beforeAll(() => {
globalThis.APP_BUNDLE_ID = "com.thirdweb.rpc";
});
test.each([
[
undefined,
undefined,
[
"https://ethereum.rpc.thirdweb.com/",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
[
undefined,
"http",
[
"https://ethereum.rpc.thirdweb.com/",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
[
"SAMPLE_CLIENT_KEY",
undefined,
[
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
[
"SAMPLE_CLIENT_KEY",
"http",
[
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
],
])("getValidChainRPCs(Ethereum, %s, %s) = %p", (clientId, mode, expected) => {
expect(getValidChainRPCs(Ethereum, clientId, mode)).toEqual(expected);
});
test.each([
[
Ethereum,
undefined,
{
...Ethereum,
rpc: [
"https://ethereum.rpc.thirdweb.com/",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
},
],
[
Ethereum,
"SAMPLE_CLIENT_KEY",
{
...Ethereum,
rpc: [
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com",
],
},
],
[{ ...Ethereum, rpc: [] }, "SAMPLE_CLIENT_KEY", { ...Ethereum, rpc: [] }],
])("updateChainRPCs(%p, %s) = %p", (chain, config, expected) => {
expect(updateChainRPCs(chain, config)).toEqual(expected);
});
});
+17
View File
@@ -1,5 +1,22 @@
# thirdweb # thirdweb
## 0.11.5
### Patch Changes
- [#1409](https://github.com/thirdweb-dev/js/pull/1409) [`b1e8c8e2`](https://github.com/thirdweb-dev/js/commit/b1e8c8e231013182eb46c16d0c441ee0f3bdfdb2) Thanks [@jnsdls](https://github.com/jnsdls)! - update dependencies
- [#1412](https://github.com/thirdweb-dev/js/pull/1412) [`fa48ab69`](https://github.com/thirdweb-dev/js/commit/fa48ab6942aaca5b4cf00893240510b1138190a1) Thanks [@jarrodwatts](https://github.com/jarrodwatts)! - fix: postinstall check keeps adding to itself
- [#1389](https://github.com/thirdweb-dev/js/pull/1389) [`53400858`](https://github.com/thirdweb-dev/js/commit/53400858232ceb998d68da8a75a6d493668fcf0f) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Add default admin param to base contract constructors
- [#1384](https://github.com/thirdweb-dev/js/pull/1384) [`0402b8bb`](https://github.com/thirdweb-dev/js/commit/0402b8bb378857b78cb207a329ac66598eeb6921) Thanks [@Marfuen](https://github.com/Marfuen)! - Update CLI Login text to mask the secret
- Updated dependencies [[`09b3b339`](https://github.com/thirdweb-dev/js/commit/09b3b339e65a6a9a1cfa32bab9e61e57532e7dbe), [`0a5eb19d`](https://github.com/thirdweb-dev/js/commit/0a5eb19d672909027bb6c7e79ea76d431535559c), [`98009cb3`](https://github.com/thirdweb-dev/js/commit/98009cb3ca6f1c2221a6a74ffa7df8d7ddac2c60), [`b1e8c8e2`](https://github.com/thirdweb-dev/js/commit/b1e8c8e231013182eb46c16d0c441ee0f3bdfdb2), [`51b36040`](https://github.com/thirdweb-dev/js/commit/51b3604021ca7b52fd00fd07c5a648a73464a61b), [`cbf486c2`](https://github.com/thirdweb-dev/js/commit/cbf486c21088ec1656933961e653e1d161939f63), [`01cc5408`](https://github.com/thirdweb-dev/js/commit/01cc54087b9d276968cb6dd3ceafa07c30bc2242), [`53400858`](https://github.com/thirdweb-dev/js/commit/53400858232ceb998d68da8a75a6d493668fcf0f), [`48ca58b7`](https://github.com/thirdweb-dev/js/commit/48ca58b7aa45348b928932b9c7b76b3dc233e429), [`aface46d`](https://github.com/thirdweb-dev/js/commit/aface46d7469ca2c1e45895e311a74363ceb8611), [`3152d4e9`](https://github.com/thirdweb-dev/js/commit/3152d4e9b42e2777316b1b58513657f4430cb79a), [`5fe3cec8`](https://github.com/thirdweb-dev/js/commit/5fe3cec894b98a2361d21bb72a5da843ec2a4d9b), [`8e6e55b1`](https://github.com/thirdweb-dev/js/commit/8e6e55b154ecdc4b09ded31387707571ff963fb7), [`aa6bdd08`](https://github.com/thirdweb-dev/js/commit/aa6bdd0809d1d5536c837c59b2d407ee974c1f9c), [`75587c8b`](https://github.com/thirdweb-dev/js/commit/75587c8b38bbbcf68d2101526e9792349cce728f), [`cc5e2ec5`](https://github.com/thirdweb-dev/js/commit/cc5e2ec51fce09af05be33811eb46980825829ee), [`a9f9a403`](https://github.com/thirdweb-dev/js/commit/a9f9a403457b9e683bcfdb61034ee9c9ee08bbf8), [`5a02c5ec`](https://github.com/thirdweb-dev/js/commit/5a02c5ec0288fd6dfb2b765ef70bb18e714aca19)]:
- @thirdweb-dev/sdk@3.10.41
- @thirdweb-dev/chains@0.1.39
- @thirdweb-dev/storage@1.2.1
## 0.11.4 ## 0.11.4
### Patch Changes ### Patch Changes
+3
View File
@@ -1,6 +1,9 @@
import { CREATE_MESSAGES } from "../constants/constants"; import { CREATE_MESSAGES } from "../constants/constants";
import { prepareEnvironment } from "@gmrchk/cli-testing-library"; import { prepareEnvironment } from "@gmrchk/cli-testing-library";
// load env variables
require("dotenv-mono").load();
// this creates an app, can take some time that's fine // this creates an app, can take some time that's fine
jest.setTimeout(150_000); jest.setTimeout(150_000);
+9 -9
View File
@@ -3,20 +3,20 @@ import { copyFile } from "fs/promises";
import { resolve } from "path"; import { resolve } from "path";
import { ERROR_MESSAGES } from "../constants/constants"; import { ERROR_MESSAGES } from "../constants/constants";
// load env variables
require("dotenv-mono").load();
const apiSecretKey = process.env.TW_SECRET_KEY as string;
// function to skip tests based on condition
const itif = (condition: boolean) => (condition ? it : it.skip);
// this creates an app, can take some time that's fine // this creates an app, can take some time that's fine
jest.setTimeout(120_000); jest.setTimeout(120_000);
describe("npx thirdweb deploy", () => { describe("npx thirdweb deploy", () => {
it("should return deploy page url", async () => { itif(!!apiSecretKey)("should return deploy page url", async () => {
const { spawn, cleanup, exists, path } = await prepareEnvironment(); const { spawn, cleanup, exists, path } = await prepareEnvironment();
// eslint-disable-next-line turbo/no-undeclared-env-vars
const apiSecretKey = process.env.CLI_E2E_API_KEY as string;
if (!apiSecretKey) {
throw new Error(
"CLI_E2E_API_KEY is not set in the environment variables",
);
}
await copyFile( await copyFile(
resolve("./e2e/files/BasicContract.sol"), resolve("./e2e/files/BasicContract.sol"),
+3
View File
@@ -1,6 +1,9 @@
import { CREATE_MESSAGES } from "../constants/constants"; import { CREATE_MESSAGES } from "../constants/constants";
import { prepareEnvironment } from "@gmrchk/cli-testing-library"; import { prepareEnvironment } from "@gmrchk/cli-testing-library";
// load env variables
require("dotenv-mono").load();
// this creates an app, can take some time that's fine // this creates an app, can take some time that's fine
jest.setTimeout(240_000); jest.setTimeout(240_000);
+12 -11
View File
@@ -3,21 +3,22 @@ import { copyFile } from "fs/promises";
import { resolve } from "path"; import { resolve } from "path";
import { ERROR_MESSAGES } from "../constants/constants"; import { ERROR_MESSAGES } from "../constants/constants";
// load env variables
require("dotenv-mono").load();
// eslint-disable-next-line turbo/no-undeclared-env-vars
const apiSecretKey = process.env.TW_SECRET_KEY as string;
// function to skip tests based on condition
const itif = (condition: boolean) => (condition ? it : it.skip);
// this creates an app, can take some time that's fine // this creates an app, can take some time that's fine
jest.setTimeout(120_000); jest.setTimeout(120_000);
describe("npx thirdweb publish", () => { describe("npx thirdweb publish", () => {
// TOOD: turn this test back on when we figure out why it's failing // conditionally skip test if there's no api key
it.skip("should return publish page url", async () => { itif(!!apiSecretKey)("should return publish page url", async () => {
const { spawn, cleanup, exists, path } = await prepareEnvironment(); const { spawn, cleanup, exists, path } = await prepareEnvironment();
// eslint-disable-next-line turbo/no-undeclared-env-vars
const apiSecretKey = process.env.CLI_E2E_API_KEY as string;
if (!apiSecretKey) {
throw new Error(
"CLI_E2E_API_KEY is not set in the environment variables",
);
}
await copyFile( await copyFile(
resolve("./e2e/files/BasicContract.sol"), resolve("./e2e/files/BasicContract.sol"),
@@ -25,7 +26,7 @@ describe("npx thirdweb publish", () => {
); );
const { waitForText, waitForFinish, getExitCode, writeText, getStderr } = const { waitForText, waitForFinish, getExitCode, writeText, getStderr } =
await spawn("node", `./dist/cli/index.js publish -k ${apiSecretKey}}`); await spawn("node", `./dist/cli/index.js publish -k ${apiSecretKey}`);
expect(await exists("BasicContract.sol")).toEqual(true); expect(await exists("BasicContract.sol")).toEqual(true);
+3 -3
View File
@@ -1,5 +1,5 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = { module.exports = {
preset: 'ts-jest', preset: "ts-jest",
testEnvironment: 'node', testEnvironment: "node",
}; };
+8 -7
View File
@@ -1,7 +1,7 @@
{ {
"name": "thirdweb", "name": "thirdweb",
"main": "dist/cli/index.js", "main": "dist/cli/index.js",
"version": "0.11.4", "version": "0.11.5",
"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",
@@ -14,9 +14,9 @@
"@types/async-retry": "^1.3.0", "@types/async-retry": "^1.3.0",
"@types/cross-spawn": "^6.0.2", "@types/cross-spawn": "^6.0.2",
"@types/inquirer": "^8.2.1", "@types/inquirer": "^8.2.1",
"@types/jest": "^29.5.2", "@types/jest": "^29.5.3",
"@types/js-yaml": "^4.0.5", "@types/js-yaml": "^4.0.5",
"@types/node": "^18.16.18", "@types/node": "^18.17.1",
"@types/prompts": "^2.4.4", "@types/prompts": "^2.4.4",
"@types/rimraf": "^3.0.0", "@types/rimraf": "^3.0.0",
"@types/tar": "^6.1.5", "@types/tar": "^6.1.5",
@@ -24,12 +24,13 @@
"@types/validate-npm-package-name": "^4.0.0", "@types/validate-npm-package-name": "^4.0.0",
"chalk": "^5.3.0", "chalk": "^5.3.0",
"cross-spawn": "^7.0.3", "cross-spawn": "^7.0.3",
"dotenv-mono": "^1.3.10",
"eslint-config-thirdweb": "workspace:*", "eslint-config-thirdweb": "workspace:*",
"hardhat": "^2.16.1", "hardhat": "^2.17.0",
"jest": "^29.4.3", "jest": "^29.6.2",
"ora": "^6.3.1", "ora": "^6.3.1",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"ts-jest": "^29.1.0", "ts-jest": "^29.1.1",
"ts-node": "^10.7.0", "ts-node": "^10.7.0",
"tsup": "^6.7.0", "tsup": "^6.7.0",
"typescript": "^5.1.6" "typescript": "^5.1.6"
@@ -47,7 +48,7 @@
"got": "11.8.5", "got": "11.8.5",
"inquirer": "^8.2.3", "inquirer": "^8.2.3",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"node-fetch": "^3.3.1", "node-fetch": "^3.3.2",
"open": "^8.4.0", "open": "^8.4.0",
"prompts": "^2.4.2", "prompts": "^2.4.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
+1 -1
View File
@@ -41,7 +41,7 @@ export function getSession(cache: Cache) {
export async function createSession(cache: Cache) { export async function createSession(cache: Cache) {
try { try {
const response = await prompts({ const response = await prompts({
type: "text", type: "invisible",
name: "apiSecretKey", name: "apiSecretKey",
message: `Please enter your API secret key, you can find or create it on ${chalk.blue( message: `Please enter your API secret key, you can find or create it on ${chalk.blue(
"https://thirdweb.com/create-api-key", "https://thirdweb.com/create-api-key",
+1 -1
View File
@@ -178,7 +178,7 @@ const main = async () => {
); );
// If the package is installed globally with yarn or pnpm, then npx won't recognize it // If the package is installed globally with yarn or pnpm, then npx won't recognize it
// So we need to make sure to run the command directly // So we need to make sure to run the command directly.
const executionCommand = const executionCommand =
!installation.isGlobal || installation.packageManager === "npm" !installation.isGlobal || installation.packageManager === "npm"
? `npx thirdweb` ? `npx thirdweb`
+1 -1
View File
@@ -62,7 +62,7 @@ export async function detectExtensions(options: any) {
} }
} }
let contractsWithFeatures: ContractFeatures[] = selectedContracts.map( const contractsWithFeatures: ContractFeatures[] = selectedContracts.map(
(contract) => { (contract) => {
const abi: Parameters<typeof detectFeatures>[0] = JSON.parse( const abi: Parameters<typeof detectFeatures>[0] = JSON.parse(
contract.metadata, contract.metadata,
+3 -3
View File
@@ -127,7 +127,7 @@ export async function processProject(
return { title: key, value: key }; return { title: key, value: key };
}); });
let routerType: string = ""; let routerType = "";
const res = await createRouterPrompt(choices, "Choose a router to deploy"); const res = await createRouterPrompt(choices, "Choose a router to deploy");
if (typeof res.routerType === "string") { if (typeof res.routerType === "string") {
routerType = res.routerType.trim(); routerType = res.routerType.trim();
@@ -361,7 +361,7 @@ export function getUrl(hashes: string[], command: string) {
); );
} else { } else {
url = new URL(THIRDWEB_URL + "/contracts/" + command); url = new URL(THIRDWEB_URL + "/contracts/" + command);
for (let hash of hashes) { for (const hash of hashes) {
url.searchParams.append("ipfs", hash.replace("ipfs://", "")); url.searchParams.append("ipfs", hash.replace("ipfs://", ""));
} }
} }
@@ -383,7 +383,7 @@ async function formatToExtensions(
for (const contract of contracts) { for (const contract of contracts) {
// Prepare extension metadata. // Prepare extension metadata.
let metadata: ExtensionMetadata = { const metadata: ExtensionMetadata = {
name: contract.name, name: contract.name,
metadataURI: await getMetadataURIForExtension(contract, storage), metadataURI: await getMetadataURIForExtension(contract, storage),
implementation: ethers.constants.AddressZero, implementation: ethers.constants.AddressZero,
+1 -1
View File
@@ -104,7 +104,7 @@ export async function detectProject(options: any) {
} }
} }
let contractsWithFeatures: ContractFeatures[] = selectedContracts.map( const contractsWithFeatures: ContractFeatures[] = selectedContracts.map(
(contract) => { (contract) => {
const abi: Parameters<typeof detectFeatures>[0] = JSON.parse( const abi: Parameters<typeof detectFeatures>[0] = JSON.parse(
contract.metadata, contract.metadata,
+38 -4
View File
@@ -7,12 +7,14 @@ import "@thirdweb-dev/contracts/base/ERC721Base.sol";
contract Contract is ERC721Base { contract Contract is ERC721Base {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
uint128 _royaltyBps uint128 _royaltyBps
) )
ERC721Base( ERC721Base(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_royaltyRecipient, _royaltyRecipient,
@@ -28,6 +30,7 @@ import "@thirdweb-dev/contracts/base/ERC721SignatureMint.sol";
contract Contract is ERC721SignatureMint { contract Contract is ERC721SignatureMint {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
@@ -35,6 +38,7 @@ contract Contract is ERC721SignatureMint {
address _primarySaleRecipient address _primarySaleRecipient
) )
ERC721SignatureMint( ERC721SignatureMint(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_royaltyRecipient, _royaltyRecipient,
@@ -50,11 +54,12 @@ import "@thirdweb-dev/contracts/base/ERC721LazyMint.sol";
contract Contract is ERC721LazyMint { contract Contract is ERC721LazyMint {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
uint128 _royaltyBps uint128 _royaltyBps
) ERC721LazyMint(_name, _symbol, _royaltyRecipient, _royaltyBps) {} ) ERC721LazyMint(_defaultAdmin, _name, _symbol, _royaltyRecipient, _royaltyBps) {}
}`, }`,
ERC721DelayedReveal: `// SPDX-License-Identifier: Apache-2.0 ERC721DelayedReveal: `// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
@@ -63,11 +68,12 @@ import "@thirdweb-dev/contracts/base/ERC721DelayedReveal.sol";
contract Contract is ERC721DelayedReveal { contract Contract is ERC721DelayedReveal {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
uint128 _royaltyBps uint128 _royaltyBps
) ERC721DelayedReveal(_name, _symbol, _royaltyRecipient, _royaltyBps) {} ) ERC721DelayedReveal(_defaultAdmin, _name, _symbol, _royaltyRecipient, _royaltyBps) {}
}`, }`,
ERC721Drop: `// SPDX-License-Identifier: Apache-2.0 ERC721Drop: `// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
@@ -76,6 +82,7 @@ import "@thirdweb-dev/contracts/base/ERC721Drop.sol";
contract Contract is ERC721Drop { contract Contract is ERC721Drop {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
@@ -83,6 +90,7 @@ contract Contract is ERC721Drop {
address _primarySaleRecipient address _primarySaleRecipient
) )
ERC721Drop( ERC721Drop(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_royaltyRecipient, _royaltyRecipient,
@@ -99,12 +107,14 @@ import "@thirdweb-dev/contracts/base/ERC1155Base.sol";
contract Contract is ERC1155Base { contract Contract is ERC1155Base {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
uint128 _royaltyBps uint128 _royaltyBps
) )
ERC1155Base( ERC1155Base(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_royaltyRecipient, _royaltyRecipient,
@@ -120,6 +130,7 @@ import "@thirdweb-dev/contracts/base/Staking721Base.sol";
contract Contract is Staking721Base { contract Contract is Staking721Base {
constructor( constructor(
address _defaultAdmin,
uint256 _timeUnit, uint256 _timeUnit,
uint256 _rewardsPerUnitTime, uint256 _rewardsPerUnitTime,
address _nftCollection, address _nftCollection,
@@ -127,6 +138,7 @@ contract Contract is Staking721Base {
address _nativeTokenWrapper address _nativeTokenWrapper
) )
Staking721Base( Staking721Base(
_defaultAdmin,
_timeUnit, _timeUnit,
_rewardsPerUnitTime, _rewardsPerUnitTime,
_nftCollection, _nftCollection,
@@ -142,6 +154,7 @@ import "@thirdweb-dev/contracts/base/ERC1155SignatureMint.sol";
contract Contract is ERC1155SignatureMint { contract Contract is ERC1155SignatureMint {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
@@ -149,6 +162,7 @@ contract Contract is ERC1155SignatureMint {
address _primarySaleRecipient address _primarySaleRecipient
) )
ERC1155SignatureMint( ERC1155SignatureMint(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_royaltyRecipient, _royaltyRecipient,
@@ -164,11 +178,12 @@ import "@thirdweb-dev/contracts/base/ERC1155LazyMint.sol";
contract Contract is ERC1155LazyMint { contract Contract is ERC1155LazyMint {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
uint128 _royaltyBps uint128 _royaltyBps
) ERC1155LazyMint(_name, _symbol, _royaltyRecipient, _royaltyBps) {} ) ERC1155LazyMint(_defaultAdmin, _name, _symbol, _royaltyRecipient, _royaltyBps) {}
}`, }`,
ERC1155DelayedReveal: `// SPDX-License-Identifier: Apache-2.0 ERC1155DelayedReveal: `// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
@@ -177,11 +192,12 @@ import "@thirdweb-dev/contracts/base/ERC1155DelayedReveal.sol";
contract Contract is ERC1155DelayedReveal { contract Contract is ERC1155DelayedReveal {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
uint128 _royaltyBps uint128 _royaltyBps
) ERC1155DelayedReveal(_name, _symbol, _royaltyRecipient, _royaltyBps) {} ) ERC1155DelayedReveal(_defaultAdmin, _name, _symbol, _royaltyRecipient, _royaltyBps) {}
}`, }`,
ERC1155Drop: `// SPDX-License-Identifier: Apache-2.0 ERC1155Drop: `// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
@@ -190,6 +206,7 @@ import "@thirdweb-dev/contracts/base/ERC1155Drop.sol";
contract Contract is ERC1155Drop { contract Contract is ERC1155Drop {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _royaltyRecipient, address _royaltyRecipient,
@@ -197,6 +214,7 @@ contract Contract is ERC1155Drop {
address _primarySaleRecipient address _primarySaleRecipient
) )
ERC1155Drop( ERC1155Drop(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_royaltyRecipient, _royaltyRecipient,
@@ -212,6 +230,7 @@ import "@thirdweb-dev/contracts/base/Staking1155Base.sol";
contract Contract is Staking1155Base { contract Contract is Staking1155Base {
constructor( constructor(
address _defaultAdmin,
uint256 _defaultTimeUnit, uint256 _defaultTimeUnit,
uint256 _defaultRewardsPerUnitTime, uint256 _defaultRewardsPerUnitTime,
address _stakingToken, address _stakingToken,
@@ -219,6 +238,7 @@ contract Contract is Staking1155Base {
address _nativeTokenWrapper address _nativeTokenWrapper
) )
Staking1155Base( Staking1155Base(
_defaultAdmin,
_defaultTimeUnit, _defaultTimeUnit,
_defaultRewardsPerUnitTime, _defaultRewardsPerUnitTime,
_stakingToken, _stakingToken,
@@ -234,10 +254,12 @@ import "@thirdweb-dev/contracts/base/ERC20Base.sol";
contract Contract is ERC20Base { contract Contract is ERC20Base {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol string memory _symbol
) )
ERC20Base( ERC20Base(
_defaultAdmin,
_name, _name,
_symbol _symbol
) )
@@ -250,10 +272,12 @@ import "@thirdweb-dev/contracts/base/ERC20Vote.sol";
contract Contract is ERC20Vote { contract Contract is ERC20Vote {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol string memory _symbol
) )
ERC20Vote( ERC20Vote(
_defaultAdmin,
_name, _name,
_symbol _symbol
) )
@@ -266,11 +290,13 @@ import "@thirdweb-dev/contracts/base/ERC20SignatureMint.sol";
contract Contract is ERC20SignatureMint { contract Contract is ERC20SignatureMint {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _primarySaleRecipient address _primarySaleRecipient
) )
ERC20SignatureMint( ERC20SignatureMint(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_primarySaleRecipient _primarySaleRecipient
@@ -285,11 +311,13 @@ import "@thirdweb-dev/contracts/base/ERC20SignatureMintVote.sol";
contract Contract is ERC20SignatureMintVote { contract Contract is ERC20SignatureMintVote {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _primarySaleRecipient address _primarySaleRecipient
) )
ERC20SignatureMintVote( ERC20SignatureMintVote(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_primarySaleRecipient _primarySaleRecipient
@@ -304,11 +332,13 @@ import "@thirdweb-dev/contracts/base/ERC20Drop.sol";
contract Contract is ERC20Drop { contract Contract is ERC20Drop {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _primarySaleRecipient address _primarySaleRecipient
) )
ERC20Drop( ERC20Drop(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_primarySaleRecipient _primarySaleRecipient
@@ -322,11 +352,13 @@ import "@thirdweb-dev/contracts/base/ERC20DropVote.sol";
contract Contract is ERC20DropVote { contract Contract is ERC20DropVote {
constructor( constructor(
address _defaultAdmin,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
address _primarySaleRecipient address _primarySaleRecipient
) )
ERC20DropVote( ERC20DropVote(
_defaultAdmin,
_name, _name,
_symbol, _symbol,
_primarySaleRecipient _primarySaleRecipient
@@ -340,6 +372,7 @@ import "@thirdweb-dev/contracts/base/Staking20Base.sol";
contract Contract is Staking20Base { contract Contract is Staking20Base {
constructor( constructor(
address _defaultAdmin,
uint256 _timeUnit, uint256 _timeUnit,
uint256 _rewardRatioNumerator, uint256 _rewardRatioNumerator,
uint256 _rewardRatioDenominator, uint256 _rewardRatioDenominator,
@@ -348,6 +381,7 @@ contract Contract is Staking20Base {
address _nativeTokenWrapper address _nativeTokenWrapper
) )
Staking20Base( Staking20Base(
_defaultAdmin,
_timeUnit, _timeUnit,
_rewardRatioNumerator, _rewardRatioNumerator,
_rewardRatioDenominator, _rewardRatioDenominator,
+1
View File
@@ -3,6 +3,7 @@
*/ */
export const THIRDWEB_URL = `https://thirdweb.com`; export const THIRDWEB_URL = `https://thirdweb.com`;
// eslint-disable-next-line @typescript-eslint/no-var-requires
export const pkg = require("../../package.json"); export const pkg = require("../../package.json");
export const cliVersion = pkg.version; export const cliVersion = pkg.version;
+3 -3
View File
@@ -137,10 +137,10 @@ export class FoundryBuilder extends BaseBuilder {
// Not to sort the array // Not to sort the array
return object; return object;
} }
var keys = Object.keys(object); const keys = Object.keys(object);
keys.sort(); keys.sort();
var newObject: any = {}; const newObject: any = {};
for (var i = 0; i < keys.length; i++) { for (let i = 0; i < keys.length; i++) {
newObject[keys[i]] = this.sort(object[keys[i]]); newObject[keys[i]] = this.sort(object[keys[i]]);
} }
return newObject; return newObject;
+1 -1
View File
@@ -90,7 +90,7 @@ export class SolcBuilder extends BaseBuilder {
} }
const contractNamesInNamespace = Object.keys(contract); const contractNamesInNamespace = Object.keys(contract);
for (let c of contractNamesInNamespace) { for (const c of contractNamesInNamespace) {
const contractFile = contract[c]; const contractFile = contract[c];
const contractFilePath = join(contractPath, c + ".json"); const contractFilePath = join(contractPath, c + ".json");
writeFileSync( writeFileSync(
+1
View File
@@ -12,6 +12,7 @@ export class TruffleBuilder extends BaseBuilder {
contracts: ContractPayload[]; contracts: ContractPayload[];
}> { }> {
// get the current config first // get the current config first
// eslint-disable-next-line @typescript-eslint/no-var-requires
const truffleConfig = require(join( const truffleConfig = require(join(
options.projectPath, options.projectPath,
"truffle-config.js", "truffle-config.js",
@@ -9,6 +9,7 @@ import { existsSync, readdirSync } from "fs";
import inquirer from "inquirer"; import inquirer from "inquirer";
import { parse } from "path"; import { parse } from "path";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { Confirm } = require("enquirer"); const { Confirm } = require("enquirer");
export default async function detect( export default async function detect(
@@ -2,6 +2,7 @@ import { ContractPayload } from "../interfaces/ContractPayload";
import chalk from "chalk"; import chalk from "chalk";
import prompts from "prompts"; import prompts from "prompts";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { MultiSelect } = require("enquirer"); const { MultiSelect } = require("enquirer");
export function createContractsPrompt( export function createContractsPrompt(
+1 -1
View File
@@ -41,7 +41,7 @@ export function install(
*/ */
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let args: string[]; let args: string[];
let command = packageManager; const command = packageManager;
const useYarn = packageManager === "yarn"; const useYarn = packageManager === "yarn";
if (dependencies && dependencies.length) { if (dependencies && dependencies.length) {

Some files were not shown because too many files have changed in this diff Show More