Compare commits

..
Author SHA1 Message Date
bc694a1823 Version Packages (#2338)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-02-29 11:30:35 -08:00
Manan Tank 553f7fda47 [react] Remove unnecessary ConnectModal opening (#2375) 2024-02-29 19:13:01 +00:00
Manan Tank bc198e215e Use private for private members in classes instead of # (#2374) 2024-02-29 17:49:32 +00:00
73e34c083c [wallet, react] Add Magic Eden wallet (#2347)
Co-authored-by: Manan Tank <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-02-29 10:24:00 +00:00
github-actions[bot]andGitHub Action cc22fa84e5 chore(chains): update chains (#2371)
Co-authored-by: GitHub Action <[email protected]>
2024-02-29 02:08:13 -08:00
github-actions[bot]andGitHub Action 58b9dbc17d chore(chains): update chains (#2368)
Co-authored-by: GitHub Action <[email protected]>
2024-02-28 21:18:28 -08:00
Joaquim Verges 8d2811dd13 [SDK] handle updating metadata for ERC1155Token contracts (#2369) 2024-02-29 03:38:45 +00:00
Yash 7d74d30b9f [SDK] Resolve EIP7511 minimal proxy (#2362) 2024-02-28 23:25:12 +00:00
github-actions[bot]andGitHub Action f3a0154b5a chore(chains): update chains (#2367)
Co-authored-by: GitHub Action <[email protected]>
2024-02-28 15:08:03 -08:00
Jonas Daniels 10b71dd7a0 revert: 4d89dc1efa (#2364)
Signed-off-by: Jonas Daniels <[email protected]>
2024-02-28 20:21:54 +00:00
Firekeeper 1ac06b9286 Unity 4.7.1 (#2363) 2024-02-28 19:51:11 +00:00
Manan TankandJonas Daniels cff6ef2c97 [react] remove const enums (#2354)
Co-authored-by: Jonas Daniels <[email protected]>
2024-02-28 19:15:39 +00:00
github-actions[bot]andGitHub Action 574f180dde chore(chains): update chains (#2358)
Co-authored-by: GitHub Action <[email protected]>
2024-02-28 11:04:22 -08:00
Yash bac0c9b4a1 [SDK] Fix joinABI filtering (#2359) 2024-02-28 18:57:12 +00:00
github-actions[bot]andGitHub Action a11f27be4e chore(chains): update chains (#2345)
Co-authored-by: GitHub Action <[email protected]>
2024-02-27 09:55:25 -08:00
Firekeeper e7528af48f [Smart Wallet] Always force deploy on sign/auth, support 1271 (#2341) 2024-02-26 23:03:51 +00:00
Kien Ngo a50d3b04f6 [React] Update code snippet for XDEFI wallet (#2348) 2024-02-26 05:33:13 +00:00
github-actions[bot]andGitHub Action fb5c185319 chore(chains): update chains (#2339)
Co-authored-by: GitHub Action <[email protected]>
2024-02-23 10:36:27 -08:00
Joaquim Verges a00917cca4 [SDK] updateMetadata for edition drop contracts (#2343) 2024-02-22 18:18:22 +00:00
Jonas Daniels 7bbf3e235e refactor(utils): update RPC URLs and remove unnecessary code (#2337) 2024-02-21 13:11:13 +00:00
github-actions[bot]andGitHub Action abc0a53dc3 chore(chains): update chains (#2336)
Co-authored-by: GitHub Action <[email protected]>
2024-02-21 05:01:20 -08:00
152 changed files with 2638 additions and 1464 deletions
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/auth # @thirdweb-dev/auth
## 4.1.34
### Patch Changes
- Updated dependencies [[`73e34c0`](https://github.com/thirdweb-dev/js/commit/73e34c083cd9c0d634e39657a4fad0f49f6fec89), [`e7528af`](https://github.com/thirdweb-dev/js/commit/e7528af48ff2dda622ed47074611499cfd66f819), [`10b71dd`](https://github.com/thirdweb-dev/js/commit/10b71dd7a0c6e91bb1ebe8250ca7fac7bac76635), [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92)]:
- @thirdweb-dev/wallets@2.4.12
## 4.1.33 ## 4.1.33
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/auth", "name": "@thirdweb-dev/auth",
"version": "4.1.33", "version": "4.1.34",
"main": "dist/thirdweb-dev-auth.cjs.js", "main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js", "module": "dist/thirdweb-dev-auth.esm.js",
"browser": { "browser": {
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/chains # @thirdweb-dev/chains
## 0.1.74
### Patch Changes
- [#2336](https://github.com/thirdweb-dev/js/pull/2336) [`abc0a53`](https://github.com/thirdweb-dev/js/commit/abc0a53dc398264f205d194e3f87a79f74e91eb1) Thanks [@github-actions](https://github.com/apps/github-actions)! - Synced Chains Package
## 0.1.73 ## 0.1.73
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -30,5 +30,5 @@ export default {
"shortName": "Baobab", "shortName": "Baobab",
"slip44": 1, "slip44": 1,
"slug": "klaytn-testnet-baobab", "slug": "klaytn-testnet-baobab",
"testnet": true "testnet": false
} as const satisfies Chain; } as const satisfies Chain;
+21 -6
View File
@@ -7,18 +7,31 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://coston2-explorer.flare.network", "url": "https://coston2-explorer.flare.network",
"standard": "EIP3091" "standard": "EIP3091"
},
{
"name": "flarescan",
"url": "https://coston2.testnet.flarescan.com",
"standard": "EIP3091"
} }
], ],
"faucets": [ "faucets": [
"https://coston2-faucet.towolabs.com" "https://faucet.flare.network"
],
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
], ],
"icon": { "icon": {
"url": "ipfs://QmZhAYyazEBZSHWNQb9uCkNPq2MNTLoW3mjwiD3955hUjw", "url": "ipfs://QmSmXY36oXCLmTp1u3Z2MSrBstBFVFyQv3aGKLKf1hxB6u",
"width": 382, "width": 500,
"height": 382, "height": 500,
"format": "png" "format": "png"
}, },
"infoURL": "https://flare.xyz", "infoURL": "https://flare.network",
"name": "Flare Testnet Coston2", "name": "Flare Testnet Coston2",
"nativeCurrency": { "nativeCurrency": {
"name": "Coston2 Flare", "name": "Coston2 Flare",
@@ -28,7 +41,9 @@ export default {
"networkId": 114, "networkId": 114,
"rpc": [ "rpc": [
"https://114.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://114.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://coston2-api.flare.network/ext/bc/C/rpc" "https://coston2-api.flare.network/ext/C/rpc",
"https://flaretestnet-bundler.etherspot.io",
"https://coston2.enosys.global/ext/C/rpc"
], ],
"shortName": "c2flr", "shortName": "c2flr",
"slip44": 1, "slip44": 1,
+28
View File
@@ -0,0 +1,28 @@
import type { Chain } from "../src/types";
export default {
"chain": "ETH",
"chainId": 123420111,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmQXw4QEDR4AbUwX9scH7aGhiSDhQRxu6LCQoUkgsYgGyK/Gelato%20brand%20mark.png",
"width": 300,
"height": 300,
"format": "png"
},
"infoURL": "https://raas.gelato.network/rollups/details/public/op-celestia-testnet",
"name": "Gelato OP Celestia",
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"networkId": 123420111,
"redFlags": [],
"rpc": [],
"shortName": "opcelestia",
"slug": "gelato-op-celestia",
"testnet": true,
"title": "Gelato OP Celestia Testnet"
} as const satisfies Chain;
+17 -6
View File
@@ -10,15 +10,23 @@ export default {
}, },
{ {
"name": "flarescan", "name": "flarescan",
"url": "https://flarescan.com", "url": "https://mainnet.flarescan.com",
"standard": "EIP3091" "standard": "EIP3091"
} }
], ],
"faucets": [], "faucets": [],
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"icon": { "icon": {
"url": "ipfs://QmevAevHxRkK2zVct2Eu6Y7s38YC4SmiAiw9X7473pVtmL", "url": "ipfs://QmbT52cCx4h1rcz6nXGfUPFdRyw1VfFMU8kKpY7YCtvUjs",
"width": 382, "width": 500,
"height": 382, "height": 500,
"format": "png" "format": "png"
}, },
"infoURL": "https://flare.network", "infoURL": "https://flare.network",
@@ -32,8 +40,11 @@ export default {
"rpc": [ "rpc": [
"https://14.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://14.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://flare-api.flare.network/ext/C/rpc", "https://flare-api.flare.network/ext/C/rpc",
"https://flare.public-rpc.com", "https://flare-bundler.etherspot.io",
"https://rpc.ftso.au/flare" "https://rpc.ankr.com/flare",
"https://rpc.ftso.au/flare",
"https://flare.enosys.global/ext/C/rpc",
"https://flare.solidifi.app/ext/C/rpc"
], ],
"shortName": "flr", "shortName": "flr",
"slug": "flare", "slug": "flare",
+38
View File
@@ -0,0 +1,38 @@
import type { Chain } from "../src/types";
export default {
"chain": "MTC",
"chainId": 1453,
"explorers": [
{
"name": "MetaExplorer",
"url": "https://istanbul-explorer.metachain.dev",
"standard": "EIP3091"
}
],
"faucets": [
"https://istanbul-faucet.metachain.dev"
],
"icon": {
"url": "ipfs://QmUH2Ph2hW4upvevEAGCaSo7nd8nthqMx5RrHcrnNZ9Y3g",
"width": 512,
"height": 512,
"format": "svg"
},
"infoURL": "https://metatime.com/en",
"name": "MetaChain Istanbul",
"nativeCurrency": {
"name": "Metatime Coin",
"symbol": "MTC",
"decimals": 18
},
"networkId": 1453,
"rpc": [
"https://1453.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://istanbul-rpc.metachain.dev"
],
"shortName": "metatimeistanbul",
"slip44": 1453,
"slug": "metachain-istanbul",
"testnet": true,
"title": "MetaChain Testnet Istanbul"
} as const satisfies Chain;
+24 -10
View File
@@ -1,26 +1,38 @@
import type { Chain } from "../src/types"; import type { Chain } from "../src/types";
export default { export default {
"chain": "FLR", "chain": "SGB",
"chainId": 16, "chainId": 16,
"explorers": [ "explorers": [
{ {
"name": "blockscout", "name": "blockscout",
"url": "https://coston-explorer.flare.network", "url": "https://coston-explorer.flare.network",
"standard": "EIP3091" "standard": "EIP3091"
},
{
"name": "flarescan",
"url": "https://coston.testnet.flarescan.com",
"standard": "EIP3091"
} }
], ],
"faucets": [ "faucets": [
"https://faucet.towolabs.com", "https://faucet.flare.network"
"https://fauceth.komputing.org?chain=16&address=${ADDRESS}" ],
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
], ],
"icon": { "icon": {
"url": "ipfs://QmW7Ljv2eLQ1poRrhJBaVWJBF1TyfZ8QYxDeELRo6sssrj", "url": "ipfs://QmV5PVhxaT3ePRHYsH3aryEHin2c49W18xW3Xg4o171iYE",
"width": 382, "width": 500,
"height": 382, "height": 500,
"format": "png" "format": "png"
}, },
"infoURL": "https://flare.xyz", "infoURL": "https://flare.network",
"name": "Flare Testnet Coston", "name": "Songbird Testnet Coston",
"nativeCurrency": { "nativeCurrency": {
"name": "Coston Flare", "name": "Coston Flare",
"symbol": "CFLR", "symbol": "CFLR",
@@ -29,9 +41,11 @@ export default {
"networkId": 16, "networkId": 16,
"rpc": [ "rpc": [
"https://16.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://16.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://coston-api.flare.network/ext/bc/C/rpc" "https://coston-api.flare.network/ext/C/rpc",
"https://coston.enosys.global/ext/C/rpc"
], ],
"shortName": "cflr", "shortName": "cflr",
"slug": "flare-testnet-coston", "slip44": 1,
"slug": "songbird-testnet-coston",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"chain": "KONET",
"chainId": 17217,
"explorers": [
{
"name": "konet-explorer",
"url": "https://explorer.kon-wallet.com",
"standard": "EIP3091"
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmSszu2AhLPgcp8SZYiBYCQiRVwb9ueqbnGbcTx9H9CJjZ",
"width": 1851,
"height": 1851,
"format": "png"
},
"infoURL": "https://konetmain.com",
"name": "KONET Mainnet",
"nativeCurrency": {
"name": "KONET",
"symbol": "KONET",
"decimals": 18
},
"networkId": 17217,
"rpc": [
"https://17217.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://api.kon-wallet.com"
],
"shortName": "KONET",
"slip44": 1,
"slug": "konet",
"testnet": false
} as const satisfies Chain;
+7 -7
View File
@@ -4,20 +4,20 @@ export default {
"chainId": 1875, "chainId": 1875,
"explorers": [ "explorers": [
{ {
"name": "wb-explorer", "name": "whitechain-explorer",
"url": "https://explorer.whitebit.network", "url": "https://explorer.whitechain.io",
"standard": "EIP3091" "standard": "EIP3091"
} }
], ],
"faucets": [], "faucets": [],
"icon": { "icon": {
"url": "ipfs://Qmbi6cqsQyDjkQSoxbNTTUy8WGyVEFqCtATX2aF4KLmCcZ", "url": "ipfs://QmNeELax6vjkR9WZVmtggk8cam9xHVABZ4WvQyqkGCJ5qf",
"width": 512, "width": 512,
"height": 512, "height": 512,
"format": "png" "format": "png"
}, },
"infoURL": "https://whitebit.network", "infoURL": "https://whitechain.io",
"name": "WhiteBIT Network", "name": "Whitechain",
"nativeCurrency": { "nativeCurrency": {
"name": "WhiteBIT Coin", "name": "WhiteBIT Coin",
"symbol": "WBT", "symbol": "WBT",
@@ -26,9 +26,9 @@ export default {
"networkId": 1875, "networkId": 1875,
"rpc": [ "rpc": [
"https://1875.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://1875.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.whitebit.network" "https://rpc.whitechain.io"
], ],
"shortName": "wbt", "shortName": "wbt",
"slug": "whitebit-network", "slug": "whitechain",
"testnet": false "testnet": false
} as const satisfies Chain; } as const satisfies Chain;
+42
View File
@@ -0,0 +1,42 @@
import type { Chain } from "../src/types";
export default {
"chain": "Titan (TKX)",
"chainId": 18889,
"explorers": [
{
"name": "Titan Explorer",
"url": "https://titan-testnet-explorer-light.tokenize-dev.com",
"standard": "none",
"icon": {
"url": "ipfs://bafkreicyvc7t55zsejv6vwaxbmhvea5vdfkkbgqkmn65rhyyifpg3mq3ua",
"width": 512,
"height": 512,
"format": "png"
}
}
],
"faucets": [],
"icon": {
"url": "ipfs://bafkreicyvc7t55zsejv6vwaxbmhvea5vdfkkbgqkmn65rhyyifpg3mq3ua",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://tokenize.exchange",
"name": "Titan (TKX) Testnet",
"nativeCurrency": {
"name": "Titan tkx",
"symbol": "TKX",
"decimals": 18
},
"networkId": 18889,
"rpc": [
"https://18889.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://titan-testnet-json-rpc-1.tokenize-dev.com",
"https://titan-testnet-json-rpc-2.tokenize-dev.com"
],
"shortName": "titan_tkx-testnet",
"slip44": 1,
"slug": "titan-tkx-testnet",
"testnet": true
} as const satisfies Chain;
+20 -8
View File
@@ -7,16 +7,29 @@ export default {
"name": "blockscout", "name": "blockscout",
"url": "https://songbird-explorer.flare.network", "url": "https://songbird-explorer.flare.network",
"standard": "EIP3091" "standard": "EIP3091"
},
{
"name": "flarescan",
"url": "https://songbird.flarescan.com",
"standard": "EIP3091"
} }
], ],
"faucets": [], "faucets": [],
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"icon": { "icon": {
"url": "ipfs://QmXyvnrZY8FUxSULfnKKA99sAEkjAHtvhRx5WeHixgaEdu", "url": "ipfs://QmdpaH9pEFDXB4tUPxcqAHfB3Sfx3BQufz6EAzBWhHH6Ka",
"width": 382, "width": 500,
"height": 382, "height": 500,
"format": "png" "format": "png"
}, },
"infoURL": "https://flare.xyz", "infoURL": "https://flare.network",
"name": "Songbird Canary-Network", "name": "Songbird Canary-Network",
"nativeCurrency": { "nativeCurrency": {
"name": "Songbird", "name": "Songbird",
@@ -27,10 +40,9 @@ export default {
"rpc": [ "rpc": [
"https://19.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://19.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://songbird-api.flare.network/ext/C/rpc", "https://songbird-api.flare.network/ext/C/rpc",
"https://sgb.ftso.com.au/ext/bc/C/rpc", "https://rpc.ftso.au/songbird",
"https://sgb.lightft.so/rpc", "https://songbird.enosys.global/ext/C/rpc",
"https://sgb-rpc.ftso.eu", "https://songbird.solidifi.app/ext/C/rpc"
"https://rpc.ftso.au/songbird"
], ],
"shortName": "sgb", "shortName": "sgb",
"slug": "songbird-canary-network", "slug": "songbird-canary-network",
+34
View File
@@ -0,0 +1,34 @@
import type { Chain } from "../src/types";
export default {
"chain": "DCSM",
"chainId": 19224,
"explorers": [
{
"name": "Decentraconnect Social",
"url": "https://decentraconnect.io",
"standard": "EIP3091"
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmatvJXLgMthjXwydGBVFRtga9fZXJ3qFEVJ6cMRxniFUc",
"width": 307,
"height": 314,
"format": "png"
},
"infoURL": "https://docs.decentraconnect.io",
"name": "Decentraconnect Social",
"nativeCurrency": {
"name": "Decentraconnect Social",
"symbol": "DCSM",
"decimals": 18
},
"networkId": 19224,
"rpc": [
"https://19224.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.decentraconnect.io"
],
"shortName": "DCSMs",
"slug": "decentraconnect-social",
"testnet": false
} as const satisfies Chain;
+38
View File
@@ -0,0 +1,38 @@
import type { Chain } from "../src/types";
export default {
"chain": "Bitlayer",
"chainId": 200810,
"explorers": [
{
"name": "bitlayer testnet scan",
"url": "https://testnet-scan.bitlayer.org",
"standard": "none"
}
],
"faucets": [
"https://www.bitlayer.org/faucet"
],
"icon": {
"url": "ipfs://QmdWZ1frB47fr3tw31xE68C2Vocaw5Ef53LQ5WDNdNnNyG",
"width": 4500,
"height": 4500,
"format": "jpg"
},
"infoURL": "https://docs.bitlayer.org/",
"name": "Bitlayer Testnet",
"nativeCurrency": {
"name": "BTC",
"symbol": "BTC",
"decimals": 18
},
"networkId": 200810,
"rpc": [
"https://200810.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.bitlayer.org",
"wss://testnet-ws.bitlayer.org"
],
"shortName": "Bitlayer",
"slip44": 1,
"slug": "bitlayer-testnet",
"testnet": true
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 210815,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Stavax Testnet",
"nativeCurrency": {
"name": "Stavax Testnet Token",
"symbol": "STA",
"decimals": 18
},
"networkId": 210815,
"redFlags": [],
"rpc": [
"https://210815.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/stavaxtest/testnet/rpc"
],
"shortName": "Stavax Testnet",
"slug": "stavax-testnet",
"testnet": true
} as const satisfies Chain;
+1 -1
View File
@@ -25,6 +25,6 @@ export default {
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc" "https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
], ],
"shortName": "Will's Testnet", "shortName": "Will's Testnet",
"slug": "will-s-testnet", "slug": "will-s-testnet-will's testnet",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 23444,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "QI M 2402272",
"nativeCurrency": {
"name": "QI M 2402272 Token",
"symbol": "OVU",
"decimals": 18
},
"networkId": 23444,
"redFlags": [],
"rpc": [
"https://23444.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "QI M 2402272",
"slug": "qi-m-2402272",
"testnet": true
} as const satisfies Chain;
+2 -2
View File
@@ -19,8 +19,8 @@ export default {
"infoURL": "https://karak.network", "infoURL": "https://karak.network",
"name": "Karak Mainnet", "name": "Karak Mainnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Karak", "name": "Ether",
"symbol": "KRK", "symbol": "ETH",
"decimals": 18 "decimals": 18
}, },
"networkId": 2410, "networkId": 2410,
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 24347,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Tnet 02-27",
"nativeCurrency": {
"name": "Tnet 02-27 Token",
"symbol": "TJO",
"decimals": 18
},
"networkId": 24347,
"redFlags": [],
"rpc": [
"https://24347.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "Tnet 02-27",
"slug": "tnet-02-27",
"testnet": true
} as const satisfies Chain;
+42
View File
@@ -0,0 +1,42 @@
import type { Chain } from "../src/types";
export default {
"chain": "tALV",
"chainId": 25839,
"explorers": [
{
"name": "AlveyScan Testnet",
"url": "https://alveytestnet.com",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmTuY2Goyxpuy5GmA32EMYZBwxRcGsahiMFgfeBixSk7rb",
"width": 2048,
"height": 1538,
"format": "png"
}
}
],
"faucets": [
"https://faucet.alveytestnet.com"
],
"icon": {
"url": "ipfs://QmTuY2Goyxpuy5GmA32EMYZBwxRcGsahiMFgfeBixSk7rb",
"width": 2048,
"height": 1538,
"format": "png"
},
"infoURL": "https://alveychain.com/",
"name": "AlveyChain Testnet",
"nativeCurrency": {
"name": "AlveyCoin Testnet",
"symbol": "tALV",
"decimals": 18
},
"networkId": 25839,
"rpc": [
"https://25839.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.alvey.io"
],
"shortName": "talv",
"slug": "alveychain-testnet",
"testnet": true
} as const satisfies Chain;
+11 -11
View File
@@ -4,22 +4,22 @@ export default {
"chainId": 2625, "chainId": 2625,
"explorers": [ "explorers": [
{ {
"name": "wb-explorer-testnet", "name": "whitechain-testnet-explorer",
"url": "https://explorer.whitebit.network/testnet", "url": "https://testnet.whitechain.io",
"standard": "EIP3091" "standard": "EIP3091"
} }
], ],
"faucets": [ "faucets": [
"https://explorer.whitebit.network/testnet/faucet" "https://testnet.whitechain.io/faucet"
], ],
"icon": { "icon": {
"url": "ipfs://QmQqAAn2F98TH5ouRyvReKxQdaGKjE7WJQPEPW6mFFVXUT", "url": "ipfs://QmNeELax6vjkR9WZVmtggk8cam9xHVABZ4WvQyqkGCJ5qf",
"width": 32, "width": 512,
"height": 32, "height": 512,
"format": "svg" "format": "png"
}, },
"infoURL": "https://whitebit.com/wbt", "infoURL": "https://whitechain.io",
"name": "WhiteBIT Network Testnet", "name": "Whitechain Testnet",
"nativeCurrency": { "nativeCurrency": {
"name": "WhiteBIT Coin", "name": "WhiteBIT Coin",
"symbol": "WBT", "symbol": "WBT",
@@ -28,10 +28,10 @@ export default {
"networkId": 2625, "networkId": 2625,
"rpc": [ "rpc": [
"https://2625.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://2625.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc-testnet.whitebit.network" "https://rpc-testnet.whitechain.io"
], ],
"shortName": "twbt", "shortName": "twbt",
"slip44": 1, "slip44": 1,
"slug": "whitebit-network-testnet", "slug": "whitechain-testnet",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "ETH",
"chainId": 2662,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmTYgeN1E3GGXnMF2oa43v2ehX2bYqrHPrGQ9xbBMXy1we",
"width": 1280,
"height": 1280,
"format": "png"
},
"infoURL": "https://apexlayer.xyz/",
"name": "APEX",
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"networkId": 2662,
"parent": {
"type": "L2",
"chain": "eip155-1"
},
"rpc": [],
"shortName": "apexmainnet",
"slug": "apex",
"status": "incubating",
"testnet": false
} as const satisfies Chain;
+3
View File
@@ -13,6 +13,9 @@ export default {
"features": [ "features": [
{ {
"name": "EIP155" "name": "EIP155"
},
{
"name": "EIP1559"
} }
], ],
"icon": { "icon": {
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 30226,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Will's Testnet",
"nativeCurrency": {
"name": "Will's Testnet Token",
"symbol": "JPQ",
"decimals": 18
},
"networkId": 30226,
"redFlags": [],
"rpc": [
"https://30226.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "Will's Testnet",
"slug": "will-s-testnet-will's testnet-30226",
"testnet": true
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 3036,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Will's Testnet",
"nativeCurrency": {
"name": "Will's Testnet Token",
"symbol": "QED",
"decimals": 18
},
"networkId": 3036,
"redFlags": [],
"rpc": [
"https://3036.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "Will's Testnet",
"slug": "will-s-testnet",
"testnet": true
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 36530,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Will's Super Subnet",
"nativeCurrency": {
"name": "Will's Super Subnet Token",
"symbol": "VRJ",
"decimals": 18
},
"networkId": 36530,
"redFlags": [],
"rpc": [
"https://36530.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "Will's Super Subnet",
"slug": "will-s-super-subnet",
"testnet": true
} as const satisfies Chain;
@@ -1,9 +1,16 @@
import type { Chain } from "../src/types"; import type { Chain } from "../src/types";
export default { export default {
"chain": "ETH", "chain": "ETH",
"chainId": 12611, "chainId": 3776,
"explorers": [], "explorers": [
{
"name": "blockscout",
"url": "https://astar-zkevm.explorer.startale.com/",
"standard": "EIP3091"
}
],
"faucets": [], "faucets": [],
"features": [],
"icon": { "icon": {
"url": "ipfs://QmRySLe3su59dE5x5JPm2b1GeZfz6DR9qUzcbp3rt4SD3A", "url": "ipfs://QmRySLe3su59dE5x5JPm2b1GeZfz6DR9qUzcbp3rt4SD3A",
"width": 300, "width": 300,
@@ -17,14 +24,19 @@ export default {
"symbol": "ETH", "symbol": "ETH",
"decimals": 18 "decimals": 18
}, },
"networkId": 12611, "networkId": 3776,
"parent": { "parent": {
"type": "L2", "type": "L2",
"chain": "eip155-1", "chain": "eip155-1",
"bridges": [] "bridges": [
{
"url": "https://bridge.gelato.network/bridge/astar-zkevm"
}
]
}, },
"redFlags": [],
"rpc": [], "rpc": [],
"shortName": "astrzk", "shortName": "astarzk",
"slug": "astar-zkevm", "slug": "astar-zkevm",
"status": "incubating", "status": "incubating",
"testnet": false, "testnet": false,
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 38085,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "QI0227I1",
"nativeCurrency": {
"name": "QI0227I1 Token",
"symbol": "ULH",
"decimals": 18
},
"networkId": 38085,
"redFlags": [],
"rpc": [
"https://38085.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "QI0227I1",
"slug": "qi0227i1",
"testnet": true
} as const satisfies Chain;
+4 -4
View File
@@ -5,7 +5,7 @@ export default {
"explorers": [], "explorers": [],
"faucets": [], "faucets": [],
"infoURL": "https://docs.thefirechain.com/", "infoURL": "https://docs.thefirechain.com/",
"name": "Firechain zkEVM Ghostrider", "name": "Firechain zkEVM Testnet",
"nativeCurrency": { "nativeCurrency": {
"name": "Ether", "name": "Ether",
"symbol": "ETH", "symbol": "ETH",
@@ -14,10 +14,10 @@ export default {
"networkId": 3885, "networkId": 3885,
"rpc": [ "rpc": [
"https://3885.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://3885.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.zkevm.ghostrider.thefirechain.com" "https://rpc-zkevm-ghostrider.thefirechain.com"
], ],
"shortName": "firechain-zkEVM-ghostrider", "shortName": "firechain-zkEVM-ghostrider",
"slug": "firechain-zkevm-ghostrider", "slug": "firechain-zkevm-testnet",
"testnet": false, "testnet": true,
"title": "Firechain zkEVM Ghostrider" "title": "Firechain zkEVM Ghostrider"
} as const satisfies Chain; } as const satisfies Chain;
+46
View File
@@ -0,0 +1,46 @@
import type { Chain } from "../src/types";
export default {
"chain": "ETH",
"chainId": 3993,
"explorers": [
{
"name": "blockscout",
"url": "https://exp-testnet.apexlayer.xyz",
"standard": "EIP3091"
}
],
"faucets": [
"https://sepoliafaucet.com/"
],
"icon": {
"url": "ipfs://qmxhs7fvjanzwm14vjpbnmklre32gsiy9chsarrnbtfa1n",
"width": 1280,
"height": 1280,
"format": "png"
},
"infoURL": "https://docs.apexlayer.xyz/",
"name": "APEX Testnet",
"nativeCurrency": {
"name": "Sepolia Ether",
"symbol": "ETH",
"decimals": 18
},
"networkId": 3993,
"parent": {
"type": "L2",
"chain": "eip155-11155111",
"bridges": [
{
"url": "https://apexlayer.xyz/bridge"
}
]
},
"rpc": [
"https://3993.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc-testnet.apexlayer.xyz"
],
"shortName": "apexsep",
"slip44": 1,
"slug": "apex-testnet",
"testnet": true
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 42840,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Will's Testnet",
"nativeCurrency": {
"name": "Will's Testnet Token",
"symbol": "DQX",
"decimals": 18
},
"networkId": 42840,
"redFlags": [],
"rpc": [
"https://42840.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "Will's Testnet",
"slug": "will-s-testnet-will's testnet-42840",
"testnet": true
} as const satisfies Chain;
+1 -1
View File
@@ -6,7 +6,7 @@ export default {
{ {
"name": "subscan", "name": "subscan",
"url": "https://pangolin.subscan.io", "url": "https://pangolin.subscan.io",
"standard": "none" "standard": "EIP3091"
} }
], ],
"faucets": [ "faucets": [
+2 -3
View File
@@ -6,7 +6,7 @@ export default {
{ {
"name": "subscan", "name": "subscan",
"url": "https://crab.subscan.io", "url": "https://crab.subscan.io",
"standard": "none" "standard": "EIP3091"
} }
], ],
"faucets": [], "faucets": [],
@@ -21,8 +21,7 @@ export default {
"rpc": [ "rpc": [
"https://44.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://44.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://crab-rpc.darwinia.network", "https://crab-rpc.darwinia.network",
"https://crab-rpc.darwiniacommunitydao.xyz", "https://crab-rpc.darwiniacommunitydao.xyz"
"https://darwiniacrab-rpc.dwellir.com"
], ],
"shortName": "crab", "shortName": "crab",
"slug": "crab-network", "slug": "crab-network",
+1 -1
View File
@@ -6,7 +6,7 @@ export default {
{ {
"name": "subscan", "name": "subscan",
"url": "https://darwinia.subscan.io", "url": "https://darwinia.subscan.io",
"standard": "none" "standard": "EIP3091"
} }
], ],
"faucets": [], "faucets": [],
+1 -1
View File
@@ -20,7 +20,7 @@ export default {
"networkId": 529, "networkId": 529,
"rpc": [ "rpc": [
"https://529.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://529.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.rpc1.thefirechain.com" "https://rpc-mainnet.thefirechain.com"
], ],
"shortName": "fire", "shortName": "fire",
"slug": "firechain", "slug": "firechain",
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 5810,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Reg Tnet",
"nativeCurrency": {
"name": "Reg Tnet Token",
"symbol": "LUG",
"decimals": 18
},
"networkId": 5810,
"redFlags": [],
"rpc": [
"https://5810.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "Reg Tnet",
"slug": "reg-tnet",
"testnet": true
} as const satisfies Chain;
+49
View File
@@ -0,0 +1,49 @@
import type { Chain } from "../src/types";
export default {
"chain": "ETH",
"chainId": 6038361,
"explorers": [
{
"name": "Blockscout zKyoto chain explorer",
"url": "https://astar-zkyoto.blockscout.com",
"standard": "EIP3091"
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmRySLe3su59dE5x5JPm2b1GeZfz6DR9qUzcbp3rt4SD3A",
"width": 300,
"height": 300,
"format": "png"
},
"infoURL": "https://astar.network",
"name": "Astar zKyoto",
"nativeCurrency": {
"name": "Sepolia Ether",
"symbol": "ETH",
"decimals": 18
},
"networkId": 6038361,
"parent": {
"type": "L2",
"chain": "eip155-11155111",
"bridges": [
{
"url": "https://portal.astar.network"
},
{
"url": "https://bridge.gelato.network/bridge/astar-zkyoto"
}
]
},
"rpc": [
"https://6038361.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.startale.com/zkyoto",
"https://rpc.zkyoto.gelato.digital"
],
"shortName": "azkyt",
"slug": "astar-zkyoto",
"status": "incubating",
"testnet": true,
"title": "Astar zkEVM Testnet zKyoto"
} as const satisfies Chain;
+2 -5
View File
@@ -26,13 +26,10 @@ export default {
"decimals": 18 "decimals": 18
}, },
"networkId": 65010001, "networkId": 65010001,
"rpc": [ "rpc": [],
"https://65010001.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc1.bakerloo.autonity.org/",
"wss://rpc1.bakerloo.autonity.org/ws/"
],
"shortName": "bakerloo-01", "shortName": "bakerloo-01",
"slip44": 1, "slip44": 1,
"slug": "autonity-bakerloo-barada-testnet", "slug": "autonity-bakerloo-barada-testnet",
"status": "deprecated",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+38
View File
@@ -0,0 +1,38 @@
import type { Chain } from "../src/types";
export default {
"chain": "AUT",
"chainId": 65010002,
"explorers": [
{
"name": "autonity-blockscout",
"url": "https://bakerloo.autonity.org",
"standard": "EIP3091"
}
],
"faucets": [
"https://faucet.autonity.org/"
],
"icon": {
"url": "ipfs://Qme5nxFZZoNNpiT8u9WwcBot4HyLTg2jxMxRnsbc5voQwB",
"width": 1000,
"height": 1000,
"format": "png"
},
"infoURL": "https://autonity.org/",
"name": "Autonity Bakerloo (Sumida) Testnet",
"nativeCurrency": {
"name": "Bakerloo Auton",
"symbol": "ATN",
"decimals": 18
},
"networkId": 65010002,
"rpc": [
"https://65010002.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc1.bakerloo.autonity.org/",
"wss://rpc1.bakerloo.autonity.org/ws/"
],
"shortName": "bakerloo-02",
"slip44": 1,
"slug": "autonity-bakerloo-sumida-testnet",
"testnet": true
} as const satisfies Chain;
+1 -1
View File
@@ -25,6 +25,6 @@ export default {
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc" "https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
], ],
"shortName": "Will's Testnet", "shortName": "Will's Testnet",
"slug": "will-s-testnet-will's testnet", "slug": "will-s-testnet-will's testnet-69740",
"testnet": true "testnet": true
} as const satisfies Chain; } as const satisfies Chain;
+2 -2
View File
@@ -23,13 +23,13 @@ export default {
"chain": "eip155-1", "chain": "eip155-1",
"bridges": [ "bridges": [
{ {
"url": "https://zkevm.bridge.rpc.thefirechain.com" "url": "https://zkevm-bridge-rpc.thefirechain.com"
} }
] ]
}, },
"rpc": [ "rpc": [
"https://814.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://814.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.zkevm.thefirechain.com" "https://rpc-zkevm.thefirechain.com"
], ],
"shortName": "firechan-zkEVM", "shortName": "firechan-zkEVM",
"slug": "firechain-zkevm", "slug": "firechain-zkevm",
+43
View File
@@ -0,0 +1,43 @@
import type { Chain } from "../src/types";
export default {
"chain": "ETH",
"chainId": 88153591557,
"explorers": [
{
"name": "blockscout",
"url": "https://gelato-orbit-anytrust-testnet.blockscout.com/",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmQXw4QEDR4AbUwX9scH7aGhiSDhQRxu6LCQoUkgsYgGyK/Gelato%20brand%20mark.png",
"width": 300,
"height": 300,
"format": "png"
}
}
],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmQXw4QEDR4AbUwX9scH7aGhiSDhQRxu6LCQoUkgsYgGyK/Gelato%20brand%20mark.png",
"width": 300,
"height": 300,
"format": "png"
},
"infoURL": "https://raas.gelato.network/rollups/details/public/gelato-orbit-anytrust-testnet",
"name": "Gelato Orbit Anytrust",
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"networkId": 88153591557,
"redFlags": [],
"rpc": [
"https://88153591557.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.gelato-orbit-anytrust-testnet.gelato.digital"
],
"shortName": "orbitanytrust",
"slug": "gelato-orbit-anytrust",
"testnet": true,
"title": "Gelato Orbit Anytrust Testnet"
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 91132,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "New Will's Testnet",
"nativeCurrency": {
"name": "New Will's Testnet Token",
"symbol": "MBM",
"decimals": 18
},
"networkId": 91132,
"redFlags": [],
"rpc": [
"https://91132.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "New Will's Testnet",
"slug": "new-will-s-testnet",
"testnet": true
} as const satisfies Chain;
+1 -1
View File
@@ -22,7 +22,7 @@ export default {
"networkId": 917, "networkId": 917,
"rpc": [ "rpc": [
"https://917.rpc.thirdweb.com/${THIRDWEB_API_KEY}", "https://917.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rinia.rpc1.thefirechain.com" "https://rinia-rpc1.thefirechain.com"
], ],
"shortName": "tfire", "shortName": "tfire",
"slip44": 1, "slip44": 1,
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 92496,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "Testnet",
"nativeCurrency": {
"name": "Testnet Token",
"symbol": "OWO",
"decimals": 18
},
"networkId": 92496,
"redFlags": [],
"rpc": [
"https://92496.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/testnet/testnet/rpc"
],
"shortName": "Testnet",
"slug": "testnet-testnet-92496",
"testnet": true
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 929038,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "QR0215Y1MP",
"nativeCurrency": {
"name": "QR0215Y1MP Token",
"symbol": "QAT",
"decimals": 18
},
"networkId": 929038,
"redFlags": [],
"rpc": [
"https://929038.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/qr0215y1mp/mainnet/rpc"
],
"shortName": "QR0215Y1MP",
"slug": "qr0215y1mp",
"testnet": false
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 93625,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "QI0222I2",
"nativeCurrency": {
"name": "QI0222I2 Token",
"symbol": "INK",
"decimals": 18
},
"networkId": 93625,
"redFlags": [],
"rpc": [
"https://93625.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "QI0222I2",
"slug": "qi0222i2",
"testnet": true
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 99132,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "QI0222I1",
"nativeCurrency": {
"name": "QI0222I1 Token",
"symbol": "ZKUx",
"decimals": 18
},
"networkId": 99132,
"redFlags": [],
"rpc": [
"https://99132.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
],
"shortName": "QI0222I1",
"slug": "qi0222i1",
"testnet": true
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"chain": "Avalanche",
"chainId": 999511,
"explorers": [],
"faucets": [],
"features": [],
"icon": {
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
"width": 256,
"height": 256,
"format": "svg"
},
"infoURL": "https://avacloud.io",
"name": "QR0227T1TS",
"nativeCurrency": {
"name": "QR0227T1TS Token",
"symbol": "YFL",
"decimals": 18
},
"networkId": 999511,
"redFlags": [],
"rpc": [
"https://999511.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/qr0227t1ts/testnet/rpc"
],
"shortName": "QR0227T1TS",
"slug": "qr0227t1ts",
"testnet": true
} as const satisfies Chain;
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/chains", "name": "@thirdweb-dev/chains",
"version": "0.1.73", "version": "0.1.74",
"main": "dist/thirdweb-dev-chains.cjs.js", "main": "dist/thirdweb-dev-chains.cjs.js",
"module": "dist/thirdweb-dev-chains.esm.js", "module": "dist/thirdweb-dev-chains.esm.js",
"exports": { "exports": {
File diff suppressed because one or more lines are too long
+10 -44
View File
@@ -12,7 +12,7 @@ import {
const MAINNET_FALLBACK_HTTP_RPCS = [ const MAINNET_FALLBACK_HTTP_RPCS = [
"https://api.mycryptoapi.com/eth", "https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com", "https://cloudflare-eth.com",
"https://ethereum.publicnode.com", "https://ethereum-rpc.publicnode.com",
"https://mainnet.gateway.tenderly.co", "https://mainnet.gateway.tenderly.co",
"https://rpc.blocknative.com/boost", "https://rpc.blocknative.com/boost",
"https://rpc.flashbots.net/fast", "https://rpc.flashbots.net/fast",
@@ -20,18 +20,14 @@ const MAINNET_FALLBACK_HTTP_RPCS = [
]; ];
const MAINNET_FALLBACK_WS_RPCS = [ const MAINNET_FALLBACK_WS_RPCS = [
"wss://ethereum.publicnode.com", "wss://ethereum-rpc.publicnode.com",
"wss://mainnet.gateway.tenderly.co", "wss://mainnet.gateway.tenderly.co",
]; ];
const CHAIN_RPC_TEST_CASES: [ChainRPCOptions, string[]][] = [ const CHAIN_RPC_TEST_CASES: [ChainRPCOptions, string[]][] = [
[ [
{ thirdwebApiKey: "SAMPLE_KEY" }, { thirdwebApiKey: "SAMPLE_KEY" },
[ ["https://1.rpc.thirdweb.com/SAMPLE_KEY", ...MAINNET_FALLBACK_HTTP_RPCS],
"https://ethereum.rpc.thirdweb.com/SAMPLE_KEY",
"https://1.rpc.thirdweb.com/SAMPLE_KEY",
...MAINNET_FALLBACK_HTTP_RPCS,
],
], ],
[ [
{ alchemyApiKey: "SAMPLE_KEY" }, { alchemyApiKey: "SAMPLE_KEY" },
@@ -63,26 +59,17 @@ describe("chains/utils", () => {
[ [
undefined, undefined,
undefined, undefined,
[ ["https://1.rpc.thirdweb.com/", ...MAINNET_FALLBACK_HTTP_RPCS],
"https://ethereum.rpc.thirdweb.com/",
"https://1.rpc.thirdweb.com/",
...MAINNET_FALLBACK_HTTP_RPCS,
],
], ],
[ [
undefined, undefined,
"http", "http",
[ ["https://1.rpc.thirdweb.com/", ...MAINNET_FALLBACK_HTTP_RPCS],
"https://ethereum.rpc.thirdweb.com/",
"https://1.rpc.thirdweb.com/",
...MAINNET_FALLBACK_HTTP_RPCS,
],
], ],
[ [
"SAMPLE_CLIENT_KEY", "SAMPLE_CLIENT_KEY",
undefined, undefined,
[ [
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
"https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY", "https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
...MAINNET_FALLBACK_HTTP_RPCS, ...MAINNET_FALLBACK_HTTP_RPCS,
], ],
@@ -91,7 +78,6 @@ describe("chains/utils", () => {
"SAMPLE_CLIENT_KEY", "SAMPLE_CLIENT_KEY",
"http", "http",
[ [
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
"https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY", "https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
...MAINNET_FALLBACK_HTTP_RPCS, ...MAINNET_FALLBACK_HTTP_RPCS,
], ],
@@ -117,7 +103,7 @@ describe("chains/utils", () => {
width: 512, width: 512,
format: "png", format: "png",
}, },
rpc: ["https://ethereum.rpc.thirdweb.com/${THIRDWEB_API_KEY}"], rpc: ["https://1.rpc.thirdweb.com/${THIRDWEB_API_KEY}"],
nativeCurrency: { nativeCurrency: {
name: "Ether", name: "Ether",
symbol: "ETH", symbol: "ETH",
@@ -153,11 +139,7 @@ describe("chains/utils", () => {
undefined, undefined,
{ {
...Ethereum, ...Ethereum,
rpc: [ rpc: ["https://1.rpc.thirdweb.com/", ...MAINNET_FALLBACK_HTTP_RPCS],
"https://ethereum.rpc.thirdweb.com/",
"https://1.rpc.thirdweb.com/",
...MAINNET_FALLBACK_HTTP_RPCS,
],
}, },
], ],
[ [
@@ -166,7 +148,6 @@ describe("chains/utils", () => {
{ {
...Ethereum, ...Ethereum,
rpc: [ rpc: [
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
"https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY", "https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY",
...MAINNET_FALLBACK_HTTP_RPCS, ...MAINNET_FALLBACK_HTTP_RPCS,
], ],
@@ -187,26 +168,17 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
[ [
undefined, undefined,
undefined, undefined,
[ ["https://1.rpc.thirdweb.com/", ...MAINNET_FALLBACK_HTTP_RPCS],
"https://ethereum.rpc.thirdweb.com/",
"https://1.rpc.thirdweb.com/",
...MAINNET_FALLBACK_HTTP_RPCS,
],
], ],
[ [
undefined, undefined,
"http", "http",
[ ["https://1.rpc.thirdweb.com/", ...MAINNET_FALLBACK_HTTP_RPCS],
"https://ethereum.rpc.thirdweb.com/",
"https://1.rpc.thirdweb.com/",
...MAINNET_FALLBACK_HTTP_RPCS,
],
], ],
[ [
"SAMPLE_CLIENT_KEY", "SAMPLE_CLIENT_KEY",
undefined, undefined,
[ [
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
"https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc", "https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
...MAINNET_FALLBACK_HTTP_RPCS, ...MAINNET_FALLBACK_HTTP_RPCS,
], ],
@@ -215,7 +187,6 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
"SAMPLE_CLIENT_KEY", "SAMPLE_CLIENT_KEY",
"http", "http",
[ [
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
"https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc", "https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
...MAINNET_FALLBACK_HTTP_RPCS, ...MAINNET_FALLBACK_HTTP_RPCS,
], ],
@@ -230,11 +201,7 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
undefined, undefined,
{ {
...Ethereum, ...Ethereum,
rpc: [ rpc: ["https://1.rpc.thirdweb.com/", ...MAINNET_FALLBACK_HTTP_RPCS],
"https://ethereum.rpc.thirdweb.com/",
"https://1.rpc.thirdweb.com/",
...MAINNET_FALLBACK_HTTP_RPCS,
],
}, },
], ],
[ [
@@ -243,7 +210,6 @@ describe("chains/utils with APP_BUNDLE_ID", () => {
{ {
...Ethereum, ...Ethereum,
rpc: [ rpc: [
"https://ethereum.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
"https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc", "https://1.rpc.thirdweb.com/SAMPLE_CLIENT_KEY/?bundleId=com.thirdweb.rpc",
...MAINNET_FALLBACK_HTTP_RPCS, ...MAINNET_FALLBACK_HTTP_RPCS,
], ],
+13
View File
@@ -1,5 +1,18 @@
# thirdweb # thirdweb
## 0.13.42
### Patch Changes
- [#2374](https://github.com/thirdweb-dev/js/pull/2374) [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92) Thanks [@MananTank](https://github.com/MananTank)! - Use `private foo` instead of `#foo` for making the members private in classes
- Updated dependencies [[`a00917c`](https://github.com/thirdweb-dev/js/commit/a00917cca451e64d7ea8dc8553c1c32540edaafa), [`73e34c0`](https://github.com/thirdweb-dev/js/commit/73e34c083cd9c0d634e39657a4fad0f49f6fec89), [`e7528af`](https://github.com/thirdweb-dev/js/commit/e7528af48ff2dda622ed47074611499cfd66f819), [`bac0c9b`](https://github.com/thirdweb-dev/js/commit/bac0c9b4a1da26bbc7b1550c4b6f5e335b80c82b), [`7d74d30`](https://github.com/thirdweb-dev/js/commit/7d74d30b9fe2d2d2798a3c5efb1d71cd73841e53), [`8d2811d`](https://github.com/thirdweb-dev/js/commit/8d2811dd131d6c8eb8ce79278f0a8ebe1883265d), [`abc0a53`](https://github.com/thirdweb-dev/js/commit/abc0a53dc398264f205d194e3f87a79f74e91eb1), [`10b71dd`](https://github.com/thirdweb-dev/js/commit/10b71dd7a0c6e91bb1ebe8250ca7fac7bac76635), [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92)]:
- @thirdweb-dev/sdk@4.0.37
- @thirdweb-dev/wallets@2.4.12
- @thirdweb-dev/chains@0.1.74
- @thirdweb-dev/auth@4.1.34
- @thirdweb-dev/storage@2.0.10
## 0.13.41 ## 0.13.41
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "thirdweb", "name": "thirdweb",
"main": "dist/cli/index.js", "main": "dist/cli/index.js",
"version": "0.13.41", "version": "0.13.42",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0", "license": "Apache-2.0",
+7 -7
View File
@@ -12,39 +12,39 @@ function shouldLog(minLevel: LogLevel, currentLevel: LogLevel): boolean {
} }
class BasicLogger { class BasicLogger {
#minLevel: LogLevel = "info"; private _minLevel: LogLevel = "info";
constructor(params?: BasicLoggerConstructorParams) { constructor(params?: BasicLoggerConstructorParams) {
if (params?.minLevel) { if (params?.minLevel) {
this.#minLevel = params.minLevel; this._minLevel = params.minLevel;
} }
} }
setSettings(params: BasicLoggerConstructorParams) { setSettings(params: BasicLoggerConstructorParams) {
if (params.minLevel) { if (params.minLevel) {
this.#minLevel = params.minLevel; this._minLevel = params.minLevel;
} }
} }
debug(...args: any[]) { debug(...args: any[]) {
if (shouldLog(this.#minLevel, "debug")) { if (shouldLog(this._minLevel, "debug")) {
console.info(...args); console.info(...args);
} }
} }
info(...args: any[]) { info(...args: any[]) {
if (shouldLog(this.#minLevel, "info")) { if (shouldLog(this._minLevel, "info")) {
console.info(...args); console.info(...args);
} }
} }
warn(...args: any[]) { warn(...args: any[]) {
if (shouldLog(this.#minLevel, "warn")) { if (shouldLog(this._minLevel, "warn")) {
console.warn(...args); console.warn(...args);
} }
} }
error(...args: any[]) { error(...args: any[]) {
if (shouldLog(this.#minLevel, "error")) { if (shouldLog(this._minLevel, "error")) {
console.error(...args); console.error(...args);
} }
} }
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/crypto # @thirdweb-dev/crypto
## 0.2.1
### Patch Changes
- [#2374](https://github.com/thirdweb-dev/js/pull/2374) [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92) Thanks [@MananTank](https://github.com/MananTank)! - Use `private foo` instead of `#foo` for making the members private in classes
## 0.2.0 ## 0.2.0
### Minor Changes ### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/crypto", "name": "@thirdweb-dev/crypto",
"version": "0.2.0", "version": "0.2.1",
"main": "dist/thirdweb-dev-crypto.cjs.js", "main": "dist/thirdweb-dev-crypto.cjs.js",
"module": "dist/thirdweb-dev-crypto.esm.js", "module": "dist/thirdweb-dev-crypto.esm.js",
"exports": { "exports": {
+8 -8
View File
@@ -1,19 +1,19 @@
class TextProcessorCache { class TextProcessorCache {
#encoder: TextEncoder | undefined; private _encoder: TextEncoder | undefined;
#decoder: TextDecoder | undefined; private _decoder: TextDecoder | undefined;
get encoder(): TextEncoder { get encoder(): TextEncoder {
if (!this.#encoder) { if (!this._encoder) {
this.#encoder = new TextEncoder(); this._encoder = new TextEncoder();
} }
return this.#encoder; return this._encoder;
} }
get decoder(): TextDecoder { get decoder(): TextDecoder {
if (!this.#decoder) { if (!this._decoder) {
this.#decoder = new TextDecoder(); this._decoder = new TextDecoder();
} }
return this.#decoder; return this._decoder;
} }
} }
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/merkletree # @thirdweb-dev/merkletree
## 0.2.1
### Patch Changes
- Updated dependencies [[`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92)]:
- @thirdweb-dev/crypto@0.2.1
## 0.2.0 ## 0.2.0
### Minor Changes ### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/merkletree", "name": "@thirdweb-dev/merkletree",
"version": "0.2.0", "version": "0.2.1",
"main": "dist/thirdweb-dev-merkletree.cjs.js", "main": "dist/thirdweb-dev-merkletree.cjs.js",
"module": "dist/thirdweb-dev-merkletree.esm.js", "module": "dist/thirdweb-dev-merkletree.esm.js",
"exports": { "exports": {
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/pay # @thirdweb-dev/pay
## 0.1.5
### Patch Changes
- [#2374](https://github.com/thirdweb-dev/js/pull/2374) [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92) Thanks [@MananTank](https://github.com/MananTank)! - Use `private foo` instead of `#foo` for making the members private in classes
## 0.1.4 ## 0.1.4
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/pay", "name": "@thirdweb-dev/pay",
"version": "0.1.4", "version": "0.1.5",
"main": "dist/thirdweb-dev-pay.cjs.js", "main": "dist/thirdweb-dev-pay.cjs.js",
"module": "dist/thirdweb-dev-pay.esm.js", "module": "dist/thirdweb-dev-pay.esm.js",
"exports": { "exports": {
@@ -16,9 +16,9 @@ export type FundWalletOptions = {
}; };
export class CoinbasePayIntegration { export class CoinbasePayIntegration {
#appId: string; private _appId: string;
constructor(options: CoinbasePayOptions) { constructor(options: CoinbasePayOptions) {
this.#appId = options.appId; this._appId = options.appId;
} }
async fundWallet(opts: FundWalletOptions): Promise<void> { async fundWallet(opts: FundWalletOptions): Promise<void> {
@@ -27,7 +27,7 @@ export class CoinbasePayIntegration {
return new Promise((res, rej) => { return new Promise((res, rej) => {
initOnRamp( initOnRamp(
{ {
appId: this.#appId, appId: this._appId,
widgetParameters: { widgetParameters: {
destinationWallets: [ destinationWallets: [
{ {
+13
View File
@@ -1,5 +1,18 @@
# @thirdweb-dev/react-core # @thirdweb-dev/react-core
## 4.4.10
### Patch Changes
- [#2347](https://github.com/thirdweb-dev/js/pull/2347) [`73e34c0`](https://github.com/thirdweb-dev/js/commit/73e34c083cd9c0d634e39657a4fad0f49f6fec89) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Add Magic Eden wallet
- Updated dependencies [[`a00917c`](https://github.com/thirdweb-dev/js/commit/a00917cca451e64d7ea8dc8553c1c32540edaafa), [`73e34c0`](https://github.com/thirdweb-dev/js/commit/73e34c083cd9c0d634e39657a4fad0f49f6fec89), [`e7528af`](https://github.com/thirdweb-dev/js/commit/e7528af48ff2dda622ed47074611499cfd66f819), [`bac0c9b`](https://github.com/thirdweb-dev/js/commit/bac0c9b4a1da26bbc7b1550c4b6f5e335b80c82b), [`7d74d30`](https://github.com/thirdweb-dev/js/commit/7d74d30b9fe2d2d2798a3c5efb1d71cd73841e53), [`8d2811d`](https://github.com/thirdweb-dev/js/commit/8d2811dd131d6c8eb8ce79278f0a8ebe1883265d), [`abc0a53`](https://github.com/thirdweb-dev/js/commit/abc0a53dc398264f205d194e3f87a79f74e91eb1), [`10b71dd`](https://github.com/thirdweb-dev/js/commit/10b71dd7a0c6e91bb1ebe8250ca7fac7bac76635), [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92)]:
- @thirdweb-dev/sdk@4.0.37
- @thirdweb-dev/wallets@2.4.12
- @thirdweb-dev/chains@0.1.74
- @thirdweb-dev/auth@4.1.34
- @thirdweb-dev/storage@2.0.10
## 4.4.9 ## 4.4.9
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/react-core", "name": "@thirdweb-dev/react-core",
"version": "4.4.9", "version": "4.4.10",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0", "license": "Apache-2.0",
@@ -9,6 +9,7 @@ import type {
EmbeddedWallet, EmbeddedWallet,
FrameWallet, FrameWallet,
LocalWallet, LocalWallet,
MagicEdenWallet,
MagicLink, MagicLink,
MetaMaskWallet, MetaMaskWallet,
OKXWallet, OKXWallet,
@@ -56,6 +57,7 @@ export type WalletIdToWalletTypeMap = {
cryptoDefiWallet: CryptoDefiWallet; cryptoDefiWallet: CryptoDefiWallet;
rabby: RabbyWallet; rabby: RabbyWallet;
xdefi: XDEFIWallet; xdefi: XDEFIWallet;
magicEden: MagicEdenWallet
}; };
/** /**
Binary file not shown.
@@ -1,5 +1,7 @@
# @thirdweb-dev/react-native-compat # @thirdweb-dev/react-native-compat
## 0.7.7
## 0.7.6 ## 0.7.6
## 0.7.5 ## 0.7.5
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@thirdweb-dev/react-native-compat", "name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects", "description": "Shims for Thirdweb in React Native Projects",
"version": "0.7.6", "version": "0.7.7",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
"license": "Apache-2.0", "license": "Apache-2.0",
+11
View File
@@ -1,5 +1,16 @@
# @thirdweb-dev/react-native # @thirdweb-dev/react-native
## 0.7.7
### Patch Changes
- Updated dependencies [[`a00917c`](https://github.com/thirdweb-dev/js/commit/a00917cca451e64d7ea8dc8553c1c32540edaafa), [`73e34c0`](https://github.com/thirdweb-dev/js/commit/73e34c083cd9c0d634e39657a4fad0f49f6fec89), [`e7528af`](https://github.com/thirdweb-dev/js/commit/e7528af48ff2dda622ed47074611499cfd66f819), [`bac0c9b`](https://github.com/thirdweb-dev/js/commit/bac0c9b4a1da26bbc7b1550c4b6f5e335b80c82b), [`7d74d30`](https://github.com/thirdweb-dev/js/commit/7d74d30b9fe2d2d2798a3c5efb1d71cd73841e53), [`8d2811d`](https://github.com/thirdweb-dev/js/commit/8d2811dd131d6c8eb8ce79278f0a8ebe1883265d), [`abc0a53`](https://github.com/thirdweb-dev/js/commit/abc0a53dc398264f205d194e3f87a79f74e91eb1), [`10b71dd`](https://github.com/thirdweb-dev/js/commit/10b71dd7a0c6e91bb1ebe8250ca7fac7bac76635), [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92)]:
- @thirdweb-dev/sdk@4.0.37
- @thirdweb-dev/react-core@4.4.10
- @thirdweb-dev/wallets@2.4.12
- @thirdweb-dev/chains@0.1.74
- @thirdweb-dev/storage@2.0.10
## 0.7.6 ## 0.7.6
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/react-native", "name": "@thirdweb-dev/react-native",
"version": "0.7.6", "version": "0.7.7",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0", "license": "Apache-2.0",
Binary file not shown.
+20
View File
@@ -1,5 +1,25 @@
# @thirdweb-dev/react # @thirdweb-dev/react
## 4.4.10
### Patch Changes
- [#2354](https://github.com/thirdweb-dev/js/pull/2354) [`cff6ef2`](https://github.com/thirdweb-dev/js/commit/cff6ef2c973cd8a8c20db1a0f3b3c0f19c61ecf8) Thanks [@MananTank](https://github.com/MananTank)! - Remove const enums to object to fix issues with Next.js <13.5
- [#2348](https://github.com/thirdweb-dev/js/pull/2348) [`a50d3b0`](https://github.com/thirdweb-dev/js/commit/a50d3b04f6aa7244027c0597c096efcedf4e71f6) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Update code snippet for XDEFI wallet
- [#2347](https://github.com/thirdweb-dev/js/pull/2347) [`73e34c0`](https://github.com/thirdweb-dev/js/commit/73e34c083cd9c0d634e39657a4fad0f49f6fec89) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Add Magic Eden wallet
- [#2375](https://github.com/thirdweb-dev/js/pull/2375) [`553f7fd`](https://github.com/thirdweb-dev/js/commit/553f7fda4739b440fc62c3f34f2dad14a022371c) Thanks [@MananTank](https://github.com/MananTank)! - Remove unnecessary ConnectModal auto opening.
This also fixes the issue where Connect Modal opens on page load when `ThirdwebProvider` is dynamically imported and rendered in the app.
- Updated dependencies [[`a00917c`](https://github.com/thirdweb-dev/js/commit/a00917cca451e64d7ea8dc8553c1c32540edaafa), [`73e34c0`](https://github.com/thirdweb-dev/js/commit/73e34c083cd9c0d634e39657a4fad0f49f6fec89), [`e7528af`](https://github.com/thirdweb-dev/js/commit/e7528af48ff2dda622ed47074611499cfd66f819), [`bac0c9b`](https://github.com/thirdweb-dev/js/commit/bac0c9b4a1da26bbc7b1550c4b6f5e335b80c82b), [`7d74d30`](https://github.com/thirdweb-dev/js/commit/7d74d30b9fe2d2d2798a3c5efb1d71cd73841e53), [`8d2811d`](https://github.com/thirdweb-dev/js/commit/8d2811dd131d6c8eb8ce79278f0a8ebe1883265d), [`abc0a53`](https://github.com/thirdweb-dev/js/commit/abc0a53dc398264f205d194e3f87a79f74e91eb1), [`10b71dd`](https://github.com/thirdweb-dev/js/commit/10b71dd7a0c6e91bb1ebe8250ca7fac7bac76635), [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92)]:
- @thirdweb-dev/sdk@4.0.37
- @thirdweb-dev/react-core@4.4.10
- @thirdweb-dev/wallets@2.4.12
- @thirdweb-dev/chains@0.1.74
## 4.4.9 ## 4.4.9
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/react", "name": "@thirdweb-dev/react",
"version": "4.4.9", "version": "4.4.10",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>", "author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0", "license": "Apache-2.0",
+1
View File
@@ -164,6 +164,7 @@ export function enDefault(): ThirdwebLocale {
}, },
}, },
coinbaseWallet: extensionAndQRScanScreens("Coinbase"), coinbaseWallet: extensionAndQRScanScreens("Coinbase"),
magicEdenWallet: extensionAndQRScanScreens("Magic Eden"),
metamaskWallet: extensionAndQRScanScreens("MetaMask"), metamaskWallet: extensionAndQRScanScreens("MetaMask"),
okxWallet: extensionAndQRScanScreens("OKX"), okxWallet: extensionAndQRScanScreens("OKX"),
phantomWallet: extensionAndQRScanScreens("Phantom"), phantomWallet: extensionAndQRScanScreens("Phantom"),
+1
View File
@@ -167,6 +167,7 @@ export function esDefault(): ThirdwebLocale {
}, },
}, },
coinbaseWallet: extensionAndQRScanScreens("Coinbase"), coinbaseWallet: extensionAndQRScanScreens("Coinbase"),
magicEdenWallet: extensionAndQRScanScreens("Magic Eden"),
metamaskWallet: extensionAndQRScanScreens("MetaMask"), metamaskWallet: extensionAndQRScanScreens("MetaMask"),
okxWallet: extensionAndQRScanScreens("OKX"), okxWallet: extensionAndQRScanScreens("OKX"),
coreWallet: extensionAndQRScanScreens("Core"), coreWallet: extensionAndQRScanScreens("Core"),
+1
View File
@@ -167,6 +167,7 @@ export function jaDefault(): ThirdwebLocale {
}, },
}, },
coinbaseWallet: extensionAndQRScanScreens("Coinbase"), coinbaseWallet: extensionAndQRScanScreens("Coinbase"),
magicEdenWallet: extensionAndQRScanScreens("Magic Eden"),
metamaskWallet: extensionAndQRScanScreens("MetaMask"), metamaskWallet: extensionAndQRScanScreens("MetaMask"),
okxWallet: extensionAndQRScanScreens("OKX"), okxWallet: extensionAndQRScanScreens("OKX"),
coreWallet: extensionAndQRScanScreens("Core"), coreWallet: extensionAndQRScanScreens("Core"),
+1
View File
@@ -169,6 +169,7 @@ export function tlDefault(): ThirdwebLocale {
}, },
}, },
coinbaseWallet: extensionAndQRScanScreens("Coinbase"), coinbaseWallet: extensionAndQRScanScreens("Coinbase"),
magicEdenWallet: extensionAndQRScanScreens("Magic Eden"),
metamaskWallet: extensionAndQRScanScreens("MetaMask"), metamaskWallet: extensionAndQRScanScreens("MetaMask"),
okxWallet: extensionAndQRScanScreens("OKX"), okxWallet: extensionAndQRScanScreens("OKX"),
phantomWallet: extensionAndQRScanScreens("Phantom"), phantomWallet: extensionAndQRScanScreens("Phantom"),
+1
View File
@@ -235,6 +235,7 @@ export type ThirdwebLocale = {
signIn: string; signIn: string;
submitEmail: string; submitEmail: string;
}; };
magicEdenWallet: ExtensionAndQRScreensLocale;
metamaskWallet: ExtensionAndQRScreensLocale; metamaskWallet: ExtensionAndQRScreensLocale;
okxWallet: ExtensionAndQRScreensLocale; okxWallet: ExtensionAndQRScreensLocale;
oneKeyWallet: ExtensionAndQRScreensLocale; oneKeyWallet: ExtensionAndQRScreensLocale;
+5
View File
@@ -26,6 +26,11 @@ export {
export { localWallet } from "./wallet/wallets/localWallet/localWallet"; export { localWallet } from "./wallet/wallets/localWallet/localWallet";
export type { LocalWalletConfigOptions } from "./wallet/wallets/localWallet/types"; export type { LocalWalletConfigOptions } from "./wallet/wallets/localWallet/types";
export {
magicEdenWallet,
type MagicEdenWalletConfigOptions,
} from "./wallet/wallets/magicEden/magicEdenWallet";
export { export {
magicLink, magicLink,
type MagicWalletConfigOptions, type MagicWalletConfigOptions,
@@ -27,11 +27,11 @@ interface VerifyOwnershipWithPaperProps {
clientId?: string; clientId?: string;
} }
const enum VERIFY_OWNERSHIP_WITH_PAPER_EVENT_TYPE { const VERIFY_OWNERSHIP_WITH_PAPER_EVENT_TYPE = {
USER_LOGIN_SUCCESS = "userLoginSuccess", USER_LOGIN_SUCCESS: "userLoginSuccess",
USER_LOGIN_FAILED = "userLoginFailed", USER_LOGIN_FAILED: "userLoginFailed",
USER_CLOSE_LOGIN_PAGE = "userCloseLoginPage", USER_CLOSE_LOGIN_PAGE: "userCloseLoginPage",
} } as const;
export const VerifyOwnershipWithPaper: React.FC< export const VerifyOwnershipWithPaper: React.FC<
VerifyOwnershipWithPaperProps VerifyOwnershipWithPaperProps
@@ -1,11 +1,13 @@
// UNCHANGED // UNCHANGED
export const enum WalletType { const WalletTypeObj = {
Preset = "Preset", Preset: "Preset",
MetaMask = "metaMask", MetaMask: "metaMask",
CoinbaseWallet = "coinbaseWallet", CoinbaseWallet: "coinbaseWallet",
WalletConnect = "walletConnect", WalletConnect: "walletConnect",
Phantom = "Phantom", Phantom: "Phantom",
} } as const;
export type WalletType = (typeof WalletTypeObj)[keyof typeof WalletTypeObj];
export interface ConnectWalletProps { export interface ConnectWalletProps {
onWalletConnected: onWalletConnectedType; onWalletConnected: onWalletConnectedType;
@@ -9,7 +9,6 @@ import {
useDisconnect, useDisconnect,
useThirdwebAuthContext, useThirdwebAuthContext,
useUser, useUser,
useWallet,
useWalletContext, useWalletContext,
useWallets, useWallets,
} from "@thirdweb-dev/react-core"; } from "@thirdweb-dev/react-core";
@@ -241,41 +240,8 @@ export const ConnectModal = () => {
}); });
}, [initialScreen, setIsWalletModalOpen, setScreen]); }, [initialScreen, setIsWalletModalOpen, setScreen]);
const [prevConnectionStatus, setPrevConnectionStatus] =
useState(connectionStatus);
useEffect(() => {
setPrevConnectionStatus(connectionStatus);
}, [connectionStatus]);
const disconnect = useDisconnect(); const disconnect = useDisconnect();
const wallet = useWallet();
const isWrapperConnected = !!wallet?.getPersonalWallet();
const isWrapperScreen =
typeof screen !== "string" && !!screen.personalWallets;
// reopen the screen to complete wrapper wallet's next step after connecting a personal wallet
useEffect(() => {
if (
!isWrapperConnected &&
isWrapperScreen &&
!isWalletModalOpen &&
connectionStatus === "connected" &&
prevConnectionStatus === "connecting"
) {
setIsWalletModalOpen(true);
}
}, [
isWalletModalOpen,
connectionStatus,
setIsWalletModalOpen,
isWrapperScreen,
isWrapperConnected,
prevConnectionStatus,
]);
useEffect(() => { useEffect(() => {
if (!isWalletModalOpen) { if (!isWalletModalOpen) {
onModalUnmount(() => { onModalUnmount(() => {
@@ -0,0 +1,101 @@
import { ConnectUIProps } from "@thirdweb-dev/react-core";
import { ConnectingScreen } from "../../ConnectWallet/screens/ConnectingScreen";
import { useCallback, useEffect, useRef, useState } from "react";
import { GetStartedScreen } from "../../ConnectWallet/screens/GetStartedScreen";
import { MagicEdenWallet } from "@thirdweb-dev/wallets";
import { wait } from "../../../utils/wait";
import { useTWLocale } from "../../../evm/providers/locale-provider";
export const MagicEdenConnectUI = (props: ConnectUIProps<MagicEdenWallet>) => {
const [screen, setScreen] = useState<"connecting" | "get-started">(
"connecting",
);
const locale = useTWLocale().wallets.magicEdenWallet;
const { walletConfig, connected } = props;
const [errorConnecting, setErrorConnecting] = useState(false);
const { connect } = props;
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
const connectToExtension = useCallback(async () => {
try {
connectPrompted.current = true;
setScreen("connecting");
setErrorConnecting(false);
await wait(1000);
await connect();
connected();
} catch (e) {
setErrorConnecting(true);
console.error(e);
}
}, [connected, connect]);
const connectPrompted = useRef(false);
useEffect(() => {
if (connectPrompted.current) {
return;
}
const isInstalled = walletConfig.isInstalled
? walletConfig.isInstalled()
: false;
(async () => {
if (isInstalled) {
connectToExtension();
}
// if magic-eden wallet is not injected
else {
setScreen("get-started");
}
})();
}, [walletConfig, connected, connect, goBack, connectToExtension]);
if (screen === "connecting") {
return (
<ConnectingScreen
locale={{
getStartedLink: locale.getStartedLink,
instruction: locale.connectionScreen.instruction,
tryAgain: locale.connectionScreen.retry,
inProgress: locale.connectionScreen.inProgress,
failed: locale.connectionScreen.failed,
}}
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
onGetStarted={() => {
setScreen("get-started");
}}
onRetry={() => {
connectToExtension();
}}
errorConnecting={errorConnecting}
/>
);
}
if (screen === "get-started") {
return (
<GetStartedScreen
locale={{
scanToDownload: locale.getStartedScreen.instruction,
}}
walletIconURL={walletConfig.meta.iconURL}
walletName={walletConfig.meta.name}
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={() => {
props.goBack();
}}
/>
);
}
return null;
};
File diff suppressed because one or more lines are too long
@@ -14,13 +14,13 @@ export type XdefiWalletConfigOptions = {
}; };
/** /**
* A wallet configurator for [Phantom Wallet](https://phantom.app/) which allows integrating the wallet with React. * A wallet configurator for [XDEFI Wallet](https://www.xdefi.io/) which allows integrating the wallet with React.
* *
* It returns a [`WalletConfig`](https://portal.thirdweb.com/references/react/v4/WalletConfig) object which can be used to connect the wallet to via [`ConnectWallet`](https://portal.thirdweb.com/react/v4/components/ConnectWallet) component or [`useConnect`](https://portal.thirdweb.com/references/react/v4/useConnect) hook as mentioned in [Connecting Wallets](https://portal.thirdweb.com/react/v4/connecting-wallets) guide * It returns a [`WalletConfig`](https://portal.thirdweb.com/references/react/v4/WalletConfig) object which can be used to connect the wallet to via [`ConnectWallet`](https://portal.thirdweb.com/react/v4/components/ConnectWallet) component or [`useConnect`](https://portal.thirdweb.com/references/react/v4/useConnect) hook as mentioned in [Connecting Wallets](https://portal.thirdweb.com/react/v4/connecting-wallets) guide
* *
* @example * @example
* ```ts * ```ts
* phantomWallet({ * xdefiWallet({
* recommended: true, * recommended: true,
* }) * })
* ``` * ```
Binary file not shown.
+20
View File
@@ -1,5 +1,25 @@
# @thirdweb-dev/sdk # @thirdweb-dev/sdk
## 4.0.37
### Patch Changes
- [#2343](https://github.com/thirdweb-dev/js/pull/2343) [`a00917c`](https://github.com/thirdweb-dev/js/commit/a00917cca451e64d7ea8dc8553c1c32540edaafa) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Expose contract.erc1155.updateMetadata()
- [#2359](https://github.com/thirdweb-dev/js/pull/2359) [`bac0c9b`](https://github.com/thirdweb-dev/js/commit/bac0c9b4a1da26bbc7b1550c4b6f5e335b80c82b) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Fix joinABI filtering
- [#2362](https://github.com/thirdweb-dev/js/pull/2362) [`7d74d30`](https://github.com/thirdweb-dev/js/commit/7d74d30b9fe2d2d2798a3c5efb1d71cd73841e53) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Resolve EIP7511 minimal proxy with Push0 opcode
- [#2369](https://github.com/thirdweb-dev/js/pull/2369) [`8d2811d`](https://github.com/thirdweb-dev/js/commit/8d2811dd131d6c8eb8ce79278f0a8ebe1883265d) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Handle updateMetadata for TokenERC1155 contracts
- [#2374](https://github.com/thirdweb-dev/js/pull/2374) [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92) Thanks [@MananTank](https://github.com/MananTank)! - Use `private foo` instead of `#foo` for making the members private in classes
- Updated dependencies [[`abc0a53`](https://github.com/thirdweb-dev/js/commit/abc0a53dc398264f205d194e3f87a79f74e91eb1), [`bc198e2`](https://github.com/thirdweb-dev/js/commit/bc198e215e57094aac525b262fe91add4786df92)]:
- @thirdweb-dev/chains@0.1.74
- @thirdweb-dev/crypto@0.2.1
- @thirdweb-dev/merkletree@0.2.1
- @thirdweb-dev/storage@2.0.10
## 4.0.36 ## 4.0.36
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@thirdweb-dev/sdk", "name": "@thirdweb-dev/sdk",
"version": "4.0.36", "version": "4.0.37",
"description": "The main thirdweb SDK.", "description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk", "repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
"license": "Apache-2.0", "license": "Apache-2.0",
+9 -9
View File
@@ -284,9 +284,9 @@ export type TransactionErrorInfo = {
* @public * @public
*/ */
export class TransactionError extends Error { export class TransactionError extends Error {
#reason: string; private _reason: string;
#info: TransactionErrorInfo; private _info: TransactionErrorInfo;
#raw: any; private _raw: any;
constructor(info: TransactionErrorInfo, raw: any) { constructor(info: TransactionErrorInfo, raw: any) {
let errorMessage = `\n\n\n╔═══════════════════╗\n║ TRANSACTION ERROR ║\n╚═══════════════════╝\n\n`; let errorMessage = `\n\n\n╔═══════════════════╗\n║ TRANSACTION ERROR ║\n╚═══════════════════╝\n\n`;
@@ -363,22 +363,22 @@ export class TransactionError extends Error {
super(errorMessage); super(errorMessage);
this.#reason = info.reason; this._reason = info.reason;
this.#info = info; this._info = info;
this.#raw = raw; this._raw = raw;
} }
// Keep reason here for backwards compatibility // Keep reason here for backwards compatibility
get reason(): string { get reason(): string {
return this.#reason; return this._reason;
} }
get raw(): any { get raw(): any {
return this.#raw; return this._raw;
} }
get info(): TransactionErrorInfo { get info(): TransactionErrorInfo {
return this.#info; return this._info;
} }
} }
@@ -36,5 +36,11 @@ export function extractMinimalProxyImplementationAddress(
return `0x${implementationAddress}`; return `0x${implementationAddress}`;
} }
// EIP-7511 minimal proxy with PUSH0 opcode - https://eips.ethereum.org/EIPS/eip-7511
if (bytecode.startsWith("0x365f5f375f5f365f73")) {
const implementationAddress = bytecode.slice(20, 60);
return `0x${implementationAddress}`;
}
return undefined; return undefined;
} }
+1
View File
@@ -23,6 +23,7 @@ export function unique<T>(a: T[], fn: (a: T, b: T) => boolean): T[] {
for (let j = i + 1; j < a.length; j++) { for (let j = i + 1; j < a.length; j++) {
if (fn(a[i], a[j])) { if (fn(a[i], a[j])) {
a.splice(j, 1); a.splice(j, 1);
j--;
} }
} }
} }
+50 -1
View File
@@ -14,7 +14,12 @@ import {
type BytesLike, type BytesLike,
} from "ethers"; } from "ethers";
import { QueryAllParams } from "../../../core/schema/QueryParams"; import { QueryAllParams } from "../../../core/schema/QueryParams";
import { NFT, NFTMetadata, NFTMetadataOrUri } from "../../../core/schema/nft"; import {
NFT,
NFTMetadata,
NFTMetadataInput,
NFTMetadataOrUri,
} from "../../../core/schema/nft";
import { resolveAddress } from "../../common/ens/resolveAddress"; import { resolveAddress } from "../../common/ens/resolveAddress";
import { import {
ExtensionNotImplementedError, ExtensionNotImplementedError,
@@ -37,6 +42,7 @@ import {
FEATURE_EDITION_REVEALABLE, FEATURE_EDITION_REVEALABLE,
FEATURE_EDITION_SIGNATURE_MINTABLE, FEATURE_EDITION_SIGNATURE_MINTABLE,
FEATURE_EDITION_SUPPLY, FEATURE_EDITION_SUPPLY,
FEATURE_EDITION_UPDATABLE_METADATA,
} from "../../constants/erc1155-features"; } from "../../constants/erc1155-features";
import { AirdropInputSchema } from "../../schema/contracts/common/airdrop"; import { AirdropInputSchema } from "../../schema/contracts/common/airdrop";
import { Address } from "../../schema/shared/Address"; import { Address } from "../../schema/shared/Address";
@@ -959,6 +965,49 @@ export class Erc1155<
}, },
); );
////// ERC1155 Update Metadata Extension //////
/**
* Update the metadata of an NFT
*
* @remarks Update the metadata of an NFT in the connected wallet
*
* @example
* ```javascript
* // The token ID of the NFT you want to update
* const tokenId = 0;
* // The updated metadata of the NFT
* const metadata = {
* name: "Updated NFT",
* description: "This is an updated NFT",
* image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
* }
*
* const result = await contract.erc1155.updateMetadata(tokenId, metadata);
* ```
* @twfeature ERC1155UpdateMetadata
*/
updateMetadata = /* @__PURE__ */ buildTransactionFunction(
async (tokenId: BigNumberish, metadata: NFTMetadataInput) => {
if (this.lazyMintable) {
return this.lazyMintable.updateMetadata.prepare(tokenId, metadata);
} else if (
detectContractFeature(this.contractWrapper, "ERC1155UpdatableMetadata")
) {
const uri = await this.storage.upload(metadata);
return Transaction.fromContractWrapper({
contractWrapper: this.contractWrapper,
method: "setTokenURI",
args: [tokenId, uri],
});
} else {
throw new ExtensionNotImplementedError(
FEATURE_EDITION_UPDATABLE_METADATA,
);
}
},
);
////// ERC1155 Claimable Extension ////// ////// ERC1155 Claimable Extension //////
/** /**
@@ -1,8 +1,12 @@
import type { DropERC1155_V2 } from "@thirdweb-dev/contracts-js"; import type { DropERC1155, DropERC1155_V2 } from "@thirdweb-dev/contracts-js";
import { TokensLazyMintedEvent } from "@thirdweb-dev/contracts-js/dist/declarations/src/LazyMint"; import { TokensLazyMintedEvent } from "@thirdweb-dev/contracts-js/dist/declarations/src/LazyMint";
import { ThirdwebStorage } from "@thirdweb-dev/storage"; import { ThirdwebStorage } from "@thirdweb-dev/storage";
import { utils, type providers } from "ethers"; import { utils, type providers, BigNumber, BigNumberish } from "ethers";
import { NFTMetadata, NFTMetadataOrUri } from "../../../../../core/schema/nft"; import {
NFTMetadata,
NFTMetadataInput,
NFTMetadataOrUri,
} from "../../../../../core/schema/nft";
import { detectContractFeature } from "../../../../common/feature-detection/detectContractFeature"; import { detectContractFeature } from "../../../../common/feature-detection/detectContractFeature";
import { getPrebuiltInfo } from "../../../../common/legacy"; import { getPrebuiltInfo } from "../../../../common/legacy";
import { uploadOrExtractURIs } from "../../../../common/nft"; import { uploadOrExtractURIs } from "../../../../common/nft";
@@ -176,6 +180,74 @@ export class Erc1155LazyMintable implements DetectableFeature {
}, },
); );
updateMetadata = /* @__PURE__ */ buildTransactionFunction(
async (
tokenId: BigNumberish,
metadata: NFTMetadataInput,
options?: {
onProgress: (event: UploadProgressEvent) => void;
},
) => {
const batchCount = await this.contractWrapper.read("getBaseURICount", []);
if (batchCount.eq(0)) {
throw new Error(
"No base URI set. Please set a base URI before updating metadata",
);
}
const targetTokenId = BigNumber.from(tokenId);
let startTokenId = BigNumber.from(0);
let endTokenId = BigNumber.from(0);
let batchIndex = 0;
for (let i = 0; i < batchCount.toNumber(); i++) {
batchIndex = i;
endTokenId = await this.contractWrapper.read("getBatchIdAtIndex", [
batchIndex,
]);
if (endTokenId.gt(targetTokenId)) {
break;
}
startTokenId = endTokenId;
}
// for the entire batch,
// 1. download all of the metadata as a list of nft metadata
const range = Array.from(
{ length: endTokenId.sub(startTokenId).toNumber() },
(v, k) => k + startTokenId.toNumber(),
);
const metadatas = await Promise.all(
range.map((id) => this.erc1155.getTokenMetadata(id)),
);
// 2. replace the metadata of the tokenId desired
const newMetadatas = [];
for (let i = 0; i < metadatas.length; i++) {
const { id, uri, ...rest } = metadatas[i];
if (BigNumber.from(targetTokenId).eq(BigNumber.from(id))) {
newMetadatas.push(metadata);
} else {
void uri; // linter
newMetadatas.push(rest);
}
}
// 3. re-upload the entire batch with the correct starting number
const batch = await uploadOrExtractURIs(
newMetadatas,
this.storage,
startTokenId.toNumber(),
options,
);
const baseUri = batch[0].substring(0, batch[0].lastIndexOf("/"));
// 4. update the base uri for the entire batch
return Transaction.fromContractWrapper({
contractWrapper: this.contractWrapper as ContractWrapper<DropERC1155>, // TODO contract detection
method: "updateBatchBaseURI",
args: [
batchIndex,
`${baseUri.endsWith("/") ? baseUri : `${baseUri}/`}`,
],
});
},
);
/** ****************************** /** ******************************
* PRIVATE FUNCTIONS * PRIVATE FUNCTIONS
*******************************/ *******************************/
+1 -1
View File
@@ -38,7 +38,7 @@ describe("Address & ENS", async () => {
).to.equal(1); ).to.equal(1);
}); });
it("Should resolve cb.id", async () => { it.skip("Should resolve cb.id", async () => {
const address = await sdk.deployer.deployNFTCollection({ const address = await sdk.deployer.deployNFTCollection({
name: "NFT", name: "NFT",
primary_sale_recipient: "aneriamin.cb.id", primary_sale_recipient: "aneriamin.cb.id",
+76 -3
View File
@@ -46,9 +46,11 @@ describe("Edition Drop Contract (V4)", async () => {
platform_fee_basis_points: 10, platform_fee_basis_points: 10,
platform_fee_recipient: adminWallet.address, platform_fee_recipient: adminWallet.address,
}, },
await sdk.deployer.getLatestBuiltInContractVersion( (
EditionDropInitializer.contractType, await sdk.deployer.getLatestBuiltInContractVersion(
), EditionDropInitializer.contractType,
)
).toString(),
); );
bdContract = await sdk.getEditionDrop(address); bdContract = await sdk.getEditionDrop(address);
}); });
@@ -252,6 +254,77 @@ describe("Edition Drop Contract (V4)", async () => {
} }
}); });
it("should update metadata", async () => {
const tokens = [
{
name: "test 0",
},
{
name: "test 1",
},
{
name: "test 2",
},
{
name: "test 3",
},
{
name: "test 4",
},
];
const result = await bdContract.createBatch(tokens);
assert.lengthOf(result, tokens.length);
for (const token of tokens) {
const found = result.find(
async (t) => (await t.data()).name === token.name,
);
assert.isDefined(found);
}
const token = await bdContract.get(1);
expect(token.metadata.name).to.eq("test 1");
await bdContract.erc1155.updateMetadata(1, {
name: "test 123",
});
const token2 = await bdContract.get(1);
expect(token2.metadata.name).to.eq("test 123");
});
it("should update metadata from diff batch", async () => {
const tokens = [
{
name: "test 0",
},
{
name: "test 1",
},
{
name: "test 2",
},
];
const result = await bdContract.createBatch(tokens);
assert.lengthOf(result, tokens.length);
const tokens2 = [
{
name: "test 3",
},
{
name: "test 4",
},
];
const result2 = await bdContract.createBatch(tokens2);
assert.lengthOf(result2, tokens2.length);
let token = await bdContract.get("3");
expect(token.metadata.name).to.eq("test 3");
await bdContract.erc1155.updateMetadata(3, {
name: "test 123",
});
token = await bdContract.get("3");
expect(token.metadata.name).to.eq("test 123");
});
it("should allow setting max claims per wallet", async () => { it("should allow setting max claims per wallet", async () => {
await bdContract.createBatch([ await bdContract.createBatch([
{ name: "name", description: "description" }, { name: "name", description: "description" },
+41
View File
@@ -54,6 +54,47 @@ describe("Edition Contract", async () => {
expect(limit.toNumber()).gt(0); expect(limit.toNumber()).gt(0);
}); });
it("should update metadata", async () => {
const tokens = [
{
metadata: { name: "test 0" },
supply: 10,
},
{
metadata: { name: "test 1" },
supply: 10,
},
{
metadata: { name: "test 2" },
supply: 10,
},
{
metadata: { name: "test 3" },
supply: 10,
},
{
metadata: { name: "test 4" },
supply: 10,
},
];
const result = await bundleContract.mintBatch(tokens);
assert.lengthOf(result, tokens.length);
for (const token of tokens) {
const found = result.find(
async (t) => (await t.data()).metadata.name === token.metadata.name,
);
assert.isDefined(found);
}
const token = await bundleContract.get(1);
expect(token.metadata.name).to.eq("test 1");
await bundleContract.erc1155.updateMetadata(1, {
name: "test 123",
});
const token2 = await bundleContract.get(1);
expect(token2.metadata.name).to.eq("test 123");
});
it("should respect pagination", async () => { it("should respect pagination", async () => {
const nfts = [] as { metadata: { name: string }; supply: number }[]; const nfts = [] as { metadata: { name: string }; supply: number }[];
for (let i = 0; i < 100; i++) { for (let i = 0; i < 100; i++) {
@@ -43,6 +43,17 @@ describe("Feature Detection", async () => {
); );
}); });
it("should extract implementation address for eip-7511 minimal proxy", async () => {
// https://eips.ethereum.org/EIPS/eip-7511#specification
const code =
"0x365f5f375f5f365f73bebebebebebebebebebebebebebebebebebebebe5af43d5f5f3e5f3d91602a57fd5bf3";
const implementationAddress =
extractMinimalProxyImplementationAddress(code);
expect(implementationAddress).to.equal(
"0xbebebebebebebebebebebebebebebebebebebebe",
);
});
it("should extract implementation address for minimal proxy with receive", async () => { it("should extract implementation address for minimal proxy with receive", async () => {
// https://github.com/0xSplits/splits-contracts/blob/c7b741926ec9746182d0d1e2c4c2046102e5d337/contracts/libraries/Clones.sol#L32 // https://github.com/0xSplits/splits-contracts/blob/c7b741926ec9746182d0d1e2c4c2046102e5d337/contracts/libraries/Clones.sol#L32
const code = const code =
+43 -1
View File
@@ -1,9 +1,10 @@
import { SmartContract, Token } from "../../src/evm"; import { SmartContract, Token, joinABIs } from "../../src/evm";
import { sdk, signers } from "./before-setup"; import { sdk, signers } from "./before-setup";
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
import { TokenERC20__factory } from "@thirdweb-dev/contracts-js"; import { TokenERC20__factory } from "@thirdweb-dev/contracts-js";
import { getContract, getContractFromAbi } from "../../src"; import { getContract, getContractFromAbi } from "../../src";
import { expect } from "chai"; import { expect } from "chai";
import { unique } from "../../src/evm/common/utils";
describe("Functions", async () => { describe("Functions", async () => {
let adminWallet: SignerWithAddress; let adminWallet: SignerWithAddress;
@@ -52,4 +53,45 @@ describe("Functions", async () => {
const balance = await contract.erc20.balance(); const balance = await contract.erc20.balance();
expect(balance.displayValue).to.equal("0.0"); expect(balance.displayValue).to.equal("0.0");
}); });
it("check abi merge", async () => {
const abi = TokenERC20__factory.abi;
const joined = joinABIs([abi, abi, abi], abi);
expect(joined.length).to.equal(abi.length);
abi.forEach((n) => {
const index = joined.findIndex((m) => {
if (n.name) {
return (
n.name === m.name &&
n.type === m.type &&
n.inputs.length === m.inputs.length
);
} else {
return n.type === m.type && n.inputs.length === m.inputs.length;
}
});
expect(index).to.be.greaterThanOrEqual(0);
});
});
it("check unique filter", async () => {
const arrayOne = [1, 2, 3, 4];
const arrayTwo = [4, 3, 2, 1];
const arrayThree = [1, 2, 3, 4];
const arrayFour = [4, 2, 3, 1];
let merged: number[] = [];
merged.push(...arrayOne, ...arrayTwo, ...arrayThree, ...arrayFour);
const filtered = unique(merged, (a, b): boolean => a === b);
expect(filtered.length).to.equal(arrayOne.length);
arrayOne.forEach((n) => {
expect(filtered.includes(n)).to.be.true;
});
});
}); });

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