Compare commits

..
Author SHA1 Message Date
github-actions[bot]andgithub-actions[bot] c97e51b855 Version Packages (#2071)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 13:11:43 +13:00
Adam Majmudar e10173bf8a [Wallets] Add support for signTransaction for smart wallets (#2080) 2023-12-12 23:57:45 +00:00
Joaquim Verges dbfa73d75a [SDK] Export contract verifier (#2081) 2023-12-12 23:34:31 +00:00
Joaquim Verges 1b1212d9fb [Wallet] Export getUserOpReceipt() (#2079) 2023-12-12 22:46:52 +00:00
Firekeeper 065f85bf71 [Unity] Support revokeSessionKey/getAllActiveSigners (#2078) 2023-12-12 21:30:46 +00:00
Joaquim Verges 09bafa9aeb [Wallets] Respect value in smart wallet gas estimations + add getUserOpReceipt utility function (#2077) 2023-12-12 21:13:18 +00:00
Joaquim Verges fe30c88cc3 [SDK] Re-export classes, comment cleanup (#2076) 2023-12-12 09:35:51 +00:00
Joaquim Verges 3a9538259c [SDK] cleanup (#2075) 2023-12-12 00:12:03 +00:00
Firekeeper 0c730e57e0 [Unity] Add JWT/AuthEndpoint login options (#2073) 2023-12-11 23:43:10 +00:00
iketw 33c9f6b1ab [Embedded] Enforce encryption key for custom jwt (#2018) 2023-12-11 22:47:41 +00:00
iketw 2346396bdf [RN] Adds analytics nonce to ews (#2072) 2023-12-11 22:41:32 +00:00
Manan Tank de5ebc9093 [wallets] Fix assertWindowEthereum (#2070) 2023-12-11 20:37:32 +00:00
Joaquim Verges 42c4c33d30 [SDK] un-export unneeded classes + package reorganization (#2069) 2023-12-11 19:06:32 +00:00
github-actions[bot]andgithub-actions[bot] 046603ac54 Version Packages (#2068)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-08 22:29:51 -08:00
Yash bcfa9463bb Fix deployments (#2067) 2023-12-09 04:37:58 +00:00
github-actions[bot]andgithub-actions[bot] 42bda873b4 Version Packages (#2054)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-08 18:04:02 -08:00
Joaquim Verges d2001ca464 sync chains (#2066) 2023-12-09 00:14:35 +00:00
Manan Tank c8ba5cf863 [react] - Add option to only show Official WC Modal, Fix focus trap when CW Modal is hidden (#2063) 2023-12-08 13:14:04 +00:00
Joaquim Verges 85842c1596 [SDK] expose BaseFee in getDynamicFeeData() (#2062) 2023-12-07 23:29:17 +00:00
Firekeeper 0fb2f1fc5e [Unity] Support for sdk.wallet.GetEmail (#2061) 2023-12-07 22:21:23 +00:00
Jonas Daniels 497677f359 fix(sdk): roles.setAll.prepare() correctly sorts role removals (#2059) 2023-12-07 18:48:16 +00:00
Manan Tank 15ae5e7f95 [react] Add "Open Official WalletConnect Modal" in ConnectWallet (#2058) 2023-12-07 16:57:52 +00:00
Firekeeper 5a0283d083 [Unity] Reload local wallet in case of reconnection (sw) (#2056) 2023-12-07 00:32:24 +00:00
Winston Yeo 9496606964 [wallets]: Winston/custom auth endpoint (#2052) 2023-12-06 23:35:47 +00:00
Manan Tank b50e4a41b5 [react] Use WalletConnect to connect MM on mobile by default (#2029) 2023-12-06 19:52:46 +00:00
Yash e595d4d92f [SDK] Update implementation (#2053) 2023-12-06 19:29:10 +00:00
244 changed files with 3208 additions and 975 deletions
+21
View File
@@ -1,5 +1,26 @@
# @thirdweb-dev/auth # @thirdweb-dev/auth
## 4.1.17
### Patch Changes
- Updated dependencies [[`33c9f6b1`](https://github.com/thirdweb-dev/js/commit/33c9f6b1ab3e65187b2c49c083412d39a1334bba), [`de5ebc90`](https://github.com/thirdweb-dev/js/commit/de5ebc9093aaf5fc08bc0d2d414138b520fe17fe), [`e10173bf`](https://github.com/thirdweb-dev/js/commit/e10173bf8aeaaabdb45231109b4da0c52c91b9da), [`09bafa9a`](https://github.com/thirdweb-dev/js/commit/09bafa9aebadb01641214747148c67d0b39c1275)]:
- @thirdweb-dev/wallets@2.3.0
## 4.1.16
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@2.2.1
## 4.1.15
### Patch Changes
- Updated dependencies [[`94966069`](https://github.com/thirdweb-dev/js/commit/9496606964d65268f8ee6bf9f78b2786e99d33ac), [`15ae5e7f`](https://github.com/thirdweb-dev/js/commit/15ae5e7f95a482a9736923c0e10916a0a6115c3d)]:
- @thirdweb-dev/wallets@2.2.0
## 4.1.14 ## 4.1.14
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/auth", "name": "@thirdweb-dev/auth",
"version": "4.1.14", "version": "4.1.17",
"main": "dist/thirdweb-dev-auth.cjs.js", "main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js", "module": "dist/thirdweb-dev-auth.esm.js",
"browser": { "browser": {
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/chains # @thirdweb-dev/chains
## 0.1.61
### Patch Changes
- [#2066](https://github.com/thirdweb-dev/js/pull/2066) [`d2001ca4`](https://github.com/thirdweb-dev/js/commit/d2001ca464aa699ac821c97eb37de7409ba865f3) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Updatechains
## 0.1.60 ## 0.1.60
### Patch Changes ### Patch Changes
+6 -9
View File
@@ -20,20 +20,17 @@ export default {
"format": "png" "format": "png"
}, },
"infoURL": "https://shimmer.network", "infoURL": "https://shimmer.network",
"name": "ShimmerEVM Testnet", "name": "ShimmerEVM Testnet Deprecated 1072",
"nativeCurrency": { "nativeCurrency": {
"name": "SMR", "name": "SMR",
"symbol": "SMR", "symbol": "SMR",
"decimals": 6 "decimals": 6
}, },
"networkId": 1072, "networkId": 1072,
"rpc": [ "rpc": [],
"https://shimmerevm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "shortName": "shimmerevm-testnet-deprecated-1072",
"https://1072.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "slug": "shimmerevm-testnet-deprecated-1072",
"https://json-rpc.evm.testnet.shimmer.network" "status": "deprecated",
],
"shortName": "shimmerevm-testnet",
"slug": "shimmerevm-testnet",
"testnet": true, "testnet": true,
"title": "ShimmerEVM Testnet" "title": "ShimmerEVM Testnet Deprecated 1072"
} as const satisfies Chain; } as const satisfies Chain;
+39
View File
@@ -0,0 +1,39 @@
import type { Chain } from "../src/types";
export default {
"chain": "ShimmerEVM",
"chainId": 1073,
"explorers": [
{
"name": "explorer",
"url": "https://explorer.evm.testnet.shimmer.network",
"standard": "EIP3091"
}
],
"faucets": [
"https://evm-toolkit.evm.testnet.shimmer.network",
"https://evm-faucet.testnet.shimmer.network"
],
"icon": {
"url": "ipfs://bafkreibky2sy6qhi6arktayvologkrgu5kudpgdxfkx4uosbvmstz7v4di",
"width": 720,
"height": 720,
"format": "png"
},
"infoURL": "https://shimmer.network",
"name": "ShimmerEVM Testnet",
"nativeCurrency": {
"name": "SMR",
"symbol": "SMR",
"decimals": 6
},
"networkId": 1073,
"rpc": [
"https://shimmerevm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://1073.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://json-rpc.evm.testnet.shimmer.network"
],
"shortName": "shimmerevm-testnet",
"slug": "shimmerevm-testnet",
"testnet": true,
"title": "ShimmerEVM Testnet"
} as const satisfies Chain;
+37
View File
@@ -0,0 +1,37 @@
import type { Chain } from "../src/types";
export default {
"chain": "ETH",
"chainId": 11155420,
"explorers": [
{
"name": "opscout",
"url": "https://optimism-sepolia.blockscout.com",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
}
}
],
"faucets": [
"https://app.optimism.io/faucet"
],
"infoURL": "https://optimism.io",
"name": "OP Sepolia Testnet",
"nativeCurrency": {
"name": "Sepolia Ether",
"symbol": "ETH",
"decimals": 18
},
"networkId": 11155420,
"rpc": [
"https://op-sepolia-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://11155420.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://sepolia.optimism.io"
],
"shortName": "opsep",
"slug": "op-sepolia-testnet",
"testnet": true
} as const satisfies Chain;
+33
View File
@@ -0,0 +1,33 @@
import type { Chain } from "../src/types";
export default {
"chain": "TILTYARD",
"chainId": 1127469,
"explorers": [
{
"name": "TILTYARD Explorer",
"url": "http://testnet-explorer.tiltyard.gg",
"standard": "EIP3091"
}
],
"faucets": [],
"features": [
{
"name": "EIP1559"
}
],
"name": "Tiltyard Subnet",
"nativeCurrency": {
"name": "Tiltyard Token",
"symbol": "TILTG",
"decimals": 18
},
"networkId": 1127469,
"rpc": [
"https://tiltyard-subnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://1127469.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/tiltyard/testnet/rpc"
],
"shortName": "tiltyard",
"slug": "tiltyard-subnet",
"testnet": true
} as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 12035,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": ".svg"
},
"infoURL": "https://avacloud.io",
"name": "QI M 11272",
"nativeCurrency": {
"name": "QI M 11272 Token",
"symbol": "JZW",
"decimals": 18
},
"networkId": 12035,
"redFlags": [],
"rpc": [
"https://qi-m-11272.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://12035.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avacloud-dev.io/b19c9e32-f359-451f-ad15-7ec784625c04"
],
"shortName": "QI M 11272",
"slug": "qi-m-11272",
"testnet": true
} as const satisfies Chain;
+1 -7
View File
@@ -6,13 +6,7 @@ export default {
{ {
"name": "Blockscout", "name": "Blockscout",
"url": "https://wan-red-ain.explorer.mainnet.skalenodes.com", "url": "https://wan-red-ain.explorer.mainnet.skalenodes.com",
"standard": "EIP3091", "standard": "EIP3091"
"icon": {
"url": "ipfs://QmT5KKrpNt6duU8QfwaYw3xf4ifTBPtjahpWsMi3gsFmcS",
"width": 440,
"height": 600,
"format": "png"
}
} }
], ],
"faucets": [ "faucets": [
+1 -13
View File
@@ -6,22 +6,10 @@ export default {
{ {
"name": "etndscan", "name": "etndscan",
"url": "https://scan.etnd.pro", "url": "https://scan.etnd.pro",
"standard": "none", "standard": "none"
"icon": {
"url": "ipfs://Qmd26eRJxPb1jJg5Q4mC2M4kD9Jrs5vmcnr5LczHFMGwSD",
"width": 128,
"height": 128,
"format": "png"
}
} }
], ],
"faucets": [], "faucets": [],
"icon": {
"url": "ipfs://Qmd26eRJxPb1jJg5Q4mC2M4kD9Jrs5vmcnr5LczHFMGwSD",
"width": 128,
"height": 128,
"format": "png"
},
"infoURL": "https://www.etnd.pro", "infoURL": "https://www.etnd.pro",
"name": "ETND Chain Mainnets", "name": "ETND Chain Mainnets",
"nativeCurrency": { "nativeCurrency": {
+43
View File
@@ -0,0 +1,43 @@
import type { Chain } from "../src/types";
export default {
"chain": "Immutable zkEVM",
"chainId": 13473,
"explorers": [
{
"name": "Immutable Testnet explorer",
"url": "https://explorer.testnet.immutable.com",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmXFUYFW4e6wifbU9LKVq7owM14bnE6ZbbYq3bn1jBP3Mw",
"width": 1168,
"height": 1168,
"format": "png"
}
}
],
"faucets": [
"https://docs.immutable.com/docs/zkEVM/guides/faucet"
],
"icon": {
"url": "ipfs://QmXFUYFW4e6wifbU9LKVq7owM14bnE6ZbbYq3bn1jBP3Mw",
"width": 1168,
"height": 1168,
"format": "png"
},
"infoURL": "https://www.immutable.com",
"name": "Immutable zkEVM Testnet",
"nativeCurrency": {
"name": "Test IMX",
"symbol": "tIMX",
"decimals": 18
},
"networkId": 13473,
"rpc": [
"https://immutable-zkevm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://13473.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.testnet.immutable.com"
],
"shortName": "imx-testnet",
"slug": "immutable-zkevm-testnet",
"testnet": true
} as const satisfies Chain;
+43
View File
@@ -0,0 +1,43 @@
import type { Chain } from "../src/types";
export default {
"chain": "Immutable zkEVM",
"chainId": 15003,
"explorers": [
{
"name": "Immutable Devnet explorer",
"url": "https://explorer.dev.immutable.com",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmXFUYFW4e6wifbU9LKVq7owM14bnE6ZbbYq3bn1jBP3Mw",
"width": 1168,
"height": 1168,
"format": "png"
}
}
],
"faucets": [
"https://docs.immutable.com/docs/zkEVM/guides/faucet"
],
"icon": {
"url": "ipfs://QmXFUYFW4e6wifbU9LKVq7owM14bnE6ZbbYq3bn1jBP3Mw",
"width": 1168,
"height": 1168,
"format": "png"
},
"infoURL": "https://www.immutable.com",
"name": "Immutable zkEVM Devnet",
"nativeCurrency": {
"name": "Dev IMX",
"symbol": "dIMX",
"decimals": 18
},
"networkId": 15003,
"rpc": [
"https://immutable-zkevm-devnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://15003.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.dev.immutable.com"
],
"shortName": "imx-devnet",
"slug": "immutable-zkevm-devnet",
"testnet": false
} as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 17026,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": ".svg"
},
"infoURL": "https://avacloud.io",
"name": "QI1204I3",
"nativeCurrency": {
"name": "QI1204I3 Token",
"symbol": "BHOX",
"decimals": 18
},
"networkId": 17026,
"redFlags": [],
"rpc": [
"https://qi1204i3.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://17026.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avacloud-test.io/e7aeac38-06b2-4aaa-87b4-2c2da10fa43e"
],
"shortName": "QI1204I3",
"slug": "qi1204i3",
"testnet": true
} as const satisfies Chain;
+3 -7
View File
@@ -12,7 +12,7 @@ export default {
"format": ".png" "format": ".png"
}, },
"infoURL": "https://tryroll.com/", "infoURL": "https://tryroll.com/",
"name": "Roll Testnet", "name": "Form Testnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Ether", "name": "Ether",
"symbol": "ETH", "symbol": "ETH",
@@ -20,13 +20,9 @@ export default {
}, },
"networkId": 1748, "networkId": 1748,
"redFlags": [], "redFlags": [],
"rpc": [ "rpc": [],
"https://roll-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://1748.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://roll.calderachain.xyz/http"
],
"shortName": "Roll", "shortName": "Roll",
"slug": "roll-testnet", "slug": "form-testnet",
"testnet": true, "testnet": true,
"title": "Roll Testnet" "title": "Roll Testnet"
} as const satisfies Chain; } as const satisfies Chain;
-6
View File
@@ -10,12 +10,6 @@ export default {
} }
], ],
"faucets": [], "faucets": [],
"icon": {
"url": "ipfs://QmePhfibWz9jnGUqF9Rven4x734br1h3LxrChYTEjbbQvo",
"width": 256,
"height": 256,
"format": "png"
},
"infoURL": "https://proofofmemes.org", "infoURL": "https://proofofmemes.org",
"name": "Proof Of Memes", "name": "Proof Of Memes",
"nativeCurrency": { "nativeCurrency": {
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"chain": "MRK",
"chainId": 1909,
"explorers": [
{
"name": "blockscout",
"url": "https://merklescan.com",
"standard": "none"
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmZocJpCSLoQqoYFkF1kn7uKDuAiFRNTK8P5PoVeiigDBU",
"width": 114,
"height": 132,
"format": "png"
},
"infoURL": "https://merklescan.com",
"name": "Merkle Scan",
"nativeCurrency": {
"name": "Merkle",
"symbol": "MRK",
"decimals": 18
},
"networkId": 1909,
"rpc": [
"https://merkle-scan.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://1909.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://marklechain-rpc.merklescan.com"
],
"shortName": "MRK",
"slug": "merkle-scan",
"testnet": false
} as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 19683,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": ".svg"
},
"infoURL": "https://avacloud.io",
"name": "ST 12-07 V1",
"nativeCurrency": {
"name": "ST 12-07 V1 Token",
"symbol": "XRL",
"decimals": 18
},
"networkId": 19683,
"redFlags": [],
"rpc": [
"https://st-12-07-v1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://19683.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avacloud-test.io/d26b972e-1832-4d3a-bf7b-d0ce1f4331c2"
],
"shortName": "ST 12-07 V1",
"slug": "st-12-07-v1",
"testnet": true
} as const satisfies Chain;
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"chain": "X1",
"chainId": 202212,
"explorers": [
{
"name": "Blockscout",
"url": "https://explorer.x1-devnet.xen.network",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
}
}
],
"faucets": [],
"infoURL": "https://docs.xen.network/x1/",
"name": "X1 Devnet",
"nativeCurrency": {
"name": "XN",
"symbol": "XN",
"decimals": 18
},
"networkId": 202212,
"rpc": [
"https://x1-devnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://202212.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://x1-devnet.xen.network"
],
"shortName": "x1-devnet",
"slug": "x1-devnet",
"testnet": false
} as const satisfies Chain;
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"chain": "X1",
"chainId": 204005,
"explorers": [
{
"name": "Blockscout",
"url": "https://explorer.x1-testnet.xen.network",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
}
}
],
"faucets": [],
"infoURL": "https://docs.xen.network/go-x1/",
"name": "X1 Network",
"nativeCurrency": {
"name": "XN",
"symbol": "XN",
"decimals": 18
},
"networkId": 204005,
"rpc": [
"https://x1-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://204005.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://x1-testnet.xen.network"
],
"shortName": "x1-testnet",
"slug": "x1-network",
"testnet": true
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "BSL",
"chainId": 21912,
"explorers": [
{
"name": "BSL Mainnet Explorer",
"url": "https://scan.nftruth.io",
"standard": "EIP3091"
}
],
"faucets": [],
"infoURL": "https://bsquarelab.com/",
"name": "BSL Mainnet",
"nativeCurrency": {
"name": "Origin NFT",
"symbol": "ONF",
"decimals": 18
},
"networkId": 21912,
"rpc": [
"https://bsl.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://21912.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"http://rpc-mainnet.nftruth.io:8545",
"ws://rpc-mainnet.nftruth.io:8645"
],
"shortName": "onf",
"slug": "bsl",
"testnet": false
} as const satisfies Chain;
+23
View File
@@ -0,0 +1,23 @@
import type { Chain } from "../src/types";
export default {
"chain": "ebro",
"chainId": 2306,
"explorers": [],
"faucets": [],
"infoURL": "https://www.ebrochain.com",
"name": "Ebro Network",
"nativeCurrency": {
"name": "Ebro",
"symbol": "ebro",
"decimals": 18
},
"networkId": 2306,
"rpc": [
"https://ebro-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://2306.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://greendinoswap.com"
],
"shortName": "ebro",
"slug": "ebro-network",
"testnet": false
} as const satisfies Chain;
+1 -6
View File
@@ -14,11 +14,6 @@ export default {
"format": "png" "format": "png"
} }
}, },
{
"name": "native",
"url": "https://devnet.explorer.neon-labs.org",
"standard": "EIP3091"
},
{ {
"name": "neonscan", "name": "neonscan",
"url": "https://devnet.neonscan.org", "url": "https://devnet.neonscan.org",
@@ -35,7 +30,7 @@ export default {
"format": "png" "format": "png"
}, },
"infoURL": "https://neon-labs.org", "infoURL": "https://neon-labs.org",
"name": "Neon EVM DevNet", "name": "Neon EVM Devnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Neon", "name": "Neon",
"symbol": "NEON", "symbol": "NEON",
+6 -2
View File
@@ -22,14 +22,18 @@ export default {
"format": "png" "format": "png"
}, },
"infoURL": "https://neonevm.org", "infoURL": "https://neonevm.org",
"name": "Neon EVM MainNet", "name": "Neon EVM Mainnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Neon", "name": "Neon",
"symbol": "NEON", "symbol": "NEON",
"decimals": 18 "decimals": 18
}, },
"networkId": 245022934, "networkId": 245022934,
"rpc": [], "rpc": [
"https://neon-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://245022934.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://neon-proxy-mainnet.solana.p2p.org"
],
"shortName": "neonevm-mainnet", "shortName": "neonevm-mainnet",
"slug": "neon-evm", "slug": "neon-evm",
"testnet": false "testnet": false
+1
View File
@@ -36,5 +36,6 @@ export default {
], ],
"shortName": "neonevm-testnet", "shortName": "neonevm-testnet",
"slug": "neon-evm-testnet", "slug": "neon-evm-testnet",
"status": "deprecated",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+1 -1
View File
@@ -5,7 +5,7 @@ export default {
"explorers": [ "explorers": [
{ {
"name": "Cronos Explorer", "name": "Cronos Explorer",
"url": "https://cronoscan.com", "url": "https://explorer.cronos.org",
"standard": "none" "standard": "none"
} }
], ],
+28
View File
@@ -0,0 +1,28 @@
import type { Chain } from "../src/types";
export default {
"chain": "FRAX",
"chainId": 252,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmQLJk5G7zF8ZDxSxkRcpHqEqcifrJEhGmEKC6zwyPXWAw/fraxchain.png",
"width": 512,
"height": 512,
"format": "PNG"
},
"infoURL": "https://mainnet.frax.com",
"name": "Fraxchain Mainnet",
"nativeCurrency": {
"name": "Frax Ether",
"symbol": "frxETH",
"decimals": 18
},
"networkId": 252,
"redFlags": [],
"rpc": [],
"shortName": "fraxchain",
"slug": "fraxchain",
"status": "incubating",
"testnet": false
} as const satisfies Chain;
+32
View File
@@ -0,0 +1,32 @@
import type { Chain } from "../src/types";
export default {
"chain": "FRAX",
"chainId": 2522,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmQLJk5G7zF8ZDxSxkRcpHqEqcifrJEhGmEKC6zwyPXWAw/fraxchain.png",
"width": 512,
"height": 512,
"format": "PNG"
},
"infoURL": "https://testnet.frax.com",
"name": "Fraxchain Testnet",
"nativeCurrency": {
"name": "Frax Ether",
"symbol": "frxETH",
"decimals": 18
},
"networkId": 2522,
"redFlags": [],
"rpc": [
"https://fraxchain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://2522.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.testnet.frax.com"
],
"shortName": "fraxchain-testnet",
"slug": "fraxchain-testnet",
"status": "active",
"testnet": false
} as const satisfies Chain;
+8 -8
View File
@@ -4,14 +4,14 @@ export default {
"chainId": 2710, "chainId": 2710,
"explorers": [ "explorers": [
{ {
"name": "Morphism Testnet Explorer", "name": "Morph Testnet Explorer",
"url": "https://explorer-testnet.morphism.xyz", "url": "https://explorer-testnet.morphl2.io",
"standard": "EIP3091" "standard": "EIP3091"
} }
], ],
"faucets": [], "faucets": [],
"infoURL": "https://morphism.xyz", "infoURL": "https://morphl2.io",
"name": "Morphism Testnet", "name": "Morph Testnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Ether", "name": "Ether",
"symbol": "ETH", "symbol": "ETH",
@@ -23,16 +23,16 @@ export default {
"chain": "eip155-1", "chain": "eip155-1",
"bridges": [ "bridges": [
{ {
"url": "https://bridge-testnet.morphism.xyz" "url": "https://bridge-testnet.morphl2.io"
} }
] ]
}, },
"rpc": [ "rpc": [
"https://morphism-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://morph-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://2710.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://2710.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc-testnet.morphism.xyz" "https://rpc-testnet.morphl2.io"
], ],
"shortName": "tmorph", "shortName": "tmorph",
"slug": "morphism-testnet", "slug": "morph-testnet",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+7 -8
View File
@@ -15,17 +15,15 @@ export default {
} }
} }
], ],
"faucets": [ "faucets": [],
"https://goerli.portal.zksync.io/faucet"
],
"icon": { "icon": {
"url": "ipfs://QmRkhUD6J3B9WhT4hEWLrcFVTrBhx3CQgNC783aJsrwxSN", "url": "ipfs://QmRkhUD6J3B9WhT4hEWLrcFVTrBhx3CQgNC783aJsrwxSN",
"width": 512, "width": 512,
"height": 512, "height": 512,
"format": "svg" "format": "svg"
}, },
"infoURL": "https://era.zksync.io/docs/", "infoURL": "https://zksync.io/",
"name": "zkSync Era Testnet", "name": "zkSync Era Goerli Testnet (deprecated)",
"nativeCurrency": { "nativeCurrency": {
"name": "Ether", "name": "Ether",
"symbol": "ETH", "symbol": "ETH",
@@ -37,16 +35,17 @@ export default {
"chain": "eip155-1", "chain": "eip155-1",
"bridges": [ "bridges": [
{ {
"url": "https://goerli.portal.zksync.io/bridge" "url": "https://bridge.zksync.io/"
} }
] ]
}, },
"rpc": [ "rpc": [
"https://zksync-era-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://zksync-era-goerli-testnet-deprecated.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://280.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://280.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.era.zksync.dev" "https://testnet.era.zksync.dev"
], ],
"shortName": "zksync-goerli", "shortName": "zksync-goerli",
"slug": "zksync-era-testnet", "slug": "zksync-era-goerli-testnet-deprecated",
"status": "deprecated",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+44 -11
View File
@@ -1,20 +1,53 @@
import type { Chain } from "../src/types"; import type { Chain } from "../src/types";
export default { export default {
"chain": "OGC", "chain": "ETH",
"chainId": 300, "chainId": 300,
"explorers": [], "explorers": [
{
"name": "zkSync Block Explorer",
"url": "https://sepolia.explorer.zksync.io",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmRkhUD6J3B9WhT4hEWLrcFVTrBhx3CQgNC783aJsrwxSN",
"width": 512,
"height": 512,
"format": "svg"
}
}
],
"faucets": [], "faucets": [],
"infoURL": "https://docs.gnosischain.com", "icon": {
"name": "(deprecated) Optimism on GC", "url": "ipfs://QmRkhUD6J3B9WhT4hEWLrcFVTrBhx3CQgNC783aJsrwxSN",
"width": 512,
"height": 512,
"format": "svg"
},
"infoURL": "https://zksync.io/",
"name": "zkSync Sepolia Testnet",
"nativeCurrency": { "nativeCurrency": {
"name": "xDAI", "name": "Ether",
"symbol": "xDAI", "symbol": "ETH",
"decimals": 18 "decimals": 18
}, },
"networkId": 300, "networkId": 300,
"rpc": [], "parent": {
"shortName": "ogc", "type": "L2",
"slug": "deprecated-optimism-on-gc", "chain": "eip155-1",
"status": "deprecated", "bridges": [
"testnet": false {
"url": "https://bridge.zksync.io/"
}
]
},
"redFlags": [
"reusedChainId"
],
"rpc": [
"https://zksync-sepolia-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://300.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://sepolia.era.zksync.dev"
],
"shortName": "zksync-sepolia",
"slug": "zksync-sepolia-testnet",
"testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+3 -3
View File
@@ -23,7 +23,7 @@ export default {
"format": "svg" "format": "svg"
}, },
"infoURL": "https://zksync.io/", "infoURL": "https://zksync.io/",
"name": "zkSync Era Mainnet", "name": "zkSync Mainnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Ether", "name": "Ether",
"symbol": "ETH", "symbol": "ETH",
@@ -40,11 +40,11 @@ export default {
] ]
}, },
"rpc": [ "rpc": [
"https://zksync-era.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://zksync.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://324.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://324.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.era.zksync.io" "https://mainnet.era.zksync.io"
], ],
"shortName": "zksync", "shortName": "zksync",
"slug": "zksync-era", "slug": "zksync",
"testnet": false "testnet": false
} as const satisfies Chain; } as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 35730,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": ".svg"
},
"infoURL": "https://avacloud.io",
"name": "QR1129I1",
"nativeCurrency": {
"name": "QR1129I1 Token",
"symbol": "YXAX",
"decimals": 18
},
"networkId": 35730,
"redFlags": [],
"rpc": [
"https://qr1129i1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://35730.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/qr1129i1/testnet/rpc"
],
"shortName": "QR1129I1",
"slug": "qr1129i1",
"testnet": true
} as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 36908,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": ".svg"
},
"infoURL": "https://avacloud.io",
"name": "QR1205s1",
"nativeCurrency": {
"name": "QR1205s1 Token",
"symbol": "MDN",
"decimals": 18
},
"networkId": 36908,
"redFlags": [],
"rpc": [
"https://qr1205s1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://36908.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/qr1205s1/testnet/rpc"
],
"shortName": "QR1205s1",
"slug": "qr1205s1",
"testnet": true
} as const satisfies Chain;
+24
View File
@@ -0,0 +1,24 @@
import type { Chain } from "../src/types";
export default {
"chain": "Firechain",
"chainId": 3885,
"explorers": [],
"faucets": [],
"infoURL": "https://docs.thefirechain.com/",
"name": "Firechain zkEVM Ghostrider",
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"networkId": 3885,
"rpc": [
"https://firechain-zkevm-ghostrider.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://3885.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.zkevm.ghostrider.thefirechain.com"
],
"shortName": "firechain-zkEVM-ghostrider",
"slug": "firechain-zkevm-ghostrider",
"testnet": false,
"title": "Firechain zkEVM Ghostrider"
} as const satisfies Chain;
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"chain": "X1",
"chainId": 4003,
"explorers": [
{
"name": "Blockscout",
"url": "https://explorer.x1-fastnet.xen.network",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
"width": 551,
"height": 540,
"format": "png"
}
}
],
"faucets": [],
"infoURL": "https://docs.xen.network/go-x1/",
"name": "X1 Fastnet",
"nativeCurrency": {
"name": "XN",
"symbol": "XN",
"decimals": 18
},
"networkId": 4003,
"rpc": [
"https://x1-fastnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://4003.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://x1-fastnet.xen.network"
],
"shortName": "x1-fastnet",
"slug": "x1-fastnet",
"testnet": false
} as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "XFI",
"chainId": 4157,
"explorers": [
{
"name": "Scan Testnet",
"url": "https://scan.testnet.ms/",
"standard": "EIP1559"
}
],
"faucets": [],
"features": [],
"name": "CrossFi Testnet",
"nativeCurrency": {
"name": "XFI",
"symbol": "XFI",
"decimals": 18
},
"networkId": 4157,
"redFlags": [],
"rpc": [
"https://crossfi-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://4157.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.testnet.ms/"
],
"shortName": "XFI",
"slug": "crossfi-testnet",
"testnet": true,
"title": "https://scan.testnet.ms/"
} as const satisfies Chain;
+49
View File
@@ -0,0 +1,49 @@
import type { Chain } from "../src/types";
export default {
"chain": "ETH",
"chainId": 43851,
"explorers": [
{
"name": "ZKFair Testnet Info",
"url": "https://testnet-scan.zkfair.io",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmVb682D4mUXkKNP28xxJDNgSYbDLvEc3kVYx7TQxEa6Cw",
"width": 400,
"height": 400,
"format": "jpg"
}
}
],
"faucets": [],
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"icon": {
"url": "ipfs://QmVb682D4mUXkKNP28xxJDNgSYbDLvEc3kVYx7TQxEa6Cw",
"width": 400,
"height": 400,
"format": "jpg"
},
"infoURL": "https://zkfair.io",
"name": "ZKFair Testnet",
"nativeCurrency": {
"name": "USDC Token",
"symbol": "USDC",
"decimals": 18
},
"networkId": 43851,
"rpc": [
"https://zkfair-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://43851.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.zkfair.io"
],
"shortName": "ZKFair-Testnet",
"slug": "zkfair-testnet",
"testnet": true
} as const satisfies Chain;
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"chain": "Areon",
"chainId": 463,
"explorers": [
{
"name": "AreonScan",
"url": "https://areonscan.com",
"standard": "none"
}
],
"faucets": [],
"icon": {
"url": "ipfs://bafkreihs2nrnizpcuzjmuu2yi7wrtwd7qlqje46qnil5bnntfbfkb2roea",
"width": 1000,
"height": 1000,
"format": "png"
},
"infoURL": "https://areon.network",
"name": "Areon Network Mainnet",
"nativeCurrency": {
"name": "Areon",
"symbol": "AREA",
"decimals": 18
},
"networkId": 463,
"rpc": [
"https://areon-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://463.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet-rpc.areon.network"
],
"shortName": "area",
"slug": "areon-network",
"testnet": false
} as const satisfies Chain;
+2 -2
View File
@@ -5,7 +5,7 @@ export default {
"explorers": [ "explorers": [
{ {
"name": "Scroll Sepolia Etherscan", "name": "Scroll Sepolia Etherscan",
"url": "https://sepolia.scrollscan.dev", "url": "https://sepolia.scrollscan.com",
"standard": "EIP3091" "standard": "EIP3091"
}, },
{ {
@@ -28,7 +28,7 @@ export default {
"chain": "eip155-11155111", "chain": "eip155-11155111",
"bridges": [ "bridges": [
{ {
"url": "https://scroll.io/bridge" "url": "https://sepolia.scroll.io/bridge"
} }
] ]
}, },
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 56914,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "KK1223",
"nativeCurrency": {
"name": "KK1223 Token",
"symbol": "KLK",
"decimals": 18
},
"networkId": 56914,
"redFlags": [],
"rpc": [
"https://kk1223.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://56914.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avacloud-dev.io/bf540c23-4601-4768-9e26-f2e5f0f89c18"
],
"shortName": "KK1223",
"slug": "kk1223",
"testnet": true
} as const satisfies Chain;
+41
View File
@@ -0,0 +1,41 @@
import type { Chain } from "../src/types";
export default {
"chain": "GCODE",
"chainId": 59971,
"explorers": [
{
"name": "Genesys Scan",
"url": "https://genesysscan.io",
"standard": "none",
"icon": {
"url": "ipfs://bafkreihgmpaceze7rxpajv7yrlx3cb6daqubippkpvgryzairtaubsjjoe",
"width": 512,
"height": 512,
"format": "png"
}
}
],
"faucets": [],
"icon": {
"url": "ipfs://bafkreihgmpaceze7rxpajv7yrlx3cb6daqubippkpvgryzairtaubsjjoe",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://genesyscode.io",
"name": "Genesys Code Mainnet",
"nativeCurrency": {
"name": "GenesysCode",
"symbol": "GCODE",
"decimals": 18
},
"networkId": 59971,
"rpc": [
"https://genesys-code.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://59971.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.genesyscode.io/"
],
"shortName": "gcode",
"slug": "genesys-code",
"testnet": false
} as const satisfies Chain;
+11 -10
View File
@@ -1,11 +1,11 @@
import type { Chain } from "../src/types"; import type { Chain } from "../src/types";
export default { export default {
"chain": "RTH", "chain": "HYP",
"chainId": 622277, "chainId": 622277,
"explorers": [ "explorers": [
{ {
"name": "rethereum", "name": "hypra",
"url": "https://explorer.rethereum.org", "url": "https://explorer.hypra.network",
"standard": "EIP3091", "standard": "EIP3091",
"icon": { "icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
@@ -30,22 +30,23 @@ export default {
"height": 830, "height": 830,
"format": "png" "format": "png"
}, },
"infoURL": "https://www.rethereum.org", "infoURL": "https://www.hypra.network",
"name": "Rethereum Mainnet", "name": "Hypra Mainnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Rethereum", "name": "Hypra",
"symbol": "RTH", "symbol": "HYP",
"decimals": 18 "decimals": 18
}, },
"networkId": 622277, "networkId": 622277,
"rpc": [ "rpc": [
"https://rethereum.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://hypra.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://622277.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://622277.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.hypra.network",
"https://rpc.rethereum.org", "https://rpc.rethereum.org",
"https://rethereum.rpc.restratagem.com", "https://rethereum.rpc.restratagem.com",
"https://rpc.rthcentral.org" "https://rpc.rthcentral.org"
], ],
"shortName": "rth", "shortName": "hyp",
"slug": "rethereum", "slug": "hypra",
"testnet": false "testnet": false
} as const satisfies Chain; } as const satisfies Chain;
@@ -1,7 +1,7 @@
import type { Chain } from "../src/types"; import type { Chain } from "../src/types";
export default { export default {
"chain": "AUT", "chain": "AUT",
"chainId": 65010000, "chainId": 65010001,
"explorers": [ "explorers": [
{ {
"name": "autonity-blockscout", "name": "autonity-blockscout",
@@ -19,20 +19,20 @@ export default {
"format": "png" "format": "png"
}, },
"infoURL": "https://autonity.org/", "infoURL": "https://autonity.org/",
"name": "Autonity Bakerloo (Thames) Testnet", "name": "Autonity Bakerloo (Barada) Testnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Bakerloo Auton", "name": "Bakerloo Auton",
"symbol": "ATN", "symbol": "ATN",
"decimals": 18 "decimals": 18
}, },
"networkId": 65010000, "networkId": 65010001,
"rpc": [ "rpc": [
"https://autonity-bakerloo-thames-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://autonity-bakerloo-barada-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://65010000.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://65010001.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc1.bakerloo.autonity.org/", "https://rpc1.bakerloo.autonity.org/",
"wss://rpc1.bakerloo.autonity.org/ws/" "wss://rpc1.bakerloo.autonity.org/ws/"
], ],
"shortName": "bakerloo-0", "shortName": "bakerloo-01",
"slug": "autonity-bakerloo-thames-testnet", "slug": "autonity-bakerloo-barada-testnet",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+29
View File
@@ -0,0 +1,29 @@
import type { Chain } from "../src/types";
export default {
"chain": "Kalichain",
"chainId": 653,
"explorers": [
{
"name": "kalichain explorer",
"url": "https://explorer.kalichain.com",
"standard": "EIP3091"
}
],
"faucets": [],
"infoURL": "https://kalichain.com",
"name": "Kalichain Mainnet",
"nativeCurrency": {
"name": "kalis",
"symbol": "KALIS",
"decimals": 18
},
"networkId": 653,
"rpc": [
"https://kalichain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://653.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.kalichain.com"
],
"shortName": "kalichain",
"slug": "kalichain",
"testnet": false
} as const satisfies Chain;
+27
View File
@@ -0,0 +1,27 @@
import type { Chain } from "../src/types";
export default {
"chain": "OCASH",
"chainId": 660868,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://ipfs.io/ipfs/QmbwuoezvkfZBY9nrZ65n3iHGyhJG6yDRyhPjqE6k3uCiM",
"width": 350,
"height": 350,
"format": "PNG"
},
"infoURL": "https://www.overline.network",
"name": "Ocash testnet",
"nativeCurrency": {
"name": "OCASH",
"symbol": "OCASH",
"decimals": 18
},
"networkId": 660868,
"redFlags": [],
"rpc": [],
"shortName": "ocash",
"slug": "ocash-testnet",
"testnet": true
} as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 69740,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": ".svg"
},
"infoURL": "https://avacloud.io",
"name": "Will's Testnet",
"nativeCurrency": {
"name": "Will's Testnet Token",
"symbol": "WLDVNT",
"decimals": 18
},
"networkId": 69740,
"redFlags": [],
"rpc": [
"https://will-s-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://69740.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "Will's Testnet",
"slug": "will-s-testnet",
"testnet": true
} as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 70466,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Cohan test3",
"nativeCurrency": {
"name": "Cohan test3 Token",
"symbol": "HYN",
"decimals": 18
},
"networkId": 70466,
"redFlags": [],
"rpc": [
"https://cohan-test3.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://70466.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avacloud-dev.io/f44b72ee-0574-44d2-a10b-363a74964145"
],
"shortName": "Cohan test3",
"slug": "cohan-test3",
"testnet": true
} as const satisfies Chain;
+24
View File
@@ -0,0 +1,24 @@
import type { Chain } from "../src/types";
export default {
"chain": "BLU",
"chainId": 727,
"explorers": [],
"faucets": [],
"infoURL": "https://www.blucrates.com",
"name": "Blucrates",
"nativeCurrency": {
"name": "Blucrates",
"symbol": "BLU",
"decimals": 18
},
"networkId": 727,
"rpc": [
"https://blucrates.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://727.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://data.bluchain.pro"
],
"shortName": "blu",
"slip44": 727,
"slug": "blucrates",
"testnet": false
} as const satisfies Chain;
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 80182,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": ".svg"
},
"infoURL": "https://avacloud.io",
"name": "QI M 12051",
"nativeCurrency": {
"name": "QI M 12051 Token",
"symbol": "VTV",
"decimals": 18
},
"networkId": 80182,
"redFlags": [],
"rpc": [
"https://qi-m-12051.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://80182.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avacloud-dev.io/b19c9e32-f359-451f-ad15-7ec784625c04"
],
"shortName": "QI M 12051",
"slug": "qi-m-12051",
"testnet": true
} as const satisfies Chain;
+29
View File
@@ -0,0 +1,29 @@
import type { Chain } from "../src/types";
export default {
"chain": "Nordek",
"chainId": 81041,
"explorers": [
{
"name": "nordek",
"url": "https://nordekscan.com",
"standard": "EIP3091"
}
],
"faucets": [],
"infoURL": "https://nordekscan.com",
"name": "Nordek Mainnet",
"nativeCurrency": {
"name": "NRK",
"symbol": "NRK",
"decimals": 18
},
"networkId": 81041,
"rpc": [
"https://nordek.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://81041.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet-rpc.nordekscan.com"
],
"shortName": "nordek",
"slug": "nordek",
"testnet": false
} as const satisfies Chain;
+39
View File
@@ -0,0 +1,39 @@
import type { Chain } from "../src/types";
export default {
"chain": "Firechain",
"chainId": 814,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmYjuztyURb3Fc6ZTLgCbwQa64CcVoigF5j9cafzuSbqgf",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://docs.thefirechain.com/",
"name": "Firechain zkEVM",
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"networkId": 814,
"parent": {
"type": "L2",
"chain": "eip155-1",
"bridges": [
{
"url": "https://zkevm.bridge.rpc.thefirechain.com"
}
]
},
"rpc": [
"https://firechain-zkevm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://814.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.zkevm.thefirechain.com"
],
"shortName": "firechan-zkEVM",
"slug": "firechain-zkevm",
"testnet": false,
"title": "Firechain zkEVM"
} as const satisfies Chain;
+1 -1
View File
@@ -5,7 +5,7 @@ export default {
"explorers": [ "explorers": [
{ {
"name": "blockscout", "name": "blockscout",
"url": "https://testnet.torusscan.com", "url": "https://testnet.toruscan.com",
"standard": "EIP3091", "standard": "EIP3091",
"icon": { "icon": {
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM", "url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
+31
View File
@@ -0,0 +1,31 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 88883,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": ".svg"
},
"infoURL": "https://avacloud.io",
"name": "Proj Orc Testnet Alpha",
"nativeCurrency": {
"name": "Proj Orc Testnet Alpha Token",
"symbol": "STX",
"decimals": 18
},
"networkId": 88883,
"redFlags": [],
"rpc": [
"https://proj-orc-testnet-alpha.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://88883.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/projorctes/testnet/rpc"
],
"shortName": "Proj Orc Testnet Alpha",
"slug": "proj-orc-testnet-alpha",
"testnet": true
} as const satisfies Chain;
+2 -1
View File
@@ -29,7 +29,8 @@ export default {
"rpc": [ "rpc": [
"https://jibchain-l1.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://jibchain-l1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://8899.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://8899.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc-l1.jibchain.net" "https://rpc-l1.jibchain.net",
"https://jib-rpc.inan.in.th"
], ],
"shortName": "jbc", "shortName": "jbc",
"slug": "jibchain-l1", "slug": "jibchain-l1",
+17 -5
View File
@@ -2,12 +2,24 @@ import type { Chain } from "../src/types";
export default { export default {
"chain": "Oort Mainnet", "chain": "Oort Mainnet",
"chainId": 970, "chainId": 970,
"explorers": [], "explorers": [
{
"name": "Oort Mainnet Explorer",
"url": "https://mainnet-scan.oortech.com",
"standard": "none",
"icon": {
"url": "ipfs://bafkreidrbvklkb52sgmg7cmy42fhf7vqpig7qj7bnrq24ijdwywkzr2tfy",
"width": 1440,
"height": 1440,
"format": "png"
}
}
],
"faucets": [], "faucets": [],
"icon": { "icon": {
"url": "ipfs://QmZ1jbxFZcuotj3eZ6iKFrg9ZXnaV8AK6sGRa7ELrceWyD", "url": "ipfs://bafkreidrbvklkb52sgmg7cmy42fhf7vqpig7qj7bnrq24ijdwywkzr2tfy",
"width": 1043, "width": 1440,
"height": 1079, "height": 1440,
"format": "png" "format": "png"
}, },
"infoURL": "https://oortech.com", "infoURL": "https://oortech.com",
@@ -21,7 +33,7 @@ export default {
"rpc": [ "rpc": [
"https://oort.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://oort.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://970.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://970.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.oortech.com" "https://mainnet-rpc.oortech.com"
], ],
"shortName": "ccn", "shortName": "ccn",
"slug": "oort", "slug": "oort",
+21 -5
View File
@@ -2,12 +2,24 @@ import type { Chain } from "../src/types";
export default { export default {
"chain": "MainnetDev", "chain": "MainnetDev",
"chainId": 9700, "chainId": 9700,
"explorers": [], "explorers": [
{
"name": "Oort MainnetDev Scan",
"url": "https://dev-scan.oortech.com",
"standard": "none",
"icon": {
"url": "ipfs://bafkreidrbvklkb52sgmg7cmy42fhf7vqpig7qj7bnrq24ijdwywkzr2tfy",
"width": 1440,
"height": 1440,
"format": "png"
}
}
],
"faucets": [], "faucets": [],
"icon": { "icon": {
"url": "ipfs://QmZ1jbxFZcuotj3eZ6iKFrg9ZXnaV8AK6sGRa7ELrceWyD", "url": "ipfs://bafkreidrbvklkb52sgmg7cmy42fhf7vqpig7qj7bnrq24ijdwywkzr2tfy",
"width": 1043, "width": 1440,
"height": 1079, "height": 1440,
"format": "png" "format": "png"
}, },
"infoURL": "https://oortech.com", "infoURL": "https://oortech.com",
@@ -18,7 +30,11 @@ export default {
"decimals": 18 "decimals": 18
}, },
"networkId": 9700, "networkId": 9700,
"rpc": [], "rpc": [
"https://oort-dev.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://9700.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://dev-rpc.oortech.com"
],
"shortName": "MainnetDev", "shortName": "MainnetDev",
"slug": "oort-dev", "slug": "oort-dev",
"testnet": false, "testnet": false,
+16 -4
View File
@@ -2,12 +2,24 @@ import type { Chain } from "../src/types";
export default { export default {
"chain": "Ascraeus", "chain": "Ascraeus",
"chainId": 972, "chainId": 972,
"explorers": [], "explorers": [
{
"name": "Oort Ascraeus Explorer",
"url": "https://ascraeus-scan.oortech.com",
"standard": "none",
"icon": {
"url": "ipfs://bafkreidrbvklkb52sgmg7cmy42fhf7vqpig7qj7bnrq24ijdwywkzr2tfy",
"width": 1440,
"height": 1440,
"format": "png"
}
}
],
"faucets": [], "faucets": [],
"icon": { "icon": {
"url": "ipfs://QmZ1jbxFZcuotj3eZ6iKFrg9ZXnaV8AK6sGRa7ELrceWyD", "url": "ipfs://bafkreidrbvklkb52sgmg7cmy42fhf7vqpig7qj7bnrq24ijdwywkzr2tfy",
"width": 1043, "width": 1440,
"height": 1079, "height": 1440,
"format": "png" "format": "png"
}, },
"infoURL": "https://oortech.com", "infoURL": "https://oortech.com",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/chains", "name": "@thirdweb-dev/chains",
"version": "0.1.60", "version": "0.1.61",
"main": "dist/thirdweb-dev-chains.cjs.js", "main": "dist/thirdweb-dev-chains.cjs.js",
"module": "dist/thirdweb-dev-chains.esm.js", "module": "dist/thirdweb-dev-chains.esm.js",
"exports": { "exports": {
File diff suppressed because one or more lines are too long
+27
View File
@@ -1,5 +1,32 @@
# thirdweb # thirdweb
## 0.13.25
### Patch Changes
- Updated dependencies [[`33c9f6b1`](https://github.com/thirdweb-dev/js/commit/33c9f6b1ab3e65187b2c49c083412d39a1334bba), [`de5ebc90`](https://github.com/thirdweb-dev/js/commit/de5ebc9093aaf5fc08bc0d2d414138b520fe17fe), [`e10173bf`](https://github.com/thirdweb-dev/js/commit/e10173bf8aeaaabdb45231109b4da0c52c91b9da), [`09bafa9a`](https://github.com/thirdweb-dev/js/commit/09bafa9aebadb01641214747148c67d0b39c1275)]:
- @thirdweb-dev/wallets@2.3.0
- @thirdweb-dev/auth@4.1.17
## 0.13.24
### Patch Changes
- Updated dependencies [[`bcfa9463`](https://github.com/thirdweb-dev/js/commit/bcfa9463bbae6bf1d3b6389b7a141f65ef3e1173)]:
- @thirdweb-dev/sdk@4.0.21
- @thirdweb-dev/wallets@2.2.1
- @thirdweb-dev/auth@4.1.16
## 0.13.23
### Patch Changes
- Updated dependencies [[`d2001ca4`](https://github.com/thirdweb-dev/js/commit/d2001ca464aa699ac821c97eb37de7409ba865f3), [`85842c15`](https://github.com/thirdweb-dev/js/commit/85842c1596c901e228be1894b6702a8871d9e794), [`e595d4d9`](https://github.com/thirdweb-dev/js/commit/e595d4d92f03e36cbe61e1f00a366e37ede5d814), [`497677f3`](https://github.com/thirdweb-dev/js/commit/497677f3596977fa90ebc0fa76cb5842d46d8dcf), [`94966069`](https://github.com/thirdweb-dev/js/commit/9496606964d65268f8ee6bf9f78b2786e99d33ac), [`15ae5e7f`](https://github.com/thirdweb-dev/js/commit/15ae5e7f95a482a9736923c0e10916a0a6115c3d)]:
- @thirdweb-dev/chains@0.1.61
- @thirdweb-dev/sdk@4.0.20
- @thirdweb-dev/wallets@2.2.0
- @thirdweb-dev/auth@4.1.15
## 0.13.22 ## 0.13.22
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "thirdweb", "name": "thirdweb",
"main": "dist/cli/index.js", "main": "dist/cli/index.js",
"version": "0.13.22", "version": "0.13.25",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0", "license": "Apache-2.0",
+27
View File
@@ -1,5 +1,32 @@
# @thirdweb-dev/react-core # @thirdweb-dev/react-core
## 4.1.15
### Patch Changes
- Updated dependencies [[`33c9f6b1`](https://github.com/thirdweb-dev/js/commit/33c9f6b1ab3e65187b2c49c083412d39a1334bba), [`de5ebc90`](https://github.com/thirdweb-dev/js/commit/de5ebc9093aaf5fc08bc0d2d414138b520fe17fe), [`e10173bf`](https://github.com/thirdweb-dev/js/commit/e10173bf8aeaaabdb45231109b4da0c52c91b9da), [`09bafa9a`](https://github.com/thirdweb-dev/js/commit/09bafa9aebadb01641214747148c67d0b39c1275)]:
- @thirdweb-dev/wallets@2.3.0
- @thirdweb-dev/auth@4.1.17
## 4.1.14
### Patch Changes
- Updated dependencies [[`bcfa9463`](https://github.com/thirdweb-dev/js/commit/bcfa9463bbae6bf1d3b6389b7a141f65ef3e1173)]:
- @thirdweb-dev/sdk@4.0.21
- @thirdweb-dev/wallets@2.2.1
- @thirdweb-dev/auth@4.1.16
## 4.1.13
### Patch Changes
- Updated dependencies [[`d2001ca4`](https://github.com/thirdweb-dev/js/commit/d2001ca464aa699ac821c97eb37de7409ba865f3), [`85842c15`](https://github.com/thirdweb-dev/js/commit/85842c1596c901e228be1894b6702a8871d9e794), [`e595d4d9`](https://github.com/thirdweb-dev/js/commit/e595d4d92f03e36cbe61e1f00a366e37ede5d814), [`497677f3`](https://github.com/thirdweb-dev/js/commit/497677f3596977fa90ebc0fa76cb5842d46d8dcf), [`94966069`](https://github.com/thirdweb-dev/js/commit/9496606964d65268f8ee6bf9f78b2786e99d33ac), [`15ae5e7f`](https://github.com/thirdweb-dev/js/commit/15ae5e7f95a482a9736923c0e10916a0a6115c3d)]:
- @thirdweb-dev/chains@0.1.61
- @thirdweb-dev/sdk@4.0.20
- @thirdweb-dev/wallets@2.2.0
- @thirdweb-dev/auth@4.1.15
## 4.1.12 ## 4.1.12
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/react-core", "name": "@thirdweb-dev/react-core",
"version": "4.1.12", "version": "4.1.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0", "license": "Apache-2.0",
+2 -4
View File
@@ -3,9 +3,7 @@ import type {
AirdropInput, AirdropInput,
Amount, Amount,
Erc721, Erc721,
Erc721Mintable,
Erc1155, Erc1155,
Erc1155Mintable,
ListingType, ListingType,
NFTMetadataInput, NFTMetadataInput,
Price, Price,
@@ -150,9 +148,9 @@ export type MintNFTParams = {
* *
*/ */
export type MintNFTReturnType<TContract> = TContract extends Erc721 export type MintNFTReturnType<TContract> = TContract extends Erc721
? Awaited<ReturnType<Erc721Mintable["to"]>> ? Awaited<ReturnType<Erc721["mintTo"]>>
: TContract extends Erc1155 : TContract extends Erc1155
? Awaited<ReturnType<Erc1155Mintable["to"]>> ? Awaited<ReturnType<Erc1155["mintTo"]>>
: never; : never;
/** /**
@@ -1,5 +1,11 @@
# @thirdweb-dev/react-native-compat # @thirdweb-dev/react-native-compat
## 0.5.0
## 0.4.14
## 0.4.13
## 0.4.12 ## 0.4.12
## 0.4.11 ## 0.4.11
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@thirdweb-dev/react-native-compat", "name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects", "description": "Shims for Thirdweb in React Native Projects",
"version": "0.4.12", "version": "0.5.0",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
"license": "Apache-2.0", "license": "Apache-2.0",
+43
View File
@@ -1,5 +1,48 @@
# @thirdweb-dev/react-native # @thirdweb-dev/react-native
## 0.5.0
### Minor Changes
- [#2018](https://github.com/thirdweb-dev/js/pull/2018) [`33c9f6b1`](https://github.com/thirdweb-dev/js/commit/33c9f6b1ab3e65187b2c49c083412d39a1334bba) Thanks [@iketw](https://github.com/iketw)! - Enforces passing an encryption key for custom jwt auth
```typescript
const embedded = useEmbeddedWallet();
embedded.connect({
jwt: "<token>",
encryptionKey: "<my-key>",
strategy: "jwt",
});
```
### Patch Changes
- [#2072](https://github.com/thirdweb-dev/js/pull/2072) [`2346396b`](https://github.com/thirdweb-dev/js/commit/2346396bdffeed169cdfc15839bfb42d87f24303) Thanks [@iketw](https://github.com/iketw)! - Adds analytics nonce to embedded wallet
- Updated dependencies [[`33c9f6b1`](https://github.com/thirdweb-dev/js/commit/33c9f6b1ab3e65187b2c49c083412d39a1334bba), [`de5ebc90`](https://github.com/thirdweb-dev/js/commit/de5ebc9093aaf5fc08bc0d2d414138b520fe17fe), [`e10173bf`](https://github.com/thirdweb-dev/js/commit/e10173bf8aeaaabdb45231109b4da0c52c91b9da), [`09bafa9a`](https://github.com/thirdweb-dev/js/commit/09bafa9aebadb01641214747148c67d0b39c1275)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 0.4.14
### Patch Changes
- Updated dependencies [[`bcfa9463`](https://github.com/thirdweb-dev/js/commit/bcfa9463bbae6bf1d3b6389b7a141f65ef3e1173)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 0.4.13
### Patch Changes
- Updated dependencies [[`d2001ca4`](https://github.com/thirdweb-dev/js/commit/d2001ca464aa699ac821c97eb37de7409ba865f3), [`85842c15`](https://github.com/thirdweb-dev/js/commit/85842c1596c901e228be1894b6702a8871d9e794), [`e595d4d9`](https://github.com/thirdweb-dev/js/commit/e595d4d92f03e36cbe61e1f00a366e37ede5d814), [`497677f3`](https://github.com/thirdweb-dev/js/commit/497677f3596977fa90ebc0fa76cb5842d46d8dcf), [`94966069`](https://github.com/thirdweb-dev/js/commit/9496606964d65268f8ee6bf9f78b2786e99d33ac), [`15ae5e7f`](https://github.com/thirdweb-dev/js/commit/15ae5e7f95a482a9736923c0e10916a0a6115c3d)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 0.4.12 ## 0.4.12
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/react-native", "name": "@thirdweb-dev/react-native",
"version": "0.4.12", "version": "0.5.0",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0", "license": "Apache-2.0",
@@ -29,6 +29,7 @@ import {
EWS_VERSION_HEADER, EWS_VERSION_HEADER,
ROUTE_AUTH_JWT_CALLBACK, ROUTE_AUTH_JWT_CALLBACK,
ROUTE_HEADLESS_OAUTH_LOGIN, ROUTE_HEADLESS_OAUTH_LOGIN,
THIRDWEB_SESSION_NONCE_HEADER,
} from "./helpers/constants"; } from "./helpers/constants";
import { AuthOptions, OauthOption, VerifiedTokenResponse } from "../types"; import { AuthOptions, OauthOption, VerifiedTokenResponse } from "../types";
import { InAppBrowser } from "react-native-inappbrowser-reborn"; import { InAppBrowser } from "react-native-inappbrowser-reborn";
@@ -38,6 +39,7 @@ import {
reactNativePackageVersion, reactNativePackageVersion,
} from "../../../../utils/version"; } from "../../../../utils/version";
import { BUNDLE_ID_HEADER } from "../../../../constants/headers"; import { BUNDLE_ID_HEADER } from "../../../../constants/headers";
import { ANALYTICS } from "./helpers/analytics";
export async function sendVerificationEmail(options: { export async function sendVerificationEmail(options: {
email: string; email: string;
@@ -189,6 +191,7 @@ export async function socialLogin(oauthOptions: OauthOption, clientId: string) {
headers: { headers: {
[EWS_VERSION_HEADER]: reactNativePackageVersion, [EWS_VERSION_HEADER]: reactNativePackageVersion,
[BUNDLE_ID_HEADER]: appBundleId, [BUNDLE_ID_HEADER]: appBundleId,
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
}, },
}); });
@@ -271,6 +274,7 @@ export async function customJwt(authOptions: AuthOptions, clientId: string) {
"Content-Type": "application/json", "Content-Type": "application/json",
[EWS_VERSION_HEADER]: reactNativePackageVersion, [EWS_VERSION_HEADER]: reactNativePackageVersion,
[BUNDLE_ID_HEADER]: appBundleId, [BUNDLE_ID_HEADER]: appBundleId,
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
}, },
body: JSON.stringify({ body: JSON.stringify({
jwt: jwt, jwt: jwt,
@@ -0,0 +1,5 @@
import { getRandomString } from "./getRandomValues";
export const ANALYTICS = {
nonce: getRandomString(16),
};
@@ -8,6 +8,7 @@ import {
ROUTE_VALIDATE_USER_MANAGED_OTP, ROUTE_VALIDATE_USER_MANAGED_OTP,
ROUTE_IS_VALID_USER_MANAGED_OTP, ROUTE_IS_VALID_USER_MANAGED_OTP,
EWS_VERSION_HEADER, EWS_VERSION_HEADER,
THIRDWEB_SESSION_NONCE_HEADER,
} from "../constants"; } from "../constants";
import { getAuthTokenClient } from "../storage/local"; import { getAuthTokenClient } from "../storage/local";
import { import {
@@ -24,6 +25,7 @@ import {
reactNativePackageVersion, reactNativePackageVersion,
} from "../../../../../../utils/version"; } from "../../../../../../utils/version";
import { BUNDLE_ID_HEADER } from "../../../../../../constants/headers"; import { BUNDLE_ID_HEADER } from "../../../../../../constants/headers";
import { ANALYTICS } from "../analytics";
const EMBEDDED_WALLET_TOKEN_HEADER = "embedded-wallet-token"; const EMBEDDED_WALLET_TOKEN_HEADER = "embedded-wallet-token";
const PAPER_CLIENT_ID_HEADER = "x-thirdweb-client-id"; const PAPER_CLIENT_ID_HEADER = "x-thirdweb-client-id";
@@ -31,6 +33,7 @@ const HEADERS = {
"Content-Type": "application/json", "Content-Type": "application/json",
[BUNDLE_ID_HEADER]: appBundleId, [BUNDLE_ID_HEADER]: appBundleId,
[EWS_VERSION_HEADER]: reactNativePackageVersion, [EWS_VERSION_HEADER]: reactNativePackageVersion,
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
}; };
export const verifyClientId = async (clientId: string) => { export const verifyClientId = async (clientId: string) => {
@@ -68,6 +71,7 @@ export const authFetchEmbeddedWalletUser = async (
[BUNDLE_ID_HEADER]: appBundleId, [BUNDLE_ID_HEADER]: appBundleId,
[PAPER_CLIENT_ID_HEADER]: clientId, [PAPER_CLIENT_ID_HEADER]: clientId,
[EWS_VERSION_HEADER]: reactNativePackageVersion, [EWS_VERSION_HEADER]: reactNativePackageVersion,
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
} }
: { : {
Authorization: `Bearer ${EMBEDDED_WALLET_TOKEN_HEADER}:${ Authorization: `Bearer ${EMBEDDED_WALLET_TOKEN_HEADER}:${
@@ -76,6 +80,7 @@ export const authFetchEmbeddedWalletUser = async (
[BUNDLE_ID_HEADER]: appBundleId, [BUNDLE_ID_HEADER]: appBundleId,
[PAPER_CLIENT_ID_HEADER]: clientId, [PAPER_CLIENT_ID_HEADER]: clientId,
[EWS_VERSION_HEADER]: reactNativePackageVersion, [EWS_VERSION_HEADER]: reactNativePackageVersion,
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
}; };
return fetch(url, params); return fetch(url, params);
}; };
@@ -4,7 +4,7 @@ import {
COGNITO_APP_CLIENT_ID, COGNITO_APP_CLIENT_ID,
COGNITO_USER_POOL_ID, COGNITO_USER_POOL_ID,
} from "../constants"; } from "../constants";
import { getRandomValues } from "../getRandomValues"; import { getRandomString } from "../getRandomValues";
Amplify.configure({ Amplify.configure({
Auth: { Auth: {
@@ -25,13 +25,6 @@ export async function cognitoEmailSignUp(email: string, clientId: string) {
await Auth.signOut(); await Auth.signOut();
} }
function getRandomString(bytes: number) {
const randomValues = getRandomValues(new Uint8Array(bytes));
return Array.from(randomValues)
.map((nr) => nr.toString(16).padStart(2, "0"))
.join("");
}
export async function cognitoEmailSignIn(email: string, clientId: string) { export async function cognitoEmailSignIn(email: string, clientId: string) {
const cognitoUser = await Auth.signIn(`${email}:email:${clientId}`); const cognitoUser = await Auth.signIn(`${email}:email:${clientId}`);
return cognitoUser; return cognitoUser;
@@ -128,14 +128,12 @@ async function getRecoveryCode(
RecoveryShareManagement.CLOUD_MANAGED RecoveryShareManagement.CLOUD_MANAGED
) { ) {
if (storedToken.authProvider === AuthProvider.CUSTOM_JWT) { if (storedToken.authProvider === AuthProvider.CUSTOM_JWT) {
// derive sub here if (!recoveryCode) {
const code = extractSubFromJwt(storedToken.jwtToken);
if (!code) {
throw new Error( throw new Error(
`GetRecoveryCode error: ${ErrorMessages.missingRecoveryCode}`, `GetRecoveryCode error: ${ErrorMessages.missingRecoveryCode}`,
); );
} }
return code; return recoveryCode;
} else { } else {
try { try {
const code = await getCognitoRecoveryPassword(clientId); const code = await getCognitoRecoveryPassword(clientId);
@@ -156,25 +154,3 @@ async function getRecoveryCode(
throw new Error("Invalid recovery share management option"); throw new Error("Invalid recovery share management option");
} }
} }
function extractSubFromJwt(jwtToken: string): string | undefined {
const parts = jwtToken.split(".");
if (parts.length !== 3) {
throw new Error("Invalid JWT format.");
}
const encodedPayload = parts[1];
if (!encodedPayload) {
throw new Error("Invalid JWT format.");
}
const decodedPayload = Buffer.from(encodedPayload, "base64").toString("utf8");
try {
const payloadObject = JSON.parse(decodedPayload);
if (payloadObject && payloadObject.sub) {
return payloadObject.sub;
}
} catch (error) {
throw new Error("Error parsing JWT payload as JSON.");
}
}
@@ -13,6 +13,7 @@ export const RECOVERY_SHARE_INDEX = RECOVERY_SHARE_ID - 1;
export const AWS_REGION = "us-west-2"; export const AWS_REGION = "us-west-2";
export const EWS_VERSION_HEADER = "x-embedded-wallet-version"; export const EWS_VERSION_HEADER = "x-embedded-wallet-version";
export const THIRDWEB_SESSION_NONCE_HEADER = "x-session-nonce";
export const COGNITO_USER_POOL_ID = "us-west-2_UFwLcZIpq"; export const COGNITO_USER_POOL_ID = "us-west-2_UFwLcZIpq";
export const COGNITO_APP_CLIENT_ID = "2e02ha2ce6du13ldk8pai4h3d0"; export const COGNITO_APP_CLIENT_ID = "2e02ha2ce6du13ldk8pai4h3d0";
@@ -11,3 +11,10 @@ export function getRandomValues<T extends IntArrayBufferView>(array: T): T {
// @ts-ignore getRandomValues is polyfilled // @ts-ignore getRandomValues is polyfilled
return crypto.getRandomValues(array); return crypto.getRandomValues(array);
} }
export function getRandomString(bytes: number) {
const randomValues = getRandomValues(new Uint8Array(bytes));
return Array.from(randomValues)
.map((nr) => nr.toString(16).padStart(2, "0"))
.join("");
}
@@ -70,7 +70,7 @@ type SocialAuthParams = {
type JwtAuthParams = { type JwtAuthParams = {
strategy: "jwt"; strategy: "jwt";
jwt: string; jwt: string;
encryptionKey?: string; encryptionKey: string;
}; };
// this is the input to 'authenticate' // this is the input to 'authenticate'
@@ -13,6 +13,8 @@ import {
import { EMAIL_WALLET_ICON } from "../../../assets/svgs"; import { EMAIL_WALLET_ICON } from "../../../assets/svgs";
import { WalletMeta } from "@thirdweb-dev/wallets/dist/declarations/src/evm/wallets/base"; import { WalletMeta } from "@thirdweb-dev/wallets/dist/declarations/src/evm/wallets/base";
import { AUTH_OPTIONS_ICONS } from "../../types/embedded-wallet"; import { AUTH_OPTIONS_ICONS } from "../../types/embedded-wallet";
import { getRandomString } from "../../connectors/embedded-wallet/embedded/helpers/getRandomValues";
import { ANALYTICS } from "../../connectors/embedded-wallet/embedded/helpers/analytics";
export type EmbeddedWalletOptions = WalletOptions< export type EmbeddedWalletOptions = WalletOptions<
EmbeddedWalletAdditionalOptions & WalletConnectReceiverConfig EmbeddedWalletAdditionalOptions & WalletConnectReceiverConfig
@@ -103,6 +105,7 @@ export class EmbeddedWallet extends AbstractClientWallet<
onDisconnect = () => { onDisconnect = () => {
this.removeListeners(); this.removeListeners();
ANALYTICS.nonce = getRandomString(16);
}; };
onChange = async (payload: any) => { onChange = async (payload: any) => {
+85
View File
@@ -1,5 +1,90 @@
# @thirdweb-dev/react # @thirdweb-dev/react
## 4.1.15
### Patch Changes
- Updated dependencies [[`33c9f6b1`](https://github.com/thirdweb-dev/js/commit/33c9f6b1ab3e65187b2c49c083412d39a1334bba), [`de5ebc90`](https://github.com/thirdweb-dev/js/commit/de5ebc9093aaf5fc08bc0d2d414138b520fe17fe), [`e10173bf`](https://github.com/thirdweb-dev/js/commit/e10173bf8aeaaabdb45231109b4da0c52c91b9da), [`09bafa9a`](https://github.com/thirdweb-dev/js/commit/09bafa9aebadb01641214747148c67d0b39c1275)]:
- @thirdweb-dev/wallets@2.3.0
- @thirdweb-dev/react-core@4.1.15
## 4.1.14
### Patch Changes
- Updated dependencies [[`bcfa9463`](https://github.com/thirdweb-dev/js/commit/bcfa9463bbae6bf1d3b6389b7a141f65ef3e1173)]:
- @thirdweb-dev/sdk@4.0.21
- @thirdweb-dev/react-core@4.1.14
- @thirdweb-dev/wallets@2.2.1
## 4.1.13
### Patch Changes
- [#2029](https://github.com/thirdweb-dev/js/pull/2029) [`b50e4a41`](https://github.com/thirdweb-dev/js/commit/b50e4a41b560eb647fec1224d6b6782be7132034) Thanks [@MananTank](https://github.com/MananTank)! - Connect to MetaMask on mobile device using WalletConnect instead of opening the web app in MetaMask browser by default
This behavior can be changed by setting `connectionMethod` option to `metamaskWallet`
```tsx
<ThirdwebProvider
supportedWallets={[
metamaskWallet({
connectionMethod: "walletConnect", // default
}),
]}
>
<App />
</ThirdwebProvider>
```
this is same as not setting `connectionMethod` option:
```tsx
<ThirdwebProvider supportedWallets={[metamaskWallet()]}>
<App />
</ThirdwebProvider>
```
If you want to revert to old behavior of opening the web app in Metamask browser, set `connectionMethod` to `metamaskBrowser`
```tsx
<ThirdwebProvider
supportedWallets={[
metamaskWallet({
connectionMethod: "metamaskBrowser",
}),
]}
>
<App />
</ThirdwebProvider>
```
- [#2063](https://github.com/thirdweb-dev/js/pull/2063) [`c8ba5cf8`](https://github.com/thirdweb-dev/js/commit/c8ba5cf863b7b2a92e0cb2c50776511782d4e2b6) Thanks [@MananTank](https://github.com/MananTank)! - - Add option to only show the Official WalletConnect Modal for `walletConnect` in ConnectWallet Modal
```ts
walletConnect({
qrModal: "walletConnect", // hide the ConnectWallet Modal and only show the WalletConnect Modal
});
```
If no, `qrModal` is set, it defaults to `"custom"` as shown below:
```ts
walletConnect({
qrModal: "custom", // render QR code in ConnectWallet Modal
});
```
- Stop Focus trapping the ConnectWallet Modal when it is rendered but hidden
- [#2058](https://github.com/thirdweb-dev/js/pull/2058) [`15ae5e7f`](https://github.com/thirdweb-dev/js/commit/15ae5e7f95a482a9736923c0e10916a0a6115c3d) Thanks [@MananTank](https://github.com/MananTank)! - Add option to open the official wallet connect modal in ConnectWallet
- Updated dependencies [[`d2001ca4`](https://github.com/thirdweb-dev/js/commit/d2001ca464aa699ac821c97eb37de7409ba865f3), [`85842c15`](https://github.com/thirdweb-dev/js/commit/85842c1596c901e228be1894b6702a8871d9e794), [`e595d4d9`](https://github.com/thirdweb-dev/js/commit/e595d4d92f03e36cbe61e1f00a366e37ede5d814), [`497677f3`](https://github.com/thirdweb-dev/js/commit/497677f3596977fa90ebc0fa76cb5842d46d8dcf), [`94966069`](https://github.com/thirdweb-dev/js/commit/9496606964d65268f8ee6bf9f78b2786e99d33ac), [`15ae5e7f`](https://github.com/thirdweb-dev/js/commit/15ae5e7f95a482a9736923c0e10916a0a6115c3d)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 4.1.12 ## 4.1.12
### Patch Changes ### Patch Changes
+5 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/react", "name": "@thirdweb-dev/react",
"version": "4.1.12", "version": "4.1.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0", "license": "Apache-2.0",
@@ -104,16 +104,17 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"stream": "npm:stream-browserify@^3.0.0", "stream": "npm:stream-browserify@^3.0.0",
"typescript": "^5.1.6", "typedoc-gen": "workspace:*",
"typedoc-gen": "workspace:*" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0", "@emotion/styled": "^11.11.0",
"@google/model-viewer": "^2.1.1", "@google/model-viewer": "^2.1.1",
"@radix-ui/colors": "^0.1.9", "@radix-ui/colors": "^0.1.9",
"@radix-ui/react-dialog": "^1.0.4", "@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.5", "@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-focus-scope": "^1.0.4",
"@radix-ui/react-icons": "^1.3.0", "@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-popover": "^1.0.6", "@radix-ui/react-popover": "^1.0.6",
"@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-tabs": "^1.0.4",
+3
View File
@@ -16,6 +16,7 @@ import { DynamicHeight } from "./DynamicHeight";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { useCustomTheme } from "../design-system/CustomThemeProvider"; import { useCustomTheme } from "../design-system/CustomThemeProvider";
import { StyledDiv } from "../design-system/elements"; import { StyledDiv } from "../design-system/elements";
import { FocusScope } from "@radix-ui/react-focus-scope";
export const Modal: React.FC<{ export const Modal: React.FC<{
trigger?: React.ReactNode; trigger?: React.ReactNode;
@@ -74,6 +75,7 @@ export const Modal: React.FC<{
</Dialog.Overlay> </Dialog.Overlay>
)} )}
<FocusScope trapped={!props.hide}>
<Dialog.Content asChild> <Dialog.Content asChild>
<DialogContent <DialogContent
ref={contentRef} ref={contentRef}
@@ -116,6 +118,7 @@ export const Modal: React.FC<{
)} )}
</DialogContent> </DialogContent>
</Dialog.Content> </Dialog.Content>
</FocusScope>
</Dialog.Portal> </Dialog.Portal>
</Dialog.Root> </Dialog.Root>
); );
@@ -71,7 +71,9 @@ export const ConnectModalContent = (props: {
? false ? false
: !!authConfig?.authUrl && !user?.address; : !!authConfig?.authUrl && !user?.address;
onModalUnmount(() => {
setHideModal(false); setHideModal(false);
});
// show sign in screen if required // show sign in screen if required
if (requiresSignIn) { if (requiresSignIn) {
@@ -242,7 +244,9 @@ export const ConnectModal = () => {
useEffect(() => { useEffect(() => {
if (!isWalletModalOpen) { if (!isWalletModalOpen) {
onModalUnmount(() => {
setHideModal(false); setHideModal(false);
});
} }
}, [isWalletModalOpen, setIsWalletModalOpen, screen]); }, [isWalletModalOpen, setIsWalletModalOpen, screen]);
@@ -268,6 +272,10 @@ export const ConnectModal = () => {
size={modalSize} size={modalSize}
open={isWalletModalOpen} open={isWalletModalOpen}
setOpen={(value) => { setOpen={(value) => {
if (hideModal) {
return;
}
setIsWalletModalOpen(value); setIsWalletModalOpen(value);
if (!value) { if (!value) {
const requiresSignIn = auth?.loginOptional const requiresSignIn = auth?.loginOptional
@@ -29,10 +29,11 @@ export const HeadlessConnectUI = ({
} catch (e) { } catch (e) {
if (!singleWallet) { if (!singleWallet) {
goBack(); goBack();
show();
} }
console.error(e); console.error(e);
} }
show();
})(); })();
}, [walletConfig, connect, singleWallet, connected, hide, show, goBack]); }, [walletConfig, connect, singleWallet, connected, hide, show, goBack]);
@@ -7,16 +7,30 @@ import { GetStartedScreen } from "../../ConnectWallet/screens/GetStartedScreen";
import { MetaMaskWallet } from "@thirdweb-dev/wallets"; import { MetaMaskWallet } from "@thirdweb-dev/wallets";
import { wait } from "../../../utils/wait"; import { wait } from "../../../utils/wait";
import { useTWLocale } from "../../../evm/providers/locale-provider"; import { useTWLocale } from "../../../evm/providers/locale-provider";
import { metamaskUris } from "./metamaskUris";
import { WCOpenURI } from "../../ConnectWallet/screens/WCOpenUri";
export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => { export const MetamaskConnectUI = (
props: ConnectUIProps<MetaMaskWallet> & {
connectionMethod: "walletConnect" | "metamaskBrowser";
},
) => {
const [screen, setScreen] = useState< const [screen, setScreen] = useState<
"connecting" | "scanning" | "get-started" "connecting" | "scanning" | "get-started" | "open-wc-uri"
>("connecting"); >("connecting");
const locale = useTWLocale().wallets.metamaskWallet; const locale = useTWLocale().wallets.metamaskWallet;
const { walletConfig, connected } = props; const { walletConfig, connected } = props;
const connect = useConnect(); const connect = useConnect();
const [errorConnecting, setErrorConnecting] = useState(false); const [errorConnecting, setErrorConnecting] = useState(false);
const connectingLocale = {
getStartedLink: locale.getStartedLink,
instruction: locale.connectionScreen.instruction,
tryAgain: locale.connectionScreen.retry,
inProgress: locale.connectionScreen.inProgress,
failed: locale.connectionScreen.failed,
};
const hideBackButton = props.supportedWallets.length === 1; const hideBackButton = props.supportedWallets.length === 1;
const connectToExtension = useCallback(async () => { const connectToExtension = useCallback(async () => {
@@ -53,27 +67,25 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
else { else {
// on mobile, open metamask app link // on mobile, open metamask app link
if (isMobile()) { if (isMobile()) {
if (props.connectionMethod === "walletConnect") {
setScreen("open-wc-uri");
} else {
window.open( window.open(
`https://metamask.app.link/dapp/${window.location.toString()}`, `https://metamask.app.link/dapp/${window.location.toString()}`,
); );
}
} else { } else {
// on desktop, show the metamask scan qr code // on desktop, show the metamask scan qr code
setScreen("scanning"); setScreen("scanning");
} }
} }
})(); })();
}, [connectToExtension, walletConfig]); }, [connectToExtension, props.connectionMethod, walletConfig]);
if (screen === "connecting") { if (screen === "connecting") {
return ( return (
<ConnectingScreen <ConnectingScreen
locale={{ locale={connectingLocale}
getStartedLink: locale.getStartedLink,
instruction: locale.connectionScreen.instruction,
tryAgain: locale.connectionScreen.retry,
inProgress: locale.connectionScreen.inProgress,
failed: locale.connectionScreen.failed,
}}
errorConnecting={errorConnecting} errorConnecting={errorConnecting}
onGetStarted={() => { onGetStarted={() => {
setScreen("get-started"); setScreen("get-started");
@@ -103,6 +115,26 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
); );
} }
if (screen === "open-wc-uri") {
return (
<WCOpenURI
locale={connectingLocale}
onRetry={() => {
// NOOP - TODO make onRetry optional
}}
errorConnecting={errorConnecting}
onGetStarted={() => {
setScreen("get-started");
}}
hideBackButton={hideBackButton}
onBack={props.goBack}
onConnected={connected}
walletConfig={walletConfig}
appUriPrefix={metamaskUris}
/>
);
}
if (screen === "scanning") { if (screen === "scanning") {
return ( return (
<MetamaskScan <MetamaskScan
@@ -4,6 +4,8 @@ import {
getInjectedMetamaskProvider, getInjectedMetamaskProvider,
} from "@thirdweb-dev/wallets"; } from "@thirdweb-dev/wallets";
import { MetamaskConnectUI } from "./MetamaskConnectUI"; import { MetamaskConnectUI } from "./MetamaskConnectUI";
import { metamaskUris } from "./metamaskUris";
import { handelWCSessionRequest } from "../handleWCSessionRequest";
export type MetamaskWalletConfigOptions = { export type MetamaskWalletConfigOptions = {
/** /**
@@ -18,6 +20,16 @@ export type MetamaskWalletConfigOptions = {
* If true, the wallet will be tagged as "reccomended" in ConnectWallet Modal * If true, the wallet will be tagged as "reccomended" in ConnectWallet Modal
*/ */
recommended?: boolean; recommended?: boolean;
/**
* Specify how the connection to metamask app should be established if the user is on a mobile device.
* There are two options: "walletconnect" and "browser".
* 1. "walletconnect" - User will be redirected to MetaMask app and upon successful connection, user can return back to the web page.
* 2. "browser" - User will be redirected to MetaMask app and the web page will be opened in MetaMask browser.
*
* @defaultValue "walletconnect"
*/
connectionMethod?: "walletConnect" | "metamaskBrowser";
}; };
/** /**
@@ -61,6 +73,8 @@ export type MetamaskWalletConfigOptions = {
export const metamaskWallet = ( export const metamaskWallet = (
options?: MetamaskWalletConfigOptions, options?: MetamaskWalletConfigOptions,
): WalletConfig<MetaMaskWallet> => { ): WalletConfig<MetaMaskWallet> => {
const connectionMethod = options?.connectionMethod || "walletConnect";
return { return {
id: MetaMaskWallet.id, id: MetaMaskWallet.id,
recommended: options?.recommended, recommended: options?.recommended,
@@ -76,9 +90,17 @@ export const metamaskWallet = (
qrcode: false, qrcode: false,
}); });
if (connectionMethod === "walletConnect") {
handelWCSessionRequest(wallet, metamaskUris);
}
return wallet; return wallet;
}, },
connectUI: MetamaskConnectUI, connectUI(props) {
return (
<MetamaskConnectUI {...props} connectionMethod={connectionMethod} />
);
},
isInstalled() { isInstalled() {
return !!getInjectedMetamaskProvider(); return !!getInjectedMetamaskProvider();
}, },
@@ -4,14 +4,17 @@ import {
} from "@thirdweb-dev/react-core"; } from "@thirdweb-dev/react-core";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import type { WalletConnect } from "@thirdweb-dev/wallets"; import type { WalletConnect } from "@thirdweb-dev/wallets";
import type { WalletConfig } from "@thirdweb-dev/react-core"; import type { ConnectUIProps, WalletConfig } from "@thirdweb-dev/react-core";
import { QRCode } from "../../../components/QRCode"; import { QRCode } from "../../../components/QRCode";
import { Img } from "../../../components/Img"; import { Img } from "../../../components/Img";
import { Spacer } from "../../../components/Spacer"; import { Spacer } from "../../../components/Spacer";
import { ModalHeader, Container } from "../../../components/basic"; import { ModalHeader, Container, Line } from "../../../components/basic";
import { iconSize } from "../../../design-system"; import { iconSize } from "../../../design-system";
import { Text } from "../../../components/text"; import { Text } from "../../../components/text";
import { useTWLocale } from "../../../evm/providers/locale-provider"; import { useTWLocale } from "../../../evm/providers/locale-provider";
import { Button } from "../../../components/buttons";
import { Spinner } from "../../../components/Spinner";
import { wait } from "../../../utils/wait";
export const WalletConnectScan: React.FC<{ export const WalletConnectScan: React.FC<{
onBack: () => void; onBack: () => void;
@@ -19,41 +22,40 @@ export const WalletConnectScan: React.FC<{
walletConfig: WalletConfig<WalletConnect>; walletConfig: WalletConfig<WalletConnect>;
hideBackButton: boolean; hideBackButton: boolean;
modalSize: "wide" | "compact"; modalSize: "wide" | "compact";
}> = ({ onBack, onConnected, walletConfig }) => { hide: ConnectUIProps["hide"];
show: ConnectUIProps["show"];
}> = ({ onBack, onConnected, walletConfig, hide, show }) => {
const locale = useTWLocale().wallets.walletConnect; const locale = useTWLocale().wallets.walletConnect;
const createInstance = useCreateWalletInstance(); const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>(); const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } = const { setConnectedWallet, chainToConnect, setConnectionStatus } =
useWalletContext(); useWalletContext();
const [isWCModalOpen, setIsWCModalOpen] = useState(false);
const scanStarted = useRef(false); const handleWCModalConnect = async () => {
useEffect(() => {
if (scanStarted.current) {
return;
}
scanStarted.current = true;
const walletInstance = createInstance(walletConfig); const walletInstance = createInstance(walletConfig);
setConnectionStatus("connecting"); setConnectionStatus("connecting");
walletInstance.connectWithQrCode({
try {
setQrCodeUri(undefined);
setIsWCModalOpen(true);
wait(1000).then(() => {
hide();
});
await walletInstance.connectWithModal({
chainId: chainToConnect?.chainId, chainId: chainToConnect?.chainId,
onQrCodeUri(uri) { });
setQrCodeUri(uri);
},
onConnected() {
setConnectedWallet(walletInstance); setConnectedWallet(walletInstance);
onConnected(); onConnected();
}, show();
}); } catch {
}, [ show();
createInstance, setIsWCModalOpen(false);
setConnectedWallet, }
chainToConnect, };
onConnected,
walletConfig,
setConnectionStatus,
]);
return ( return (
<Container fullHeight animate="fadein" flex="column"> <Container fullHeight animate="fadein" flex="column">
@@ -64,19 +66,29 @@ export const WalletConnectScan: React.FC<{
<Spacer y="sm" /> <Spacer y="sm" />
<Container flex="column" center={"both"} px="lg" expand> <Container flex="column" center={"both"} px="lg" expand>
<QRCode {isWCModalOpen ? (
qrCodeUri={qrCodeUri} <Container
QRIcon={ style={{
<Img minHeight: "300px",
width={iconSize.xxl} }}
height={iconSize.xxl} flex="column"
src={walletConfig.meta.iconURL} center="both"
/> >
} <Spinner size="xl" color="accentText" />
/> </Container>
) : (
<WalletConnectQRScanConnect
createInstance={createInstance}
onConnected={onConnected}
qrCodeUri={qrCodeUri}
setConnectedWallet={setConnectedWallet}
setConnectionStatus={setConnectionStatus}
setQrCodeUri={setQrCodeUri}
walletConfig={walletConfig}
chainIdToConnect={chainToConnect?.chainId}
/>
)}
</Container> </Container>
<Spacer y="lg" />
{/* <Spacer y="xl" /> */} {/* <Spacer y="xl" /> */}
@@ -95,10 +107,84 @@ export const WalletConnectScan: React.FC<{
{locale.scanInstruction} {locale.scanInstruction}
</Text> </Text>
</Container> </Container>
<Line />
<Container py="lg" flex="row" center="x">
<Button variant="link" onClick={handleWCModalConnect}>
{"Open Official WalletConnect Modal"}
</Button>
</Container>
</Container> </Container>
); );
}; };
function WalletConnectQRScanConnect(props: {
qrCodeUri: string | undefined;
setQrCodeUri: (uri: string) => void;
walletConfig: WalletConfig<WalletConnect>;
onConnected: () => void;
setConnectedWallet: (wallet: WalletConnect) => void;
createInstance: (walletConfig: WalletConfig<WalletConnect>) => WalletConnect;
setConnectionStatus: (
status: "disconnected" | "connecting" | "connected",
) => void;
chainIdToConnect?: number;
}) {
const {
qrCodeUri,
walletConfig,
onConnected,
setConnectedWallet,
createInstance,
setQrCodeUri,
chainIdToConnect,
setConnectionStatus,
} = props;
const scanStarted = useRef(false);
useEffect(() => {
if (scanStarted.current) {
return;
}
scanStarted.current = true;
const walletInstance = createInstance(walletConfig);
setConnectionStatus("connecting");
walletInstance.connectWithQrCode({
chainId: chainIdToConnect,
onQrCodeUri(uri) {
setQrCodeUri(uri);
},
onConnected() {
setConnectedWallet(walletInstance);
onConnected();
},
});
}, [
createInstance,
setConnectedWallet,
chainIdToConnect,
onConnected,
walletConfig,
setConnectionStatus,
setQrCodeUri,
]);
return (
<QRCode
qrCodeUri={qrCodeUri}
QRIcon={
<Img
width={iconSize.xxl}
height={iconSize.xxl}
src={walletConfig.meta.iconURL}
/>
}
/>
);
}
// export const CopyButton: React.FC<{ // export const CopyButton: React.FC<{
// text: string; // text: string;
// tip: string; // tip: string;
@@ -27,6 +27,15 @@ export type walletConnectConfigOptions = {
* If true, the wallet will be tagged as "reccomended" in ConnectWallet Modal * If true, the wallet will be tagged as "reccomended" in ConnectWallet Modal
*/ */
recommended?: boolean; recommended?: boolean;
/**
* Specify wheher a custom QR Modal or the Official WalletConnect Modal should be used on desktop. The custom screen has an option to open the official WalletConnect Modal too.
*
* Note that the official WalletConnect Modal is always used on mobile devices.
*
* The default is `"custom"` ( for desktop )
*/
qrModal?: "custom" | "walletConnect";
}; };
/** /**
@@ -71,6 +80,15 @@ export const walletConnect = (
config?: walletConnectConfigOptions, config?: walletConnectConfigOptions,
): WalletConfig<WalletConnect> => { ): WalletConfig<WalletConnect> => {
const projectId = config?.projectId || TW_WC_PROJECT_ID; const projectId = config?.projectId || TW_WC_PROJECT_ID;
// on mobile - always use the official WalletConnect Modal
// on desktop - use the official WalletConnect Modal if qrModal is set to "walletconnect"
const showOfficialModal = isMobile()
? true
: config?.qrModal === "walletConnect"
? true
: false;
return { return {
recommended: config?.recommended, recommended: config?.recommended,
id: WalletConnect.id, id: WalletConnect.id,
@@ -82,13 +100,14 @@ export const walletConnect = (
create(options: WalletOptions) { create(options: WalletOptions) {
return new WalletConnect({ return new WalletConnect({
...options, ...options,
qrcode: isMobile() ? true : false,
qrcode: showOfficialModal,
projectId, projectId,
qrModalOptions: config?.qrModalOptions, qrModalOptions: config?.qrModalOptions,
}); });
}, },
connectUI(props) { connectUI(props) {
if (isMobile()) { if (showOfficialModal) {
return <HeadlessConnectUI {...props} />; return <HeadlessConnectUI {...props} />;
} }
@@ -99,6 +118,8 @@ export const walletConnect = (
walletConfig={props.walletConfig} walletConfig={props.walletConfig}
hideBackButton={props.supportedWallets.length > 1} hideBackButton={props.supportedWallets.length > 1}
modalSize={props.modalSize} modalSize={props.modalSize}
hide={props.hide}
show={props.show}
/> />
); );
}, },
+19
View File
@@ -1,5 +1,24 @@
# @thirdweb-dev/sdk # @thirdweb-dev/sdk
## 4.0.21
### Patch Changes
- [#2067](https://github.com/thirdweb-dev/js/pull/2067) [`bcfa9463`](https://github.com/thirdweb-dev/js/commit/bcfa9463bbae6bf1d3b6389b7a141f65ef3e1173) Thanks [@kumaryash90](https://github.com/kumaryash90)! - fix deployments
## 4.0.20
### Patch Changes
- [#2062](https://github.com/thirdweb-dev/js/pull/2062) [`85842c15`](https://github.com/thirdweb-dev/js/commit/85842c1596c901e228be1894b6702a8871d9e794) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Expose baseFee in getDynamicFeeData()
- [#2053](https://github.com/thirdweb-dev/js/pull/2053) [`e595d4d9`](https://github.com/thirdweb-dev/js/commit/e595d4d92f03e36cbe61e1f00a366e37ede5d814) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Fix error message
- [#2059](https://github.com/thirdweb-dev/js/pull/2059) [`497677f3`](https://github.com/thirdweb-dev/js/commit/497677f3596977fa90ebc0fa76cb5842d46d8dcf) Thanks [@jnsdls](https://github.com/jnsdls)! - contract.roles.setAll now allows passing a actingAddress explictly to "prepare()" to correctly prepare the txn when there are multiple roles being removed
- Updated dependencies [[`d2001ca4`](https://github.com/thirdweb-dev/js/commit/d2001ca464aa699ac821c97eb37de7409ba865f3)]:
- @thirdweb-dev/chains@0.1.61
## 4.0.19 ## 4.0.19
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/sdk", "name": "@thirdweb-dev/sdk",
"version": "4.0.19", "version": "4.0.21",
"description": "The main thirdweb SDK.", "description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
"license": "Apache-2.0", "license": "Apache-2.0",
+3
View File
@@ -1,3 +1,6 @@
/**
* @internal
*/
export function getRpcUrl(network: string, clientId?: string) { export function getRpcUrl(network: string, clientId?: string) {
return `https://${network}.rpc.thirdweb.com/${clientId || ""}`; return `https://${network}.rpc.thirdweb.com/${clientId || ""}`;
} }
+9 -1
View File
@@ -1,5 +1,13 @@
let alreadyChecked = false; let alreadyChecked = false;
export function checkClientIdOrSecretKey(message: string, clientId?: string, secretKey?: string) {
/**
* @internal
*/
export function checkClientIdOrSecretKey(
message: string,
clientId?: string,
secretKey?: string,
) {
if (alreadyChecked) { if (alreadyChecked) {
return; return;
} }
+3
View File
@@ -1,6 +1,9 @@
import { GENERATED_ABI } from "@thirdweb-dev/generated-abis"; import { GENERATED_ABI } from "@thirdweb-dev/generated-abis";
import { ContractInterface } from "ethers/lib/ethers"; import { ContractInterface } from "ethers/lib/ethers";
/**
* @internal
*/
export function getCachedAbiForContract( export function getCachedAbiForContract(
address: string, address: string,
): ContractInterface | undefined { ): ContractInterface | undefined {
@@ -4,7 +4,7 @@ import { getSaltHash } from "./getSaltHash";
/** /**
* Pre-compute a contract's deployment address for a CREATE2 deployment. * Pre-compute a contract's deployment address for a CREATE2 deployment.
* *
* @public * @internal
* @param bytecode - Creation bytecode of the contract to deploy * @param bytecode - Creation bytecode of the contract to deploy
* @param encodedArgs - Abi-encoded constructor params * @param encodedArgs - Abi-encoded constructor params
* @param create2FactoryAddress - The create2 factory address to use * @param create2FactoryAddress - The create2 factory address to use
@@ -23,6 +23,9 @@ import { extractConstructorParamsFromAbi } from "../feature-detection/extractCon
import { caches } from "./caches"; import { caches } from "./caches";
import { getRoyaltyEngineV1ByChainId } from "../../constants/royaltyEngine"; import { getRoyaltyEngineV1ByChainId } from "../../constants/royaltyEngine";
/**
* @internal
*/
export async function computeDeploymentInfo( export async function computeDeploymentInfo(
contractType: DeployedContractType, contractType: DeployedContractType,
provider: providers.Provider, provider: providers.Provider,
@@ -1,5 +1,11 @@
/**
* @internal
*/
export const CREATE2_FACTORY_BYTECODE = export const CREATE2_FACTORY_BYTECODE =
"0x604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3"; "0x604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3";
/**
* @internal
*/
export const SIGNATURE = { export const SIGNATURE = {
v: 27, v: 27,
r: "0x2222222222222222222222222222222222222222222222222222222222222222", r: "0x2222222222222222222222222222222222222222222222222222222222222222",
@@ -7,9 +13,18 @@ export const SIGNATURE = {
}; };
export const COMMON_FACTORY = "0x4e59b44847b379578588920cA78FbF26c0B4956C"; // for pre-eip-155 supporting chains export const COMMON_FACTORY = "0x4e59b44847b379578588920cA78FbF26c0B4956C"; // for pre-eip-155 supporting chains
/**
* @internal
*/
export const GAS_LIMIT_FOR_DEPLOYER = 5000000; export const GAS_LIMIT_FOR_DEPLOYER = 5000000;
/**
* @internal
*/
export const DEPLOYER_BYTECODE = export const DEPLOYER_BYTECODE =
"0x60806040526040516107f33803806107f383398101604081905261002291610359565b805160005b818110156100c157828181518110610041576100416104c9565b6020026020010151600001516001600160a01b03163b600014156100af576100ad838281518110610074576100746104c9565b602002602001015160200151848381518110610092576100926104c9565b6020026020010151604001516100c960201b6100091760201c565b505b806100b9816104df565b915050610027565b505050610557565b606061011183836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061011860201b60201c565b9392505050565b6060610127848460008561012f565b949350505050565b6060824710156101955760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084015b60405180910390fd5b6001600160a01b0385163b6101ec5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161018c565b600080866001600160a01b031685876040516102089190610508565b60006040518083038185875af1925050503d8060008114610245576040519150601f19603f3d011682016040523d82523d6000602084013e61024a565b606091505b50909250905061025b828286610266565b979650505050505050565b60608315610275575081610111565b8251156102855782518084602001fd5b8160405162461bcd60e51b815260040161018c9190610524565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156102d7576102d761029f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156103055761030561029f565b604052919050565b80516001600160a01b038116811461032457600080fd5b919050565b60005b8381101561034457818101518382015260200161032c565b83811115610353576000848401525b50505050565b6000602080838503121561036c57600080fd5b82516001600160401b038082111561038357600080fd5b818501915085601f83011261039757600080fd5b8151818111156103a9576103a961029f565b8060051b6103b88582016102dd565b91825283810185019185810190898411156103d257600080fd5b86860192505b838310156104bc578251858111156103f05760008081fd5b86016060601f19828d0381018213156104095760008081fd5b6104116102b5565b61041c8b850161030d565b8152604061042b81860161030d565b828d01529284015192898411156104425760008081fd5b83850194508e603f86011261045957600093508384fd5b8b85015193508984111561046f5761046f61029f565b61047f8c84601f870116016102dd565b92508383528e818587010111156104965760008081fd5b6104a5848d8501838801610329565b8101919091528452505091860191908601906103d8565b9998505050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060001982141561050157634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161051a818460208701610329565b9190910192915050565b6020815260008251806020840152610543816040850160208701610329565b601f01601f19169190910160400192915050565b61028d806105666000396000f3fe6080604052600080fd5b606061004b83836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250610052565b9392505050565b60606100618484600085610069565b949350505050565b6060824710156100cf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084015b60405180910390fd5b6001600160a01b0385163b6101265760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100c6565b600080866001600160a01b031685876040516101429190610208565b60006040518083038185875af1925050503d806000811461017f576040519150601f19603f3d011682016040523d82523d6000602084013e610184565b606091505b509150915061019482828661019f565b979650505050505050565b606083156101ae57508161004b565b8251156101be5782518084602001fd5b8160405162461bcd60e51b81526004016100c69190610224565b60005b838110156101f35781810151838201526020016101db565b83811115610202576000848401525b50505050565b6000825161021a8184602087016101d8565b9190910192915050565b60208152600082518060208401526102438160408501602087016101d8565b601f01601f1916919091016040019291505056fea26469706673582212200b524eb8ceaafe6c603273ee859fddbc2d6f1b7860c3d853dcf6f129f9d9371364736f6c634300080c0033"; "0x60806040526040516107f33803806107f383398101604081905261002291610359565b805160005b818110156100c157828181518110610041576100416104c9565b6020026020010151600001516001600160a01b03163b600014156100af576100ad838281518110610074576100746104c9565b602002602001015160200151848381518110610092576100926104c9565b6020026020010151604001516100c960201b6100091760201c565b505b806100b9816104df565b915050610027565b505050610557565b606061011183836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061011860201b60201c565b9392505050565b6060610127848460008561012f565b949350505050565b6060824710156101955760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084015b60405180910390fd5b6001600160a01b0385163b6101ec5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161018c565b600080866001600160a01b031685876040516102089190610508565b60006040518083038185875af1925050503d8060008114610245576040519150601f19603f3d011682016040523d82523d6000602084013e61024a565b606091505b50909250905061025b828286610266565b979650505050505050565b60608315610275575081610111565b8251156102855782518084602001fd5b8160405162461bcd60e51b815260040161018c9190610524565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156102d7576102d761029f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156103055761030561029f565b604052919050565b80516001600160a01b038116811461032457600080fd5b919050565b60005b8381101561034457818101518382015260200161032c565b83811115610353576000848401525b50505050565b6000602080838503121561036c57600080fd5b82516001600160401b038082111561038357600080fd5b818501915085601f83011261039757600080fd5b8151818111156103a9576103a961029f565b8060051b6103b88582016102dd565b91825283810185019185810190898411156103d257600080fd5b86860192505b838310156104bc578251858111156103f05760008081fd5b86016060601f19828d0381018213156104095760008081fd5b6104116102b5565b61041c8b850161030d565b8152604061042b81860161030d565b828d01529284015192898411156104425760008081fd5b83850194508e603f86011261045957600093508384fd5b8b85015193508984111561046f5761046f61029f565b61047f8c84601f870116016102dd565b92508383528e818587010111156104965760008081fd5b6104a5848d8501838801610329565b8101919091528452505091860191908601906103d8565b9998505050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060001982141561050157634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161051a818460208701610329565b9190910192915050565b6020815260008251806020840152610543816040850160208701610329565b601f01601f19169190910160400192915050565b61028d806105666000396000f3fe6080604052600080fd5b606061004b83836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250610052565b9392505050565b60606100618484600085610069565b949350505050565b6060824710156100cf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084015b60405180910390fd5b6001600160a01b0385163b6101265760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100c6565b600080866001600160a01b031685876040516101429190610208565b60006040518083038185875af1925050503d806000811461017f576040519150601f19603f3d011682016040523d82523d6000602084013e610184565b606091505b509150915061019482828661019f565b979650505050505050565b606083156101ae57508161004b565b8251156101be5782518084602001fd5b8160405162461bcd60e51b81526004016100c69190610224565b60005b838110156101f35781810151838201526020016101db565b83811115610202576000848401525b50505050565b6000825161021a8184602087016101d8565b9190910192915050565b60208152600082518060208401526102438160408501602087016101d8565b601f01601f1916919091016040019291505056fea26469706673582212200b524eb8ceaafe6c603273ee859fddbc2d6f1b7860c3d853dcf6f129f9d9371364736f6c634300080c0033";
/**
* @internal
*/
export const DEPLOYER_ABI = [ export const DEPLOYER_ABI = [
{ {
inputs: [ inputs: [
@@ -1,6 +1,9 @@
import { BigNumber, utils } from "ethers"; import { BigNumber, utils } from "ethers";
import invariant from "tiny-invariant"; import invariant from "tiny-invariant";
/**
* @internal
*/
export function convertParamValues( export function convertParamValues(
constructorParamTypes: string[], constructorParamTypes: string[],
constructorParamValues: any[], constructorParamValues: any[],
@@ -2,6 +2,9 @@ import { PrecomputedDeploymentTransaction } from "../../types/any-evm/deploy-dat
import { GAS_LIMIT_FOR_DEPLOYER } from "./constants"; import { GAS_LIMIT_FOR_DEPLOYER } from "./constants";
import { estimateGasForDeploy } from "./estimateGasForDeploy"; import { estimateGasForDeploy } from "./estimateGasForDeploy";
/**
* @internal
*/
export function createTransactionBatches( export function createTransactionBatches(
transactions: PrecomputedDeploymentTransaction[], transactions: PrecomputedDeploymentTransaction[],
upperGasLimit: number = GAS_LIMIT_FOR_DEPLOYER, upperGasLimit: number = GAS_LIMIT_FOR_DEPLOYER,
@@ -8,7 +8,7 @@ import { isContractDeployed } from "./isContractDeployed";
* Deploy a contract at a deterministic address, using Create2 method * Deploy a contract at a deterministic address, using Create2 method
* Address depends on the Create2 factory address. * Address depends on the Create2 factory address.
* *
* @public * @internal
* *
* @param signer - The signer to use * @param signer - The signer to use
* @param bytecode - The bytecode to deploy * @param bytecode - The bytecode to deploy
@@ -13,7 +13,7 @@ import { getInitBytecodeWithSalt } from "./getInitBytecodeWithSalt";
* Deploy a contract at a deterministic address, using Create2 method * Deploy a contract at a deterministic address, using Create2 method
* Address depends on the Create2 factory address. * Address depends on the Create2 factory address.
* *
* @public * @internal
* *
* @param signer - The signer to use * @param signer - The signer to use
* @param bytecode - The bytecode to deploy * @param bytecode - The bytecode to deploy
@@ -4,6 +4,9 @@ import type { DeployOptions } from "../../types/deploy/deploy-options";
import { DEPLOYER_ABI, DEPLOYER_BYTECODE } from "./constants"; import { DEPLOYER_ABI, DEPLOYER_BYTECODE } from "./constants";
import { createTransactionBatches } from "./createTransactionBatches"; import { createTransactionBatches } from "./createTransactionBatches";
/**
* @internal
*/
export async function deployWithThrowawayDeployer( export async function deployWithThrowawayDeployer(
signer: Signer, signer: Signer,
transactions: PrecomputedDeploymentTransaction[], transactions: PrecomputedDeploymentTransaction[],
@@ -1,5 +1,8 @@
import { utils } from "ethers"; import { utils } from "ethers";
/**
* @internal
*/
export function estimateGasForDeploy(initCode: string) { export function estimateGasForDeploy(initCode: string) {
let gasLimit = let gasLimit =
utils utils

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