Compare commits
37
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
182a4e7e8f | ||
|
|
8b82f3c59c | ||
|
|
f59b729f8b | ||
|
|
387dddbd87 | ||
|
|
911e14fcac | ||
|
|
cd6b07b591 | ||
|
|
154c55add5 | ||
|
|
f202f597ca | ||
|
|
91f0245be7 | ||
|
|
ae74b8ef62 | ||
|
|
5a373a7509 | ||
|
|
088547f763 | ||
|
|
586e91dbe6 | ||
|
|
f65578d637 | ||
|
|
447d984653 | ||
|
|
34a3bb8ae3 | ||
|
|
bc003c2fef | ||
|
|
c88fa57591 | ||
|
|
c12f0874b4 | ||
|
|
184c325ab2 | ||
|
|
046c9ad604 | ||
|
|
2a7bbf8665 | ||
|
|
f97ddf4c7f | ||
|
|
66c53360cd | ||
|
|
bd1fcbae32 | ||
|
|
e196264172 | ||
|
|
c9deda6f4b | ||
|
|
b91d3e9901 | ||
|
|
d248aa2c5a | ||
|
|
8f3b685ad2 | ||
|
|
26349f311d | ||
|
|
2897576513 | ||
|
|
07fb1b5ffa | ||
|
|
300a3c6f04 | ||
|
|
26367c04f3 | ||
|
|
39e2af6f2f | ||
|
|
a5ba9e4fbf |
@@ -1,5 +1,54 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 3.2.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.20
|
||||
|
||||
## 3.2.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.19
|
||||
|
||||
## 3.2.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.18
|
||||
|
||||
## 3.2.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.17
|
||||
|
||||
## 3.2.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.16
|
||||
|
||||
## 3.2.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`07fb1b5f`](https://github.com/thirdweb-dev/js/commit/07fb1b5ffa4c170e252df31070852ddb9a81dec9)]:
|
||||
- @thirdweb-dev/wallets@1.1.15
|
||||
|
||||
## 3.2.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`39e2af6f`](https://github.com/thirdweb-dev/js/commit/39e2af6f2f4d933dca1b3de4a37de76375bafd74)]:
|
||||
- @thirdweb-dev/wallets@1.1.14
|
||||
|
||||
## 3.2.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "3.2.30",
|
||||
"version": "3.2.37",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
|
||||
@@ -1,5 +1,37 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 0.1.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1530](https://github.com/thirdweb-dev/js/pull/1530) [`911e14fc`](https://github.com/thirdweb-dev/js/commit/911e14fcac743b07fa1a66440c72d662c08e971c) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Add Chiliz Spicy testnet
|
||||
|
||||
## 0.1.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1518](https://github.com/thirdweb-dev/js/pull/1518) [`34a3bb8a`](https://github.com/thirdweb-dev/js/commit/34a3bb8ae3c1d7a506e5568a9e79ab7e469557a8) Thanks [@nkrishang](https://github.com/nkrishang)! - Update contracts package
|
||||
|
||||
## 0.1.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1508](https://github.com/thirdweb-dev/js/pull/1508) [`184c325a`](https://github.com/thirdweb-dev/js/commit/184c325ab2ef028022a050c4274f2ab12b1a3a7f) Thanks [@jnsdls](https://github.com/jnsdls)! - update xpla chain icons
|
||||
|
||||
- [#1513](https://github.com/thirdweb-dev/js/pull/1513) [`c12f0874`](https://github.com/thirdweb-dev/js/commit/c12f0874b4dac43c263c7edb20d0343c16381c34) Thanks [@jnsdls](https://github.com/jnsdls)! - add additonal chains
|
||||
|
||||
## 0.1.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1506](https://github.com/thirdweb-dev/js/pull/1506) [`f97ddf4c`](https://github.com/thirdweb-dev/js/commit/f97ddf4c7f14854f3b204ad9741b52ddb8dac736) Thanks [@jnsdls](https://github.com/jnsdls)! - add xpla chains & update chains
|
||||
|
||||
## 0.1.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1499](https://github.com/thirdweb-dev/js/pull/1499) [`8f3b685a`](https://github.com/thirdweb-dev/js/commit/8f3b685ad2bd73cb4d5d8c8aa25c04ffc10fb7cf) Thanks [@Marfuen](https://github.com/Marfuen)! - Update deploy command from CLI to use show a public gateway url temporarily. Updated chains too.
|
||||
|
||||
## 0.1.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -18,6 +18,7 @@ export default {
|
||||
"https://gnosis.api.onfinality.io/public",
|
||||
"https://gnosis.blockpi.network/v1/rpc/public",
|
||||
"https://web3endpoints.com/gnosischain-mainnet",
|
||||
"https://gnosis.oat.farm",
|
||||
"wss://rpc.gnosischain.com/wss"
|
||||
],
|
||||
"faucets": [
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Japan Open Chain Testnet",
|
||||
"chain": "JOCT",
|
||||
"rpc": [
|
||||
"https://japan-open-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-1.testnet.japanopenchain.org:8545",
|
||||
"https://rpc-2.testnet.japanopenchain.org:8545"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Japan Open Chain Testnet Token",
|
||||
"symbol": "JOCT",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.japanopenchain.org/",
|
||||
"shortName": "joct",
|
||||
"chainId": 10081,
|
||||
"networkId": 10081,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Testnet Block Explorer",
|
||||
"url": "https://explorer.testnet.japanopenchain.org",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "japan-open-chain-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "MaxxChain Mainnet",
|
||||
"chain": "MaxxChain",
|
||||
"rpc": [
|
||||
"https://maxxchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.maxxchain.org",
|
||||
"https://rpc1.maxxchain.org",
|
||||
"https://rpc2.maxxchain.org"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.maxxchain.org"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Power",
|
||||
"symbol": "PWR",
|
||||
"decimals": 18
|
||||
},
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhQG9TZrXDdbQeTzBmjg3pqgwaD5TKVZj8k4kaz8AoZx",
|
||||
"width": 1021,
|
||||
"height": 1021,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://www.maxxchain.org/",
|
||||
"shortName": "PWR",
|
||||
"chainId": 10201,
|
||||
"networkId": 10201,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "MaxxChain Block Explorer",
|
||||
"url": "https://explorer.maxxchain.org",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "maxxchain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Arthera Testnet",
|
||||
"chain": "AA",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYQp3e52KjkT4bYdAvB6ACEEpXs2D8DozsDitaADRY2Ak",
|
||||
"width": 1024,
|
||||
"height": 998,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://arthera-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-test.arthera.net"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.arthera.net"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Arthera",
|
||||
"symbol": "AA",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://docs.arthera.net",
|
||||
"shortName": "aa",
|
||||
"chainId": 10243,
|
||||
"networkId": 10243,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://explorer-test.arthera.net",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "arthera-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,44 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Swisstronik Testnet",
|
||||
"chain": "SWTR",
|
||||
"rpc": [
|
||||
"https://swisstronik-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://json-rpc.testnet.swisstronik.com"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.testnet.swisstronik.com"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Swisstronik",
|
||||
"symbol": "SWTR",
|
||||
"decimals": 18
|
||||
},
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"infoURL": "https://www.swisstronik.com",
|
||||
"shortName": "swtr",
|
||||
"chainId": 1291,
|
||||
"networkId": 1291,
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeihuintkoipxalwans23vhxajbwjnozpy34ww7ia7ds7nay3rpylzi",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "svg"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Swisstronik Scout",
|
||||
"url": "https://explorer-evm.testnet.swisstronik.com",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "swisstronik-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -10,8 +10,8 @@ export default {
|
||||
"https://t.me/HumanodeTestnet5FaucetBot"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "HMND",
|
||||
"symbol": "HMND",
|
||||
"name": "eHMND",
|
||||
"symbol": "eHMND",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://humanode.io",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Omni Testnet 1",
|
||||
"name": "Omni Testnet",
|
||||
"chain": "Omni",
|
||||
"rpc": [
|
||||
"https://omni-testnet-1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet-1.omni.network"
|
||||
"https://omni-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet.omni.network"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
@@ -24,10 +24,10 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Omni Explorer",
|
||||
"url": "https://testnet-1.explorer.omni.network",
|
||||
"url": "https://testnet.explorer.omni.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "omni-testnet-1"
|
||||
"slug": "omni-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -11,8 +11,8 @@ export default {
|
||||
},
|
||||
"rpc": [
|
||||
"https://horizen-gobi-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://gobi-testnet.horizenlabs.io/ethv1",
|
||||
"https://rpc.ankr.com/horizen_testnet_evm"
|
||||
"https://gobi-rpc.horizenlabs.io/ethv1",
|
||||
"https://rpc.ankr.com/horizen_gobi_testnet"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Holesky",
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://holesky.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.holesky.ethpandaops.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.holesky.ethpandaops.io",
|
||||
"https://holesky-faucet.pk910.de"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Testnet ETH",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://holesky.ethpandaops.io",
|
||||
"shortName": "holesky",
|
||||
"chainId": 17000,
|
||||
"networkId": 17000,
|
||||
"icon": {
|
||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
||||
"width": 1000,
|
||||
"height": 1628,
|
||||
"format": "png"
|
||||
},
|
||||
"status": "incubating",
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Holesky Explorer",
|
||||
"url": "https://holesky.beaconcha.in",
|
||||
"icon": {
|
||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
||||
"width": 1000,
|
||||
"height": 1628,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "holesky"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "DeBank Testnet",
|
||||
"chain": "DeBank",
|
||||
"rpc": [
|
||||
"https://debank-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"http://rpc.testnet.debank.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmW9pBps8WHRRWmyXhjLZrjZJUe8F48hUu7z98bu2RVsjN",
|
||||
"width": 400,
|
||||
"height": 400,
|
||||
"format": "png"
|
||||
},
|
||||
"nativeCurrency": {
|
||||
"name": "DeBank USD",
|
||||
"symbol": "USD",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://debank.com",
|
||||
"shortName": "dbk",
|
||||
"chainId": 2021398,
|
||||
"networkId": 2021398,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "DeBank Chain Explorer",
|
||||
"url": "https://explorer.testnet.debank.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "debank-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,35 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Centrifuge",
|
||||
"chain": "CFG",
|
||||
"rpc": [
|
||||
"wss://fullnode.parachain.centrifuge.io"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Centrifuge",
|
||||
"symbol": "CFG",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://centrifuge.io",
|
||||
"shortName": "cfg",
|
||||
"chainId": 2031,
|
||||
"networkId": 2031,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "subscan",
|
||||
"url": "https://centrifuge.subscan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "centrifuge"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Catalyst",
|
||||
"chain": "CFG",
|
||||
"rpc": [
|
||||
"wss://fullnode.catalyst.cntrfg.com"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Catalyst CFG",
|
||||
"symbol": "NCFG",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://centrifuge.io",
|
||||
"shortName": "ncfg",
|
||||
"chainId": 2032,
|
||||
"networkId": 2032,
|
||||
"testnet": false,
|
||||
"slug": "catalyst"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,33 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Kiwi Subnet",
|
||||
"chain": "KIWI",
|
||||
"rpc": [
|
||||
"https://kiwi-subnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/kiwi/testnet/rpc"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Shrapgas",
|
||||
"symbol": "SHRAP",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "",
|
||||
"shortName": "kiwi",
|
||||
"chainId": 2037,
|
||||
"networkId": 2037,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "KIWI Explorer",
|
||||
"url": "https://subnets-test.avax.network/kiwi",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "kiwi-subnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "opBNB Mainnet",
|
||||
"chain": "opBNB",
|
||||
"rpc": [
|
||||
"https://opbnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://opbnb-mainnet-rpc.bnbchain.org"
|
||||
],
|
||||
"faucets": [
|
||||
"https://free-online-app.com/faucet-for-eth-evm-chains"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "BNB Chain Native Token",
|
||||
"symbol": "BNB",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://opbnb.bnbchain.org/en",
|
||||
"shortName": "obnb",
|
||||
"chainId": 204,
|
||||
"networkId": 204,
|
||||
"slip44": 714,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "opbnbscan",
|
||||
"url": "http://mainnet.opbnbscan.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "opbnb"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Altair",
|
||||
"chain": "AIR",
|
||||
"rpc": [
|
||||
"wss://fullnode.altair.centrifuge.io"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Altair",
|
||||
"symbol": "AIR",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://centrifuge.io",
|
||||
"shortName": "air",
|
||||
"chainId": 2088,
|
||||
"networkId": 2088,
|
||||
"testnet": false,
|
||||
"slug": "altair"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Algol",
|
||||
"chain": "algol",
|
||||
"rpc": [
|
||||
"wss://fullnode.algol.cntrfg.com"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Algol",
|
||||
"symbol": "ALGL",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://centrifuge.io",
|
||||
"shortName": "algl",
|
||||
"chainId": 2089,
|
||||
"networkId": 2089,
|
||||
"testnet": false,
|
||||
"slug": "algol"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,10 +1,11 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Kava EVM Testnet",
|
||||
"name": "Kava Testnet",
|
||||
"chain": "KAVA",
|
||||
"rpc": [
|
||||
"https://kava-evm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://kava-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://evm.testnet.kava.io",
|
||||
"https://kava-evm-testnet.rpc.thirdweb.com",
|
||||
"wss://wevm.testnet.kava.io"
|
||||
],
|
||||
"faucets": [
|
||||
@@ -28,7 +29,7 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Kava Testnet Explorer",
|
||||
"url": "https://explorer.testnet.kava.io",
|
||||
"url": "http://testnet.kavascan.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmdpRTk6oL1HRW9xC6cAc4Rnf9gs6zgdAcr4Z3HcLztusm",
|
||||
@@ -39,5 +40,5 @@ export default {
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "kava-evm-testnet"
|
||||
"slug": "kava-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,11 +1,13 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Kava EVM",
|
||||
"name": "Kava",
|
||||
"chain": "KAVA",
|
||||
"rpc": [
|
||||
"https://kava-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://kava.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://evm.kava.io",
|
||||
"https://evm2.kava.io",
|
||||
"https://kava-rpc.gateway.pokt.network",
|
||||
"https://kava-evm.rpc.thirdweb.com",
|
||||
"wss://wevm.kava.io",
|
||||
"wss://wevm2.kava.io",
|
||||
"https://kava-evm.publicnode.com"
|
||||
@@ -29,7 +31,7 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Kava EVM Explorer",
|
||||
"url": "https://explorer.kava.io",
|
||||
"url": "https://kavascan.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmdpRTk6oL1HRW9xC6cAc4Rnf9gs6zgdAcr4Z3HcLztusm",
|
||||
@@ -40,5 +42,5 @@ export default {
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "kava-evm"
|
||||
"slug": "kava"
|
||||
} as const satisfies Chain;
|
||||
@@ -4,7 +4,11 @@ export default {
|
||||
"chain": "SOMA",
|
||||
"rpc": [
|
||||
"https://soma-network-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://data-testnet-v1.somanetwork.io/"
|
||||
"https://data-testnet-v1.somanetwork.io/",
|
||||
"https://testnet-au-server-2.somanetwork.io",
|
||||
"https://testnet-au-server-1.somanetwork.io",
|
||||
"https://testnet-sg-server-1.somanetwork.io",
|
||||
"https://testnet-sg-server-2.somanetwork.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.somanetwork.io"
|
||||
|
||||
@@ -4,7 +4,10 @@ export default {
|
||||
"chain": "SOMA",
|
||||
"rpc": [
|
||||
"https://soma-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://data-mainnet-v1.somanetwork.io/"
|
||||
"https://data-mainnet-v1.somanetwork.io/",
|
||||
"https://id-mainnet.somanetwork.io",
|
||||
"https://hk-mainnet.somanetwork.io",
|
||||
"https://sg-mainnet.somanetwork.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://airdrop.somanetwork.io"
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Unicorn Ultra Nebulas Testnet",
|
||||
"chain": "u2u",
|
||||
"rpc": [
|
||||
"https://unicorn-ultra-nebulas-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-nebulas-testnet.uniultra.xyz"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.uniultra.xyz"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Unicorn Ultra Nebulas Testnet",
|
||||
"symbol": "U2U",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://uniultra.xyz",
|
||||
"shortName": "u2u_nebulas",
|
||||
"chainId": 2484,
|
||||
"networkId": 2484,
|
||||
"icon": {
|
||||
"url": "ipfs://QmcW64RgqQVHnNbVFyfaMNKt7dJvFqEbfEHZmeyeK8dpEa",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"icon": {
|
||||
"url": "ipfs://QmcW64RgqQVHnNbVFyfaMNKt7dJvFqEbfEHZmeyeK8dpEa",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"name": "U2U Explorer",
|
||||
"url": "https://testnet.u2uscan.xyz",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "unicorn-ultra-nebulas-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Ancient8 Testnet",
|
||||
"chain": "Ancient8",
|
||||
"icon": {
|
||||
"url": "ipfs://QmSX8sHToRzyFupT8BvPQjVsegRWFYz2mdnLkVnqBFKohY",
|
||||
"width": 901,
|
||||
"height": 901,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://ancient8-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-testnet.ancient8.gg"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Ether",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://ancient8.gg/",
|
||||
"shortName": "a8",
|
||||
"chainId": 2863311531,
|
||||
"networkId": 2863311531,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "a8scan-testnet",
|
||||
"url": "https://testnet.a8scan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "ancient8-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -5,6 +5,12 @@ export default {
|
||||
"shortName": "POPTestnet",
|
||||
"chainId": 331769,
|
||||
"testnet": true,
|
||||
"icon": {
|
||||
"format": "png",
|
||||
"url": "ipfs://QmP8rYvcc7aJB3c2YZxjxaySvHapHnoK8MnxuSuDT4PtF2",
|
||||
"height": 400,
|
||||
"width": 400
|
||||
},
|
||||
"rpc": [
|
||||
"https://proofofpepe-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet01.proofofpepe.tech"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "POP Mainnet",
|
||||
"chain": "POP",
|
||||
"shortName": "POP",
|
||||
"chainId": 331771,
|
||||
"testnet": false,
|
||||
"icon": {
|
||||
"format": "png",
|
||||
"url": "ipfs://QmP8rYvcc7aJB3c2YZxjxaySvHapHnoK8MnxuSuDT4PtF2",
|
||||
"height": 400,
|
||||
"width": 400
|
||||
},
|
||||
"rpc": [
|
||||
"https://pop.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc00.proofofpepe.tech",
|
||||
"https://rpc01.proofofpepe.tech",
|
||||
"https://rpc02.proofofpepe.tech"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Pepe",
|
||||
"symbol": "PEPE",
|
||||
"decimals": 18
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Pepescan",
|
||||
"url": "https://pepescan.app",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"slug": "pop"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Yooldo Verse Mainnet",
|
||||
"chain": "Yooldo Verse",
|
||||
"icon": {
|
||||
"url": "ipfs://QmWvfA2usnYp1ktzLcqFS8eTLgdp4ifrxjiify46KyG9NZ",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://yooldo-verse.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.yooldo-verse.xyz/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "OAS",
|
||||
"symbol": "OAS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://yooldo.gg/",
|
||||
"shortName": "YVM",
|
||||
"chainId": 345,
|
||||
"networkId": 345,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Yooldo Verse Explorer",
|
||||
"url": "https://explorer.yooldo-verse.xyz",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"parent": {
|
||||
"type": "L2",
|
||||
"chain": "eip155-248"
|
||||
},
|
||||
"testnet": false,
|
||||
"slug": "yooldo-verse"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,27 +1,35 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "SeedCoin-Network",
|
||||
"chain": "SeedCoin-Network",
|
||||
"name": "Xpla Mainnet",
|
||||
"chain": "XPLA",
|
||||
"rpc": [
|
||||
"https://seedcoin-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://node.seedcoin.network"
|
||||
"https://xpla-xpla.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://dimension-evm-rpc.xpla.dev"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "SeedCoin",
|
||||
"symbol": "SEED",
|
||||
"name": "XPLA",
|
||||
"symbol": "XPLA",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.seedcoin.network/",
|
||||
"shortName": "SEED",
|
||||
"infoURL": "https://xpla.io/",
|
||||
"shortName": "xpla",
|
||||
"chainId": 37,
|
||||
"icon": {
|
||||
"url": "ipfs://QmSchLvCCZjBzcv5n22v1oFDAc2yHJ42NERyjZeL9hBgrh",
|
||||
"width": 64,
|
||||
"height": 64,
|
||||
"url": "ipfs://QmbvEAKZfgJckEziU3mpCwz6jqMeWRcLgd8TNsWA7g8sD9/xpla.png",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"chainId": 37,
|
||||
"networkId": 37,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "XPLA Explorer",
|
||||
"url": "https://explorer.xpla.io",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "seedcoin-network"
|
||||
"redFlags": [
|
||||
"reusedChainId"
|
||||
],
|
||||
"slug": "xpla-xpla"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Xpla Mainnet",
|
||||
"chain": "XPLA",
|
||||
"rpc": [
|
||||
"https://xpla.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://dimension-rpc.xpla.dev"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.xpla.io/"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "XPLA",
|
||||
"symbol": "XPLA",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://xpla.io/",
|
||||
"shortName": "xpla",
|
||||
"chainId": 3701,
|
||||
"networkId": 3701,
|
||||
"icon": {
|
||||
"url": "ipfs://Qmf4GoxfpeA5VGqu7KP5eyv1WKaCpNDbvMxq1MjQBwFWxq",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "XPLA Explorer",
|
||||
"url": "https://explorer.xpla.io",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "xpla"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "KalyChain Mainnet",
|
||||
"chain": "KLC",
|
||||
"icon": {
|
||||
"url": "ipfs://QmUaXcPewLuQtY5a7xPTzJyVdjkH487VfV7gSR8UXrbxQ3",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://kalychain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.kalychain.io/rpc"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "KalyCoin",
|
||||
"symbol": "KLC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://kalychain.io",
|
||||
"shortName": "kalymainnet",
|
||||
"chainId": 3888,
|
||||
"networkId": 3888,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "KalyScan",
|
||||
"url": "https://kalyscan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "kalychain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "KalyChain Testnet",
|
||||
"chain": "KLC",
|
||||
"icon": {
|
||||
"url": "ipfs://QmUaXcPewLuQtY5a7xPTzJyVdjkH487VfV7gSR8UXrbxQ3",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://kalychain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnetrpc.kalychain.io/rpc"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "KalyCoin",
|
||||
"symbol": "KLC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://kalychain.io",
|
||||
"shortName": "kalytestnet",
|
||||
"chainId": 3889,
|
||||
"networkId": 3889,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "KalyScan",
|
||||
"url": "https://testnet.kalyscan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "kalychain-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Alterium L2 Testnet",
|
||||
"chain": "ALT",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreid3v7ow4c4t3ljya6aouiwvqbtssb2lzmkwt2eghryk234g7yynrq",
|
||||
"width": 756,
|
||||
"height": 756,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://alterium-l2-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://l2-testnet-rpc.altscan.org"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Alterium ETH",
|
||||
"symbol": "AltETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://alteriumprotocol.org",
|
||||
"shortName": "alterium",
|
||||
"chainId": 420692,
|
||||
"networkId": 420692,
|
||||
"parent": {
|
||||
"type": "L2",
|
||||
"chain": "eip155-5",
|
||||
"bridges": [
|
||||
{
|
||||
"url": "https://testnet-bridge.alteriumprotocol.org"
|
||||
}
|
||||
]
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Alterium L2 Testnet Explorer",
|
||||
"url": "https://l2-testnet.altscan.org",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "alterium-l2-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,39 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Beam",
|
||||
"chain": "BEAM",
|
||||
"rpc": [
|
||||
"https://beam.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/beam/mainnet/rpc"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Merit Circle",
|
||||
"symbol": "MC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.onbeam.com",
|
||||
"shortName": "beam",
|
||||
"icon": {
|
||||
"url": "ipfs://QmQJ21NWyGGDraicVEzS1Uqq1yXahM9NCuNZgnfYvtspdt",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"chainId": 4337,
|
||||
"networkId": 4337,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Beam Explorer",
|
||||
"url": "https://subnets.avax.network/beam",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "beam"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,39 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Orderly Sepolia Testnet",
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://orderly-sepolia-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Sepolia Ether",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"shortName": "orderlyl2",
|
||||
"chainId": 4460,
|
||||
"networkId": 4460,
|
||||
"icon": {
|
||||
"url": "ipfs://QmSpwp3RAVhZsErAQrCQxEmjnGqJQMigarzZbfqr9Ktakb",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "basescout",
|
||||
"url": "https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "orderly-sepolia-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,36 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Acria IntelliChain",
|
||||
"chain": "AIC",
|
||||
"name": "Xpla Testnet",
|
||||
"chain": "XPLA",
|
||||
"rpc": [
|
||||
"https://acria-intellichain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://aic.acria.ai"
|
||||
"https://xpla-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://cube-evm-rpc.xpla.dev"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ACRIA",
|
||||
"symbol": "ACRIA",
|
||||
"name": "XPLA",
|
||||
"symbol": "XPLA",
|
||||
"decimals": 18
|
||||
},
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
"faucets": [
|
||||
"https://faucet.xpla.io/"
|
||||
],
|
||||
"infoURL": "https://acria.ai",
|
||||
"shortName": "aic",
|
||||
"infoURL": "https://xpla.io/",
|
||||
"shortName": "xpla-test",
|
||||
"chainId": 47,
|
||||
"networkId": 47,
|
||||
"icon": {
|
||||
"url": "ipfs://QmbvEAKZfgJckEziU3mpCwz6jqMeWRcLgd8TNsWA7g8sD9/xpla.png",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Acria IntelliChain-Explorer",
|
||||
"url": "https://explorer.acria.ai",
|
||||
"standard": "EIP3091"
|
||||
"name": "XPLA Explorer",
|
||||
"url": "https://explorer.xpla.io/testnet",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "acria-intellichain"
|
||||
"testnet": true,
|
||||
"redFlags": [
|
||||
"reusedChainId"
|
||||
],
|
||||
"slug": "xpla-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -8,8 +8,8 @@ export default {
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "HMND",
|
||||
"symbol": "HMND",
|
||||
"name": "eHMND",
|
||||
"symbol": "eHMND",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://humanode.io",
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "PAWCHAIN Testnet",
|
||||
"chain": "PAW",
|
||||
"rpc": [
|
||||
"https://pawchain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://pawchainx.com/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "PAW",
|
||||
"symbol": "PAW",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://pawchainx.com/",
|
||||
"shortName": "PAW",
|
||||
"chainId": 542,
|
||||
"networkId": 542,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "PAWCHAIN Testnet",
|
||||
"url": "https://pawscan.io",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "pawchain-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,23 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Tanssi EVM ContainerChain",
|
||||
"chain": "EVMCC",
|
||||
"rpc": [
|
||||
"https://tanssi-evm-containerchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://fraa-dancebox-3001-rpc.a.dancebox.tanssi.network",
|
||||
"wss://fraa-dancebox-3001-rpc.a.dancebox.tanssi.network"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Unit",
|
||||
"symbol": "Unit",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://tanssi.network",
|
||||
"shortName": "TanssiCC",
|
||||
"chainId": 5678,
|
||||
"networkId": 5678,
|
||||
"explorers": [],
|
||||
"testnet": false,
|
||||
"slug": "tanssi-evm-containerchain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "VELO Labs Mainnet",
|
||||
"chain": "NOVA chain",
|
||||
"rpc": [
|
||||
"https://velo-labs.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://nova.velo.org"
|
||||
],
|
||||
"faucets": [
|
||||
"https://nova-faucet.velo.org"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Nova",
|
||||
"symbol": "NOVA",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://velo.org",
|
||||
"shortName": "VELO",
|
||||
"chainId": 56789,
|
||||
"networkId": 56789,
|
||||
"icon": {
|
||||
"url": "ipfs://QmYqvnW2jwPEKUv8BdaV4sbL8Audcwosat6SPn4GqYtKxc",
|
||||
"width": 225,
|
||||
"height": 225,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "novascan",
|
||||
"url": "https://novascan.velo.org",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "velo-labs"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "LAOS Arrakis",
|
||||
"title": "LAOS Testnet Arrakis",
|
||||
"chain": "LAOS",
|
||||
"icon": {
|
||||
"url": "ipfs://QmZ4YYcvhcaeotMPaGXC5Vab7JFaVkka37V8TiTJpT7Mak",
|
||||
"width": 586,
|
||||
"height": 558,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://laos-arrakis.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://arrakis.gorengine.com/own",
|
||||
"wss://arrakis.gorengine.com/own"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "LAOS",
|
||||
"symbol": "LAOS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.laosfoundation.io/",
|
||||
"shortName": "laos",
|
||||
"chainId": 667,
|
||||
"networkId": 667,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://arrakis.gorengine.com",
|
||||
"icon": {
|
||||
"url": "ipfs://QmZ4YYcvhcaeotMPaGXC5Vab7JFaVkka37V8TiTJpT7Mak",
|
||||
"width": 586,
|
||||
"height": 558,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "laos-arrakis"
|
||||
} as const satisfies Chain;
|
||||
@@ -4,7 +4,11 @@ export default {
|
||||
"chain": "DSC",
|
||||
"rpc": [
|
||||
"https://decimal-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://node.decimalchain.com/web3/"
|
||||
"https://node.decimalchain.com/web3/",
|
||||
"https://node1-mainnet.decimalchain.com/web3/",
|
||||
"https://node2-mainnet.decimalchain.com/web3/",
|
||||
"https://node3-mainnet.decimalchain.com/web3/",
|
||||
"https://node4-mainnet.decimalchain.com/web3/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Miexs Smartchain",
|
||||
"chain": "MiexsSmartchain",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreic6tcc6swh5kzljwqnswj6rlemcm7n6ra7xkgttwv5v3fv7ozj5zu",
|
||||
"width": 1500,
|
||||
"height": 1500,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://miexs-smartchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet-rpc.miexs.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Miexs Coin",
|
||||
"symbol": "MIX",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://miexs.com",
|
||||
"shortName": "Miexs",
|
||||
"chainId": 761412,
|
||||
"networkId": 761412,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Miexs Smartchain Explorer",
|
||||
"url": "https://miexs.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "miexs-smartchain"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,19 +1,17 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "BeOne Chain Testnet",
|
||||
"chain": "BOC",
|
||||
"name": "Testnet BeOne Chain",
|
||||
"chain": "tBOC",
|
||||
"rpc": [
|
||||
"https://beone-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://pre-boc1.beonechain.com",
|
||||
"https://pre-boc2.beonechain.com",
|
||||
"https://pre-boc3.beonechain.com"
|
||||
"https://testnet-beone-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://pre-boc1.beonechain.com"
|
||||
],
|
||||
"faucets": [
|
||||
"https://testnet.beonescan.com/faucet"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "BeOne Chain Testnet",
|
||||
"symbol": "BOC",
|
||||
"name": "Testnet BeOne Chain",
|
||||
"symbol": "tBOC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://testnet.beonescan.com",
|
||||
@@ -28,7 +26,7 @@ export default {
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "BeOne Chain Testnet",
|
||||
"name": "Testnet BeOne Chain",
|
||||
"url": "https://testnet.beonescan.com",
|
||||
"icon": {
|
||||
"url": "ipfs://QmbVLQnaMDu86bPyKgCvTGhFBeYwjr15hQnrCcsp1EkAGL",
|
||||
@@ -40,5 +38,5 @@ export default {
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "beone-chain-testnet"
|
||||
"slug": "testnet-beone-chain"
|
||||
} as const satisfies Chain;
|
||||
@@ -4,7 +4,8 @@ export default {
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.base.org/"
|
||||
"https://mainnet.base.org/",
|
||||
"https://developer-access-mainnet.base.org/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Aerie Network",
|
||||
"chain": "Aerie",
|
||||
"rpc": [
|
||||
"https://aerie-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.aerielab.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Aerie",
|
||||
"symbol": "AER",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://aerielab.io/",
|
||||
"shortName": "Aerie",
|
||||
"chainId": 84886,
|
||||
"networkId": 84886,
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreig54jss26xllpjbclmfgwvot72m4ku7qxignhlqei6mijvwi2m4pu",
|
||||
"width": 1062,
|
||||
"height": 1069,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Aerie Explorer",
|
||||
"url": "https://explorer.aerielab.io",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreig54jss26xllpjbclmfgwvot72m4ku7qxignhlqei6mijvwi2m4pu",
|
||||
"width": 1062,
|
||||
"height": 1069,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "aerie-network"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Spicy Chain",
|
||||
"chain": "Spicy",
|
||||
"rpc": [
|
||||
"https://spicy-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://spicy-rpc.chiliz.com/"
|
||||
],
|
||||
"faucets": [
|
||||
"https://spicy-faucet.chiliz.com/"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Chiliz",
|
||||
"symbol": "CHZ",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://chiliz.com/",
|
||||
"shortName": "Spicy",
|
||||
"chainId": 88882,
|
||||
"networkId": 88882,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Spicy Explorer",
|
||||
"url": "http://spicy-explorer.chiliz.com/",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmTGYofJ8VLkeNY4J69AvXi8e126kmbHmf34wLFoJ1FKAK",
|
||||
"width": 400,
|
||||
"height": 400,
|
||||
"format": "png"
|
||||
},
|
||||
"testnet": true,
|
||||
"slug": "spicy-chain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Worlds Appchain",
|
||||
"chain": "WRLDS",
|
||||
"shortName": "WRLDS",
|
||||
"chainId": 91003,
|
||||
"testnet": true,
|
||||
"rpc": [
|
||||
"https://worlds-appchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.evm.worlds.dev.eclipsenetwork.xyz/"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "WRLDS",
|
||||
"symbol": "WRLDS",
|
||||
"decimals": 18
|
||||
},
|
||||
"faucets": [
|
||||
"https://faucet.evm.worlds.dev.eclipsenetwork.xyz/request_neon"
|
||||
],
|
||||
"slug": "worlds-appchain"
|
||||
} as const satisfies Chain;
|
||||
@@ -10,7 +10,8 @@ export default {
|
||||
},
|
||||
"rpc": [
|
||||
"https://mind-smart-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet-msc.mindchain.info/"
|
||||
"https://testnet-msc.mindchain.info/",
|
||||
"wss://testnet-msc.mindchain.info/ws"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.mindchain.info/"
|
||||
|
||||
@@ -8,6 +8,12 @@ export default {
|
||||
shortName: "POPTestnet",
|
||||
chainId: 331769,
|
||||
testnet: true,
|
||||
icon: {
|
||||
format: "png",
|
||||
url: "ipfs://QmP8rYvcc7aJB3c2YZxjxaySvHapHnoK8MnxuSuDT4PtF2",
|
||||
height: 400,
|
||||
width: 400,
|
||||
},
|
||||
rpc: ["https://testnet01.proofofpepe.tech"],
|
||||
nativeCurrency: {
|
||||
name: "POP",
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// @ts-check
|
||||
/** @typedef { import("../../src/types").Chain } Chain */
|
||||
|
||||
/** @type {Omit<Chain, "slug">} */
|
||||
export default {
|
||||
name: "POP Mainnet",
|
||||
chain: "POP",
|
||||
shortName: "POP",
|
||||
chainId: 331771,
|
||||
testnet: false,
|
||||
icon: {
|
||||
format: "png",
|
||||
url: "ipfs://QmP8rYvcc7aJB3c2YZxjxaySvHapHnoK8MnxuSuDT4PtF2",
|
||||
height: 400,
|
||||
width: 400,
|
||||
},
|
||||
rpc: [
|
||||
"https://rpc00.proofofpepe.tech",
|
||||
"https://rpc01.proofofpepe.tech",
|
||||
"https://rpc02.proofofpepe.tech",
|
||||
],
|
||||
nativeCurrency: {
|
||||
name: "Pepe",
|
||||
symbol: "PEPE",
|
||||
decimals: 18,
|
||||
},
|
||||
explorers: [
|
||||
{ name: "Pepescan", url: "https://pepescan.app", standard: "none" },
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
// @ts-check
|
||||
/** @typedef { import("../../src/types").Chain } Chain */
|
||||
|
||||
/** @type {Omit<Chain, "slug">} */
|
||||
export default {
|
||||
name: "Xpla Mainnet",
|
||||
chain: "XPLA",
|
||||
rpc: ["https://dimension-evm-rpc.xpla.dev"],
|
||||
nativeCurrency: {
|
||||
name: "XPLA",
|
||||
symbol: "XPLA",
|
||||
decimals: 18,
|
||||
},
|
||||
infoURL: "https://xpla.io/",
|
||||
shortName: "xpla",
|
||||
chainId: 37,
|
||||
icon: {
|
||||
url: "ipfs://QmbvEAKZfgJckEziU3mpCwz6jqMeWRcLgd8TNsWA7g8sD9/xpla.png",
|
||||
width: 512,
|
||||
height: 512,
|
||||
format: "png",
|
||||
},
|
||||
explorers: [
|
||||
{
|
||||
name: "XPLA Explorer",
|
||||
url: "https://explorer.xpla.io",
|
||||
standard: "none",
|
||||
},
|
||||
],
|
||||
testnet: false,
|
||||
redFlags: ["reusedChainId"],
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
// @ts-check
|
||||
/** @typedef { import("../../src/types").Chain } Chain */
|
||||
|
||||
/** @type {Omit<Chain, "slug">} */
|
||||
export default {
|
||||
name: "Xpla Testnet",
|
||||
chain: "XPLA",
|
||||
rpc: ["https://cube-evm-rpc.xpla.dev"],
|
||||
nativeCurrency: {
|
||||
name: "XPLA",
|
||||
symbol: "XPLA",
|
||||
decimals: 18,
|
||||
},
|
||||
faucets: ["https://faucet.xpla.io/"],
|
||||
infoURL: "https://xpla.io/",
|
||||
shortName: "xpla-test",
|
||||
chainId: 47,
|
||||
icon: {
|
||||
url: "ipfs://QmbvEAKZfgJckEziU3mpCwz6jqMeWRcLgd8TNsWA7g8sD9/xpla.png",
|
||||
width: 512,
|
||||
height: 512,
|
||||
format: "png",
|
||||
},
|
||||
explorers: [
|
||||
{
|
||||
name: "XPLA Explorer",
|
||||
url: "https://explorer.xpla.io/testnet",
|
||||
standard: "none",
|
||||
},
|
||||
],
|
||||
testnet: true,
|
||||
redFlags: ["reusedChainId"],
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
// @ts-check
|
||||
/** @typedef { import("../../src/types").Chain } Chain */
|
||||
|
||||
/** @type {Omit<Chain, "slug">} */
|
||||
export default {
|
||||
name: "Spicy Chain",
|
||||
chain: "Spicy",
|
||||
rpc: ["https://spicy-rpc.chiliz.com/"],
|
||||
faucets: ["https://spicy-faucet.chiliz.com/"],
|
||||
nativeCurrency: {
|
||||
name: "Chiliz",
|
||||
symbol: "CHZ",
|
||||
decimals: 18,
|
||||
},
|
||||
infoURL: "https://chiliz.com/",
|
||||
shortName: "Spicy",
|
||||
chainId: 88882,
|
||||
networkId: 88882,
|
||||
explorers: [
|
||||
{
|
||||
name: "Spicy Explorer",
|
||||
url: "http://spicy-explorer.chiliz.com/",
|
||||
standard: "none",
|
||||
},
|
||||
],
|
||||
icon: {
|
||||
url: "ipfs://QmTGYofJ8VLkeNY4J69AvXi8e126kmbHmf34wLFoJ1FKAK",
|
||||
width: 400,
|
||||
height: 400,
|
||||
format: "png",
|
||||
},
|
||||
testnet: true,
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
// @ts-check
|
||||
/** @typedef { import("../../src/types").Chain } Chain */
|
||||
|
||||
/** @type {Omit<Chain, "slug">} */
|
||||
export default {
|
||||
name: "Worlds Appchain",
|
||||
chain: "WRLDS",
|
||||
shortName: "WRLDS",
|
||||
chainId: 91003,
|
||||
testnet: true,
|
||||
rpc: ["https://api.evm.worlds.dev.eclipsenetwork.xyz/"],
|
||||
nativeCurrency: {
|
||||
name: "WRLDS",
|
||||
symbol: "WRLDS",
|
||||
decimals: 18,
|
||||
},
|
||||
faucets: ["https://faucet.evm.worlds.dev.eclipsenetwork.xyz/request_neon"],
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/chains",
|
||||
"version": "0.1.43",
|
||||
"version": "0.1.48",
|
||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||
"browser": {
|
||||
|
||||
@@ -344,6 +344,7 @@ ${exports.join("\n")}
|
||||
export * from "./types";
|
||||
export * from "./utils";
|
||||
export const defaultChains = [c1, c5, c8453, c84531, c137, c80001, c42161, c421613, c10, c420, c56, c97, c250, c4002, c43114, c43113, c1337];
|
||||
// @ts-expect-error - TODO: fix this later
|
||||
export const allChains: Chain[] = [${exportNames.join(", ")}];
|
||||
|
||||
type ChainsById = {
|
||||
|
||||
+114
-17
File diff suppressed because one or more lines are too long
@@ -1,5 +1,72 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.11.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1538](https://github.com/thirdweb-dev/js/pull/1538) [`8b82f3c5`](https://github.com/thirdweb-dev/js/commit/8b82f3c59cad6bd1167c13cb0b8a1cdc36475ab8) Thanks [@iketw](https://github.com/iketw)! - Adds support for creating PWA Vite apps
|
||||
|
||||
You can now run:
|
||||
|
||||
```bash
|
||||
npx thirdweb@nightly create --template pwa-vite-typescript-starter
|
||||
```
|
||||
|
||||
- Updated dependencies [[`f59b729f`](https://github.com/thirdweb-dev/js/commit/f59b729f8b09aa86655b8e8a70fba644fc52009b), [`911e14fc`](https://github.com/thirdweb-dev/js/commit/911e14fcac743b07fa1a66440c72d662c08e971c), [`cd6b07b5`](https://github.com/thirdweb-dev/js/commit/cd6b07b591606d2671794cebebf8edcb59076c32)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.11.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`586e91db`](https://github.com/thirdweb-dev/js/commit/586e91dbe610588cc7b24fade59172fed6481074), [`34a3bb8a`](https://github.com/thirdweb-dev/js/commit/34a3bb8ae3c1d7a506e5568a9e79ab7e469557a8), [`91f0245b`](https://github.com/thirdweb-dev/js/commit/91f0245be78ae523e1faea26b1032bfb283467d9), [`f65578d6`](https://github.com/thirdweb-dev/js/commit/f65578d637decc8b87cada5b5b0c8c504064d9d5), [`5a373a75`](https://github.com/thirdweb-dev/js/commit/5a373a75090da7e1e05724ed1a3a3a6aa9f7fd21), [`ae74b8ef`](https://github.com/thirdweb-dev/js/commit/ae74b8ef6200dba8affa8b52e7d834c5552350d0), [`bc003c2f`](https://github.com/thirdweb-dev/js/commit/bc003c2fef33fcf7ce5981d8634911ac4bcaa927), [`447d9846`](https://github.com/thirdweb-dev/js/commit/447d984653f77af6860ae907072e768b584b263d), [`f65578d6`](https://github.com/thirdweb-dev/js/commit/f65578d637decc8b87cada5b5b0c8c504064d9d5)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.11.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`184c325a`](https://github.com/thirdweb-dev/js/commit/184c325ab2ef028022a050c4274f2ab12b1a3a7f), [`046c9ad6`](https://github.com/thirdweb-dev/js/commit/046c9ad604587ff79bf028c4fe7b1f9c94f4ea54), [`c12f0874`](https://github.com/thirdweb-dev/js/commit/c12f0874b4dac43c263c7edb20d0343c16381c34)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.11.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`f97ddf4c`](https://github.com/thirdweb-dev/js/commit/f97ddf4c7f14854f3b204ad9741b52ddb8dac736)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.11.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`e1962641`](https://github.com/thirdweb-dev/js/commit/e19626417218767a0e44c00f440761d7b86d02eb), [`bd1fcbae`](https://github.com/thirdweb-dev/js/commit/bd1fcbae327e788124f5635673511f0b72e9d7ab)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.11.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1499](https://github.com/thirdweb-dev/js/pull/1499) [`8f3b685a`](https://github.com/thirdweb-dev/js/commit/8f3b685ad2bd73cb4d5d8c8aa25c04ffc10fb7cf) Thanks [@Marfuen](https://github.com/Marfuen)! - Update deploy command from CLI to use show a public gateway url temporarily. Updated chains too.
|
||||
|
||||
- Updated dependencies [[`d248aa2c`](https://github.com/thirdweb-dev/js/commit/d248aa2c5a89a297dd2623c961793026de1de346), [`d248aa2c`](https://github.com/thirdweb-dev/js/commit/d248aa2c5a89a297dd2623c961793026de1de346), [`8f3b685a`](https://github.com/thirdweb-dev/js/commit/8f3b685ad2bd73cb4d5d8c8aa25c04ffc10fb7cf), [`28975765`](https://github.com/thirdweb-dev/js/commit/2897576513eb6f497a9f92e3e473182b4fc9681b), [`b91d3e99`](https://github.com/thirdweb-dev/js/commit/b91d3e990198b77dc1358e738c11dc4acaa67491)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.11.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a5ba9e4f`](https://github.com/thirdweb-dev/js/commit/a5ba9e4fbfee228e5b9ac27cd0157187e3a50117), [`39e2af6f`](https://github.com/thirdweb-dev/js/commit/39e2af6f2f4d933dca1b3de4a37de76375bafd74)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.11.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.11.13",
|
||||
"version": "0.11.20",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -69,6 +69,9 @@ export async function twCreate(
|
||||
if (options.reactNative) {
|
||||
framework = "react-native";
|
||||
}
|
||||
if (options.pwaVite) {
|
||||
framework = "pwa-vite";
|
||||
}
|
||||
|
||||
if (options.solana) {
|
||||
chain = "solana";
|
||||
@@ -239,6 +242,7 @@ export async function twCreate(
|
||||
{ title: "Next.js", value: "next" },
|
||||
{ title: "Create React App", value: "cra" },
|
||||
{ title: "Vite", value: "vite" },
|
||||
{ title: "PWA Vite", value: "pwa-vite" },
|
||||
{ title: "React Native", value: "react-native" },
|
||||
{ title: "Node.js", value: "node" },
|
||||
{ title: "Express", value: "express" },
|
||||
@@ -265,6 +269,8 @@ export async function twCreate(
|
||||
if (typeof res.project === "string") {
|
||||
language = res.project.trim();
|
||||
}
|
||||
} else if (framework === "pwa-vite" || framework === "pwa-next") {
|
||||
language = "typescript";
|
||||
} else {
|
||||
const res = await prompts({
|
||||
type: "select",
|
||||
|
||||
@@ -220,7 +220,7 @@ export async function createApp({
|
||||
}
|
||||
|
||||
let startOrDev: string | undefined;
|
||||
if (framework && (framework === "next" || framework === "vite")) {
|
||||
if (framework && (framework.includes("next") || framework.includes("vite"))) {
|
||||
startOrDev = "dev";
|
||||
} else if (template) {
|
||||
startOrDev = await getStartOrDev(template);
|
||||
|
||||
@@ -70,7 +70,10 @@ export async function deployApp(
|
||||
|
||||
try {
|
||||
const uri = await upload(storage, distPath);
|
||||
return storage.resolveScheme(uri);
|
||||
return `${uri.replace(
|
||||
"ipfs://",
|
||||
"https://cf-ipfs.com/ipfs/",
|
||||
)}`;
|
||||
} catch (err) {
|
||||
console.error("Can't upload project", err);
|
||||
return Promise.reject("Can't upload project");
|
||||
|
||||
@@ -199,13 +199,15 @@ export async function generate(options: GenerateOptions, apiSecretKey: string) {
|
||||
}
|
||||
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
||||
if (packageJson.scripts?.postinstall?.includes("thirdweb generate") || packageJson.scripts?.postinstall?.includes("thirdweb@latest generate")) {
|
||||
if (
|
||||
packageJson.scripts?.postinstall?.includes("thirdweb generate") ||
|
||||
packageJson.scripts?.postinstall?.includes("thirdweb@latest generate")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
const postinstall = packageJson.scripts?.postinstall
|
||||
? packageJson.scripts.postinstall +
|
||||
`npx --yes thirdweb@latest generate`
|
||||
? packageJson.scripts.postinstall + `npx --yes thirdweb@latest generate`
|
||||
: `npx --yes thirdweb@latest generate`;
|
||||
|
||||
fs.writeFileSync(
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/contracts-js
|
||||
|
||||
## 1.3.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1518](https://github.com/thirdweb-dev/js/pull/1518) [`34a3bb8a`](https://github.com/thirdweb-dev/js/commit/34a3bb8ae3c1d7a506e5568a9e79ab7e469557a8) Thanks [@nkrishang](https://github.com/nkrishang)! - Update contracts package
|
||||
|
||||
## 1.3.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/contracts-js",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12",
|
||||
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
|
||||
"module": "dist/thirdweb-dev-contracts-js.esm.js",
|
||||
"browser": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/contracts-js",
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/contracts": "3.8.3"
|
||||
"@thirdweb-dev/contracts": "3.9.3-0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
|
||||
@@ -1,5 +1,83 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 3.14.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`f59b729f`](https://github.com/thirdweb-dev/js/commit/f59b729f8b09aa86655b8e8a70fba644fc52009b), [`911e14fc`](https://github.com/thirdweb-dev/js/commit/911e14fcac743b07fa1a66440c72d662c08e971c), [`cd6b07b5`](https://github.com/thirdweb-dev/js/commit/cd6b07b591606d2671794cebebf8edcb59076c32)]:
|
||||
- @thirdweb-dev/sdk@3.10.56
|
||||
- @thirdweb-dev/chains@0.1.48
|
||||
- @thirdweb-dev/wallets@1.1.20
|
||||
- @thirdweb-dev/auth@3.2.37
|
||||
|
||||
## 3.14.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1522](https://github.com/thirdweb-dev/js/pull/1522) [`088547f7`](https://github.com/thirdweb-dev/js/commit/088547f763294f1641c01ffe1aabac585f255dc0) Thanks [@MananTank](https://github.com/MananTank)! - - New prop `switchToActiveChain` added to `ConnectWallet`` component to show "Switch Network" button if wallet is not connected to the `activeChain`passed to the`ThirdwebProvider`
|
||||
- Add max-height on `ConnectWallet` modal
|
||||
- Local Wallet UI adjustments
|
||||
- Updated dependencies [[`586e91db`](https://github.com/thirdweb-dev/js/commit/586e91dbe610588cc7b24fade59172fed6481074), [`34a3bb8a`](https://github.com/thirdweb-dev/js/commit/34a3bb8ae3c1d7a506e5568a9e79ab7e469557a8), [`91f0245b`](https://github.com/thirdweb-dev/js/commit/91f0245be78ae523e1faea26b1032bfb283467d9), [`f65578d6`](https://github.com/thirdweb-dev/js/commit/f65578d637decc8b87cada5b5b0c8c504064d9d5), [`5a373a75`](https://github.com/thirdweb-dev/js/commit/5a373a75090da7e1e05724ed1a3a3a6aa9f7fd21), [`ae74b8ef`](https://github.com/thirdweb-dev/js/commit/ae74b8ef6200dba8affa8b52e7d834c5552350d0), [`bc003c2f`](https://github.com/thirdweb-dev/js/commit/bc003c2fef33fcf7ce5981d8634911ac4bcaa927), [`447d9846`](https://github.com/thirdweb-dev/js/commit/447d984653f77af6860ae907072e768b584b263d), [`f65578d6`](https://github.com/thirdweb-dev/js/commit/f65578d637decc8b87cada5b5b0c8c504064d9d5)]:
|
||||
- @thirdweb-dev/sdk@3.10.55
|
||||
- @thirdweb-dev/chains@0.1.47
|
||||
- @thirdweb-dev/storage@1.2.8
|
||||
- @thirdweb-dev/wallets@1.1.19
|
||||
- @thirdweb-dev/auth@3.2.36
|
||||
|
||||
## 3.14.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`184c325a`](https://github.com/thirdweb-dev/js/commit/184c325ab2ef028022a050c4274f2ab12b1a3a7f), [`046c9ad6`](https://github.com/thirdweb-dev/js/commit/046c9ad604587ff79bf028c4fe7b1f9c94f4ea54), [`c12f0874`](https://github.com/thirdweb-dev/js/commit/c12f0874b4dac43c263c7edb20d0343c16381c34)]:
|
||||
- @thirdweb-dev/chains@0.1.46
|
||||
- @thirdweb-dev/storage@1.2.7
|
||||
- @thirdweb-dev/sdk@3.10.54
|
||||
- @thirdweb-dev/wallets@1.1.18
|
||||
- @thirdweb-dev/auth@3.2.35
|
||||
|
||||
## 3.14.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`f97ddf4c`](https://github.com/thirdweb-dev/js/commit/f97ddf4c7f14854f3b204ad9741b52ddb8dac736)]:
|
||||
- @thirdweb-dev/chains@0.1.45
|
||||
- @thirdweb-dev/sdk@3.10.53
|
||||
- @thirdweb-dev/wallets@1.1.17
|
||||
- @thirdweb-dev/auth@3.2.34
|
||||
|
||||
## 3.14.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`e1962641`](https://github.com/thirdweb-dev/js/commit/e19626417218767a0e44c00f440761d7b86d02eb), [`bd1fcbae`](https://github.com/thirdweb-dev/js/commit/bd1fcbae327e788124f5635673511f0b72e9d7ab)]:
|
||||
- @thirdweb-dev/sdk@3.10.52
|
||||
- @thirdweb-dev/wallets@1.1.16
|
||||
- @thirdweb-dev/auth@3.2.33
|
||||
|
||||
## 3.14.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1489](https://github.com/thirdweb-dev/js/pull/1489) [`07fb1b5f`](https://github.com/thirdweb-dev/js/commit/07fb1b5ffa4c170e252df31070852ddb9a81dec9) Thanks [@iketw](https://github.com/iketw)! - Cleanup and minor bug fix in ReactCore
|
||||
|
||||
- [#1486](https://github.com/thirdweb-dev/js/pull/1486) [`300a3c6f`](https://github.com/thirdweb-dev/js/commit/300a3c6f04d0ea7e25dfdb0a4c28b3a5796fcadf) Thanks [@iketw](https://github.com/iketw)! - Add better error messages when using hooks outside the <ThirdwebProvider />
|
||||
|
||||
- Updated dependencies [[`07fb1b5f`](https://github.com/thirdweb-dev/js/commit/07fb1b5ffa4c170e252df31070852ddb9a81dec9), [`d248aa2c`](https://github.com/thirdweb-dev/js/commit/d248aa2c5a89a297dd2623c961793026de1de346), [`d248aa2c`](https://github.com/thirdweb-dev/js/commit/d248aa2c5a89a297dd2623c961793026de1de346), [`8f3b685a`](https://github.com/thirdweb-dev/js/commit/8f3b685ad2bd73cb4d5d8c8aa25c04ffc10fb7cf), [`28975765`](https://github.com/thirdweb-dev/js/commit/2897576513eb6f497a9f92e3e473182b4fc9681b), [`b91d3e99`](https://github.com/thirdweb-dev/js/commit/b91d3e990198b77dc1358e738c11dc4acaa67491)]:
|
||||
- @thirdweb-dev/wallets@1.1.15
|
||||
- @thirdweb-dev/sdk@3.10.51
|
||||
- @thirdweb-dev/storage@1.2.6
|
||||
- @thirdweb-dev/chains@0.1.44
|
||||
- @thirdweb-dev/auth@3.2.32
|
||||
|
||||
## 3.14.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`39e2af6f`](https://github.com/thirdweb-dev/js/commit/39e2af6f2f4d933dca1b3de4a37de76375bafd74), [`a5ba9e4f`](https://github.com/thirdweb-dev/js/commit/a5ba9e4fbfee228e5b9ac27cd0157187e3a50117), [`39e2af6f`](https://github.com/thirdweb-dev/js/commit/39e2af6f2f4d933dca1b3de4a37de76375bafd74)]:
|
||||
- @thirdweb-dev/wallets@1.1.14
|
||||
- @thirdweb-dev/sdk@3.10.50
|
||||
- @thirdweb-dev/auth@3.2.31
|
||||
|
||||
## 3.14.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "3.14.30",
|
||||
"version": "3.14.37",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
@@ -98,7 +98,7 @@
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/react-query": "^4.32.0",
|
||||
"@tanstack/react-query": "^4.33.0",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/generated-abis": "workspace:^",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
|
||||
@@ -152,6 +152,7 @@ export const ThirdwebProviderCore = <TChains extends Chain[]>({
|
||||
autoSwitch={props.autoSwitch}
|
||||
autoConnectTimeout={props.autoConnectTimeout}
|
||||
clientId={props.clientId}
|
||||
activeChainSetExplicitly={!!props.activeChain}
|
||||
>
|
||||
<ThirdwebSDKProviderWrapper
|
||||
queryClient={props.queryClient}
|
||||
|
||||
@@ -89,6 +89,7 @@ type ThirdwebWalletContextData = {
|
||||
* Get wallet config object from wallet instance
|
||||
*/
|
||||
getWalletConfig: (walletInstance: WalletInstance) => WalletConfig | undefined;
|
||||
activeChainSetExplicitly: boolean;
|
||||
};
|
||||
|
||||
const ThirdwebWalletContext = /* @__PURE__ */ createContext<
|
||||
@@ -106,6 +107,7 @@ export function ThirdwebWalletProvider(
|
||||
autoSwitch?: boolean;
|
||||
autoConnectTimeout?: number;
|
||||
clientId?: string;
|
||||
activeChainSetExplicitly: boolean;
|
||||
}>,
|
||||
) {
|
||||
const [signer, setSigner] = useState<Signer | undefined>(undefined);
|
||||
@@ -229,7 +231,11 @@ export function ThirdwebWalletProvider(
|
||||
|
||||
try {
|
||||
const parsedWallet = JSON.parse(lastConnectedWallet as string);
|
||||
parsedWallet.connectParams.chainId = chainId;
|
||||
if (parsedWallet.connectParams) {
|
||||
parsedWallet.connectParams.chainId = chainId;
|
||||
} else {
|
||||
parsedWallet.connectParams = { chainId };
|
||||
}
|
||||
await lastConnectedWalletStorage.setItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
JSON.stringify(parsedWallet),
|
||||
@@ -476,6 +482,7 @@ export function ThirdwebWalletProvider(
|
||||
getWalletConfig: (walletInstance: WalletInstance) => {
|
||||
return walletInstanceToConfig.get(walletInstance);
|
||||
},
|
||||
activeChainSetExplicitly: props.activeChainSetExplicitly,
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { Chain, defaultChains } from "@thirdweb-dev/chains";
|
||||
import { Chain } from "@thirdweb-dev/chains";
|
||||
import React, { createContext, PropsWithChildren, useContext } from "react";
|
||||
import invariant from "tiny-invariant";
|
||||
|
||||
interface ThirdwebConfigContext {
|
||||
chains: Chain[];
|
||||
clientId?: string;
|
||||
}
|
||||
|
||||
const ThirdwebConfigContext =
|
||||
/* @__PURE__ */ createContext<ThirdwebConfigContext>({
|
||||
chains: defaultChains,
|
||||
});
|
||||
export const ThirdwebConfigContext = /* @__PURE__ */ createContext<
|
||||
ThirdwebConfigContext | undefined
|
||||
>(undefined);
|
||||
|
||||
export const ThirdwebConfigProvider: React.FC<
|
||||
PropsWithChildren<{
|
||||
@@ -22,5 +22,10 @@ export const ThirdwebConfigProvider: React.FC<
|
||||
);
|
||||
|
||||
export function useThirdwebConfigContext() {
|
||||
return useContext(ThirdwebConfigContext);
|
||||
const context = useContext(ThirdwebConfigContext);
|
||||
invariant(
|
||||
context,
|
||||
"useThirdwebConfigContext() hook must be used within a <ThirdwebProvider/>",
|
||||
);
|
||||
return context;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import React, {
|
||||
useState,
|
||||
} from "react";
|
||||
import { useSDK } from "../hooks/useSDK";
|
||||
import invariant from "tiny-invariant";
|
||||
|
||||
interface ThirdwebConnectedWalletContext {
|
||||
wallet: UserWallet | undefined;
|
||||
@@ -26,10 +27,9 @@ const INITIAL_CONTEXT_VALUE: ThirdwebConnectedWalletContext = {
|
||||
signer: undefined,
|
||||
};
|
||||
|
||||
const ThirdwebConnectedWalletContext =
|
||||
/* @__PURE__ */ createContext<ThirdwebConnectedWalletContext>(
|
||||
INITIAL_CONTEXT_VALUE,
|
||||
);
|
||||
export const ThirdwebConnectedWalletContext = /* @__PURE__ */ createContext<
|
||||
ThirdwebConnectedWalletContext | undefined
|
||||
>(undefined);
|
||||
|
||||
export const ThirdwebConnectedWalletProvider: React.FC<
|
||||
PropsWithChildren<{ signer?: Signer }>
|
||||
@@ -115,5 +115,10 @@ export const ThirdwebConnectedWalletProvider: React.FC<
|
||||
};
|
||||
|
||||
export function useThirdwebConnectedWalletContext() {
|
||||
return useContext(ThirdwebConnectedWalletContext);
|
||||
const context = useContext(ThirdwebConnectedWalletContext);
|
||||
invariant(
|
||||
context,
|
||||
"useThirdwebConnectedWalletContext() hook must be used within a <ThirdwebProvider/>",
|
||||
);
|
||||
return context;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import {
|
||||
} from "@tanstack/react-query";
|
||||
import { getCachedAbiForContract, TransactionResult } from "@thirdweb-dev/sdk";
|
||||
import type {
|
||||
Abi,
|
||||
CommonContractSchemaInput,
|
||||
ContractEvent,
|
||||
ContractForPrebuiltContractType,
|
||||
@@ -33,6 +32,7 @@ import type {
|
||||
ThirdwebSDK,
|
||||
ValidContractInstance,
|
||||
BaseContractForAddress,
|
||||
PublishedMetadata,
|
||||
} from "@thirdweb-dev/sdk";
|
||||
import type { CallOverrides, ContractInterface, providers } from "ethers";
|
||||
import { useEffect, useMemo } from "react";
|
||||
@@ -88,19 +88,11 @@ export const contractType = {
|
||||
|
||||
// end contract type
|
||||
|
||||
type FetchCompilerMetadataReturnType = {
|
||||
name: string;
|
||||
metadata: Record<string, any>;
|
||||
abi: Abi;
|
||||
info: Record<string, any>;
|
||||
licenses: string[];
|
||||
};
|
||||
|
||||
// contract compiler metadata
|
||||
function fetchCompilerMetadata(
|
||||
contractAddress: RequiredParam<ContractAddress>,
|
||||
sdk: RequiredParam<ThirdwebSDK>,
|
||||
): Promise<FetchCompilerMetadataReturnType> | null {
|
||||
): Promise<PublishedMetadata> | null {
|
||||
if (!contractAddress || !sdk) {
|
||||
return null;
|
||||
}
|
||||
@@ -114,7 +106,7 @@ function fetchCompilerMetadata(
|
||||
|
||||
export function useCompilerMetadata(
|
||||
contractAddress: RequiredParam<ContractAddress>,
|
||||
): UseQueryResult<FetchCompilerMetadataReturnType | null> {
|
||||
): UseQueryResult<PublishedMetadata | null> {
|
||||
const sdk = useSDK();
|
||||
|
||||
return useQueryWithNetwork(
|
||||
|
||||
@@ -22,6 +22,6 @@ export function useAuth() {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return new ThirdwebAuth(wallet, authConfig.domain)
|
||||
}, [wallet, authConfig, authConfig?.domain])
|
||||
return new ThirdwebAuth(wallet, authConfig.domain);
|
||||
}, [wallet, authConfig?.domain]);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
import { useThirdwebConnectedWalletContext } from "../contexts/thirdweb-wallet";
|
||||
import { useContext } from "react";
|
||||
import { ThirdwebConnectedWalletContext } from "../contexts/thirdweb-wallet";
|
||||
import type { Signer } from "ethers";
|
||||
import invariant from "tiny-invariant";
|
||||
|
||||
/**
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export function useSigner(): Signer | undefined {
|
||||
return useThirdwebConnectedWalletContext().signer;
|
||||
const context = useContext(ThirdwebConnectedWalletContext);
|
||||
invariant(
|
||||
context,
|
||||
"useSigner() hook must be used within a <ThirdwebProvider/>",
|
||||
);
|
||||
return context.signer;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import { useThirdwebConfigContext } from "../contexts/thirdweb-config";
|
||||
import { useContext } from "react";
|
||||
import invariant from "tiny-invariant";
|
||||
import { ThirdwebConfigContext } from "../contexts/thirdweb-config";
|
||||
|
||||
export function useSupportedChains() {
|
||||
return useThirdwebConfigContext().chains;
|
||||
const context = useContext(ThirdwebConfigContext);
|
||||
invariant(
|
||||
context,
|
||||
"useSupportedChains() hook must be used within a <ThirdwebProvider/>",
|
||||
);
|
||||
return context.chains;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
import { useThirdwebConnectedWalletContext } from "../contexts/thirdweb-wallet";
|
||||
import invariant from "tiny-invariant";
|
||||
import {
|
||||
ThirdwebConnectedWalletContext,
|
||||
useThirdwebConnectedWalletContext,
|
||||
} from "../contexts/thirdweb-wallet";
|
||||
import { ContractAddress } from "../types";
|
||||
import { cacheKeys } from "../utils/cache-keys";
|
||||
import { useSupportedChains } from "./useSupportedChains";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { Chain, defaultChains } from "@thirdweb-dev/chains";
|
||||
import { useMemo } from "react";
|
||||
import { useContext, useMemo } from "react";
|
||||
|
||||
/**
|
||||
* A hook to get the native or (optional) ERC20 token balance of the connected wallet.
|
||||
@@ -40,7 +44,12 @@ export function useBalance(tokenAddress?: ContractAddress) {
|
||||
* @internal
|
||||
*/
|
||||
export function useConnectedWallet() {
|
||||
return useThirdwebConnectedWalletContext().wallet;
|
||||
const context = useContext(ThirdwebConnectedWalletContext);
|
||||
invariant(
|
||||
context,
|
||||
"useConnectedWallet() hook must be used within a <ThirdwebProvider/>",
|
||||
);
|
||||
return context.signer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,7 +80,12 @@ export function useConnectedWallet() {
|
||||
* @public
|
||||
*/
|
||||
export function useAddress(): string | undefined {
|
||||
return useThirdwebConnectedWalletContext().address;
|
||||
const context = useContext(ThirdwebConnectedWalletContext);
|
||||
invariant(
|
||||
context,
|
||||
"useAddress() hook must be used within a <ThirdwebProvider/>",
|
||||
);
|
||||
return context.address;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,7 +110,12 @@ export function useAddress(): string | undefined {
|
||||
* @public
|
||||
*/
|
||||
export function useChainId(): number | undefined {
|
||||
return useThirdwebConnectedWalletContext().chainId;
|
||||
const context = useContext(ThirdwebConnectedWalletContext);
|
||||
invariant(
|
||||
context,
|
||||
"useChainId() hook must be used within a <ThirdwebProvider/>",
|
||||
);
|
||||
return context.chainId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -251,6 +251,9 @@ export { ThirdwebSDKProvider } from "./providers/thirdweb-sdk-provider";
|
||||
export { useSDK, useSDKChainId } from "./hooks/useSDK";
|
||||
export type { ThirdwebSDKProviderProps } from "./providers/types";
|
||||
|
||||
// utils
|
||||
export { invalidateContractAndBalances } from "./utils/cache-keys";
|
||||
|
||||
// types
|
||||
export type {
|
||||
Chain,
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/react-native-compat
|
||||
|
||||
## 0.2.56
|
||||
|
||||
## 0.2.55
|
||||
|
||||
## 0.2.54
|
||||
|
||||
## 0.2.53
|
||||
|
||||
## 0.2.52
|
||||
|
||||
## 0.2.51
|
||||
|
||||
## 0.2.50
|
||||
|
||||
## 0.2.49
|
||||
|
||||
## 0.2.48
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native-compat",
|
||||
"description": "Shims for Thirdweb in React Native Projects",
|
||||
"version": "0.2.49",
|
||||
"version": "0.2.56",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,122 @@
|
||||
# @thirdweb-dev/react-native
|
||||
|
||||
## 0.2.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1536](https://github.com/thirdweb-dev/js/pull/1536) [`387dddbd`](https://github.com/thirdweb-dev/js/commit/387dddbd87ff6c1a53ffaf663564a44b89a3a2a5) Thanks [@iketw](https://github.com/iketw)! - Adds switchToActiveChain prop to the ConnectWallet button.
|
||||
|
||||
When set to true it will show a "Switch Network" button if the wallet
|
||||
is connected to a different chain than the `activeChain` provided in `ThirdwebProvider`
|
||||
|
||||
**Note:** IF you support multiple networks in your app this prop should
|
||||
be set to `false` to allow users to switch between networks.
|
||||
|
||||
Usage:
|
||||
|
||||
```javascript
|
||||
<ConnectWallet switchToActiveChain={true} />
|
||||
```
|
||||
|
||||
- Updated dependencies [[`f59b729f`](https://github.com/thirdweb-dev/js/commit/f59b729f8b09aa86655b8e8a70fba644fc52009b), [`911e14fc`](https://github.com/thirdweb-dev/js/commit/911e14fcac743b07fa1a66440c72d662c08e971c), [`cd6b07b5`](https://github.com/thirdweb-dev/js/commit/cd6b07b591606d2671794cebebf8edcb59076c32)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.2.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`586e91db`](https://github.com/thirdweb-dev/js/commit/586e91dbe610588cc7b24fade59172fed6481074), [`34a3bb8a`](https://github.com/thirdweb-dev/js/commit/34a3bb8ae3c1d7a506e5568a9e79ab7e469557a8), [`91f0245b`](https://github.com/thirdweb-dev/js/commit/91f0245be78ae523e1faea26b1032bfb283467d9), [`f65578d6`](https://github.com/thirdweb-dev/js/commit/f65578d637decc8b87cada5b5b0c8c504064d9d5), [`5a373a75`](https://github.com/thirdweb-dev/js/commit/5a373a75090da7e1e05724ed1a3a3a6aa9f7fd21), [`ae74b8ef`](https://github.com/thirdweb-dev/js/commit/ae74b8ef6200dba8affa8b52e7d834c5552350d0), [`bc003c2f`](https://github.com/thirdweb-dev/js/commit/bc003c2fef33fcf7ce5981d8634911ac4bcaa927), [`447d9846`](https://github.com/thirdweb-dev/js/commit/447d984653f77af6860ae907072e768b584b263d), [`f65578d6`](https://github.com/thirdweb-dev/js/commit/f65578d637decc8b87cada5b5b0c8c504064d9d5), [`088547f7`](https://github.com/thirdweb-dev/js/commit/088547f763294f1641c01ffe1aabac585f255dc0)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.2.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`184c325a`](https://github.com/thirdweb-dev/js/commit/184c325ab2ef028022a050c4274f2ab12b1a3a7f), [`046c9ad6`](https://github.com/thirdweb-dev/js/commit/046c9ad604587ff79bf028c4fe7b1f9c94f4ea54), [`c12f0874`](https://github.com/thirdweb-dev/js/commit/c12f0874b4dac43c263c7edb20d0343c16381c34)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.2.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`f97ddf4c`](https://github.com/thirdweb-dev/js/commit/f97ddf4c7f14854f3b204ad9741b52ddb8dac736)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.2.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`e1962641`](https://github.com/thirdweb-dev/js/commit/e19626417218767a0e44c00f440761d7b86d02eb), [`bd1fcbae`](https://github.com/thirdweb-dev/js/commit/bd1fcbae327e788124f5635673511f0b72e9d7ab)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.2.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1489](https://github.com/thirdweb-dev/js/pull/1489) [`07fb1b5f`](https://github.com/thirdweb-dev/js/commit/07fb1b5ffa4c170e252df31070852ddb9a81dec9) Thanks [@iketw](https://github.com/iketw)! - Adding walletConnect as a supportedWallet in React Native
|
||||
|
||||
```javascript
|
||||
import {
|
||||
localWallet,
|
||||
ThirdwebProvider,
|
||||
walletConnect,
|
||||
} from "@thirdweb-dev/react-native";
|
||||
import { Ethereum } from "@thirdweb-dev/chains";
|
||||
|
||||
const App = () => {
|
||||
const activeChain = Ethereum;
|
||||
return (
|
||||
<ThirdwebProvider
|
||||
activeChain={activeChain}
|
||||
supportedChains={[activeChain]}
|
||||
clientId="your-client-id"
|
||||
supportedWallets={[
|
||||
localWallet(),
|
||||
walletConnect({
|
||||
projectId: "your-wallet-connect-project-id", // optional, but we recommend you get your own for production
|
||||
}),
|
||||
]}
|
||||
>
|
||||
<AppInner />
|
||||
</ThirdwebProvider>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
- [#1496](https://github.com/thirdweb-dev/js/pull/1496) [`26349f31`](https://github.com/thirdweb-dev/js/commit/26349f311d144d692c69a6c2a7ec0f34949851d4) Thanks [@iketw](https://github.com/iketw)! - Improves loading states when disconnecting and fetching balances
|
||||
|
||||
- Updated dependencies [[`07fb1b5f`](https://github.com/thirdweb-dev/js/commit/07fb1b5ffa4c170e252df31070852ddb9a81dec9), [`300a3c6f`](https://github.com/thirdweb-dev/js/commit/300a3c6f04d0ea7e25dfdb0a4c28b3a5796fcadf), [`d248aa2c`](https://github.com/thirdweb-dev/js/commit/d248aa2c5a89a297dd2623c961793026de1de346), [`d248aa2c`](https://github.com/thirdweb-dev/js/commit/d248aa2c5a89a297dd2623c961793026de1de346), [`8f3b685a`](https://github.com/thirdweb-dev/js/commit/8f3b685ad2bd73cb4d5d8c8aa25c04ffc10fb7cf), [`28975765`](https://github.com/thirdweb-dev/js/commit/2897576513eb6f497a9f92e3e473182b4fc9681b), [`b91d3e99`](https://github.com/thirdweb-dev/js/commit/b91d3e990198b77dc1358e738c11dc4acaa67491)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.2.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`39e2af6f`](https://github.com/thirdweb-dev/js/commit/39e2af6f2f4d933dca1b3de4a37de76375bafd74), [`a5ba9e4f`](https://github.com/thirdweb-dev/js/commit/a5ba9e4fbfee228e5b9ac27cd0157187e3a50117), [`39e2af6f`](https://github.com/thirdweb-dev/js/commit/39e2af6f2f4d933dca1b3de4a37de76375bafd74)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 0.2.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native",
|
||||
"version": "0.2.49",
|
||||
"version": "0.2.56",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
@@ -28,7 +28,7 @@
|
||||
"@magic-sdk/provider": "17.2.0",
|
||||
"@magic-sdk/react-native-bare": "^18.5.0",
|
||||
"@shopify/restyle": "^2.4.2",
|
||||
"@tanstack/react-query": "^4.32.0",
|
||||
"@tanstack/react-query": "^4.33.0",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/react-core": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
|
||||
@@ -128,7 +128,7 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
|
||||
) {
|
||||
return reject(
|
||||
new Error(
|
||||
`This looks like a network error, the endpoint might be blocked by an internet provider or a firewall. ${xhr.responseText}`,
|
||||
`Upload failed due to a network error. ${xhr.responseText}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,11 +3,18 @@ import {
|
||||
ConnectWalletDetailsProps,
|
||||
WalletDetailsButton,
|
||||
} from "./ConnectWalletDetails/WalletDetailsButton";
|
||||
import { useAddress } from "@thirdweb-dev/react-core";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { Animated } from "react-native";
|
||||
import {
|
||||
useAddress,
|
||||
useNetworkMismatch,
|
||||
useSwitchChain,
|
||||
useWalletContext,
|
||||
} from "@thirdweb-dev/react-core";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { ActivityIndicator, Animated, StyleSheet } from "react-native";
|
||||
import { ConnectWalletButton } from "./ConnectWalletFlow/ConnectWalletButton";
|
||||
import { ConnectWalletButtonProps } from "./ConnectWalletFlow/ConnectWalletButton";
|
||||
import BaseButton from "./base/BaseButton";
|
||||
import Text from "./base/Text";
|
||||
|
||||
export type ConnectWalletProps = {
|
||||
/**
|
||||
@@ -26,6 +33,17 @@ export type ConnectWalletProps = {
|
||||
* @default false
|
||||
*/
|
||||
hideTestnetFaucet?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to show "Switch Network" button if the wallet is connected,
|
||||
* but it is not connected to the `activeChain` provided in `ThirdwebProvider`
|
||||
*
|
||||
* Please, note that if you support multiple networks in your app this prop should
|
||||
* be set to `false` to allow users to switch between networks.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
switchToActiveChain?: boolean;
|
||||
} & ConnectWalletButtonProps;
|
||||
|
||||
export const ConnectWallet = ({
|
||||
@@ -35,9 +53,15 @@ export const ConnectWallet = ({
|
||||
modalTitle,
|
||||
extraRows,
|
||||
hideTestnetFaucet,
|
||||
switchToActiveChain,
|
||||
}: ConnectWalletProps) => {
|
||||
const fadeAnim = useRef(new Animated.Value(0)).current;
|
||||
const address = useAddress();
|
||||
const isNetworkMismatch = useNetworkMismatch();
|
||||
const { activeChainSetExplicitly } = useWalletContext();
|
||||
const { activeChain } = useWalletContext();
|
||||
const switchChain = useSwitchChain();
|
||||
const [switching, setSwitching] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
Animated.timing(fadeAnim, {
|
||||
@@ -51,12 +75,38 @@ export const ConnectWallet = ({
|
||||
<ThemeProvider theme={theme}>
|
||||
<Animated.View style={{ opacity: fadeAnim }}>
|
||||
{address ? (
|
||||
<WalletDetailsButton
|
||||
address={address}
|
||||
detailsButton={detailsButton}
|
||||
extraRows={extraRows}
|
||||
hideTestnetFaucet={hideTestnetFaucet}
|
||||
/>
|
||||
switchToActiveChain &&
|
||||
isNetworkMismatch &&
|
||||
activeChainSetExplicitly ? (
|
||||
<BaseButton
|
||||
backgroundColor="buttonBackgroundColor"
|
||||
onPress={async () => {
|
||||
setSwitching(true);
|
||||
try {
|
||||
await switchChain(activeChain.chainId);
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
setSwitching(false);
|
||||
}}
|
||||
style={styles.connectWalletButton}
|
||||
>
|
||||
{switching ? (
|
||||
<ActivityIndicator size="small" color="buttonTextColor" />
|
||||
) : (
|
||||
<Text variant="bodyLarge" color="buttonTextColor">
|
||||
Switch Network
|
||||
</Text>
|
||||
)}
|
||||
</BaseButton>
|
||||
) : (
|
||||
<WalletDetailsButton
|
||||
address={address}
|
||||
detailsButton={detailsButton}
|
||||
extraRows={extraRows}
|
||||
hideTestnetFaucet={hideTestnetFaucet}
|
||||
/>
|
||||
)
|
||||
) : (
|
||||
<ConnectWalletButton
|
||||
modalTitle={modalTitle}
|
||||
@@ -68,3 +118,17 @@ export const ConnectWallet = ({
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
connectWalletButton: {
|
||||
display: "flex",
|
||||
flexDirection: "row",
|
||||
alignContent: "center",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
borderRadius: 8,
|
||||
paddingHorizontal: 10,
|
||||
paddingVertical: 10,
|
||||
minWidth: 150,
|
||||
},
|
||||
});
|
||||
|
||||
+3
-8
@@ -3,12 +3,13 @@ import BaseButton from "../base/BaseButton";
|
||||
import { ChainIcon } from "../base/ChainIcon";
|
||||
import Text from "../base/Text";
|
||||
import { WalletIcon } from "../base/WalletIcon";
|
||||
import { useWallet, useBalance, useChain } from "@thirdweb-dev/react-core";
|
||||
import { useWallet, useChain } from "@thirdweb-dev/react-core";
|
||||
import { StyleSheet, View } from "react-native";
|
||||
import { LocalWallet } from "@thirdweb-dev/wallets";
|
||||
import Box from "../base/Box";
|
||||
import { ConnectWalletDetailsModal } from "./ConnectWalletDetailsModal";
|
||||
import { useState } from "react";
|
||||
import { TextBalance } from "../base/TextBalance";
|
||||
|
||||
export type ConnectWalletDetailsProps = {
|
||||
address?: string;
|
||||
@@ -25,7 +26,6 @@ export const WalletDetailsButton = ({
|
||||
}: ConnectWalletDetailsProps) => {
|
||||
const activeWallet = useWallet();
|
||||
const chain = useChain();
|
||||
const balanceQuery = useBalance();
|
||||
const [isModalVisible, setIsModalVisible] = useState(false);
|
||||
|
||||
const onPress = () => {
|
||||
@@ -64,12 +64,7 @@ export const WalletDetailsButton = ({
|
||||
<ChainIcon size={32} chainIconUrl={chain?.icon?.url} />
|
||||
</View>
|
||||
<Box justifyContent="center" alignItems="flex-start">
|
||||
<Text variant="bodySmall">
|
||||
{balanceQuery.data
|
||||
? Number(balanceQuery.data.displayValue).toFixed(3)
|
||||
: ""}{" "}
|
||||
{balanceQuery.data?.symbol}
|
||||
</Text>
|
||||
<TextBalance textVariant="bodySmall" />
|
||||
{activeWallet?.walletId === LocalWallet.id ? (
|
||||
<Text variant="error">Guest</Text>
|
||||
) : (
|
||||
|
||||
+6
-10
@@ -2,14 +2,14 @@ import { Icon } from "../../assets/icon";
|
||||
import { useAppTheme } from "../../styles/hooks";
|
||||
import { AddressDisplay } from "../base/AddressDisplay";
|
||||
import BaseButton from "../base/BaseButton";
|
||||
import Text from "../base/Text";
|
||||
import { WalletIcon } from "../base/WalletIcon";
|
||||
import { useWallet, useBalance } from "@thirdweb-dev/react-core";
|
||||
import { useWallet } from "@thirdweb-dev/react-core";
|
||||
import { ActivityIndicator, StyleSheet, View } from "react-native";
|
||||
import * as Clipboard from "expo-clipboard";
|
||||
import Box from "../base/Box";
|
||||
import CopyIcon from "../../assets/copy";
|
||||
import { useState } from "react";
|
||||
import { TextBalance } from "../base/TextBalance";
|
||||
|
||||
interface WalletDetailsModalHeaderProps {
|
||||
address?: string;
|
||||
@@ -24,7 +24,6 @@ export const WalletDetailsModalHeader = ({
|
||||
onAddressCopied,
|
||||
}: WalletDetailsModalHeaderProps) => {
|
||||
const theme = useAppTheme();
|
||||
const balanceQuery = useBalance();
|
||||
const activeWallet = useWallet();
|
||||
const [showLoading, setShowLoading] = useState(false);
|
||||
|
||||
@@ -38,7 +37,9 @@ export const WalletDetailsModalHeader = ({
|
||||
|
||||
const onDisconnectPressInternal = () => {
|
||||
setShowLoading(true);
|
||||
onDisconnectPress();
|
||||
setTimeout(() => {
|
||||
onDisconnectPress();
|
||||
}, 0);
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -65,12 +66,7 @@ export const WalletDetailsModalHeader = ({
|
||||
color={theme.colors.textSecondary}
|
||||
/>
|
||||
</Box>
|
||||
<Text variant="bodySmallSecondary">
|
||||
{balanceQuery.data
|
||||
? Number(balanceQuery.data.displayValue).toFixed(3)
|
||||
: ""}{" "}
|
||||
{balanceQuery.data?.symbol}
|
||||
</Text>
|
||||
<TextBalance textVariant="bodySmallSecondary" />
|
||||
</BaseButton>
|
||||
{showLoading ? (
|
||||
<ActivityIndicator size="small" color={theme.colors.iconHighlight} />
|
||||
|
||||
@@ -89,6 +89,10 @@ export const ConnectWalletFlow = () => {
|
||||
setIsConnecting(false);
|
||||
};
|
||||
|
||||
const handleClose = useCallback(() => {
|
||||
onClose(true);
|
||||
}, [onClose]);
|
||||
|
||||
const getComponentForWallet = useCallback(() => {
|
||||
switch (activeWallet?.id) {
|
||||
case SmartWallet.id:
|
||||
@@ -100,7 +104,7 @@ export const ConnectWalletFlow = () => {
|
||||
<activeWallet.connectUI
|
||||
theme={theme || "dark"}
|
||||
goBack={onBackPress}
|
||||
close={() => onClose(true)}
|
||||
close={handleClose}
|
||||
isOpen={modalVisible}
|
||||
open={onOpenModal}
|
||||
walletConfig={activeWallet}
|
||||
@@ -112,6 +116,7 @@ export const ConnectWalletFlow = () => {
|
||||
}
|
||||
}, [
|
||||
activeWallet,
|
||||
handleClose,
|
||||
modalVisible,
|
||||
onBackPress,
|
||||
onClose,
|
||||
|
||||
@@ -64,6 +64,7 @@ const styles = StyleSheet.create({
|
||||
borderTopLeftRadius: 24,
|
||||
borderTopRightRadius: 24,
|
||||
padding: 24,
|
||||
paddingBottom: 40,
|
||||
},
|
||||
contentContainer: {
|
||||
maxHeight: MODAL_HEIGHT,
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useState } from "react";
|
||||
import { Image } from "react-native";
|
||||
import { SvgUri } from "react-native-svg";
|
||||
import { isAppBundleIdPresentInGlobal } from "../../utils/global";
|
||||
import Box from "./Box";
|
||||
|
||||
const ImageSvgUri = ({
|
||||
imageUrl = "",
|
||||
@@ -29,29 +30,29 @@ const ImageSvgUri = ({
|
||||
return null;
|
||||
}
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<SvgUri
|
||||
width={width}
|
||||
height={height}
|
||||
uri={resolvedImageUrl}
|
||||
onError={(err) => {
|
||||
console.warn("Error loading an svg image: ", err);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
// always try to render Image first, if error then try to render svg
|
||||
// Image from RN handles onError better than SvgUri
|
||||
return (
|
||||
<Image
|
||||
alt={imageAlt}
|
||||
source={{ uri: resolvedImageUrl }}
|
||||
style={[{ width: width, height: height }]}
|
||||
onError={() => setError(true)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Box style={{ width: width, height: height }}>
|
||||
{error ? (
|
||||
<SvgUri
|
||||
width={width}
|
||||
height={height}
|
||||
uri={resolvedImageUrl}
|
||||
onError={(err) => {
|
||||
console.warn("Error loading an svg image: ", err);
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
// always try to render Image first, if error then try to render svg
|
||||
// Image from RN handles onError better than SvgUri
|
||||
<Image
|
||||
alt={imageAlt}
|
||||
source={{ uri: resolvedImageUrl }}
|
||||
style={[{ width: width, height: height }]}
|
||||
onError={() => setError(true)}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default ImageSvgUri;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import React, { useCallback, useEffect, useRef } from "react";
|
||||
import { View, Animated, Easing, StyleSheet } from "react-native";
|
||||
import { baseTheme } from "../../styles/theme";
|
||||
import { useAppTheme } from "../../styles/hooks";
|
||||
|
||||
type LoadingTextAnimationProps = {
|
||||
text: string;
|
||||
textVariant: keyof typeof baseTheme.textVariants;
|
||||
};
|
||||
|
||||
const LoadingTextAnimation = ({
|
||||
text,
|
||||
textVariant,
|
||||
}: LoadingTextAnimationProps) => {
|
||||
const fadeAnim = useRef(new Animated.Value(0)).current;
|
||||
const theme = useAppTheme();
|
||||
|
||||
const fadeInOut = useCallback(() => {
|
||||
Animated.loop(
|
||||
Animated.sequence([
|
||||
Animated.timing(fadeAnim, {
|
||||
toValue: 1,
|
||||
duration: 600,
|
||||
easing: Easing.linear,
|
||||
useNativeDriver: true,
|
||||
}),
|
||||
Animated.timing(fadeAnim, {
|
||||
toValue: 0,
|
||||
duration: 600,
|
||||
easing: Easing.linear,
|
||||
useNativeDriver: true,
|
||||
}),
|
||||
]),
|
||||
{ iterations: -1 },
|
||||
).start();
|
||||
}, [fadeAnim]);
|
||||
|
||||
useEffect(() => {
|
||||
fadeInOut();
|
||||
}, [fadeInOut]);
|
||||
|
||||
return (
|
||||
<View style={styles.animatedView}>
|
||||
<Animated.Text
|
||||
style={{
|
||||
color: theme.colors.textSecondary,
|
||||
fontWeight: theme.textVariants[textVariant].fontWeight as any,
|
||||
fontSize: theme.textVariants[textVariant].fontSize,
|
||||
lineHeight: theme.textVariants[textVariant].lineHeight,
|
||||
opacity: fadeAnim,
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
</Animated.Text>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default LoadingTextAnimation;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
animatedView: {
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
flex: 1,
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import { useBalance } from "@thirdweb-dev/react-core";
|
||||
import Text from "./Text";
|
||||
import LoadingTextAnimation from "./LoadingTextAnimation";
|
||||
import { baseTheme } from "../../styles/theme";
|
||||
|
||||
type TextBalance = {
|
||||
textVariant: keyof typeof baseTheme.textVariants;
|
||||
};
|
||||
|
||||
export const TextBalance = ({ textVariant }: TextBalance) => {
|
||||
const balanceQuery = useBalance();
|
||||
|
||||
return !balanceQuery.data ? (
|
||||
<LoadingTextAnimation text="Fetching..." textVariant={textVariant} />
|
||||
) : (
|
||||
<Text variant={textVariant}>
|
||||
{Number(balanceQuery.data?.displayValue).toFixed(3)}{" "}
|
||||
{balanceQuery.data.symbol}
|
||||
</Text>
|
||||
);
|
||||
};
|
||||
@@ -1,2 +1,7 @@
|
||||
export const TW_WC_PROJECT_ID = "145769e410f16970a79ff77b2d89a1e0";
|
||||
export const WC_RELAY_URL = "wss://relay.walletconnect.com";
|
||||
|
||||
export const WC_LINKS = {
|
||||
native: "wc://",
|
||||
universal: "wc://",
|
||||
};
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import { useCallback, useEffect, useRef } from "react";
|
||||
|
||||
interface Props {
|
||||
callback: (args: any) => void;
|
||||
delay?: number;
|
||||
}
|
||||
|
||||
export function useDebounceCallback({ callback, delay = 250 }: Props) {
|
||||
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
||||
const callbackRef = useRef(callback);
|
||||
|
||||
useEffect(() => {
|
||||
callbackRef.current = callback;
|
||||
}, [callback]);
|
||||
|
||||
const debouncedCallback = useCallback(
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore args can be any in this case
|
||||
(args) => {
|
||||
if (timeoutRef.current) {
|
||||
clearTimeout(timeoutRef.current);
|
||||
}
|
||||
|
||||
timeoutRef.current = setTimeout(() => {
|
||||
callbackRef.current(args);
|
||||
}, delay);
|
||||
},
|
||||
[delay],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (timeoutRef.current) {
|
||||
clearTimeout(timeoutRef.current);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
return debouncedCallback;
|
||||
}
|
||||
@@ -19,7 +19,9 @@ export { magicWallet } from "./wallets/wallets/magic-link";
|
||||
export { MagicWallet } from "./wallets/wallets/MagicLink";
|
||||
export { MagicLink } from "./wallets/wallets/MagicLink";
|
||||
export { magicLink } from "./wallets/wallets/magic-link";
|
||||
export * from "./wallets/wallets/WalletConnectV2";
|
||||
export * from "./wallets/wallets/wallet-connect/WalletConnectBase";
|
||||
export { WalletConnect } from "./wallets/wallets/wallet-connect/WalletConnect";
|
||||
export { walletConnect } from "./wallets/wallets/wallet-connect/wallet-connect";
|
||||
export type { WCMeta } from "./wallets/types/wc";
|
||||
|
||||
export { useCoinbaseWallet } from "./wallets/hooks/useCoinbaseWallet";
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
export type WCWallet = {
|
||||
iconURL: string;
|
||||
name: string;
|
||||
links: {
|
||||
native: string;
|
||||
universal: string;
|
||||
};
|
||||
};
|
||||
@@ -2,7 +2,7 @@ export type WCMeta = {
|
||||
name: string;
|
||||
iconURL: string;
|
||||
links: {
|
||||
native?: string;
|
||||
universal?: string;
|
||||
native: string;
|
||||
universal: string;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { walletIds } from "@thirdweb-dev/wallets";
|
||||
import { WalletOptions, WalletConfig } from "@thirdweb-dev/react-core";
|
||||
import { WalletConnectV2 } from "./WalletConnectV2";
|
||||
import { WCMeta } from "../types/wc";
|
||||
import { WalletConnectBase } from "./wallet-connect/WalletConnectBase";
|
||||
|
||||
export class MetaMaskWallet extends WalletConnectV2 {
|
||||
export class MetaMaskWallet extends WalletConnectBase {
|
||||
static id = walletIds.metamask;
|
||||
static meta = {
|
||||
name: "MetaMask",
|
||||
|
||||
@@ -2,9 +2,9 @@ import {
|
||||
WalletOptions as WalletOptionsRC,
|
||||
WalletConfig,
|
||||
} from "@thirdweb-dev/react-core";
|
||||
import { WalletConnectV2 } from "./WalletConnectV2";
|
||||
import { WalletConnectBase } from "./wallet-connect/WalletConnectBase";
|
||||
|
||||
export class RainbowWallet extends WalletConnectV2 {
|
||||
export class RainbowWallet extends WalletConnectBase {
|
||||
static id = "rainbow" as const;
|
||||
static meta = {
|
||||
name: "Rainbow",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { WalletOptions, WalletConfig } from "@thirdweb-dev/react-core";
|
||||
import { WalletConnectV2 } from "./WalletConnectV2";
|
||||
import { WCMeta } from "../types/wc";
|
||||
import { WalletConnectBase } from "./wallet-connect/WalletConnectBase";
|
||||
|
||||
export class TrustWallet extends WalletConnectV2 {
|
||||
export class TrustWallet extends WalletConnectBase {
|
||||
static id = "trust" as const;
|
||||
static meta = {
|
||||
name: "Trust Wallet",
|
||||
@@ -31,5 +31,5 @@ export const trustWallet = (config?: TrustWalletConfig) => {
|
||||
walletId: "trust",
|
||||
projectId: config?.projectId,
|
||||
}),
|
||||
} satisfies WalletConfig<WalletConnectV2>;
|
||||
} satisfies WalletConfig<WalletConnectBase>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
import { MMKV } from "react-native-mmkv";
|
||||
import { WC2Options, WalletConnectBase } from "./WalletConnectBase";
|
||||
|
||||
const PREFIX = "__TW__WALLET__CONNECT__";
|
||||
|
||||
export class WalletConnect extends WalletConnectBase {
|
||||
static id = "WalletConnect" as const;
|
||||
static meta = {
|
||||
name: "WalletConnect",
|
||||
iconURL:
|
||||
"ipfs://QmX58KPRaTC9JYZ7KriuBzeoEaV2P9eZcA3qbFnTHZazKw/wallet-connect.svg",
|
||||
links: {
|
||||
native: "wc:",
|
||||
universal: "wc:",
|
||||
},
|
||||
};
|
||||
|
||||
storage: MMKV;
|
||||
links: { native: string; universal: string };
|
||||
|
||||
constructor(options: WC2Options) {
|
||||
super(options);
|
||||
|
||||
this.storage = new MMKV();
|
||||
|
||||
const storedLinksStr = this.storage.getString(PREFIX + "links");
|
||||
|
||||
this.links = storedLinksStr
|
||||
? JSON.parse(storedLinksStr)
|
||||
: {
|
||||
native: "wc:",
|
||||
universal: "wc:",
|
||||
};
|
||||
|
||||
this.on("disconnect", () => {
|
||||
this.storage.delete(PREFIX + "links");
|
||||
});
|
||||
}
|
||||
|
||||
getMeta() {
|
||||
return { ...WalletConnect.meta, links: this.links };
|
||||
}
|
||||
|
||||
setWCLinks(links: { native: string; universal: string }) {
|
||||
this.storage.set(PREFIX + "links", JSON.stringify(links));
|
||||
this.links = links;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user