Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b6b52ea56b Version Packages (#1360)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-18 18:36:39 -07:00
Tair AsimandGitHub da95dce580 [service-utils] handle port in the origin check (#1365) 2023-07-18 21:43:35 +00:00
iketwandGitHub 44dbf283c9 [RN/Storage] Use storage.downloader in RN and pass the clientId (#1362) 2023-07-18 21:04:00 +00:00
+1 d844714609 [All Packages] Pass keys in all packages (#1316)
Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Manan Tank <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
Co-authored-by: Mariano Fuentes <[email protected]>
Co-authored-by: Mariano Fuentes <[email protected]>
Co-authored-by: Adam Majmudar <[email protected]>
Co-authored-by: Farhan Khwaja <[email protected]>
Co-authored-by: Nacho Iacovino <[email protected]>
Co-authored-by: 0xFirekeeper <[email protected]>
2023-07-17 23:54:41 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
5cea8436c1 Version Packages (#1341)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-17 15:10:05 +02:00
Joaquim VergesandGitHub dac8fa7d98 [SDK] Fix getOwned missing last owner for OpenEdition contracts (#1357) 2023-07-15 22:13:58 +00:00
Joaquim VergesandGitHub 7a6534d1a9 [React] Fix wrong enabled logic in useOwnedNFTs (#1356) 2023-07-15 05:02:06 +00:00
Tair AsimandGitHub d5aee62bf4 [service-utils] remove unused type (#1355) 2023-07-14 23:33:28 +00:00
Tair AsimandGitHub 0bfdedd4ba [service-utils] fix enforce auth param (#1354) 2023-07-14 23:18:10 +00:00
Joaquim VergesandGitHub c5761b99e9 [Wallets] Switch local wallet to seed based wallets (#1352) 2023-07-14 23:07:59 +00:00
Tair AsimandGitHub 42d9ab68d9 [service-utils] allow to skip auth for backwards compat (#1353) 2023-07-14 22:27:14 +00:00
farhanW3andGitHub fd0650dcac Farhan/service utils fix (#1351) 2023-07-14 20:52:30 +00:00
Tair AsimandGitHub ddb3dabe69 [service-utils] allow target addresses and api url stringy (#1349) 2023-07-14 19:17:28 +00:00
Manan TankandGitHub b96a228273 [wallets, react] Various improvements (#1350) 2023-07-14 18:26:26 +00:00
Tair AsimandGitHub 781e26d896 [service-utils] authorize bundle (#1347) 2023-07-14 16:47:22 +00:00
Tair AsimandGitHub f7392138ee [service-utils] api url fix (#1346) 2023-07-14 09:52:23 +00:00
Jonas DanielsandGitHub 5eb6fc1bf3 [service-utils] - rewrite (#1345) 2023-07-14 08:21:03 +00:00
Danny FridayandGitHub 7dc685bbec Add creatorWalletAddress to ApiKey type (#1343) 2023-07-14 04:11:26 +00:00
Jonas DanielsandGitHub 4915ac50f8 [service-utils] add relayer service definition (#1342) 2023-07-14 04:02:47 +00:00
Jonas DanielsandGitHub d724ad85c5 [service-utils] - fix use endpoint (#1340) 2023-07-14 00:27:25 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
1d32b299a0 Version Packages (#1337)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-13 16:02:54 -07:00
Tair AsimandGitHub cfa7ecbc9a service-utils: remove crypt + unfetch (#1339) 2023-07-13 22:20:42 +00:00
Jonas DanielsandGitHub 8dd7540c45 [storage] - remove HEAD request pre upload (#1338) 2023-07-13 21:57:30 +00:00
07c7d97c28 [service-utils] - initially add package (#1333)
Co-authored-by: Tair Asim <[email protected]>
2023-07-13 20:51:55 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
47e931e0dd Version Packages (#1336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-13 09:25:13 -07:00
Jonas DanielsandGitHub 0407b2c2f3 [chains] update chains (#1335) 2023-07-13 16:01:04 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
55ffb176f2 Version Packages (#1331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 19:28:04 -07:00
Adam MajmudarandGitHub a9093bcf28 Override binance chain slug (#1330) 2023-07-12 19:17:58 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
db964131b4 Version Packages (#1329)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 18:56:29 -07:00
Adam MajmudarandGitHub 4393b22805 Make base default chain (#1328) 2023-07-12 18:42:27 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b28c3a5a67 Version Packages (#1327)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 18:29:43 -07:00
Adam MajmudarandGitHub 4068219145 [Chains] Add support for base (#1326) 2023-07-13 00:25:33 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
03d1a6d73b Version Packages (#1311)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-11 14:34:02 -07:00
YashandGitHub fd74d79180 [Chains] Update chains: Linea Mainnet (#1320) 2023-07-11 17:42:19 +00:00
Jonas DanielsandGitHub 35f20ceb4f [all] add package resolutions (#1315) 2023-07-11 01:27:22 +00:00
iketwandGitHub db68bd04cd Passes API key to all packages (#1314) 2023-07-10 23:06:05 +00:00
Manan TankandGitHub 3df86ad16f [react] ConnectWallet UI fixes (#1310) 2023-07-10 15:42:50 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4389083ca3 Version Packages (#1294)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-09 22:16:24 -07:00
Jonas DanielsandGitHub 4961b597a0 unblock storage (#1309) 2023-07-10 04:54:23 +00:00
nkrishangandGitHub 7e044c664d [SDK] Create ERC721LoyaltyCard and ERC721UpdatableMetadata (#1299) 2023-07-08 00:55:24 +00:00
iketwandGitHub 498df5d69a [RN] Fix ImageSvgUri render by trying Image first (#1306) 2023-07-07 16:47:53 +00:00
Nacho IacovinoandGitHub b8d4930305 [SDK] Add social_urls to CommonContractSchema (#1305) 2023-07-07 16:30:51 +00:00
Nacho IacovinoandGitHub 2c0bb07899 [SDK] Fix pack code snippets (#1304) 2023-07-07 15:24:34 +00:00
Joaquim VergesandGitHub 72ada47596 [SDK] Proper handling of custom contract metadata types (#1298) 2023-07-07 04:38:27 +00:00
iketwandGitHub dc9eee735c [RN] Improve svg rendering (#1300) 2023-07-07 00:46:12 +00:00
Adam MajmudarandGitHub b4aee9b591 [Wallets] Add all supported chains to safe server urls (#1301) 2023-07-07 00:38:39 +00:00
FirekeeperandGitHub b5c6eedb38 Firekeeper/default chains zksync (#1297) 2023-07-06 22:22:02 +00:00
iketwandGitHub 8672c8533c Ike/demo (#1283) 2023-07-06 22:08:04 +00:00
FirekeeperandGitHub bb207473f8 Firekeeper/default wallets wcv2 (#1293) 2023-07-06 21:00:46 +00:00
Tair AsimandGitHub 10b3a717da fix: handling authz errors from smart wallet connector (#1292) 2023-07-06 19:08:49 +00:00
Josh SteinandGitHub aa81bedaf2 deps: change Taro to Bubs testnet (#1289) 2023-07-06 03:56:52 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b4676e1b4e Version Packages (#1279)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-04 11:48:14 -07:00
Jonas DanielsandGitHub 0135a7790c [storage] - fix head request schema (#1287) 2023-07-04 18:22:56 +00:00
Jonas DanielsandGitHub 2d088d367c [storage] - fix double / case (#1286) 2023-07-04 17:43:01 +00:00
Jonas DanielsandGitHub 546353a479 [storage] - add additional fallback gateways (#1285) 2023-07-04 17:08:03 +00:00
9daf044926 [STORAGE] Use subdomain-based paths for our IPFS gateway (#1232)
Co-authored-by: Jonas Daniels <[email protected]>
2023-07-04 16:14:05 +00:00
Kien NgoandGitHub 7054f9f016 Fix #1201 (#1282) 2023-07-01 00:48:32 +00:00
nkrishangandGitHub a3bb17cb33 [SDK] Handle ERC4337Signer correctly in signTypedDataInternal (#1281) 2023-06-30 23:30:29 +00:00
d03645aefd Omit marketplacev3 filter parameters that have no effect (#1221)
Co-authored-by: Jonas Daniels <[email protected]>
2023-06-30 23:22:24 +00:00
Mariano FuentesandGitHub 53626f8100 Don't rely on package.json to run export (#1280) 2023-06-30 16:59:43 +00:00
Jonas DanielsandGitHub 8a389f1295 [all] - update dependencies (#1278) 2023-06-30 02:55:20 +00:00
346 changed files with 14227 additions and 6019 deletions
+1
View File
@@ -131,3 +131,4 @@ jobs:
run: pnpm e2e
env:
NODE_OPTIONS: "--max_old_space_size=4096"
CLI_E2E_API_KEY: ${{ secrets.CLI_E2E_API_KEY }}
+27 -8
View File
@@ -34,22 +34,41 @@
"packageManager": "[email protected]",
"dependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"@changesets/get-dependents-graph": "^1.3.5",
"@changesets/get-release-plan": "^3.0.16",
"@changesets/cli": "^2.26.2",
"@changesets/get-dependents-graph": "^1.3.6",
"@changesets/get-release-plan": "^3.0.17",
"@changesets/parse": "^0.3.16",
"@manypkg/cli": "^0.20.0",
"@manypkg/cli": "^0.21.0",
"@manypkg/get-packages": "^1.1.3",
"@playwright/test": "1.31.2",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/node": "^18.15.11",
"eslint": "^8.42.0",
"@types/node": "^18.16.18",
"eslint": "^8.45.0",
"mocha": "^10.2.0",
"prettier": "^2.8.7",
"turbo": "^1.9.8",
"prettier": "^3.0.0",
"turbo": "^1.10.7",
"yalc": "1.0.0-pre.53"
},
"manypkg": {
"defaultBranch": "main"
},
"pnpm": {
"overrides": {
"cross-fetch@>=3.0.0 <3.1.5": ">=3.1.5",
"got@<11.8.5": ">=11.8.5",
"glob-parent@<5.1.2": ">=5.1.2",
"node-fetch@<2.6.7": ">=2.6.7",
"nth-check@<2.0.1": ">=2.0.1",
"socket.io-parser@>=4.0.4 <4.2.3": ">=4.2.3",
"fast-xml-parser@<4.2.4": ">=4.2.4",
"@openzeppelin/contracts@>=4.3.0 <4.9.1": ">=4.9.1",
"@openzeppelin/contracts@>=4.7.0 <4.9.2": ">=4.9.2",
"xml2js@<0.5.0": ">=0.5.0",
"engine.io@>=5.1.0 <6.4.2": ">=6.4.2",
"semver@<7.5.2": ">=7.5.2",
"json5@<1.0.2": ">=1.0.2",
"protobufjs@>=6.10.0 <7.2.4": ">=7.2.4",
"tough-cookie@<4.1.3": ">=4.1.3"
}
}
}
+72
View File
@@ -1,5 +1,77 @@
# @thirdweb-dev/auth
## 3.2.17
### Patch Changes
- Updated dependencies [[`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b)]:
- @thirdweb-dev/wallets@1.1.0
## 3.2.16
### Patch Changes
- Updated dependencies [[`c5761b99`](https://github.com/thirdweb-dev/js/commit/c5761b99e9797772481506e90cbfa5c35a05bd1d), [`b96a2282`](https://github.com/thirdweb-dev/js/commit/b96a2282730582b684cc96802649a96851af5220)]:
- @thirdweb-dev/wallets@1.0.12
## 3.2.15
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.11
## 3.2.14
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.10
## 3.2.13
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.9
## 3.2.12
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.8
## 3.2.11
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.7
## 3.2.10
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.6
## 3.2.9
### Patch Changes
- Updated dependencies [[`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58)]:
- @thirdweb-dev/wallets@1.0.5
## 3.2.8
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
- Updated dependencies [[`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2)]:
- @thirdweb-dev/wallets@1.0.4
## 3.2.7
### Patch Changes
+19 -19
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "3.2.7",
"version": "3.2.17",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
@@ -80,29 +80,29 @@
}
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@microsoft/api-documenter": "^7.19.4",
"@microsoft/api-extractor": "^7.29.2",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@microsoft/api-documenter": "^7.22.21",
"@microsoft/api-extractor": "^7.36.0",
"@microsoft/tsdoc": "^0.14.1",
"@preconstruct/cli": "^2.2.1",
"@preconstruct/cli": "^2.7.0",
"@solana/web3.js": "^1.62.0",
"@swc-node/register": "^1.5.1",
"@swc/core": "^1.3.23",
"@swc-node/register": "^1.6.6",
"@swc/core": "^1.3.67",
"@thirdweb-dev/tsconfig": "workspace:*",
"@types/chai": "^4.3.3",
"@types/chai": "^4.3.5",
"@types/cookie": "^0.5.1",
"@types/cookie-parser": "^1.4.3",
"@types/express": "^4.17.13",
"@types/mocha": "^10.0.0",
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"chai": "^4.3.6",
"cookie-parser": "^1.4.6",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.3.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-thirdweb": "workspace:*",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-inclusive-language": "^2.2.0",
@@ -111,10 +111,10 @@
"ethers": "^5.7.2",
"express": "^4.18.1",
"mocha": "^10.2.0",
"next": "^12.2.0",
"next-auth": "^4.20.1",
"prettier": "^2.7.1",
"typescript": "^4.7.4"
"next": "^12.3.4",
"next-auth": "^4.22.1",
"prettier": "^3.0.0",
"typescript": "^5.1.6"
},
"peerDependencies": {
"@solana/web3.js": "^1.73.0",
+62
View File
@@ -1,5 +1,67 @@
# @thirdweb-dev/chains
## 0.1.35
### Patch Changes
- [#1316](https://github.com/thirdweb-dev/js/pull/1316) [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b) Thanks [@iketw](https://github.com/iketw)! - Adds support for clientId / secretKey
## 0.1.34
### Patch Changes
- [#1338](https://github.com/thirdweb-dev/js/pull/1338) [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
## 0.1.33
### Patch Changes
- [#1335](https://github.com/thirdweb-dev/js/pull/1335) [`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains again
## 0.1.32
### Patch Changes
- [#1330](https://github.com/thirdweb-dev/js/pull/1330) [`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95) Thanks [@adam-maj](https://github.com/adam-maj)! - Override binance slug
## 0.1.31
### Patch Changes
- [#1328](https://github.com/thirdweb-dev/js/pull/1328) [`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5) Thanks [@adam-maj](https://github.com/adam-maj)! - Make base default chain
## 0.1.30
### Patch Changes
- [#1326](https://github.com/thirdweb-dev/js/pull/1326) [`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2) Thanks [@adam-maj](https://github.com/adam-maj)! - Add base chain support
## 0.1.29
### Patch Changes
- [#1320](https://github.com/thirdweb-dev/js/pull/1320) [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Linea mainnet support
- [#1315](https://github.com/thirdweb-dev/js/pull/1315) [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a) Thanks [@jnsdls](https://github.com/jnsdls)! - add more chains
## 0.1.28
### Patch Changes
- [#1299](https://github.com/thirdweb-dev/js/pull/1299) [`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5) Thanks [@nkrishang](https://github.com/nkrishang)! - Add ERC721LoyaltyCard and ERC721UpdatableMetadata
- [#1297](https://github.com/thirdweb-dev/js/pull/1297) [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - add zksync as default chain
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
## 0.1.27
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
- [#1281](https://github.com/thirdweb-dev/js/pull/1281) [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96) Thanks [@nkrishang](https://github.com/nkrishang)! - Handle ERC4337Signer correctly for signTypedData
## 0.1.26
### Patch Changes
@@ -20,12 +20,12 @@ export default {
"nativeCurrency": {
"name": "SMR",
"symbol": "SMR",
"decimals": 18
"decimals": 6
},
"infoURL": "https://shimmer.network",
"shortName": "shimmerevm-testnet",
"chainId": 1071,
"networkId": 1071,
"chainId": 1072,
"networkId": 1072,
"explorers": [
{
"name": "explorer",
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"name": "Mintara Testnet",
"title": "Mintara Testnet",
"chain": "Mintara",
"icon": {
"url": "ipfs://bafybeie7jzlzlpz7c3a3oh4x5joej23dj2qf3cexmchjyc72hv3fblcaja",
"width": 256,
"height": 256,
"format": "png"
},
"rpc": [
"https://mintara-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/mintara/testnet/rpc"
],
"faucets": [],
"nativeCurrency": {
"name": "MINTARA",
"symbol": "MNTR",
"decimals": 18
},
"infoURL": "https://playthink.co.jp",
"shortName": "mintara-testnet",
"chainId": 1079,
"networkId": 1079,
"explorers": [
{
"name": "explorer",
"url": "https://subnets-test.avax.network/mintara",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "mintara-testnet"
} as const satisfies Chain;
+41
View File
@@ -0,0 +1,41 @@
import type { Chain } from "../src/types";
export default {
"name": "Metachain One Mainnet",
"chain": "METAO",
"icon": {
"url": "ipfs://QmTmo2QAtX5PbhX96vewnvH4Vc5H83Ft2DJGi6tAqTcFij",
"width": 1000,
"height": 981,
"format": "png"
},
"rpc": [
"https://metachain-one.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.metachain.one",
"https://rpc2.metachain.one"
],
"faucets": [],
"nativeCurrency": {
"name": "Metao",
"symbol": "METAO",
"decimals": 18
},
"infoURL": "https://metachain.one",
"shortName": "metao",
"chainId": 112358,
"networkId": 112358,
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.metachain.one",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "metachain-one"
} as const satisfies Chain;
+4 -4
View File
@@ -1,9 +1,9 @@
import type { Chain } from "../src/types";
export default {
"name": "ChainX-EVM",
"name": "BEVM",
"chain": "ChainX",
"rpc": [
"https://chainx-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bevm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.chainx.org/rpc",
"https://mainnet2.chainx.org/rpc"
],
@@ -19,11 +19,11 @@ export default {
"networkId": 1501,
"explorers": [
{
"name": "chainx-evm scan",
"name": "bevm scan",
"url": "https://evm.chainx.org",
"standard": "none"
}
],
"testnet": false,
"slug": "chainx-evm"
"slug": "bevm"
} as const satisfies Chain;
+9 -9
View File
@@ -1,8 +1,8 @@
import type { Chain } from "../src/types";
export default {
"name": "Taro Testnet",
"name": "Bubs Testnet",
"chain": "gETH",
"shortName": "Taro",
"shortName": "Bubs",
"chainId": 1582,
"testnet": true,
"icon": {
@@ -12,8 +12,8 @@ export default {
"height": 512
},
"rpc": [
"https://taro-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://taro-testnet.calderachain.xyz/http"
"https://bubs-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bubs.calderachain.xyz/http"
],
"nativeCurrency": {
"decimals": 18,
@@ -22,15 +22,15 @@ export default {
},
"explorers": [
{
"url": "https://explorer.tarotestnet.com",
"name": "Taro Testnet Explorer",
"url": "https://explorer.bubstestnet.com",
"name": "Bubs Testnet Explorer",
"standard": "EIP3091"
}
],
"faucets": [
"https://tarotestnet.com"
"https://bubstestnet.com"
],
"infoURL": "https://tarotestnet.com",
"infoURL": "https://bubstestnet.com",
"networkId": 1582,
"slug": "taro-testnet"
"slug": "bubs-testnet"
} as const satisfies Chain;
+34
View File
@@ -0,0 +1,34 @@
import type { Chain } from "../src/types";
export default {
"name": "MXC zkEVM Mainnet",
"chain": "MXC zkEVM",
"icon": {
"url": "ipfs://QmdGCthKA11K9kCZJdbTP5WPAyq1wiRZ3REn6KG58MrWaE",
"width": 159,
"height": 159,
"format": "png"
},
"rpc": [
"https://mxc-zkevm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.mxc.com"
],
"faucets": [],
"nativeCurrency": {
"name": "MXC zkEVM Mainnet",
"symbol": "MXC",
"decimals": 18
},
"infoURL": "https://doc.mxc.com/docs/intro",
"shortName": "MXCzkEVM",
"chainId": 18686,
"networkId": 18686,
"explorers": [
{
"name": "MXC zkEVM Mainnet",
"url": "https://explorer.mxc.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "mxc-zkevm"
} as const satisfies Chain;
+44
View File
@@ -0,0 +1,44 @@
import type { Chain } from "../src/types";
export default {
"name": "Moonsama Network",
"chain": "MSN",
"rpc": [
"https://moonsama-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.moonsama.com",
"wss://rpc.moonsama.com/ws"
],
"faucets": [
"https://multiverse.moonsama.com/faucet"
],
"nativeCurrency": {
"name": "Sama Token",
"symbol": "SAMA",
"decimals": 18
},
"infoURL": "https://moonsama.com",
"shortName": "msn",
"chainId": 2199,
"networkId": 2199,
"slip44": 2199,
"icon": {
"url": "ipfs://QmaQxfwpXYTomUd24PMx5tKjosupXcm99z1jL1XLq9LWBS",
"width": 468,
"height": 468,
"format": "png"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.moonsama.com",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "moonsama-network"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Antofy Mainnet",
"chain": "ABN",
"icon": {
"url": "ipfs://QmdTfku81ohnG9ECU1Xswmeumt678cBhwHWuFYZ7i1Qsto",
"width": 400,
"height": 400,
"format": "png"
},
"rpc": [
"https://antofy.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.antofy.io"
],
"faucets": [
"https://faucet.antofy.io"
],
"nativeCurrency": {
"name": "Antofy",
"symbol": "ABN",
"decimals": 18
},
"infoURL": "https://antofy.io",
"shortName": "ABNm",
"chainId": 2202,
"networkId": 2202,
"explorers": [
{
"name": "Antofy Mainnet",
"url": "https://antofyscan.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "antofy"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Antofy Testnet",
"chain": "ABN",
"icon": {
"url": "ipfs://QmdTfku81ohnG9ECU1Xswmeumt678cBhwHWuFYZ7i1Qsto",
"width": 400,
"height": 400,
"format": "png"
},
"rpc": [
"https://antofy-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.antofy.io"
],
"faucets": [
"https://faucet.antofy.io"
],
"nativeCurrency": {
"name": "Antofy",
"symbol": "ABN",
"decimals": 18
},
"infoURL": "https://antofy.io",
"shortName": "ABNt",
"chainId": 23006,
"networkId": 23006,
"explorers": [
{
"name": "Antofy Testnet",
"url": "https://test.antofyscan.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "antofy-testnet"
} as const satisfies Chain;
@@ -2,10 +2,10 @@ import type { Chain } from "../src/types";
export default {
"name": "Kroma Sepolia",
"title": "Kroma Testnet Sepolia",
"chainId": 2357,
"chainId": 2358,
"shortName": "kroma-sepolia",
"chain": "ETH",
"networkId": 2357,
"networkId": 2358,
"nativeCurrency": {
"name": "Sepolia Ether",
"symbol": "ETH",
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Plinga Mainnet",
"chain": "Plinga",
"icon": {
"url": "ipfs://bafybeibpvlod5nyev6wyuvp6pbestmgvru3ovbadsul32odpno26xwld6y",
"width": 1039,
"height": 1022,
"format": "svg"
},
"rpc": [
"https://plinga.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpcurl.mainnet.plgchain.com",
"https://rpcurl.plgchain.blockchain.evmnode.online",
"https://rpcurl.mainnet.plgchain.plinga.technology"
],
"faucets": [],
"nativeCurrency": {
"name": "Plinga",
"symbol": "PLINGA",
"decimals": 18
},
"infoURL": "https://www.plinga.technology/",
"shortName": "plgchain",
"chainId": 242,
"networkId": 242,
"explorers": [
{
"name": "plgscan",
"url": "https://www.plgscan.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "plinga"
} as const satisfies Chain;
+1 -4
View File
@@ -2,10 +2,7 @@ import type { Chain } from "../src/types";
export default {
"name": "Neon EVM MainNet",
"chain": "Solana",
"rpc": [
"https://neon-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.neonevm.org"
],
"rpc": [],
"faucets": [],
"icon": {
"url": "ipfs://Qmcxevb3v8PEvnvfYgcG3bCBuPhe5YAdsHeaufDChSSR3Q",
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "EgonCoin Mainnet",
"chain": "EGON",
"icon": {
"url": "ipfs://QmNZiMmzMQYjyGtNSghtzLg4UooYhDgMQsa677DAP5KsBg",
"width": 512,
"height": 512,
"format": "png"
},
"rpc": [
"https://egoncoin.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.egcscan.com"
],
"faucets": [
"https://faucet.egcscan.com"
],
"nativeCurrency": {
"name": "EgonCoin",
"symbol": "EGON",
"decimals": 18
},
"infoURL": "https://egcscan.com",
"shortName": "EGONm",
"chainId": 271,
"networkId": 271,
"explorers": [
{
"name": "EgonCoin Mainnet",
"url": "https://egcscan.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "egoncoin"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "EgonCoin Testnet",
"chain": "EGON",
"icon": {
"url": "ipfs://QmNZiMmzMQYjyGtNSghtzLg4UooYhDgMQsa677DAP5KsBg",
"width": 512,
"height": 512,
"format": "png"
},
"rpc": [
"https://egoncoin-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpctest.egcscan.com"
],
"faucets": [
"https://faucet.egcscan.com"
],
"nativeCurrency": {
"name": "EgonCoin",
"symbol": "EGON",
"decimals": 18
},
"infoURL": "https://egcscan.com",
"shortName": "EGONt",
"chainId": 271271,
"networkId": 271271,
"explorers": [
{
"name": "EgonCoin Testnet",
"url": "https://testnet.egcscan.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "egoncoin-testnet"
} as const satisfies Chain;
+6 -1
View File
@@ -4,7 +4,12 @@ export default {
"chain": "ETH",
"rpc": [
"https://boba-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.boba.network/"
"https://mainnet.boba.network",
"https://replica.boba.network",
"http://boba-ethereum.gateway.tenderly.co",
"http://gateway.tenderly.co/public/boba-ethereum",
"wss://boba-ethereum.gateway.tenderly.co/",
"wss://gateway.tenderly.co/public/boba-ethereum"
],
"faucets": [],
"nativeCurrency": {
+4 -3
View File
@@ -4,7 +4,8 @@ export default {
"chain": "ETH",
"rpc": [
"https://boba-network-goerli-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://goerli.boba.network/"
"https://goerli.boba.network/",
"wss://wss.goerli.boba.network/"
],
"faucets": [],
"nativeCurrency": {
@@ -13,7 +14,7 @@ export default {
"decimals": 18
},
"infoURL": "https://boba.network",
"shortName": "Bobagoerli",
"shortName": "BobaGoerli",
"chainId": 2888,
"networkId": 2888,
"explorers": [
@@ -28,7 +29,7 @@ export default {
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.goerli.boba.network"
"url": "https://gateway.boba.network"
}
]
},
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Botanix Testnet",
"chain": "BTC",
"icon": {
"url": "ipfs://Qmf2iSjcrZwUDKhCVY9ZzfbSV2He2HSssbcG2yMz1mDerm",
"width": 32,
"height": 32,
"format": "png"
},
"rpc": [
"https://botanix-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.btxtestchain.com"
],
"faucets": [
"https://faucet.btxtestchain.com"
],
"nativeCurrency": {
"name": "Botanix",
"symbol": "BTC",
"decimals": 18
},
"infoURL": "https://btxtestchain.com",
"shortName": "BTCt",
"chainId": 3636,
"networkId": 3636,
"explorers": [
{
"name": "Botanix",
"url": "https://testnet.btxtestchain.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "botanix-testnet"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Botanix Mainnet",
"chain": "BTC",
"icon": {
"url": "ipfs://Qmf2iSjcrZwUDKhCVY9ZzfbSV2He2HSssbcG2yMz1mDerm",
"width": 32,
"height": 32,
"format": "png"
},
"rpc": [
"https://botanix.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.btxtestchain.com"
],
"faucets": [
"https://faucet.btxtestchain.com"
],
"nativeCurrency": {
"name": "Botanix",
"symbol": "BTC",
"decimals": 18
},
"infoURL": "https://btxtestchain.com",
"shortName": "BTCm",
"chainId": 3637,
"networkId": 3637,
"explorers": [
{
"name": "Botanix",
"url": "https://btxtestchain.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "botanix"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "SenjePowers Testnet",
"chain": "SPC",
"icon": {
"url": "ipfs://QmcpyTj4hUyHJZ2VmSdkXFpPpRcNKRP1VxMs7Cp1anymNy",
"width": 504,
"height": 495,
"format": "png"
},
"rpc": [
"https://senjepowers-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.senjepowersscan.com"
],
"faucets": [
"https://faucet.senjepowersscan.com"
],
"nativeCurrency": {
"name": "SenjePowers",
"symbol": "SPC",
"decimals": 18
},
"infoURL": "https://senjepowersscan.com",
"shortName": "SPCt",
"chainId": 3698,
"networkId": 3698,
"explorers": [
{
"name": "SenjePowers",
"url": "https://testnet.senjepowersscan.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "senjepowers-testnet"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "SenjePowers Mainnet",
"chain": "SPC",
"icon": {
"url": "ipfs://QmcpyTj4hUyHJZ2VmSdkXFpPpRcNKRP1VxMs7Cp1anymNy",
"width": 504,
"height": 495,
"format": "png"
},
"rpc": [
"https://senjepowers.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.senjepowersscan.com"
],
"faucets": [
"https://faucet.senjepowersscan.com"
],
"nativeCurrency": {
"name": "SenjePowers",
"symbol": "SPC",
"decimals": 18
},
"infoURL": "https://senjepowersscan.com",
"shortName": "SPCm",
"chainId": 3699,
"networkId": 3699,
"explorers": [
{
"name": "SenjePowers",
"url": "https://senjepowersscan.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "senjepowers"
} as const satisfies Chain;
+48
View File
@@ -0,0 +1,48 @@
import type { Chain } from "../src/types";
export default {
"name": "AltLayer Zero Gas Network",
"chain": "ETH",
"rpc": [
"https://altlayer-zero-gas-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://zero.alt.technology"
],
"faucets": [],
"nativeCurrency": {
"name": "ZERO",
"symbol": "ZERO",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://altlayer.io",
"shortName": "alt-zerogas",
"chainId": 4000003,
"networkId": 4000003,
"icon": {
"url": "ipfs://QmcEfZJU7NMn9ycTAcEooQgGNfa2nYBToSUZHdFCFadcjb",
"width": 1080,
"height": 1025,
"format": "png"
},
"explorers": [
{
"name": "blockscout",
"url": "https://zero-explorer.alt.technology",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "altlayer-zero-gas-network"
} as const satisfies Chain;
+57
View File
@@ -0,0 +1,57 @@
import type { Chain } from "../src/types";
export default {
"name": "PGN (Public Goods Network)",
"chain": "ETH",
"rpc": [
"https://pgn-public-goods-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.publicgoods.network"
],
"faucets": [],
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://publicgoods.network/",
"shortName": "PGN",
"chainId": 424,
"networkId": 424,
"icon": {
"url": "ipfs://QmUVJ7MLCEAfq3pHVPFLscqRMiyAY5biVgTkeDQCmAhHNS",
"width": 574,
"height": 574,
"format": "svg"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.publicgoods.network",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"parent": {
"type": "L2",
"chain": "eip155-1",
"bridges": [
{
"url": "https://bridge.publicgoods.network"
}
]
},
"testnet": false,
"slug": "pgn-public-goods-network"
} as const satisfies Chain;
+10 -2
View File
@@ -6,8 +6,7 @@ export default {
"https://bobafuji-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.avax.boba.network",
"wss://wss.testnet.avax.boba.network",
"https://replica.testnet.avax.boba.network",
"wss://replica-wss.testnet.avax.boba.network"
"https://replica.testnet.avax.boba.network"
],
"faucets": [],
"nativeCurrency": {
@@ -26,6 +25,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": true,
"slug": "bobafuji-testnet"
} as const satisfies Chain;
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "MEVerse Chain Testnet",
"chain": "MEVerse",
"rpc": [
"https://meverse-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.meversetestnet.io"
],
"faucets": [],
"nativeCurrency": {
"name": "MEVerse",
"symbol": "MEV",
"decimals": 18
},
"infoURL": "https://www.meverse.sg",
"shortName": "TESTMEV",
"chainId": 4759,
"networkId": 4759,
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
},
"explorers": [
{
"name": "MEVerse Chain Testnet Explorer",
"url": "https://testnet.meversescan.io",
"standard": "none",
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
}
}
],
"testnet": true,
"slug": "meverse-chain-testnet"
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"name": "Shinarium Beta",
"chain": "Shinarium",
"rpc": [
"https://shinarium-beta.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.shinarium.org"
],
"faucets": [
"https://faucet.shinarium.org"
],
"nativeCurrency": {
"name": "Shina Inu",
"symbol": "SHI",
"decimals": 18
},
"infoURL": "https://shinarium.org",
"shortName": "shi",
"chainId": 534849,
"networkId": 534849,
"explorers": [
{
"name": "shinascan",
"url": "https://shinascan.shinarium.org",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "shinarium-beta"
} as const satisfies Chain;
+37
View File
@@ -0,0 +1,37 @@
import type { Chain } from "../src/types";
export default {
"name": "Toronet Testnet",
"chain": "Toronet",
"icon": {
"url": "ipfs://QmciSvgLatP6jhgdazuiyD3fSrhipfAN7wC943v1qxcrpv",
"width": 846,
"height": 733,
"format": "png"
},
"rpc": [
"https://toronet-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"http://testnet.toronet.org/rpc"
],
"faucets": [],
"nativeCurrency": {
"name": "Toro",
"symbol": "TORO",
"decimals": 18
},
"infoURL": "https://toronet.org",
"shortName": "ToronetTestnet",
"chainId": 54321,
"networkId": 54321,
"ens": {
"registry": "0x059C474f26D65B0458F9da10A649a7322aB02C09"
},
"explorers": [
{
"name": "toronet_explorer",
"url": "https://testnet.toronet.org",
"standard": "none"
}
],
"testnet": true,
"slug": "toronet-testnet"
} as const satisfies Chain;
+7 -7
View File
@@ -1,6 +1,6 @@
import type { Chain } from "../src/types";
export default {
"name": "Binance Smart Chain Mainnet",
"name": "BNB Smart Chain Mainnet",
"chain": "BSC",
"rpc": [
"https://binance.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
@@ -14,20 +14,20 @@ export default {
"https://bsc-dataseed3.defibit.io",
"https://bsc-dataseed2.defibit.io",
"https://bsc-dataseed1.defibit.io",
"https://bsc-dataseed4.binance.org",
"https://bsc-dataseed3.binance.org",
"https://bsc-dataseed2.binance.org",
"https://bsc-dataseed1.binance.org"
"https://bsc-dataseed4.bnbchain.org",
"https://bsc-dataseed3.bnbchain.org",
"https://bsc-dataseed2.bnbchain.org",
"https://bsc-dataseed1.bnbchain.org"
],
"faucets": [
"https://free-online-app.com/faucet-for-eth-evm-chains/"
],
"nativeCurrency": {
"name": "Binance Chain Native Token",
"name": "BNB Chain Native Token",
"symbol": "BNB",
"decimals": 18
},
"infoURL": "https://www.binance.org",
"infoURL": "https://www.bnbchain.org/en",
"shortName": "bnb",
"chainId": 56,
"networkId": 56,
+13 -2
View File
@@ -5,9 +5,11 @@ export default {
"rpc": [
"https://boba-bnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bnb.boba.network",
"wss://wss.bnb.boba.network",
"http://boba-bnb.gateway.tenderly.co/",
"http://gateway.tenderly.co/public/boba-bnb",
"https://replica.bnb.boba.network",
"wss://replica-wss.bnb.boba.network"
"wss://boba-bnb.gateway.tenderly.co/",
"wss://gateway.tenderly.co/public/boba-bnb"
],
"faucets": [],
"nativeCurrency": {
@@ -26,6 +28,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": false,
"slug": "boba-bnb"
} as const satisfies Chain;
+1
View File
@@ -5,6 +5,7 @@ export default {
"rpc": [
"https://rollux.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.rollux.com",
"https://rollux.public-rpc.com",
"wss://rpc.rollux.com/wss",
"https://rpc.ankr.com/rollux/${ANKR_API_KEY}"
],
+57
View File
@@ -0,0 +1,57 @@
import type { Chain } from "../src/types";
export default {
"name": "Sepolia PGN (Public Goods Network)",
"chain": "ETH",
"rpc": [
"https://sepolia-pgn-public-goods-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://sepolia.publicgoods.network"
],
"faucets": [],
"nativeCurrency": {
"name": "Sepolia Ether",
"symbol": "ETH",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://publicgoods.network/",
"shortName": "sepPGN",
"chainId": 58008,
"networkId": 58008,
"icon": {
"url": "ipfs://QmUVJ7MLCEAfq3pHVPFLscqRMiyAY5biVgTkeDQCmAhHNS",
"width": 574,
"height": 574,
"format": "svg"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.sepolia.publicgoods.network",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"parent": {
"type": "L2",
"chain": "eip155-11155111",
"bridges": [
{
"url": "https://pgn-bridge.vercel.app/bridge"
}
]
},
"testnet": false,
"slug": "sepolia-pgn-public-goods-network"
} as const satisfies Chain;
+32
View File
@@ -0,0 +1,32 @@
import type { Chain } from "../src/types";
export default {
"name": "Linea Mainnet",
"chain": "Linea Mainnet",
"shortName": "linea-mainnet",
"chainId": 59144,
"testnet": false,
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"rpc": [],
"explorers": [
{
"name": "Linea Scan",
"url": "https://lineascan.build",
"standard": ""
}
],
"faucets": [
"https://www.infura.io/faucet/linea"
],
"infoURL": "https://docs.linea.build/overview",
"icon": {
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
"height": 512,
"width": 512,
"format": "svg"
},
"slug": "linea"
} as const satisfies Chain;
+53
View File
@@ -0,0 +1,53 @@
import type { Chain } from "../src/types";
export default {
"name": "Cascadia Testnet",
"chain": "Cascadia",
"rpc": [
"https://cascadia-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.cascadia.foundation"
],
"faucets": [
"https://www.cascadia.foundation/faucet"
],
"nativeCurrency": {
"name": "CC",
"symbol": "tCC",
"decimals": 18
},
"infoURL": "https://www.cascadia.foundation",
"shortName": "cascadia",
"chainId": 6102,
"networkId": 6102,
"icon": {
"url": "ipfs://QmQtcwxNiJ9D1QDz4k6jZ7qacLcqMk6CeW85TTBWBvNp3z",
"width": 256,
"height": 256,
"format": "png"
},
"explorers": [
{
"name": "Cascadia EVM Explorer",
"url": "https://explorer.cascadia.foundation",
"standard": "none",
"icon": {
"url": "ipfs://QmQtcwxNiJ9D1QDz4k6jZ7qacLcqMk6CeW85TTBWBvNp3z",
"width": 256,
"height": 256,
"format": "png"
}
},
{
"name": "Cascadia Cosmos Explorer",
"url": "https://validator.cascadia.foundation",
"standard": "none",
"icon": {
"url": "ipfs://QmQtcwxNiJ9D1QDz4k6jZ7qacLcqMk6CeW85TTBWBvNp3z",
"width": 256,
"height": 256,
"format": "png"
}
}
],
"testnet": true,
"slug": "cascadia-testnet"
} as const satisfies Chain;
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "Avocado",
"chain": "Avocado",
"rpc": [
"https://avocado.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.avocado.instadapp.io"
],
"faucets": [],
"nativeCurrency": {
"name": "USDC",
"symbol": "USDC",
"decimals": 18
},
"infoURL": "https://avocado.instadapp.io",
"shortName": "avocado",
"chainId": 634,
"networkId": 634,
"icon": {
"url": "ipfs://Qma9rJSgy32UL1iXtXKFZQJA6FjkcUcDU4HR6y13Wu1vjn",
"width": 600,
"height": 600,
"format": "png"
},
"explorers": [
{
"name": "avoscan",
"url": "https://avoscan.co",
"icon": {
"url": "ipfs://Qma9rJSgy32UL1iXtXKFZQJA6FjkcUcDU4HR6y13Wu1vjn",
"width": 600,
"height": 600,
"format": "png"
},
"standard": "none"
}
],
"testnet": false,
"slug": "avocado"
} as const satisfies Chain;
+34
View File
@@ -0,0 +1,34 @@
import type { Chain } from "../src/types";
export default {
"name": "ALL Mainnet",
"chain": "ALL",
"icon": {
"url": "ipfs://bafkreibqe2mgiqezi24sx272kunqt6pv7uzxhpkxuobvpbsptce3q6nn5i",
"width": 1000,
"height": 1000,
"format": "png"
},
"rpc": [
"https://all.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet-rpc.alltra.global"
],
"faucets": [],
"nativeCurrency": {
"name": "ALL",
"symbol": "ALL",
"decimals": 18
},
"infoURL": "https://alltra.world",
"shortName": "ALL",
"chainId": 651940,
"networkId": 651940,
"explorers": [
{
"name": "Alltra SmartChain Explorer",
"url": "https://alltra.global",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "all"
} as const satisfies Chain;
+1 -2
View File
@@ -10,8 +10,7 @@ export default {
},
"rpc": [
"https://zetachain-athens-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://zetachain-athens-evm.blockpi.network/v1/rpc/public",
"wss://zetachain-athens.blockpi.network/rpc/v1/public/websocket"
"https://api.athens2.zetachain.com/evm"
],
"faucets": [
"https://labs.zetachain.com/get-zeta"
+34
View File
@@ -0,0 +1,34 @@
import type { Chain } from "../src/types";
export default {
"name": "Bitrock Mainnet",
"chain": "Bitrock",
"icon": {
"url": "ipfs://QmfXZCAh3HWS2bJroUStN9TieL4QA9QArMotie3X4pwBfj",
"width": 72,
"height": 72,
"format": "svg"
},
"rpc": [
"https://bitrock.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://connect.bit-rock.io"
],
"faucets": [],
"nativeCurrency": {
"name": "BITROCK",
"symbol": "BROCK",
"decimals": 18
},
"infoURL": "https://bit-rock.io",
"shortName": "bitrock",
"chainId": 7171,
"networkId": 7171,
"explorers": [
{
"name": "Bitrock Explorer",
"url": "https://scan.bit-rock.io",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "bitrock"
} as const satisfies Chain;
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "MEVerse Chain Mainnet",
"chain": "MEVerse",
"rpc": [
"https://meverse-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.meversemainnet.io"
],
"faucets": [],
"nativeCurrency": {
"name": "MEVerse",
"symbol": "MEV",
"decimals": 18
},
"infoURL": "https://www.meverse.sg",
"shortName": "MEV",
"chainId": 7518,
"networkId": 7518,
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
},
"explorers": [
{
"name": "MEVerse Chain Explorer",
"url": "https://www.meversescan.io",
"standard": "none",
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
}
}
],
"testnet": false,
"slug": "meverse-chain"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Bitrock Testnet",
"chain": "Bitrock",
"icon": {
"url": "ipfs://QmfXZCAh3HWS2bJroUStN9TieL4QA9QArMotie3X4pwBfj",
"width": 72,
"height": 72,
"format": "svg"
},
"rpc": [
"https://bitrock-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.bit-rock.io"
],
"faucets": [
"https://faucet.bit-rock.io"
],
"nativeCurrency": {
"name": "BITROCK",
"symbol": "BROCK",
"decimals": 18
},
"infoURL": "https://bit-rock.io",
"shortName": "tbitrock",
"chainId": 7771,
"networkId": 7771,
"explorers": [
{
"name": "Bitrock Testnet Explorer",
"url": "https://testnetscan.bit-rock.io",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "bitrock-testnet"
} as const satisfies Chain;
+37
View File
@@ -0,0 +1,37 @@
import type { Chain } from "../src/types";
export default {
"name": "Toronet Mainnet",
"chain": "Toronet",
"icon": {
"url": "ipfs://QmciSvgLatP6jhgdazuiyD3fSrhipfAN7wC943v1qxcrpv",
"width": 846,
"height": 733,
"format": "png"
},
"rpc": [
"https://toronet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"http://toronet.org/rpc"
],
"faucets": [],
"nativeCurrency": {
"name": "Toro",
"symbol": "TORO",
"decimals": 18
},
"infoURL": "https://toronet.org",
"shortName": "Toronet",
"chainId": 77777,
"networkId": 77777,
"ens": {
"registry": "0x1f45a71f4aAD769E27c969c4359E0e250C67165c"
},
"explorers": [
{
"name": "toronet_explorer",
"url": "https://toronet.org/explorer",
"standard": "none"
}
],
"testnet": false,
"slug": "toronet"
} as const satisfies Chain;
+42
View File
@@ -0,0 +1,42 @@
import type { Chain } from "../src/types";
export default {
"name": "ARDENIUM Athena",
"chain": "ATHENA",
"rpc": [
"https://ardenium-athena.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc-athena.ardescan.com/"
],
"faucets": [
"https://faucet-athena.ardescan.com/"
],
"nativeCurrency": {
"name": "ARD",
"symbol": "tARD",
"decimals": 18
},
"infoURL": "https://ardenium.org",
"shortName": "ard",
"chainId": 7895,
"networkId": 7895,
"icon": {
"url": "ipfs://QmdwifhejRfF8QfyzYrNdFVhfhCR6iuzWMmppK4eL7kttG",
"width": 120,
"height": 120,
"format": "png"
},
"explorers": [
{
"name": "ARDENIUM Athena Explorer",
"icon": {
"url": "ipfs://QmdwifhejRfF8QfyzYrNdFVhfhCR6iuzWMmppK4eL7kttG",
"width": 120,
"height": 120,
"format": "png"
},
"url": "https://testnet.ardscan.com",
"standard": "none"
}
],
"testnet": true,
"slug": "ardenium-athena"
} as const satisfies Chain;
+17 -2
View File
@@ -2,7 +2,10 @@ import type { Chain } from "../src/types";
export default {
"name": "Base",
"chain": "ETH",
"rpc": [],
"rpc": [
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://developer-access-mainnet.base.org/"
],
"faucets": [],
"nativeCurrency": {
"name": "Ether",
@@ -13,13 +16,25 @@ export default {
"shortName": "base",
"chainId": 8453,
"networkId": 8453,
"status": "incubating",
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"explorers": [
{
"name": "basescout",
"url": "https://base.blockscout.com",
"standard": "none"
},
{
"name": "basescan",
"url": "https://basescan.org",
"standard": "none"
}
],
"status": "active",
"testnet": false,
"slug": "base"
} as const satisfies Chain;
+6 -6
View File
@@ -18,6 +18,12 @@ export default {
"shortName": "basegor",
"chainId": 84531,
"networkId": 84531,
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"explorers": [
{
"name": "basescout",
@@ -31,11 +37,5 @@ export default {
}
],
"testnet": true,
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"slug": "base-goerli"
} as const satisfies Chain;
+2 -13
View File
@@ -26,19 +26,8 @@ export default {
},
"explorers": [
{
"name": "Evmos EVM Explorer",
"url": "https://evm.evmos.dev",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmeZW6VKUFTbz7PPW8PmDR3ZHa6osYPLBFPnW8T5LSU49c",
"width": 400,
"height": 400,
"format": "png"
}
},
{
"name": "Evmos Cosmos Explorer",
"url": "https://explorer.evmos.dev",
"name": "Evmos Explorer (Escan)",
"url": "https://testnet.escan.live",
"standard": "none",
"icon": {
"url": "ipfs://QmeZW6VKUFTbz7PPW8PmDR3ZHa6osYPLBFPnW8T5LSU49c",
+1 -13
View File
@@ -4,7 +4,6 @@ export default {
"chain": "Evmos",
"rpc": [
"https://evmos.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://eth.bd.evmos.org:8545",
"https://evmos-evm.publicnode.com"
],
"faucets": [],
@@ -25,7 +24,7 @@ export default {
},
"explorers": [
{
"name": "Evmos EVM Explorer (Escan)",
"name": "Evmos Explorer (Escan)",
"url": "https://escan.live",
"standard": "none",
"icon": {
@@ -34,17 +33,6 @@ export default {
"height": 400,
"format": "png"
}
},
{
"name": "Evmos Cosmos Explorer (Mintscan)",
"url": "https://www.mintscan.io/evmos",
"standard": "none",
"icon": {
"url": "ipfs://QmeZW6VKUFTbz7PPW8PmDR3ZHa6osYPLBFPnW8T5LSU49c",
"width": 400,
"height": 400,
"format": "png"
}
}
],
"testnet": false,
+10 -10
View File
@@ -1,26 +1,26 @@
import type { Chain } from "../src/types";
export default {
"name": "Binance Smart Chain Testnet",
"name": "BNB Smart Chain Testnet",
"chain": "BSC",
"rpc": [
"https://binance-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bsc-testnet.publicnode.com",
"https://data-seed-prebsc-2-s3.binance.org:8545",
"https://data-seed-prebsc-1-s3.binance.org:8545",
"https://data-seed-prebsc-2-s2.binance.org:8545",
"https://data-seed-prebsc-1-s2.binance.org:8545",
"https://data-seed-prebsc-2-s1.binance.org:8545",
"https://data-seed-prebsc-1-s1.binance.org:8545"
"https://data-seed-prebsc-2-s3.bnbchain.org:8545",
"https://data-seed-prebsc-1-s3.bnbchain.org:8545",
"https://data-seed-prebsc-2-s2.bnbchain.org:8545",
"https://data-seed-prebsc-1-s2.bnbchain.org:8545",
"https://data-seed-prebsc-2-s1.bnbchain.org:8545",
"https://data-seed-prebsc-1-s1.bnbchain.org:8545"
],
"faucets": [
"https://testnet.binance.org/faucet-smart"
"https://testnet.bnbchain.org/faucet-smart"
],
"nativeCurrency": {
"name": "Binance Chain Native Token",
"name": "BNB Chain Native Token",
"symbol": "tBNB",
"decimals": 18
},
"infoURL": "https://testnet.binance.org/",
"infoURL": "https://www.bnbchain.org/en",
"shortName": "bnbt",
"chainId": 97,
"networkId": 97,
+9
View File
@@ -26,6 +26,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": true,
"slug": "boba-bnb-testnet"
} as const satisfies Chain;
+7 -7
View File
@@ -3,9 +3,9 @@
/** @type {Omit<Chain, "slug">} */
export default {
name: "Taro Testnet",
name: "Bubs Testnet",
chain: "gETH",
shortName: "Taro",
shortName: "Bubs",
chainId: 1582,
testnet: true,
icon: {
@@ -14,7 +14,7 @@ export default {
width: 512,
height: 512,
},
rpc: ["https://taro-testnet.calderachain.xyz/http"],
rpc: ["https://bubs.calderachain.xyz/http"],
nativeCurrency: {
decimals: 18,
name: "Ether",
@@ -22,12 +22,12 @@ export default {
},
explorers: [
{
url: "https://explorer.tarotestnet.com",
name: "Taro Testnet Explorer",
url: "https://explorer.bubstestnet.com",
name: "Bubs Testnet Explorer",
standard: "EIP3091",
},
],
faucets: ["https://tarotestnet.com"],
infoURL: "https://tarotestnet.com",
faucets: ["https://bubstestnet.com"],
infoURL: "https://bubstestnet.com",
networkId: 1582,
};
+32
View File
@@ -0,0 +1,32 @@
// @ts-check
/** @typedef { import("../../src/types").Chain } Chain */
/** @type {Omit<Chain, "slug">} */
export default {
name: "Linea Mainnet",
chain: "Linea Mainnet",
shortName: "linea-mainnet",
chainId: 59144,
testnet: false,
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18,
},
rpc: [],
explorers: [
{
name: "Linea Scan",
url: "https://lineascan.build",
standard: "",
},
],
faucets: ["https://www.infura.io/faucet/linea"],
infoURL: "https://docs.linea.build/overview",
icon: {
url: "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
height: 512,
width: 512,
format: "svg",
},
};
+2
View File
@@ -10,4 +10,6 @@ export default {
width: 512,
format: "png",
},
rpc: ["https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}"],
status: "active",
};
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/chains",
"version": "0.1.26",
"version": "0.1.35",
"main": "dist/thirdweb-dev-chains.cjs.js",
"module": "dist/thirdweb-dev-chains.esm.js",
"browser": {
@@ -23,18 +23,18 @@
},
"author": "thirdweb eng <[email protected]>",
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.19.0",
"@preconstruct/cli": "^2.2.1",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@preconstruct/cli": "^2.7.0",
"@thirdweb-dev/tsconfig": "workspace:*",
"axios": "^1.3.4",
"deepmerge": "^4.3.0",
"axios": "^1.4.0",
"deepmerge": "^4.3.1",
"eslint-config-thirdweb": "workspace:*",
"jest": "^29.4.3",
"plop": "^3.1.2",
"typescript": "^4.7.4"
"typescript": "^5.1.6"
},
"preconstruct": {
"entrypoints": [
+3 -3
View File
@@ -164,10 +164,10 @@ function findSlug(chain) {
if (slug === "arbitrum-one") {
slug = "arbitrum";
}
if (slug === "binance-smart-chain") {
if (slug === "bnb-smart-chain") {
slug = "binance";
}
if (slug === "binance-smart-chain-testnet") {
if (slug === "bnb-smart-chain-testnet") {
slug = "binance-testnet";
}
if (slug === "base-goerli-testnet") {
@@ -267,7 +267,7 @@ import type { Chain } from "./types";
${exports.join("\n")}
export * from "./types";
export * from "./utils";
export const defaultChains = [c1, c5, 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];
export const allChains: Chain[] = [${exportNames.join(", ")}];
type ChainsById = {
File diff suppressed because one or more lines are too long
+73
View File
@@ -69,6 +69,64 @@ export function getChainRPCs(
return processedRPCs;
}
/**
* Construct the list of RPC URLs given a specific chain config. Format any RPC URLs
* with necessary clientId/secretKey and returns the first valid one.
*
* @param chain - The chain config to assemble RPC URLs from
* @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
*/
export function getValidChainRPCs(
chain: Pick<Chain, "rpc" | "chainId">,
clientId?: string,
mode: "http" | "ws" = "http",
): string[] {
const processedRPCs: string[] = [];
chain.rpc.forEach((rpc) => {
// exclude RPC if mode mismatch
if (mode === "http" && !rpc.startsWith("http")) {
return;
}
if (mode === "ws" && !rpc.startsWith("ws")) {
return;
}
// Replace API_KEY placeholder with value
if (rpc.includes("${THIRDWEB_API_KEY}")) {
if (clientId) {
processedRPCs.push(rpc.replace("${THIRDWEB_API_KEY}", clientId));
} else {
// if no client id, let it through with empty string
// if secretKey is present, it will be used in header
// if none are passed, will have reduced access
processedRPCs.push(rpc.replace("${THIRDWEB_API_KEY}", ""));
}
}
// exclude RPCs with unknown placeholder
else if (rpc.includes("${")) {
return;
}
// add as is
else {
processedRPCs.push(rpc);
}
});
if (processedRPCs.length === 0) {
throw new Error(
`No RPC available for chainId "${chain.chainId}" with mode ${mode}`,
);
}
return processedRPCs;
}
/**
* Get the highest priority RPC URL for a specific chain
*
@@ -118,3 +176,18 @@ export function configureChain(
// prepend additional RPCs to the chain's RPCs
return { ...chain, rpc: [...additionalRPCs, ...chain.rpc] };
}
/**
*
* use the clientId and return a new chain object with updated RPCs
*/
export function updateChainRPCs(chain: Chain, clientId?: string) {
try {
return {
...chain,
rpc: getValidChainRPCs(chain, clientId),
};
} catch (error) {
return chain;
}
}
+108
View File
@@ -1,5 +1,113 @@
# thirdweb
## 0.11.0
### Minor Changes
- [#1316](https://github.com/thirdweb-dev/js/pull/1316) [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b) Thanks [@iketw](https://github.com/iketw)! - Introducing API secret key restrictions for certain commands. Get your API secret key from [here](https://thirdweb.com/dashboard/settings/api-keys).
The following commands will require you to have logged in with your API secret key:
- `thirdweb deploy`
- `thirdweb release`
- `thirdweb publish`
- `thirdweb upload`
Implemented 2 new commands for managing your session with the CLI:
- thirdweb login
- thirdweb logout
Note: If you try to call a command that requires you to be logged in, you will be prompted to login.
Updated chains.
### Patch Changes
- Updated dependencies [[`44dbf283`](https://github.com/thirdweb-dev/js/commit/44dbf283c985f3e2ecbeb1cfdf09fe1d84e26298), [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b), [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b), [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b)]:
- @thirdweb-dev/storage@1.2.0
- @thirdweb-dev/sdk@3.10.37
- @thirdweb-dev/chains@0.1.35
## 0.10.37
### Patch Changes
- Updated dependencies [[`dac8fa7d`](https://github.com/thirdweb-dev/js/commit/dac8fa7d98b6952acf8d13e173099889c1d47da8)]:
- @thirdweb-dev/sdk@3.10.36
## 0.10.36
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/sdk@3.10.35
## 0.10.35
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/sdk@3.10.34
## 0.10.34
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/sdk@3.10.33
## 0.10.33
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/sdk@3.10.32
## 0.10.32
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/sdk@3.10.31
## 0.10.31
### Patch Changes
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/storage@1.1.8
- @thirdweb-dev/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
## 0.10.30
### Patch Changes
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/chains@0.1.28
- @thirdweb-dev/sdk@3.10.29
- @thirdweb-dev/storage@1.1.7
## 0.10.29
### Patch Changes
- [#1280](https://github.com/thirdweb-dev/js/pull/1280) [`53626f81`](https://github.com/thirdweb-dev/js/commit/53626f8100f400c46333617b14bd9fc144a7e801) Thanks [@Marfuen](https://github.com/Marfuen)! - Don't rely on package.json to export app
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
- Updated dependencies [[`2d088d36`](https://github.com/thirdweb-dev/js/commit/2d088d367ca54233836dc69712fd411ab7924205), [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2), [`9daf0449`](https://github.com/thirdweb-dev/js/commit/9daf044926bf995ac8998929dbeca548c5eb8561), [`546353a4`](https://github.com/thirdweb-dev/js/commit/546353a479c11533818ef917c0f6b4d6f8f69872), [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96), [`0135a779`](https://github.com/thirdweb-dev/js/commit/0135a7790cf2acde6b701cb41ea10dd311da5ec3)]:
- @thirdweb-dev/storage@1.1.6
- @thirdweb-dev/chains@0.1.27
- @thirdweb-dev/sdk@3.10.28
## 0.10.28
### Patch Changes
+13 -2
View File
@@ -1,7 +1,7 @@
import { ERROR_MESSAGES } from "../constants/constants";
import { prepareEnvironment } from "@gmrchk/cli-testing-library";
import { copyFile } from "fs/promises";
import { resolve } from "path";
import { ERROR_MESSAGES } from "../constants/constants";
// this creates an app, can take some time that's fine
jest.setTimeout(120_000);
@@ -9,6 +9,14 @@ jest.setTimeout(120_000);
describe("npx thirdweb deploy", () => {
it("should return deploy page url", async () => {
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(
resolve("./e2e/files/BasicContract.sol"),
@@ -16,7 +24,10 @@ describe("npx thirdweb deploy", () => {
);
const { waitForText, waitForFinish, getExitCode, writeText, getStderr } =
await spawn("node", "./dist/cli/index.js deploy --contract");
await spawn(
"node",
`./dist/cli/index.js deploy --contract -k ${apiSecretKey}`,
);
expect(await exists("BasicContract.sol")).toEqual(true);
+12 -3
View File
@@ -1,14 +1,23 @@
import { ERROR_MESSAGES } from "../constants/constants";
import { prepareEnvironment } from "@gmrchk/cli-testing-library";
import { copyFile } from "fs/promises";
import { resolve } from "path";
import { ERROR_MESSAGES } from "../constants/constants";
// this creates an app, can take some time that's fine
jest.setTimeout(120_000);
describe("npx thirdweb publish", () => {
it("should return publish page url", async () => {
// TOOD: turn this test back on when we figure out why it's failing
it.skip("should return publish page url", async () => {
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(
resolve("./e2e/files/BasicContract.sol"),
@@ -16,7 +25,7 @@ describe("npx thirdweb publish", () => {
);
const { waitForText, waitForFinish, getExitCode, writeText, getStderr } =
await spawn("node", "./dist/cli/index.js publish");
await spawn("node", `./dist/cli/index.js publish -k ${apiSecretKey}}`);
expect(await exists("BasicContract.sol")).toEqual(true);
+15 -15
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.10.28",
"version": "0.11.0",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -14,25 +14,25 @@
"@types/async-retry": "^1.3.0",
"@types/cross-spawn": "^6.0.2",
"@types/inquirer": "^8.2.1",
"@types/jest": "^29.2.1",
"@types/jest": "^29.5.2",
"@types/js-yaml": "^4.0.5",
"@types/node": "^18.0.0",
"@types/prompts": "^2.0.14",
"@types/node": "^18.16.18",
"@types/prompts": "^2.4.4",
"@types/rimraf": "^3.0.0",
"@types/tar": "^6.1.2",
"@types/update-notifier": "^6.0.1",
"@types/tar": "^6.1.5",
"@types/update-notifier": "^6.0.4",
"@types/validate-npm-package-name": "^4.0.0",
"chalk": "^5.2.0",
"chalk": "^5.3.0",
"cross-spawn": "^7.0.3",
"eslint-config-thirdweb": "workspace:*",
"hardhat": "^2.9.3",
"hardhat": "^2.16.1",
"jest": "^29.4.3",
"ora": "^6.1.2",
"prettier": "^2.7.1",
"ts-jest": "^29.0.3",
"ora": "^6.3.1",
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.7.0",
"tsup": "^6.2.3",
"typescript": "^4.7.4"
"tsup": "^6.7.0",
"typescript": "^5.1.6"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
@@ -53,10 +53,10 @@
"rimraf": "^3.0.2",
"solc": "0.8.17",
"sync-disk-cache": "^2.1.0",
"tar": "^6.1.11",
"tar": "^6.1.15",
"update-notifier": "^6.0.2",
"validate-npm-package-name": "^4.0.0",
"yaml": "^2.1.1"
"yaml": "^2.3.1"
},
"bin": {
"thirdweb": "./dist/cli/index.js"
+86
View File
@@ -0,0 +1,86 @@
import chalk from "chalk";
import prompts from "prompts";
import Cache, { CacheEntry } from "sync-disk-cache";
import { ApiResponse } from "../lib/types";
export async function loginUser(
cache: Cache,
options?: { new: boolean },
showLogs?: boolean,
) {
const keyFound = getSession(cache);
if (keyFound && !options?.new) {
if (showLogs) {
console.log(chalk.green("You are already logged in"));
}
return keyFound;
} else {
const apiKey = await createSession(cache);
return apiKey;
}
}
export async function logoutUser(cache: Cache) {
try {
cache.remove("api-secret-key");
console.log(chalk.green("You have been logged out"));
} catch (error) {
console.log(chalk.red("Something went wrong", error));
}
}
export function getSession(cache: Cache) {
try {
const apiKey: CacheEntry = cache.get("api-secret-key");
return apiKey.value;
} catch (error) {
console.log(error);
}
}
export async function createSession(cache: Cache) {
try {
const response = await prompts({
type: "text",
name: "apiSecretKey",
message: `Please enter your API secret key, you can find or create it on ${chalk.blue(
"https://thirdweb.com/create-api-key",
)}`,
});
try {
await validateKey(response.apiSecretKey);
} catch (error) {
console.log(error);
process.exit(1);
}
cache.set("api-secret-key", response.apiSecretKey);
return response.apiSecretKey;
} catch (error) {
console.log(error);
}
}
export async function validateKey(apiSecretKey: string) {
const fetch = (await import("node-fetch")).default;
// TODO: CHANGE THIS TO PROD BEFORE MERGING!!!
const response = await fetch(
`https://api.thirdweb.com/v1/keys/use?scope=storage`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
"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;
}
}
+94 -24
View File
@@ -1,30 +1,34 @@
#!/usr/bin/env node
import { detectExtensions } from "../common/feature-detector";
import { detectProject } from "../common/project-detector";
import { processProject } from "../common/processor";
import { cliVersion, pkg } from "../constants/urls";
import { info, logger, spinner } from "../core/helpers/logger";
import { CacheEntry } from "../core/types/cache";
import { twCreate } from "../create/command";
import { deploy } from "../deploy";
import { generate } from "../generate/command";
import { findPackageInstallation } from "../helpers/detect-local-packages";
import { upload } from "../storage/command";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
import chalk from "chalk";
import { exec, spawn } from "child_process";
import { Command } from "commander";
import open from "open";
import os from "os";
import path from "path";
import prompts from "prompts";
import Cache from "sync-disk-cache";
import Cache, { CacheEntry } from "sync-disk-cache";
import { loginUser, logoutUser, validateKey } from "../auth";
import { detectExtensions } from "../common/feature-detector";
import { processProject } from "../common/processor";
import { detectProject } from "../common/project-detector";
import { cliVersion, pkg } from "../constants/urls";
import { info, logger, spinner } from "../core/helpers/logger";
import { twCreate } from "../create/command";
import { deploy } from "../deploy";
import { generate } from "../generate/command";
import { findPackageInstallation } from "../helpers/detect-local-packages";
import { install } from "../install";
import { upload } from "../storage/command";
const main = async () => {
// eslint-disable-next-line turbo/no-undeclared-env-vars
const skipIntro = process.env.THIRDWEB_CLI_SKIP_INTRO === "true";
const program = new Command();
const cache = new Cache("thirdweb:cli");
const cache = new Cache("thirdweb:cli", {
location: path.join(os.homedir(), ".thirdweb", "creds"),
});
// yes this has to look like this, eliminates whitespace
if (!skipIntro) {
@@ -205,8 +209,8 @@ const main = async () => {
.option("--nightly", "Install the nightly version of packages.")
.option("--dev", "Install the dev version of packages")
.option("-d, --debug", "show debug logs")
.action(async (path, options) => {
await install(path, options);
.action(async (_path, options) => {
await install(_path, options);
});
program
@@ -246,8 +250,8 @@ const main = async () => {
"-c, --contract-name [name]",
"Name of the new smart contract to create",
)
.action(async (type, path, options) => {
await twCreate(type, path, options);
.action(async (type, _path, options) => {
await twCreate(type, _path, options);
});
program
@@ -296,8 +300,17 @@ const main = async () => {
"Deploy a dynamic smart contract made up of extensions to blockchains",
)
.option("--zksync", "Deploy on ZKSync")
.option("-k, --key <key>", "API key to authorize usage")
.action(async (options) => {
const url = await deploy(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;
}
const url = await deploy(options, apiSecretKey);
if (url) {
await open(url);
}
@@ -319,11 +332,20 @@ const main = async () => {
.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");
const url = await processProject(options, "publish", apiSecretKey);
info(
`Open this link to publish your contracts: ${chalk.blueBright(
url.toString(),
@@ -350,8 +372,17 @@ const main = async () => {
.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) => {
const url = await processProject(options, "publish");
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;
}
const url = await processProject(options, "publish", apiSecretKey);
info(
`Open this link to publish your contracts: ${chalk.blueBright(
url.toString(),
@@ -364,10 +395,21 @@ const main = async () => {
.command("upload")
.description("Upload any file or directory to decentralized storage (IPFS)")
.argument("[upload]", "path to file or directory to upload")
.action(async (path) => {
const storage = new ThirdwebStorage();
.option("-k, --key <key>", "API key to authorize usage")
.action(async (_path, 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;
}
const storage = new ThirdwebStorage({
secretKey: apiSecretKey,
});
try {
const uri = await upload(storage, path);
const uri = await upload(storage, _path);
info(
`Files stored at the following IPFS URI: ${chalk.blueBright(
uri.toString(),
@@ -414,8 +456,36 @@ const main = async () => {
"Preload ABIs and generate types for your smart contract to strongly type the thirdweb SDK",
)
.option("-p, --path <project-path>", "path to project", ".")
.option("-k, --key <key>", "API key to authorize usage")
.action(async (options) => {
await generate(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;
}
await generate(options, apiSecretKey);
});
program
.command("login")
.description(
"Authenticate with the thirdweb CLI using your API secret key or replace an existing API secret key",
)
.option("-n, --new", "Login with a new API secret key", false)
.action(async (options) => {
await loginUser(cache, options, true);
});
program
.command("logout")
.description(
"Logout of the thirdweb CLI, effectively removing your API secret key from your machine",
)
.action(async () => {
await logoutUser(cache);
});
await program.parseAsync();
+23 -14
View File
@@ -1,11 +1,18 @@
import { detectFeatures } from "@thirdweb-dev/sdk";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
import chalk from "chalk";
import { ethers } from "ethers";
import { readFileSync, writeFileSync } from "fs";
import ora from "ora";
import path from "path";
import {
EXTENSION_REGISTRY_ADDRESS,
ROUTER_CONTRACTS,
PreDeployedRouter,
TWRouterParams,
ROUTER_CONTRACTS,
RouterParams,
TWRouterParams,
} from "../constants/router-contracts";
import { cliVersion, THIRDWEB_URL } from "../constants/urls";
import { THIRDWEB_URL, cliVersion } from "../constants/urls";
import build from "../core/builder/build";
import detect from "../core/detection/detect";
import { execute } from "../core/helpers/exec";
@@ -17,24 +24,20 @@ import {
import { ContractPayload } from "../core/interfaces/ContractPayload";
import {
Extension,
ExtensionDeployArgs,
ExtensionFunction,
ExtensionMetadata,
ExtensionDeployArgs,
} from "../core/interfaces/Extension";
import { detectFeatures } from "@thirdweb-dev/sdk";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
import chalk from "chalk";
import { ethers } from "ethers";
import { readFileSync, writeFileSync } from "fs";
import ora from "ora";
import path from "path";
export async function processProject(
options: any,
command: "deploy" | "publish",
apiSecretKey: string,
) {
// TODO: allow overriding the default storage
const storage = new ThirdwebStorage();
const storage = new ThirdwebStorage({
secretKey: apiSecretKey,
});
logger.setSettings({
minLevel: options.debug ? "debug" : "info",
@@ -237,6 +240,7 @@ export async function processProject(
} else {
const deployArgs: RouterParams = await formatToExtensions(
selectedContracts,
apiSecretKey,
);
const outputDeployArgs = JSON.stringify(deployArgs, undefined, 2);
@@ -364,11 +368,16 @@ export function getUrl(hashes: string[], command: string) {
return url;
}
async function formatToExtensions(contracts: ContractPayload[]): Promise<{
async function formatToExtensions(
contracts: ContractPayload[],
apiSecretKey: string,
): Promise<{
extensions: Extension[];
extensionDeployArgs: ExtensionDeployArgs[];
}> {
const storage = new ThirdwebStorage();
const storage = new ThirdwebStorage({
secretKey: apiSecretKey,
});
const extensions: Extension[] = [];
const extensionDeployArgs: ExtensionDeployArgs[] = [];
+22 -5
View File
@@ -4,7 +4,10 @@ import detectLibrary from "../core/detection/detectLibrary";
import detectLanguage from "../core/detection/detectLanguage";
import { logger, spinner } from "../core/helpers/logger";
import path from "path";
import { ContractLibrariesType, contractLibraries } from "../core/types/ProjectType";
import {
ContractLibrariesType,
contractLibraries,
} from "../core/types/ProjectType";
import { FeatureWithEnabled, detectFeatures } from "@thirdweb-dev/sdk";
import chalk from "chalk";
import ora from "ora";
@@ -48,8 +51,16 @@ export async function detectProject(options: any) {
options,
detectedPackageManager,
);
const detectedAppType = detectedFramework !== "none" ? contractLibraries.includes(detectedFramework as ContractLibrariesType) ? "contract" : "app" : "app";
const detectedContractLibrary = detectedAppType === "contract" ? detectedFramework as ContractLibrariesType : "none";
const detectedAppType =
detectedFramework !== "none"
? contractLibraries.includes(detectedFramework as ContractLibrariesType)
? "contract"
: "app"
: "app";
const detectedContractLibrary =
detectedAppType === "contract"
? (detectedFramework as ContractLibrariesType)
: "none";
logger.info("Detected package manager: " + detectedPackageManager);
logger.info("Detected library: " + detectedLibrary);
@@ -61,7 +72,11 @@ export async function detectProject(options: any) {
let compiledResult;
const compileLoader = spinner("Compiling project...");
try {
compiledResult = await build(projectPath, detectedContractLibrary, options);
compiledResult = await build(
projectPath,
detectedContractLibrary,
options,
);
} catch (e) {
compileLoader.fail("Compilation failed");
logger.error(e);
@@ -127,7 +142,9 @@ export async function detectProject(options: any) {
).stopAndPersist({ symbol: "🔎" });
} else {
ora(
`Detected extension on ${chalk.blueBright(contractWithFeatures.name)}`,
`Detected extension on ${chalk.blueBright(
contractWithFeatures.name,
)}`,
).stopAndPersist({ symbol: "🔎" });
contractWithFeatures.enabledFeatures.map((feature) => {
logger.info(`✔️ ${chalk.green(feature.name)}`);
+8 -5
View File
@@ -16,11 +16,14 @@ export class SolcBuilder extends BaseBuilder {
const inputPaths: string[] = [];
findFiles(options.projectPath, /^.*\.sol$/, inputPaths);
const sources = inputPaths.reduce((acc, curr) => {
const source = readFileSync(curr, "utf-8");
acc[basename(curr)] = { content: source };
return acc;
}, {} as Record<string, { content: string }>);
const sources = inputPaths.reduce(
(acc, curr) => {
const source = readFileSync(curr, "utf-8");
acc[basename(curr)] = { content: source };
return acc;
},
{} as Record<string, { content: string }>,
);
const input = {
language: "Solidity",
@@ -67,7 +67,10 @@ export default async function detect(
return possibleFrameworks[0];
}
if (possibleFrameworks.includes("expo") && possibleFrameworks.includes("react-native-cli")) {
if (
possibleFrameworks.includes("expo") &&
possibleFrameworks.includes("react-native-cli")
) {
return "expo";
}
@@ -30,7 +30,10 @@ export default async function detect(
return possibleLanguages[0];
}
if (possibleLanguages.includes("typescript") && possibleLanguages.includes("javascript")) {
if (
possibleLanguages.includes("typescript") &&
possibleLanguages.includes("javascript")
) {
return "typescript";
}
@@ -34,7 +34,10 @@ export default async function detect(
return possibleLibraries[0];
}
if (possibleLibraries.includes("react-native") && possibleLibraries.includes("react")) {
if (
possibleLibraries.includes("react-native") &&
possibleLibraries.includes("react")
) {
return "react-native";
}
@@ -42,7 +42,10 @@ export default async function detect(
return possiblePackageManagers[0];
}
if (possiblePackageManagers.includes("brownie") && possiblePackageManagers.includes("pip")) {
if (
possiblePackageManagers.includes("brownie") &&
possiblePackageManagers.includes("pip")
) {
return "brownie";
}
@@ -21,13 +21,15 @@ export default class BrownieDetector implements FrameworkDetector {
);
const additionalDirectoriesToCheck = ["/build", "/contracts", "/reports"];
const additionalDirectoriesExist = additionalDirectoriesToCheck.every((dir) => {
return existsSync(path + dir);
});
const additionalDirectoriesExist = additionalDirectoriesToCheck.every(
(dir) => {
return existsSync(path + dir);
},
);
return (
!!dependencies.find(dep => dep.includes("brownie")) ||
!!devDependencies.find(dep => dep.includes("brownie")) ||
!!dependencies.find((dep) => dep.includes("brownie")) ||
!!devDependencies.find((dep) => dep.includes("brownie")) ||
additionalFilesExist ||
additionalDirectoriesExist ||
false
@@ -18,8 +18,8 @@ export default class DjangoDetector implements FrameworkDetector {
);
return (
!!dependencies.find(dep => dep.includes("Django")) ||
!!devDependencies.find(dep => dep.includes("Django")) ||
!!dependencies.find((dep) => dep.includes("Django")) ||
!!devDependencies.find((dep) => dep.includes("Django")) ||
additionalFilesExist ||
false
);
@@ -18,8 +18,8 @@ export default class FastAPIDetector implements FrameworkDetector {
);
return (
!!dependencies.find(dep => dep.includes("fastapi")) ||
!!devDependencies.find(dep => dep.includes("fastapi")) ||
!!dependencies.find((dep) => dep.includes("fastapi")) ||
!!devDependencies.find((dep) => dep.includes("fastapi")) ||
additionalFilesExist ||
false
);
@@ -18,8 +18,8 @@ export default class FlaskDetector implements FrameworkDetector {
);
return (
!!dependencies.find(dep => dep.includes("Flask")) ||
!!devDependencies.find(dep => dep.includes("Flask")) ||
!!dependencies.find((dep) => dep.includes("Flask")) ||
!!devDependencies.find((dep) => dep.includes("Flask")) ||
additionalFilesExist ||
false
);
@@ -18,8 +18,8 @@ export default class PopulusDetector implements FrameworkDetector {
);
return (
!!dependencies.find(dep => dep === "populus") ||
!!devDependencies.find(dep => dep === "populus") ||
!!dependencies.find((dep) => dep === "populus") ||
!!devDependencies.find((dep) => dep === "populus") ||
additionalFilesExist ||
false
);
@@ -16,10 +16,7 @@ export default class TruffleDetector implements FrameworkDetector {
const packageJson = readFileSync(packageJsonPath);
const { dependencies, devDependencies } = parsePackageJson(packageJson);
const additionalFilesToCheck = [
"/truffle.config.js",
"/truffle.js",
];
const additionalFilesToCheck = ["/truffle.config.js", "/truffle.js"];
const additionalFilesExist = additionalFilesToCheck.some((file) =>
existsSync(path + file),
);
@@ -12,7 +12,9 @@ export default class Web3PyDetector implements LibraryDetector {
);
return (
!!dependencies.find(dep => dep.includes("web3")) || !!devDependencies.find(dep => dep.includes("web3")) || false
!!dependencies.find((dep) => dep.includes("web3")) ||
!!devDependencies.find((dep) => dep.includes("web3")) ||
false
);
}
}
@@ -6,7 +6,6 @@ export default class BrownieDetector implements PackageManagerDetector {
public packageManagerType: PackageManagerType = "brownie";
public matches(path: string): boolean {
const additionalFilesToCheck = [
"/brownie-config.yaml",
"/brownie-config.json",
@@ -17,14 +16,12 @@ export default class BrownieDetector implements PackageManagerDetector {
// Check that all of these exist.
const additionalDirectoriesToCheck = ["/build", "/contracts", "/reports"];
const additionalDirectoriesExist = additionalDirectoriesToCheck.every((dir) => {
return existsSync(path + dir);
});
return (
additionalFilesExist ||
additionalDirectoriesExist ||
false
const additionalDirectoriesExist = additionalDirectoriesToCheck.every(
(dir) => {
return existsSync(path + dir);
},
);
return additionalFilesExist || additionalDirectoriesExist || false;
}
}
+1 -2
View File
@@ -76,7 +76,6 @@ export type ContractLibrariesType =
| "solc"
| "none";
export const contractLibraries: readonly ContractLibrariesType[] = [
"brownie",
"foundry",
@@ -84,4 +83,4 @@ export const contractLibraries: readonly ContractLibrariesType[] = [
"truffle",
"solc",
"none",
] as const;
] as const;
-5
View File
@@ -1,5 +0,0 @@
export type CacheEntry = {
isCached: boolean;
key: string;
value: string;
};
-2
View File
@@ -1,2 +0,0 @@
declare module "sync-disk-cache";
declare module "solc";
+21
View File
@@ -0,0 +1,21 @@
declare module 'sync-disk-cache' {
export type CacheEntry = {
isCached: boolean;
key: string;
value: string;
};
export default class Cache {
constructor(key: string, options?: { location?: string; compression?: "gzip" | "deflate" | "deflateRaw"; });
clear(): void;
has(key: string): boolean;
get(key: string): CacheEntry;
set(key: string, value: string): string;
remove(key: string): boolean;
pathFor(key: string): string;
decompress(value: string): string;
compress(value: string): string;
}
}
declare module "solc"
+4 -1
View File
@@ -321,7 +321,10 @@ export async function twCreate(
const res = await prompts({
type: "text",
name: "path",
message: projectType === "extension" ? CREATE_MESSAGES.extensionName : CREATE_MESSAGES.contractName,
message:
projectType === "extension"
? CREATE_MESSAGES.extensionName
: CREATE_MESSAGES.contractName,
initial: defaultName,
validate: (name: string) => {
const isValid = /(^[a-z0-9A-Z]+$)|(^[a-z0-9A-Z]+\.sol$)/.test(name);
@@ -9,7 +9,7 @@ export async function runCommand(
return new Promise<void>((resolve, reject) => {
/**
* Spawn the installation process.
*/
*/
const child = spawn(command, args);
child.stdout?.on("data", (data) => {
@@ -28,7 +28,7 @@ export async function runCommand(
});
child.on("error", (err) => {
console.log("Spawn error", err)
console.log("Spawn error", err);
});
child.on("close", (code) => {
@@ -39,4 +39,4 @@ export async function runCommand(
resolve();
});
});
}
}
+20 -7
View File
@@ -5,10 +5,20 @@ import { logger } from "../core/helpers/logger";
import { runCommand } from "../create/helpers/run-command";
import { upload } from "../storage/command";
export async function deployApp(distPath = "dist", projectPath = ".") {
const storage = new ThirdwebStorage();
export async function deployApp(
distPath = "dist",
projectPath = ".",
apiSecretKey: string,
) {
const storage = new ThirdwebStorage({
secretKey: apiSecretKey,
});
const detectedPackageManager = await detectPackageManager(projectPath, {});
const detectedFramework = await detectFramework(projectPath, {}, detectedPackageManager);
const detectedFramework = await detectFramework(
projectPath,
{},
detectedPackageManager,
);
if (detectedFramework === "none") {
throw new Error("No supported project detected");
@@ -35,19 +45,19 @@ export async function deployApp(distPath = "dist", projectPath = ".") {
case "yarn":
await runCommand("yarn", ["build"], true);
if (detectedFramework === "next") {
await runCommand("yarn", ["export"], true);
await runCommand("yarn", ["next", "export"], true);
}
break;
case "npm":
await runCommand("npm", ["run", "build"], true);
if (detectedFramework === "next") {
await runCommand("npm", ["run", "export"], true);
await runCommand("npx", ["next", "export"], true);
}
break;
case "pnpm":
await runCommand("pnpm", ["build"], true);
if (detectedFramework === "next") {
await runCommand("pnpm", ["export"], true);
await runCommand("pnpm", ["next", "export"], true);
}
break;
default:
@@ -60,7 +70,10 @@ export async function deployApp(distPath = "dist", projectPath = ".") {
try {
const uri = await upload(storage, distPath);
return `${uri.replace("ipfs://", "https://ipfs-public.thirdwebcdn.com/ipfs/")}`;
return `${uri.replace(
"ipfs://",
"https://ipfs-public.thirdwebcdn.com/ipfs/",
)}`;
} catch (err) {
console.error("Can't upload project", err);
return Promise.reject("Can't upload project");
+4 -4
View File
@@ -1,8 +1,8 @@
import chalk from "chalk";
import { processProject } from "../common/processor";
import { info, logger } from "../core/helpers/logger";
import generateDashboardUrl from "../helpers/generate-dashboard-url";
import { deployApp } from "./app";
import chalk from "chalk";
type DeployOptions = {
name: string;
@@ -12,7 +12,7 @@ type DeployOptions = {
distPath?: string;
};
export async function deploy(options: DeployOptions) {
export async function deploy(options: DeployOptions, apiSecretKey: string) {
if (options.name) {
const url = generateDashboardUrl(options.name, options.contractVersion);
@@ -33,7 +33,7 @@ export async function deploy(options: DeployOptions) {
if (options.app) {
try {
let url = await deployApp(options.distPath, options.path);
let url = await deployApp(options.distPath, options.path, apiSecretKey);
info(`Here is the link to your app: ${chalk.blueBright(url.toString())}`);
return url.toString();
} catch (err) {
@@ -44,7 +44,7 @@ export async function deploy(options: DeployOptions) {
}
}
const url = await processProject(options, "deploy");
const url = await processProject(options, "deploy", apiSecretKey);
info(
`Open this link to deploy your contracts: ${chalk.blueBright(
url.toString(),
+23 -15
View File
@@ -1,20 +1,20 @@
import { GENERATE_MESSAGES } from "../../constants/constants";
import { allChains } from "@thirdweb-dev/chains";
import {
DeployedContract,
fetchContractMetadataFromAddress,
getChainProvider,
} from "@thirdweb-dev/sdk";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
import { info } from "../core/helpers/logger";
import { allChains } from "@thirdweb-dev/chains";
import fs from "fs";
import prompts from "prompts";
import { findMatches } from "../common/file-helper";
import ora from "ora";
import prompts from "prompts";
import { GENERATE_MESSAGES } from "../../constants/constants";
import { findMatches } from "../common/file-helper";
import { info } from "../core/helpers/logger";
import { GenerateOptions, ThirdwebConfig } from "./types";
import { CHAIN_OPTIONS, getContractsForAddresses } from "./utils";
export async function generate(options: GenerateOptions) {
export async function generate(options: GenerateOptions, apiSecretKey: string) {
let projectPath: string = options.path?.replace(/\/$/, "") || ".";
let contracts: DeployedContract[] = [];
@@ -96,7 +96,9 @@ export async function generate(options: GenerateOptions) {
// Attempt to download the ABI for each contract
ora(`Downloading ABIs for contracts configured in 'thirdweb.json'`).info();
const storage = new ThirdwebStorage();
const storage = new ThirdwebStorage({
secretKey: apiSecretKey,
});
const metadata: {
address: string;
metadata: Awaited<ReturnType<typeof fetchContractMetadataFromAddress>>;
@@ -147,10 +149,13 @@ export async function generate(options: GenerateOptions) {
const file = fs.readFileSync(filePath, "utf-8");
const abiRegex = /GENERATED_ABI = \{.*\};\n\n/s;
const contractAbis = metadata.reduce((acc, contract) => {
acc[contract.address] = contract.metadata.abi;
return acc;
}, {} as Record<string, any>);
const contractAbis = metadata.reduce(
(acc, contract) => {
acc[contract.address] = contract.metadata.abi;
return acc;
},
{} as Record<string, any>,
);
const updatedAbis = JSON.stringify(contractAbis, null, 2);
const updatedFile = file.replace(
abiRegex,
@@ -169,10 +174,13 @@ export async function generate(options: GenerateOptions) {
const file = fs.readFileSync(typeFilePath, "utf-8");
const abiRegex = /GENERATED_ABI: \{.*\}/s;
const contractAbis = metadata.reduce((acc, contract) => {
acc[contract.address] = contract.metadata.abi;
return acc;
}, {} as Record<string, any>);
const contractAbis = metadata.reduce(
(acc, contract) => {
acc[contract.address] = contract.metadata.abi;
return acc;
},
{} as Record<string, any>,
);
const updatedAbis = JSON.stringify(contractAbis, null, 2);
const updatedFile = file.replace(abiRegex, `GENERATED_ABI: ${updatedAbis}`);
fs.writeFileSync(typeFilePath, updatedFile);
+295 -235
View File
@@ -1,235 +1,295 @@
// Import required dependencies
import { existsSync, readFileSync } from "fs";
import ora from "ora";
import inquirer from "inquirer";
// Import project dependencies
import detectFramework from "../core/detection/detectFramework";
import detectPackageManager from "../core/detection/detectPackageManager";
import detectLibrary from "../core/detection/detectLibrary";
import { ContractLibrariesType, contractLibraries } from "../core/types/ProjectType";
import { checkIfBrowniePackageIsInstalled, getDependenciesForFoundry, getDependenciesForGo, getDependenciesForPython, installOrUpdate, parsePackageJson, processAppType, processContractAppType } from "../lib/utils";
import { logger } from "../core/helpers/logger";
// Define excluded dependencies
const EXCLUDED_DEPENDENCIES = ["@thirdweb-dev/chain-icons"];
export async function install(projectPath = ".", options: any) {
const debug = options.debug || false;
let installer;
let updater;
// Initialize all dependencies.
let jsDependencies: { [key: string]: string } | string[] = {};
let jsDevDependencies: { [key: string]: string } | string[] = {};
let pythonDependencies: string[] = [];
let pythonDevDependencies: string[] = [];
let peerDependencies: { [key: string]: string } = {};
let goDependencies: { name: string; version: string }[] = [];
const thirdwebDepsToInstall = new Set<string>();
const otherDeps = new Set<string>();
// Initialize brownie and foundry checks
let thirdwebExistsInBrownie = { package: "", exists: false };
let thirdwebExistsInFoundry = false;
// Detect the package manager, and framework used in the project
const detectedPackageManager = await detectPackageManager(projectPath, options);
const detectedFramework = await detectFramework(projectPath, options, detectedPackageManager);
const detectedLibrary = await detectLibrary(projectPath, options, detectedPackageManager);
// Determine project type
const detectedAppType = detectedFramework !== "none" ? contractLibraries.includes(detectedFramework as ContractLibrariesType) ? "contract" : "app" : "app";
// Identify which specific package manager is used
const isBrowniePackageManager = detectedPackageManager === "brownie";
const isFoundryPackageManager = detectedPackageManager === "foundry";
const isGoPackageManager = detectedPackageManager === "go-modules";
const isPythonPackageManager = ["pip", "pipenv", "poetry"].includes(detectedPackageManager);
const isJSPackageManager = ["yarn", "pnpm", "npm"].includes(detectedPackageManager);
// Processing JS/TS dependencies
if (isJSPackageManager) {
let packageJson;
const packageJsonPath = projectPath + "/package.json";
// Check if package.json exists
if (!existsSync(packageJsonPath)) {
console.error(
"No package.json file found. Please run this command in the root of your project."
);
return;
}
// Parse package.json
packageJson = readFileSync(packageJsonPath);
const parsedJSDeps = parsePackageJson(packageJson);
jsDependencies = parsedJSDeps.dependencies;
jsDevDependencies = parsedJSDeps.devDependencies;
peerDependencies = parsedJSDeps.peerDependencies;
}
// Processing Python dependencies
if (isPythonPackageManager) {
const pythonDeps = getDependenciesForPython(projectPath, detectedPackageManager);
pythonDependencies = pythonDeps.dependencies;
pythonDevDependencies = pythonDeps.devDependencies;
}
// Processing Brownie dependencies
if (isBrowniePackageManager) {
const regex = /\s*thirdweb-dev\/contracts@\d+\.\d+\.\d+/g;
const res = await checkIfBrowniePackageIsInstalled(regex);
thirdwebExistsInBrownie = res;
}
// Processing Foundry dependencies
if (isFoundryPackageManager) {
const exists = await getDependenciesForFoundry(projectPath, "thirdweb-contracts");
thirdwebExistsInFoundry = exists;
}
// Processing Go dependencies
if (isGoPackageManager) {
const deps = getDependenciesForGo(projectPath);
goDependencies = deps;
}
const hasEthers =
!!jsDependencies?.ethers ||
!!jsDevDependencies?.ethers;
const version = !isJSPackageManager ? "" :
options.dev
? "@dev"
: options.nightly
? "@nightly" : "";
const thirdwebDepsToUpdate = new Set<string>(
[
...Object.keys(jsDependencies).filter((dep) =>
dep.startsWith("@thirdweb-dev/"),
),
...Object.keys(jsDevDependencies).filter((dep) =>
dep.startsWith("@thirdweb-dev/"),
),
...Object.keys(peerDependencies).filter((dep) =>
dep.startsWith("@thirdweb-dev/"),
),
...pythonDependencies
.filter((dep) => dep.startsWith("thirdweb-sdk"))
.map((dep) => dep.split('==')[0]),
...pythonDevDependencies
.filter((dep) => dep.startsWith("thirdweb-sdk"))
.map((dep) => dep.split('==')[0]),
...goDependencies
.filter((dep) => {
console.log('dep', dep)
return dep.name === "github.com/thirdweb-dev/go-sdk/v2"
})
.map((dep) => dep.name),
].concat(thirdwebExistsInBrownie.exists ? [thirdwebExistsInBrownie.package] : [])
.concat(thirdwebExistsInFoundry ? ["lib/thirdweb-contracts"] : [])
);
// Figure out which dependencies to install and which to update.
if (detectedAppType === "contract") {
processContractAppType({ detectedPackageManager, thirdwebDepsToUpdate, thirdwebDepsToInstall, isJSPackageManager })
} else if (detectedAppType === "app") {
processAppType({
detectedLibrary,
detectedFramework,
hasEthers,
isGoPackageManager,
isJSPackageManager,
isPythonPackageManager,
otherDeps,
thirdwebDepsToInstall,
thirdwebDepsToUpdate,
})
}
// remove exluded dependencies
EXCLUDED_DEPENDENCIES.forEach((excludedDep) => {
thirdwebDepsToUpdate.delete(excludedDep);
thirdwebDepsToInstall.delete(excludedDep);
});
// Ask which dependencies to install
if (thirdwebDepsToInstall.size !== 0) {
const answer = await inquirer.prompt({
type: "checkbox",
choices: [...thirdwebDepsToInstall],
message: "Which thirdweb dependencies would you like to install?",
name: "dependencies",
default: [...thirdwebDepsToInstall],
});
if (answer.dependencies.length !== thirdwebDepsToInstall.size) {
thirdwebDepsToInstall.clear();
answer.dependencies.forEach((dep: string) => thirdwebDepsToInstall.add(dep));
}
}
// Ask which dependencies to update
if (thirdwebDepsToUpdate.size !== 0) {
const answer = await inquirer.prompt({
type: "checkbox",
choices: [...thirdwebDepsToUpdate],
message: "Which thirdweb dependencies would you like to update?",
name: "dependencies",
default: [...thirdwebDepsToUpdate],
});
if (answer.dependencies.length !== thirdwebDepsToUpdate.size) {
thirdwebDepsToUpdate.clear();
answer.dependencies.forEach((dep: string) => thirdwebDepsToUpdate.add(dep));
}
}
if (thirdwebDepsToInstall.size === 0 && thirdwebDepsToUpdate.size === 0) {
console.log("No thirdweb dependencies to install or update.");
return;
}
if (debug) {
logger.info("Detected package manager: " + detectedPackageManager);
logger.info("Detected library: " + detectedLibrary);
logger.info("Detected framework: " + detectedFramework);
logger.info("Detected app type: " + detectedAppType);
}
try {
const dependenciesToAdd = [
...[...thirdwebDepsToInstall].map((dep) => `${dep}${version}`),
...otherDeps,
];
const dependenciesToUpdate = [...thirdwebDepsToUpdate].map(
(dep) => `${dep}${version}`,
)
if (thirdwebDepsToInstall.size !== 0) {
installer = ora(
`Installing: "${[...thirdwebDepsToInstall].join('", "')}"`,
).start();
await installOrUpdate(detectedPackageManager, dependenciesToAdd, [], "install", { oldVersion: thirdwebExistsInBrownie.package, debug });
installer?.succeed(`Installed: "${dependenciesToAdd.join('", "')}"`);
}
if (thirdwebDepsToUpdate.size !== 0) {
updater = ora(
`Updating: "${[...thirdwebDepsToUpdate].join('", "')}"`,
).start();
await installOrUpdate(detectedPackageManager, [], dependenciesToUpdate, "update", {
debug,
});
updater?.succeed(`Updated: "${dependenciesToUpdate.join('", "')}"`);
}
} catch (err) {
console.error("Can't install within project: ", err);
return Promise.reject("Can't install within project");
}
}
// Import required dependencies
import { existsSync, readFileSync } from "fs";
import ora from "ora";
import inquirer from "inquirer";
// Import project dependencies
import detectFramework from "../core/detection/detectFramework";
import detectPackageManager from "../core/detection/detectPackageManager";
import detectLibrary from "../core/detection/detectLibrary";
import {
ContractLibrariesType,
contractLibraries,
} from "../core/types/ProjectType";
import {
checkIfBrowniePackageIsInstalled,
getDependenciesForFoundry,
getDependenciesForGo,
getDependenciesForPython,
installOrUpdate,
parsePackageJson,
processAppType,
processContractAppType,
} from "../lib/utils";
import { logger } from "../core/helpers/logger";
// Define excluded dependencies
const EXCLUDED_DEPENDENCIES = ["@thirdweb-dev/chain-icons"];
export async function install(projectPath = ".", options: any) {
const debug = options.debug || false;
let installer;
let updater;
// Initialize all dependencies.
let jsDependencies: { [key: string]: string } | string[] = {};
let jsDevDependencies: { [key: string]: string } | string[] = {};
let pythonDependencies: string[] = [];
let pythonDevDependencies: string[] = [];
let peerDependencies: { [key: string]: string } = {};
let goDependencies: { name: string; version: string }[] = [];
const thirdwebDepsToInstall = new Set<string>();
const otherDeps = new Set<string>();
// Initialize brownie and foundry checks
let thirdwebExistsInBrownie = { package: "", exists: false };
let thirdwebExistsInFoundry = false;
// Detect the package manager, and framework used in the project
const detectedPackageManager = await detectPackageManager(
projectPath,
options,
);
const detectedFramework = await detectFramework(
projectPath,
options,
detectedPackageManager,
);
const detectedLibrary = await detectLibrary(
projectPath,
options,
detectedPackageManager,
);
// Determine project type
const detectedAppType =
detectedFramework !== "none"
? contractLibraries.includes(detectedFramework as ContractLibrariesType)
? "contract"
: "app"
: "app";
// Identify which specific package manager is used
const isBrowniePackageManager = detectedPackageManager === "brownie";
const isFoundryPackageManager = detectedPackageManager === "foundry";
const isGoPackageManager = detectedPackageManager === "go-modules";
const isPythonPackageManager = ["pip", "pipenv", "poetry"].includes(
detectedPackageManager,
);
const isJSPackageManager = ["yarn", "pnpm", "npm"].includes(
detectedPackageManager,
);
// Processing JS/TS dependencies
if (isJSPackageManager) {
let packageJson;
const packageJsonPath = projectPath + "/package.json";
// Check if package.json exists
if (!existsSync(packageJsonPath)) {
console.error(
"No package.json file found. Please run this command in the root of your project.",
);
return;
}
// Parse package.json
packageJson = readFileSync(packageJsonPath);
const parsedJSDeps = parsePackageJson(packageJson);
jsDependencies = parsedJSDeps.dependencies;
jsDevDependencies = parsedJSDeps.devDependencies;
peerDependencies = parsedJSDeps.peerDependencies;
}
// Processing Python dependencies
if (isPythonPackageManager) {
const pythonDeps = getDependenciesForPython(
projectPath,
detectedPackageManager,
);
pythonDependencies = pythonDeps.dependencies;
pythonDevDependencies = pythonDeps.devDependencies;
}
// Processing Brownie dependencies
if (isBrowniePackageManager) {
const regex = /\s*thirdweb-dev\/contracts@\d+\.\d+\.\d+/g;
const res = await checkIfBrowniePackageIsInstalled(regex);
thirdwebExistsInBrownie = res;
}
// Processing Foundry dependencies
if (isFoundryPackageManager) {
const exists = await getDependenciesForFoundry(
projectPath,
"thirdweb-contracts",
);
thirdwebExistsInFoundry = exists;
}
// Processing Go dependencies
if (isGoPackageManager) {
const deps = getDependenciesForGo(projectPath);
goDependencies = deps;
}
const hasEthers = !!jsDependencies?.ethers || !!jsDevDependencies?.ethers;
const version = !isJSPackageManager
? ""
: options.dev
? "@dev"
: options.nightly
? "@nightly"
: "";
const thirdwebDepsToUpdate = new Set<string>(
[
...Object.keys(jsDependencies).filter((dep) =>
dep.startsWith("@thirdweb-dev/"),
),
...Object.keys(jsDevDependencies).filter((dep) =>
dep.startsWith("@thirdweb-dev/"),
),
...Object.keys(peerDependencies).filter((dep) =>
dep.startsWith("@thirdweb-dev/"),
),
...pythonDependencies
.filter((dep) => dep.startsWith("thirdweb-sdk"))
.map((dep) => dep.split("==")[0]),
...pythonDevDependencies
.filter((dep) => dep.startsWith("thirdweb-sdk"))
.map((dep) => dep.split("==")[0]),
...goDependencies
.filter((dep) => {
console.log("dep", dep);
return dep.name === "github.com/thirdweb-dev/go-sdk/v2";
})
.map((dep) => dep.name),
]
.concat(
thirdwebExistsInBrownie.exists ? [thirdwebExistsInBrownie.package] : [],
)
.concat(thirdwebExistsInFoundry ? ["lib/thirdweb-contracts"] : []),
);
// Figure out which dependencies to install and which to update.
if (detectedAppType === "contract") {
processContractAppType({
detectedPackageManager,
thirdwebDepsToUpdate,
thirdwebDepsToInstall,
isJSPackageManager,
});
} else if (detectedAppType === "app") {
processAppType({
detectedLibrary,
detectedFramework,
hasEthers,
isGoPackageManager,
isJSPackageManager,
isPythonPackageManager,
otherDeps,
thirdwebDepsToInstall,
thirdwebDepsToUpdate,
});
}
// remove exluded dependencies
EXCLUDED_DEPENDENCIES.forEach((excludedDep) => {
thirdwebDepsToUpdate.delete(excludedDep);
thirdwebDepsToInstall.delete(excludedDep);
});
// Ask which dependencies to install
if (thirdwebDepsToInstall.size !== 0) {
const answer = await inquirer.prompt({
type: "checkbox",
choices: [...thirdwebDepsToInstall],
message: "Which thirdweb dependencies would you like to install?",
name: "dependencies",
default: [...thirdwebDepsToInstall],
});
if (answer.dependencies.length !== thirdwebDepsToInstall.size) {
thirdwebDepsToInstall.clear();
answer.dependencies.forEach((dep: string) =>
thirdwebDepsToInstall.add(dep),
);
}
}
// Ask which dependencies to update
if (thirdwebDepsToUpdate.size !== 0) {
const answer = await inquirer.prompt({
type: "checkbox",
choices: [...thirdwebDepsToUpdate],
message: "Which thirdweb dependencies would you like to update?",
name: "dependencies",
default: [...thirdwebDepsToUpdate],
});
if (answer.dependencies.length !== thirdwebDepsToUpdate.size) {
thirdwebDepsToUpdate.clear();
answer.dependencies.forEach((dep: string) =>
thirdwebDepsToUpdate.add(dep),
);
}
}
if (thirdwebDepsToInstall.size === 0 && thirdwebDepsToUpdate.size === 0) {
console.log("No thirdweb dependencies to install or update.");
return;
}
if (debug) {
logger.info("Detected package manager: " + detectedPackageManager);
logger.info("Detected library: " + detectedLibrary);
logger.info("Detected framework: " + detectedFramework);
logger.info("Detected app type: " + detectedAppType);
}
try {
const dependenciesToAdd = [
...[...thirdwebDepsToInstall].map((dep) => `${dep}${version}`),
...otherDeps,
];
const dependenciesToUpdate = [...thirdwebDepsToUpdate].map(
(dep) => `${dep}${version}`,
);
if (thirdwebDepsToInstall.size !== 0) {
installer = ora(
`Installing: "${[...thirdwebDepsToInstall].join('", "')}"`,
).start();
await installOrUpdate(
detectedPackageManager,
dependenciesToAdd,
[],
"install",
{ oldVersion: thirdwebExistsInBrownie.package, debug },
);
installer?.succeed(`Installed: "${dependenciesToAdd.join('", "')}"`);
}
if (thirdwebDepsToUpdate.size !== 0) {
updater = ora(
`Updating: "${[...thirdwebDepsToUpdate].join('", "')}"`,
).start();
await installOrUpdate(
detectedPackageManager,
[],
dependenciesToUpdate,
"update",
{
debug,
},
);
updater?.succeed(`Updated: "${dependenciesToUpdate.join('", "')}"`);
}
} catch (err) {
console.error("Can't install within project: ", err);
return Promise.reject("Can't install within project");
}
}
+29 -3
View File
@@ -1,11 +1,15 @@
import { FrameworkType, LibraryType, PackageManagerType } from "../core/types/ProjectType";
import {
FrameworkType,
LibraryType,
PackageManagerType,
} from "../core/types/ProjectType";
export type IProcessContractAppTypeArgs = {
detectedPackageManager: PackageManagerType;
thirdwebDepsToUpdate: Set<string>;
thirdwebDepsToInstall: Set<string>;
isJSPackageManager: boolean;
}
};
export type IProcessAppTypeArgs = {
detectedLibrary: LibraryType;
@@ -17,4 +21,26 @@ export type IProcessAppTypeArgs = {
isGoPackageManager: boolean;
hasEthers: boolean;
otherDeps: Set<string>;
}
};
export type ApiKey = {
id: string;
key: string;
walletAddresses: string[];
domains: string[];
services?: [
{
name: string;
targetAddresses: string[];
},
];
};
export type ApiResponse = {
data: ApiKey | null;
error: {
code: string;
statusCode: number;
message: string;
};
};
+107 -43
View File
@@ -7,19 +7,21 @@ import { IProcessAppTypeArgs, IProcessContractAppTypeArgs } from "./types";
export function convertDependenciesToStringFormat(dependenciesObject: object) {
return Object.entries(dependenciesObject).map(([pkg, versionDetails]) => {
let version = '';
if (typeof versionDetails === 'string') {
let version = "";
if (typeof versionDetails === "string") {
version = versionDetails;
} else if (typeof versionDetails === 'object') {
} else if (typeof versionDetails === "object") {
version = versionDetails.version;
}
// Replace '^' with nothing as '^' is not a valid version specifier in Python
version = version.replace('^', '');
version = version.replace("^", "");
return `${pkg}==${version}`;
});
}
export const parsePackageJson = (packageJson: Buffer): {
export const parsePackageJson = (
packageJson: Buffer,
): {
dependencies: {
[key: string]: string;
};
@@ -55,10 +57,9 @@ export const parsePipFile = (PipFile: string) => {
export const parsePyProjectToml = (pyProjectToml: string) => {
const pyProjectFile = toml.parse(pyProjectToml) as any;
const dependencies =
(pyProjectFile["tool"]["poetry"]["dependencies"]) || [];
const dependencies = pyProjectFile["tool"]["poetry"]["dependencies"] || [];
const devDependencies =
(pyProjectFile["tool"]["poetry"]["dev-dependencies"]) || [];
pyProjectFile["tool"]["poetry"]["dev-dependencies"] || [];
return {
dependencies: convertDependenciesToStringFormat(dependencies),
@@ -150,20 +151,26 @@ export const getDependenciesForPython = (
export const getLatestVersion = async (packageName: string): Promise<any> => {
try {
const fetch = (await import('node-fetch')).default;
const url = `https://registry.npmjs.org/${packageName}`
const fetch = (await import("node-fetch")).default;
const url = `https://registry.npmjs.org/${packageName}`;
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data: any = await response.json();
return data['dist-tags']['latest'];
return data["dist-tags"]["latest"];
} catch (error) {
console.error(`Failed to get latest version of ${packageName}:`, error);
}
}
};
export const installOrUpdate = async (packageManager: PackageManagerType, dependenciesToAdd: string[], dependenciesToUpdate: string[], typeOfAction: "install" | "update", options?: { oldVersion?: string, debug?: boolean }) => {
export const installOrUpdate = async (
packageManager: PackageManagerType,
dependenciesToAdd: string[],
dependenciesToUpdate: string[],
typeOfAction: "install" | "update",
options?: { oldVersion?: string; debug?: boolean },
) => {
let runner: string = "";
let installCommand: string[] = [];
let updateCommand: string[] = [];
@@ -174,7 +181,7 @@ export const installOrUpdate = async (packageManager: PackageManagerType, depend
case "npm":
runner = "npm";
installCommand = ["install"];
updateCommand = ["install", "--legacy-peer-deps"]
updateCommand = ["install", "--legacy-peer-deps"];
break;
case "yarn":
runner = "yarn";
@@ -208,9 +215,9 @@ export const installOrUpdate = async (packageManager: PackageManagerType, depend
break;
case "brownie":
runner = "brownie";
installCommand = ["pm", "install"]
updateCommand = ["pm", "update"]
deleteCommand = ["pm", "delete"]
installCommand = ["pm", "install"];
updateCommand = ["pm", "update"];
deleteCommand = ["pm", "delete"];
break;
case "foundry":
runner = "forge";
@@ -223,17 +230,25 @@ export const installOrUpdate = async (packageManager: PackageManagerType, depend
}
if (typeOfAction === "install") {
if (!dependenciesToAdd.length) { return; }
if (!dependenciesToAdd.length) {
return;
}
const commands = [...installCommand, ...dependenciesToAdd];
await runCommand(runner, commands, printLogs);
if (options?.oldVersion) {
await runCommand(runner, [...deleteCommand, options.oldVersion], printLogs);
await runCommand(
runner,
[...deleteCommand, options.oldVersion],
printLogs,
);
}
}
if (typeOfAction === "update") {
if (!dependenciesToUpdate.length) { return; }
if (!dependenciesToUpdate.length) {
return;
}
const commands = [...updateCommand, ...dependenciesToUpdate];
await runCommand(runner, commands, printLogs);
}
@@ -259,13 +274,16 @@ export const getDependenciesForBrownie = async () => {
let deps = "";
await runCommand("brownie", ["pm", "list"], true, (data) => {
deps += data.toString();
})
});
// strip out colors from output
deps = deps.replace(/\u001b\[\d+(;\d+)*m/g, '');
deps = deps.replace(/\u001b\[\d+(;\d+)*m/g, "");
return deps;
};
export const getDependenciesForFoundry = async (filePath: string, libName: string) => {
export const getDependenciesForFoundry = async (
filePath: string,
libName: string,
) => {
const fullPath = path.join(filePath, "lib", libName);
return existsSync(fullPath);
};
@@ -275,15 +293,14 @@ type GoModule = {
version: string;
};
export const getDependenciesForGo = (filePath: string): GoModule[] => {
const content = readFileSync(filePath + "/go.mod", "utf-8");
const lines = content.split("\n");
const modules: GoModule[] = [];
for (const line of lines) {
if (line.includes('github.com/thirdweb-dev')) {
const words = line.split(/\s+/); // split on any amount of whitespace
if (line.includes("github.com/thirdweb-dev")) {
const words = line.split(/\s+/); // split on any amount of whitespace
const name = words[1].trim();
const version = words[2];
modules.push({ name, version });
@@ -291,10 +308,17 @@ export const getDependenciesForGo = (filePath: string): GoModule[] => {
}
return modules;
}
};
export const processContractAppType = async (args: IProcessContractAppTypeArgs): Promise<void> => {
const { detectedPackageManager, thirdwebDepsToUpdate, thirdwebDepsToInstall, isJSPackageManager } = args;
export const processContractAppType = async (
args: IProcessContractAppTypeArgs,
): Promise<void> => {
const {
detectedPackageManager,
thirdwebDepsToUpdate,
thirdwebDepsToInstall,
isJSPackageManager,
} = args;
if (isJSPackageManager) {
if (!thirdwebDepsToUpdate.has(`@thirdweb-dev/contracts`)) {
@@ -303,15 +327,29 @@ export const processContractAppType = async (args: IProcessContractAppTypeArgs):
}
if (detectedPackageManager === "brownie") {
const latestThirdwebContractVersion = await getLatestVersion("@thirdweb-dev/contracts");
const latestThirdwebContractVersion = await getLatestVersion(
"@thirdweb-dev/contracts",
);
// Exit out early if the user already has the latest version of thirdweb installed.
if (thirdwebDepsToUpdate.has(`thirdweb-dev/contracts@${latestThirdwebContractVersion}`)) {
return Promise.reject("You already have the latest version of thirdweb-dev/contracts installed.");
if (
thirdwebDepsToUpdate.has(
`thirdweb-dev/contracts@${latestThirdwebContractVersion}`,
)
) {
return Promise.reject(
"You already have the latest version of thirdweb-dev/contracts installed.",
);
}
if (!thirdwebDepsToUpdate.has(`thirdweb-dev/contracts@${latestThirdwebContractVersion}`)) {
thirdwebDepsToInstall.add(`thirdweb-dev/contracts@${latestThirdwebContractVersion}`);
if (
!thirdwebDepsToUpdate.has(
`thirdweb-dev/contracts@${latestThirdwebContractVersion}`,
)
) {
thirdwebDepsToInstall.add(
`thirdweb-dev/contracts@${latestThirdwebContractVersion}`,
);
}
}
@@ -322,8 +360,20 @@ export const processContractAppType = async (args: IProcessContractAppTypeArgs):
}
};
export const processAppType = async (args: IProcessAppTypeArgs): Promise<void> => {
const { detectedFramework, thirdwebDepsToUpdate, thirdwebDepsToInstall, hasEthers, isJSPackageManager, otherDeps, isPythonPackageManager, isGoPackageManager, detectedLibrary } = args;
export const processAppType = async (
args: IProcessAppTypeArgs,
): Promise<void> => {
const {
detectedFramework,
thirdwebDepsToUpdate,
thirdwebDepsToInstall,
hasEthers,
isJSPackageManager,
otherDeps,
isPythonPackageManager,
isGoPackageManager,
detectedLibrary,
} = args;
const reactlibs = [
"react",
@@ -335,21 +385,35 @@ export const processAppType = async (args: IProcessAppTypeArgs): Promise<void> =
"vue",
"vite",
"svelte",
]
const shouldInstallThirdwebReact = reactlibs.includes(detectedFramework as string);
];
const shouldInstallThirdwebReact = reactlibs.includes(
detectedFramework as string,
);
const shouldInstallThirdwebReactNative = detectedLibrary === "react-native";
if (isJSPackageManager) {
if (!thirdwebDepsToUpdate.has(`@thirdweb-dev/react`) && shouldInstallThirdwebReact) {
if (
!thirdwebDepsToUpdate.has(`@thirdweb-dev/react`) &&
shouldInstallThirdwebReact
) {
thirdwebDepsToInstall.add(`@thirdweb-dev/react`);
}
if (!thirdwebDepsToUpdate.has(`@thirdweb-dev/sdk`) && !shouldInstallThirdwebReactNative) {
if (
!thirdwebDepsToUpdate.has(`@thirdweb-dev/sdk`) &&
!shouldInstallThirdwebReactNative
) {
thirdwebDepsToInstall.add(`@thirdweb-dev/sdk`);
}
if (!thirdwebDepsToUpdate.has(`@thirdweb-dev/react-native`) && shouldInstallThirdwebReactNative) {
if (
!thirdwebDepsToUpdate.has(`@thirdweb-dev/react-native`) &&
shouldInstallThirdwebReactNative
) {
thirdwebDepsToInstall.add(`@thirdweb-dev/react-native`);
}
if (!thirdwebDepsToUpdate.has(`@thirdweb-dev/react-native-compat`) && shouldInstallThirdwebReactNative) {
if (
!thirdwebDepsToUpdate.has(`@thirdweb-dev/react-native-compat`) &&
shouldInstallThirdwebReactNative
) {
thirdwebDepsToInstall.add(`@thirdweb-dev/react-native-compat`);
}
if (!hasEthers) {
@@ -368,4 +432,4 @@ export const processAppType = async (args: IProcessAppTypeArgs): Promise<void> =
thirdwebDepsToInstall.add("github.com/thirdweb-dev/go-sdk/v2");
}
}
};
};
+14 -4
View File
@@ -51,9 +51,14 @@ export async function upload(
const spin = spinner(
"Uploading directory to IPFS. This may take a while depending on file sizes.",
);
const uris = await storage.uploadBatch(files);
spin.succeed("Successfully uploaded directory to IPFS");
uri = uris[0].substring(0, uris[0].lastIndexOf("/"));
try {
const uris = await storage.uploadBatch(files);
spin.succeed("Successfully uploaded directory to IPFS");
uri = uris[0].substring(0, uris[0].lastIndexOf("/"));
} catch (err) {
spin.fail("Failed to upload directory to IPFS.");
return Promise.reject(err);
}
} else if (fileType.isFile()) {
const fileName = path.parse(uploadPath).base;
const fileData = fs.readFileSync(uploadPath);
@@ -62,7 +67,12 @@ export async function upload(
const spin = spinner(
"Uploading file to IPFS. This may take a while depending on file sizes.",
);
uri = await storage.upload(file, { uploadWithoutDirectory: true });
try {
uri = await storage.upload(file, { uploadWithoutDirectory: true });
} catch (err) {
spin.fail("Failed to upload file to IPFS.");
return Promise.reject(err);
}
spin.succeed("Successfully uploaded file to IPFS.");
} else {
return Promise.reject("Invalid path provided");
+12
View File
@@ -1,5 +1,17 @@
# @thirdweb-dev/contracts-js
## 1.3.9
### Patch Changes
- [#1299](https://github.com/thirdweb-dev/js/pull/1299) [`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5) Thanks [@nkrishang](https://github.com/nkrishang)! - Add ERC721LoyaltyCard and ERC721UpdatableMetadata
## 1.3.8
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
## 1.3.7
### Patch Changes
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/contracts-js",
"version": "1.3.7",
"version": "1.3.9",
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
"module": "dist/thirdweb-dev-contracts-js.esm.js",
"browser": {
@@ -10,20 +10,20 @@
"license": "Apache-2.0",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/contracts-js",
"dependencies": {
"@thirdweb-dev/contracts": "3.5.9"
"@thirdweb-dev/contracts": "3.6.0"
},
"devDependencies": {
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@preconstruct/cli": "^2.2.1",
"@preconstruct/cli": "^2.7.0",
"@thirdweb-dev/tsconfig": "workspace:*",
"@typechain/ethers-v5": "10.0.0",
"eslint-config-thirdweb": "workspace:*",
"ethers": "^5.7.2",
"typechain": "^8.1.0",
"typescript": "^4.7.4"
"typechain": "^8.2.0",
"typescript": "^5.1.6"
},
"peerDependencies": {
"ethers": "^5"
@@ -1,5 +1,11 @@
# eslint-config-thirdweb
## 0.1.5
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
## 0.1.4
### Patch Changes
+4 -4
View File
@@ -1,13 +1,13 @@
{
"name": "eslint-config-thirdweb",
"version": "0.1.4",
"version": "0.1.5",
"main": "index.js",
"license": "Apache-2.0",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint-config-next": "13.2.4",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^0.0.8",
"eslint-plugin-react": "^7.28.0"
},
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/pay
## 0.1.2
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
## 0.1.1
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/pay",
"version": "0.1.1",
"version": "0.1.2",
"main": "dist/thirdweb-dev-pay.cjs.js",
"module": "dist/thirdweb-dev-pay.esm.js",
"exports": {
@@ -33,13 +33,13 @@
},
"sideEffects": false,
"dependencies": {
"@coinbase/cbpay-js": "^1.6.0"
"@coinbase/cbpay-js": "^1.7.0"
},
"devDependencies": {
"@preconstruct/cli": "^2.2.1",
"typescript": "^4.7.4",
"@preconstruct/cli": "^2.7.0",
"@thirdweb-dev/tsconfig": "workspace:*",
"eslint-config-thirdweb": "workspace:*",
"@thirdweb-dev/tsconfig": "workspace:*"
"typescript": "^5.1.6"
},
"scripts": {
"format": "prettier --write 'src/**/*'",
+108
View File
@@ -1,5 +1,113 @@
# @thirdweb-dev/react-core
## 3.14.17
### Patch Changes
- [#1316](https://github.com/thirdweb-dev/js/pull/1316) [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b) Thanks [@iketw](https://github.com/iketw)! - Adds new `clientId` prop to access thirdweb's services.
You can create a _free_ `clientId` [on the thirdweb Dashboard](https://thirdweb.com/dashboard)
```javascript
<ThirdwebProvider clientId="your-client-id" />
```
- Updated dependencies [[`44dbf283`](https://github.com/thirdweb-dev/js/commit/44dbf283c985f3e2ecbeb1cfdf09fe1d84e26298), [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b), [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b), [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b), [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.16
### Patch Changes
- [#1356](https://github.com/thirdweb-dev/js/pull/1356) [`7a6534d1`](https://github.com/thirdweb-dev/js/commit/7a6534d1a98cab1eb47cf88d13e2b7ec04037e42) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix useOwnedNFT enabled state
- Updated dependencies [[`dac8fa7d`](https://github.com/thirdweb-dev/js/commit/dac8fa7d98b6952acf8d13e173099889c1d47da8), [`c5761b99`](https://github.com/thirdweb-dev/js/commit/c5761b99e9797772481506e90cbfa5c35a05bd1d), [`b96a2282`](https://github.com/thirdweb-dev/js/commit/b96a2282730582b684cc96802649a96851af5220)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.15
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.14
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.13
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.12
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.11
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.10
### Patch Changes
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.9
### Patch Changes
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.8
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
- Updated dependencies [[`2d088d36`](https://github.com/thirdweb-dev/js/commit/2d088d367ca54233836dc69712fd411ab7924205), [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2), [`9daf0449`](https://github.com/thirdweb-dev/js/commit/9daf044926bf995ac8998929dbeca548c5eb8561), [`546353a4`](https://github.com/thirdweb-dev/js/commit/546353a479c11533818ef917c0f6b4d6f8f69872), [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96), [`0135a779`](https://github.com/thirdweb-dev/js/commit/0135a7790cf2acde6b701cb41ea10dd311da5ec3)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 3.14.7
### Patch Changes
+17 -17
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "3.14.7",
"version": "3.14.17",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -66,26 +66,26 @@
},
"sideEffects:": false,
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.10",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.19.0",
"@microsoft/api-documenter": "^7.19.4",
"@microsoft/api-extractor": "^7.29.2",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@microsoft/api-documenter": "^7.22.21",
"@microsoft/api-extractor": "^7.36.0",
"@microsoft/tsdoc": "^0.14.1",
"@preconstruct/cli": "^2.2.1",
"@preconstruct/cli": "^2.7.0",
"@solana/wallet-adapter-react": "^0.15.19",
"@solana/web3.js": "^1.62.0",
"@thirdweb-dev/auth": "workspace:*",
"@thirdweb-dev/tsconfig": "workspace:*",
"@types/js-cookie": "^3.0.3",
"@types/mime": "3.0.0",
"@types/react": "^18.0.5",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.3.0",
"@types/react": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-thirdweb": "workspace:*",
"eslint-plugin-better-tree-shaking": "0.0.3",
"eslint-plugin-import": "^2.26.0",
@@ -93,12 +93,12 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-tsdoc": "^0.2.16",
"ethers": "^5.7.2",
"prettier": "^2.7.1",
"prettier": "^3.0.0",
"react": "^18.2.0",
"typescript": "^4.7.4"
"typescript": "^5.1.6"
},
"dependencies": {
"@tanstack/react-query": "^4.0.10",
"@tanstack/react-query": "^4.29.19",
"@thirdweb-dev/chains": "workspace:*",
"@thirdweb-dev/generated-abis": "workspace:^",
"@thirdweb-dev/sdk": "workspace:*",

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