Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
449ae19f94 | ||
|
|
7304c5b0c7 | ||
|
|
49cfdb3fd9 | ||
|
|
2d7ebe2111 | ||
|
|
a9ce10f39a | ||
|
|
321cf26342 | ||
|
|
d2ad36d76d | ||
|
|
507d0e5bf4 | ||
|
|
79e6a047d6 | ||
|
|
4dce62de1c | ||
|
|
1c533efcd5 | ||
|
|
eca6217f77 | ||
|
|
df84f9c4ce | ||
|
|
17c0e6f282 | ||
|
|
d51c1883af | ||
|
|
9cf3a1d663 | ||
|
|
c94bcd574a | ||
|
|
41c6d04c2f | ||
|
|
3a78041de7 | ||
|
|
8b74602e3b | ||
|
|
f9081d58d4 | ||
|
|
b051d844d0 | ||
|
|
f8e0c5f84b | ||
|
|
476b6cc271 | ||
|
|
ffaff744f7 | ||
|
|
198f72c493 |
@@ -106,7 +106,7 @@ jobs:
|
||||
|
||||
- name: Install Yarn (if needed)
|
||||
if: matrix.package_manager == 'yarn'
|
||||
run: npm install -g yarn
|
||||
run: npm install -g yarn@1.22.19
|
||||
|
||||
- name: Create test project
|
||||
run: |
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { Metadata } from "next";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { CodeExample } from "../../../components/code/code-example";
|
||||
import { CustomizedConnect } from "../../../components/sign-in/custom";
|
||||
import { HooksPreview } from "../../../components/sign-in/hooks";
|
||||
import { StyledConnectButton } from "../../../components/styled-connect-button";
|
||||
import { StyledConnectEmbed } from "../../../components/styled-connect-embed";
|
||||
@@ -70,6 +71,10 @@ export default function Page() {
|
||||
<EmbedComponent />
|
||||
</section>
|
||||
|
||||
<section className="container px-4 md:px-6 space-y-8">
|
||||
<CustomizedComponent />
|
||||
</section>
|
||||
|
||||
<section className="container px-4 md:px-6 space-y-8">
|
||||
<Hooks />
|
||||
</section>
|
||||
@@ -146,6 +151,65 @@ return (
|
||||
);
|
||||
}
|
||||
|
||||
function CustomizedComponent() {
|
||||
return (
|
||||
<>
|
||||
<div className="space-y-2">
|
||||
<h2 className="text-2xl sm:text-3xl font-semibold tracking-tight">
|
||||
Customized Component
|
||||
</h2>
|
||||
<p className="max-w-[600px]">
|
||||
Change the look and feel of the connect button without rewriting your
|
||||
own.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<CodeExample
|
||||
preview={<CustomizedConnect />}
|
||||
code={`import { createThirdwebClient } from "thirdweb";
|
||||
import { ConnectEmbed } from "thirdweb/react";
|
||||
|
||||
const THIRDWEB_CLIENT = createThirdwebClient({
|
||||
clientId: "<YOUR_CLIENT_ID>"
|
||||
});
|
||||
|
||||
function App(){
|
||||
return (
|
||||
<ConnectButton
|
||||
client={THIRDWEB_CLIENT}
|
||||
connectButton={{
|
||||
label: "Custom Connect Button",
|
||||
}}
|
||||
showAllWallets={false}
|
||||
connectModal={{
|
||||
title: "Custom Connect Modal",
|
||||
size: "compact",
|
||||
}}
|
||||
theme={darkTheme({
|
||||
colors: {
|
||||
modalBg: "#281866",
|
||||
accentButtonBg: "#281866",
|
||||
connectedButtonBgHover: "#281866",
|
||||
borderColor: "rgba(256, 256,256, 0.1)",
|
||||
accentText: "rgba(256, 256,256, 0.1)",
|
||||
connectedButtonBg: "#281866",
|
||||
tertiaryBg: "rgba(256, 256,256, 0.1)",
|
||||
primaryButtonBg: "#281866",
|
||||
secondaryButtonBg: "rgba(256, 256,256, 0.1)",
|
||||
primaryButtonText: "#E7E8E9",
|
||||
primaryText: "#E7E8E9",
|
||||
separatorLine: "rgba(256, 256,256, 0.1)",
|
||||
},
|
||||
})}
|
||||
/>
|
||||
);
|
||||
};`}
|
||||
lang="tsx"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function Hooks() {
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { getContract } from "thirdweb";
|
||||
import { zkSyncSepolia } from "thirdweb/chains";
|
||||
import { baseSepolia } from "thirdweb/chains";
|
||||
import { THIRDWEB_CLIENT } from "../../lib/client";
|
||||
|
||||
export const chain = zkSyncSepolia;
|
||||
export const editionDropAddress = "0xd563ACBeD80e63B257B2524562BdD7Ec666eEE77";
|
||||
export const chain = baseSepolia;
|
||||
export const editionDropAddress = "0x638263e3eAa3917a53630e61B1fBa685308024fa";
|
||||
export const editionDropTokenId = 0n;
|
||||
|
||||
export const editionDropContract = getContract({
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
useReadContract,
|
||||
} from "thirdweb/react";
|
||||
import { THIRDWEB_CLIENT } from "../../lib/client";
|
||||
import { CodeExample } from "../code/code-example";
|
||||
import { editionDropContract, editionDropTokenId } from "./constants";
|
||||
|
||||
export function SponsoredTxPreview() {
|
||||
@@ -50,7 +49,7 @@ export function SponsoredTxPreview() {
|
||||
/>
|
||||
) : null}
|
||||
{smartAccount ? (
|
||||
<>
|
||||
<div className="flex flex-col justify-center p-8">
|
||||
<p className="font-semibold text-center mb-2">
|
||||
You own {ownedNfts?.[0]?.quantityOwned.toString() || "0"}{" "}
|
||||
Kittens
|
||||
@@ -73,7 +72,7 @@ export function SponsoredTxPreview() {
|
||||
>
|
||||
Mint
|
||||
</TransactionButton>
|
||||
</>
|
||||
</div>
|
||||
) : (
|
||||
<p
|
||||
style={{
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
"use client";
|
||||
import { ConnectButton } from "thirdweb/react";
|
||||
import { darkTheme, lightTheme } from "thirdweb/react";
|
||||
import { THIRDWEB_CLIENT } from "../../lib/client";
|
||||
|
||||
export const CustomizedConnect = () => {
|
||||
return (
|
||||
<ConnectButton
|
||||
client={THIRDWEB_CLIENT}
|
||||
connectButton={{
|
||||
label: "Custom Connect Button",
|
||||
}}
|
||||
showAllWallets={false}
|
||||
connectModal={{
|
||||
title: "Custom Connect Modal",
|
||||
size: "compact",
|
||||
}}
|
||||
theme={darkTheme({
|
||||
colors: {
|
||||
modalBg: "#281866",
|
||||
accentButtonBg: "#281866",
|
||||
connectedButtonBgHover: "#281866",
|
||||
borderColor: "rgba(256, 256,256, 0.1)",
|
||||
accentText: "rgba(256, 256,256, 0.1)",
|
||||
connectedButtonBg: "#281866",
|
||||
tertiaryBg: "rgba(256, 256,256, 0.1)",
|
||||
primaryButtonBg: "#281866",
|
||||
secondaryButtonBg: "rgba(256, 256,256, 0.1)",
|
||||
primaryButtonText: "#E7E8E9",
|
||||
primaryText: "#E7E8E9",
|
||||
separatorLine: "rgba(256, 256,256, 0.1)",
|
||||
},
|
||||
})}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@@ -1,5 +1,26 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 4.1.96
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@2.5.38
|
||||
|
||||
## 4.1.95
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@2.5.37
|
||||
|
||||
## 4.1.94
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@2.5.36
|
||||
|
||||
## 4.1.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "4.1.93",
|
||||
"version": "4.1.96",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 0.1.120
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3348](https://github.com/thirdweb-dev/js/pull/3348) [`321cf26`](https://github.com/thirdweb-dev/js/commit/321cf26342d0755204aa465bc2390e052d5ed071) Thanks [@github-actions](https://github.com/apps/github-actions)! - Synced Chains Package
|
||||
|
||||
## 0.1.119
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3311](https://github.com/thirdweb-dev/js/pull/3311) [`8b74602`](https://github.com/thirdweb-dev/js/commit/8b74602e3b7fbe011bf886b9d5ee0e2ea62f7447) Thanks [@github-actions](https://github.com/apps/github-actions)! - Synced Chains Package
|
||||
|
||||
## 0.1.118
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -4,12 +4,6 @@ export default {
|
||||
"chainId": 107107114116,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmNTZ9nEomAXK6bLxUbMfTS1TvrsN22HU1zTtxHUpMkUhz",
|
||||
"width": 1000,
|
||||
"height": 1000,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://kakarot.org",
|
||||
"name": "Kakarot Sepolia Deprecated",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -36,7 +36,9 @@ export default {
|
||||
},
|
||||
"rpc": [
|
||||
"https://1123.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://b2-testnet.alt.technology"
|
||||
"https://b2-testnet.alt.technology",
|
||||
"https://rpc.ankr.com/b2_testnet",
|
||||
"https://testnet-rpc.bsquared.network"
|
||||
],
|
||||
"shortName": "B2-testnet",
|
||||
"slug": "b2-testnet",
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Artela",
|
||||
"chainId": 11822,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "ArtelaScan",
|
||||
"url": "https://betanet-scan.artela.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"infoURL": "https://artela.network/",
|
||||
"name": "Artela Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "ART",
|
||||
"symbol": "ART",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 11822,
|
||||
"rpc": [
|
||||
"https://11822.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://betanet-rpc1.artela.network"
|
||||
],
|
||||
"shortName": "Artela",
|
||||
"slug": "artela-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "CuckooAI",
|
||||
"chainId": 1200,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Cuckoo Chain Explorer",
|
||||
"url": "https://mainnet-scan.cuckoo.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmZjVDfk56DjqkCPymaweJJaj9ASGjjgcwJ95XsFDzj9us",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://cuckoo.network",
|
||||
"name": "Cuckoo Chain",
|
||||
"nativeCurrency": {
|
||||
"name": "CuckooAI",
|
||||
"symbol": "CAI",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1200,
|
||||
"rpc": [
|
||||
"https://1200.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet-rpc.cuckoo.network",
|
||||
"wss://mainnet-rpc.cuckoo.network"
|
||||
],
|
||||
"shortName": "cai",
|
||||
"slug": "cuckoo-chain",
|
||||
"testnet": false,
|
||||
"title": "Cuckoo Chain"
|
||||
} as const satisfies Chain;
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://buildonhybrid.com",
|
||||
"name": "Hybrid Testnet",
|
||||
"name": "Hybrid Testnet (Deprecated)",
|
||||
"nativeCurrency": {
|
||||
"name": "Hybrid",
|
||||
"symbol": "HYB",
|
||||
@@ -28,7 +28,8 @@ export default {
|
||||
"https://1224.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet-rpc.buildonhybrid.com"
|
||||
],
|
||||
"shortName": "hyb",
|
||||
"slug": "hybrid-testnet",
|
||||
"shortName": "hyb_deprecated",
|
||||
"slug": "hybrid-testnet-deprecated",
|
||||
"status": "deprecated",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "HYB",
|
||||
"chainId": 1225,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Hybrid Testnet",
|
||||
"url": "https://explorer.buildonhybrid.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmdGfvH9qfvbMXYKosS1nHbw3q5UtFJky4hdMDmmKDTx8Y",
|
||||
"width": 250,
|
||||
"height": 250,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://buildonhybrid.com",
|
||||
"name": "Hybrid Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Hybrid",
|
||||
"symbol": "HYB",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1225,
|
||||
"rpc": [
|
||||
"https://1225.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://hybrid-testnet.rpc.caldera.xyz/http",
|
||||
"wss://hybrid-testnet.rpc.caldera.xyz/ws"
|
||||
],
|
||||
"shortName": "hyb",
|
||||
"slug": "hybrid-testnet",
|
||||
"status": "active",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -15,12 +15,6 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmRySLe3su59dE5x5JPm2b1GeZfz6DR9qUzcbp3rt4SD3A",
|
||||
"width": 300,
|
||||
"height": 300,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://astar.network",
|
||||
"name": "zKatana",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -6,13 +6,7 @@ export default {
|
||||
{
|
||||
"name": "etherscan",
|
||||
"url": "http://testnet-api.magape.io:81",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmPsxWMvnxnZ9dZcRJJMaE24o34dQsnsAMCJh3kVDrE1aB",
|
||||
"width": 1000,
|
||||
"height": 1000,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
@@ -21,12 +15,6 @@ export default {
|
||||
"name": "EIP155"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmPsxWMvnxnZ9dZcRJJMaE24o34dQsnsAMCJh3kVDrE1aB",
|
||||
"width": 1000,
|
||||
"height": 1000,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://magape.io",
|
||||
"name": "MagApe Testnet",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -15,12 +15,6 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmNTZ9nEomAXK6bLxUbMfTS1TvrsN22HU1zTtxHUpMkUhz",
|
||||
"width": 1000,
|
||||
"height": 1000,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://kakarot.org",
|
||||
"name": "Kakarot Sepolia",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "TCC Network",
|
||||
"chainId": 181155,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Tcc Scan",
|
||||
"url": "https://scan.tccworld.org/",
|
||||
"standard": "181155",
|
||||
"icon": {
|
||||
"url": "ipfs://QmchZTtvuU7oRe3rSu1HNPELJQdnutV79NjcHxoybJ4SVo/tcc-coin.png",
|
||||
"width": 100,
|
||||
"height": 100,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmchZTtvuU7oRe3rSu1HNPELJQdnutV79NjcHxoybJ4SVo/tcc-coin.png",
|
||||
"width": 100,
|
||||
"height": 100,
|
||||
"format": "png"
|
||||
},
|
||||
"name": "TCC Network",
|
||||
"nativeCurrency": {
|
||||
"name": "The ChampCoin",
|
||||
"symbol": "TCC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 181155,
|
||||
"redFlags": [],
|
||||
"rpc": [],
|
||||
"shortName": "TCC",
|
||||
"slug": "tcc-network",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,41 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Gemuchain",
|
||||
"chainId": 1903648807,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Gemuchain Explorer",
|
||||
"url": "https://gemutest-explorer.gemuchain.io",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "https://explorer.gemuchain.io/assets/network_logo.svg",
|
||||
"width": 345,
|
||||
"height": 48,
|
||||
"format": "svg"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "https://raw.githubusercontent.com/UrfinDeuce/logos/05725373b48fb7e3de75737f621b21a4a6557c76/GemuChain%20logo.svg",
|
||||
"width": 345,
|
||||
"height": 48,
|
||||
"format": "svg"
|
||||
},
|
||||
"name": "Gemuchain Lab",
|
||||
"nativeCurrency": {
|
||||
"name": "GEMU",
|
||||
"symbol": "GEMU",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1903648807,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://1903648807.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://gemutest-rpc.gemuchain.io"
|
||||
],
|
||||
"shortName": "GEMU",
|
||||
"slug": "gemuchain-lab",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "KYOTO",
|
||||
"chainId": 1997,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Kyotoscan",
|
||||
"url": "https://kyotoscan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
}
|
||||
],
|
||||
"infoURL": "https://kyotoprotocol.io",
|
||||
"name": "Kyoto",
|
||||
"nativeCurrency": {
|
||||
"name": "Kyoto",
|
||||
"symbol": "KYOTO",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1997,
|
||||
"rpc": [
|
||||
"https://1997.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.kyotochain.io"
|
||||
],
|
||||
"shortName": "kyoto",
|
||||
"slip44": 1,
|
||||
"slug": "kyoto",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -20,8 +20,8 @@ export default {
|
||||
"networkId": 2136,
|
||||
"rpc": [
|
||||
"https://2136.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://test-market.bigsb.io",
|
||||
"wss://test-market.bigsb.io"
|
||||
"https://test-market.bigsb.network",
|
||||
"wss://test-market.bigsb.network"
|
||||
],
|
||||
"shortName": "bigsb_testnet",
|
||||
"slug": "bigshortbets-testnet",
|
||||
|
||||
@@ -6,34 +6,16 @@ export default {
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://testnet.meldscan.io",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
|
||||
"width": 4000,
|
||||
"height": 4000,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://subnets-test.avax.network/meld",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
|
||||
"width": 4000,
|
||||
"height": 4000,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
|
||||
"width": 4000,
|
||||
"height": 4000,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://meld.com",
|
||||
"name": "Kanazawa",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -44,7 +44,8 @@ export default {
|
||||
"https://mainnet.b2-rpc.com",
|
||||
"https://rpc.bsquared.network",
|
||||
"https://b2-mainnet.alt.technology",
|
||||
"https://b2-mainnet-public.s.chainbase.com"
|
||||
"https://b2-mainnet-public.s.chainbase.com",
|
||||
"https://rpc.ankr.com/b2"
|
||||
],
|
||||
"shortName": "B2-mainnet",
|
||||
"slug": "b2",
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "AILayer",
|
||||
"chainId": 2648,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://testnet-explorer.ailayer.xyz",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYoqc8rm8PrBg9jqfpsrxd6zdPEqDozbyNVMkBo3QMAFP",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmYoqc8rm8PrBg9jqfpsrxd6zdPEqDozbyNVMkBo3QMAFP",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://ailayer.xyz/",
|
||||
"name": "AILayer Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "BTC",
|
||||
"symbol": "BTC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 2648,
|
||||
"rpc": [
|
||||
"https://2648.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet-rpc.ailayer.xyz",
|
||||
"wss://testnet-rpc.ailayer.xyz"
|
||||
],
|
||||
"shortName": "ailayer-testnet",
|
||||
"slug": "ailayer-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,41 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "AILayer",
|
||||
"chainId": 2649,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://mainnet-explorer.ailayer.xyz",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYoqc8rm8PrBg9jqfpsrxd6zdPEqDozbyNVMkBo3QMAFP",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmYoqc8rm8PrBg9jqfpsrxd6zdPEqDozbyNVMkBo3QMAFP",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://ailayer.xyz/",
|
||||
"name": "AILayer Mainnet",
|
||||
"nativeCurrency": {
|
||||
"name": "BTC",
|
||||
"symbol": "BTC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 2649,
|
||||
"rpc": [
|
||||
"https://2649.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet-rpc.ailayer.xyz",
|
||||
"wss://mainnet-rpc.ailayer.xyz"
|
||||
],
|
||||
"shortName": "ailayer-mainnet",
|
||||
"slug": "ailayer",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -6,34 +6,16 @@ export default {
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://meldscan.io",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
|
||||
"width": 4000,
|
||||
"height": 4000,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://subnets.avax.network/meld",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
|
||||
"width": 4000,
|
||||
"height": 4000,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
|
||||
"width": 4000,
|
||||
"height": 4000,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://meld.com",
|
||||
"name": "Meld",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "GTC",
|
||||
"chainId": 3490,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "GTCScan Explorer",
|
||||
"url": "https://gtcscan.io",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeiaaq7gogws6uqcvo6imxbxfgpdhewybh7bxgtfny2i2as5nidbdje",
|
||||
"width": 312,
|
||||
"height": 312,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeiaaq7gogws6uqcvo6imxbxfgpdhewybh7bxgtfny2i2as5nidbdje",
|
||||
"width": 312,
|
||||
"height": 312,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://gtcscan.io/",
|
||||
"name": "GTCSCAN",
|
||||
"nativeCurrency": {
|
||||
"name": "GTC",
|
||||
"symbol": "GTC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 3490,
|
||||
"rpc": [
|
||||
"https://3490.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://gtc-dataseed.gtcscan.io/"
|
||||
],
|
||||
"shortName": "gtc",
|
||||
"slip44": 1,
|
||||
"slug": "gtcscan",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -10,6 +10,12 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmcumhDxUyoLTHkcMKgPqkpGnnjwSTqE2KGFnDXXFY8mMo",
|
||||
"width": 40,
|
||||
"height": 38,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://islamicoin.finance",
|
||||
"name": "iChain Network",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "iChain Testnet",
|
||||
"chainId": 3645,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "iChainscan",
|
||||
"url": "https://test.ichainscan.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmcumhDxUyoLTHkcMKgPqkpGnnjwSTqE2KGFnDXXFY8mMo",
|
||||
"width": 40,
|
||||
"height": 38,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://islamicoin.finance",
|
||||
"name": "iChain Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "ISLAMICOIN",
|
||||
"symbol": "ISLAMI",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 3645,
|
||||
"rpc": [
|
||||
"https://3645.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://istanbul.ichainscan.com"
|
||||
],
|
||||
"shortName": "ISLAMIT",
|
||||
"slug": "ichain-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -16,12 +16,6 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmZt75xixnEtFzqHTrJa8kJkV4cTXmUZqeMeHM8BcvomQc",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://oho.ai",
|
||||
"name": "OHO Mainnet",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -10,12 +10,6 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmXARMjJGkXEVEdjUyxkeG4ffsWvEo9vSJpVon3JwRxckS",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://tobechain.net",
|
||||
"name": "Tobe Chain",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -4,8 +4,8 @@ export default {
|
||||
"chainId": 44,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "subscan",
|
||||
"url": "https://crab.subscan.io",
|
||||
"name": "blockscout",
|
||||
"url": "https://crab-scan.darwinia.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,22 +6,10 @@ export default {
|
||||
{
|
||||
"name": "etmpscan",
|
||||
"url": "https://etmscan.network",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmT7DTqT1V2y42pRpt3sj9ifijfmbtkHN7D2vTfAUAS622",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmT7DTqT1V2y42pRpt3sj9ifijfmbtkHN7D2vTfAUAS622",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://etm.network",
|
||||
"name": "Ennothem Mainnet Proterozoic",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -10,12 +10,6 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmT7DTqT1V2y42pRpt3sj9ifijfmbtkHN7D2vTfAUAS622",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://etm.network",
|
||||
"name": "Ennothem Testnet Pioneer",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 51290,
|
||||
"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": "Test Using Resources",
|
||||
"nativeCurrency": {
|
||||
"name": "Test Using Resources Token",
|
||||
"symbol": "JMH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 51290,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://51290.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/testsize2/testnet/rpc"
|
||||
],
|
||||
"shortName": "Test Using Resources",
|
||||
"slug": "test-using-resources",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -6,13 +6,7 @@ export default {
|
||||
{
|
||||
"name": "Pentagon Testnet Explorer",
|
||||
"url": "https://explorer-testnet.pentagon.games",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfU7W3Tm3tGWgnHBTG9vjB4PXGMvcL7Cq8R6MaSaC33DC",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
@@ -26,12 +20,6 @@ export default {
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmfU7W3Tm3tGWgnHBTG9vjB4PXGMvcL7Cq8R6MaSaC33DC",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://pentagon.games",
|
||||
"name": "Pentagon Testnet",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -4,17 +4,17 @@ export default {
|
||||
"chainId": 57451,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "coinsec network",
|
||||
"name": "coinsecnetwork",
|
||||
"url": "https://explorer.coinsec.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmYV6beVVg3iS9RGPno7GAASpgjyBDoKmWGUcvAKe2nXWK",
|
||||
"width": 50,
|
||||
"height": 50,
|
||||
"format": "png"
|
||||
"url": "ipfs://QmeUyBe58BPndt6SpH9Tn1a8AYpNtHbMVhVyZt8Ppc4HTB",
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"format": "svg"
|
||||
},
|
||||
"infoURL": "https://explorer.coinsec.network/",
|
||||
"name": "COINSEC Network",
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 57923,
|
||||
"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": "QI0614I1",
|
||||
"nativeCurrency": {
|
||||
"name": "QI0614I1 Token",
|
||||
"symbol": "GZD",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 57923,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://57923.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QI0614I1",
|
||||
"slug": "qi0614i1",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -16,12 +16,6 @@ export default {
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmRySLe3su59dE5x5JPm2b1GeZfz6DR9qUzcbp3rt4SD3A",
|
||||
"width": 300,
|
||||
"height": 300,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://astar.network",
|
||||
"name": "Astar zKyoto",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Open Campus Codex",
|
||||
"chainId": 656476,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Open Campus Codex",
|
||||
"url": "https://opencampus-codex.blockscout.com",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://QmXbz7VEYvf6NVHezuBy5HpJTCiagEThBxxdDdfVXNQ8Bt",
|
||||
"width": 30,
|
||||
"height": 30,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmXbz7VEYvf6NVHezuBy5HpJTCiagEThBxxdDdfVXNQ8Bt",
|
||||
"width": 30,
|
||||
"height": 30,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://raas.gelato.network/rollups/details/public/open-campus-codex",
|
||||
"name": "Open Campus Codex",
|
||||
"nativeCurrency": {
|
||||
"name": "EDU",
|
||||
"symbol": "EDU",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 656476,
|
||||
"rpc": [
|
||||
"https://656476.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.open-campus-codex.gelato.digital"
|
||||
],
|
||||
"shortName": "open-campus-codex",
|
||||
"slug": "open-campus-codex",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "OX",
|
||||
"chainId": 6699,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"infoURL": "https://ox.fun/chain",
|
||||
"name": "OX Chain",
|
||||
"nativeCurrency": {
|
||||
"name": "OX",
|
||||
"symbol": "OX",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 6699,
|
||||
"rpc": [
|
||||
"https://6699.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.oxscan.io"
|
||||
],
|
||||
"shortName": "ox-chain",
|
||||
"slug": "ox-chain",
|
||||
"status": "incubating",
|
||||
"testnet": false,
|
||||
"title": "OX Chain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Darwinia Koi",
|
||||
"chainId": 701,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://koi-scan.darwinia.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"infoURL": "https://darwinia.network/",
|
||||
"name": "Darwinia Koi Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Koi Network Native Token",
|
||||
"symbol": "KRING",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 701,
|
||||
"rpc": [
|
||||
"https://701.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://koi-rpc.darwinia.network"
|
||||
],
|
||||
"shortName": "darwinia-koi",
|
||||
"slip44": 1,
|
||||
"slug": "darwinia-koi-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -26,7 +26,8 @@ export default {
|
||||
"networkId": 77001,
|
||||
"rpc": [
|
||||
"https://77001.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://public-node.api.boraportal.com/bora/mainnet"
|
||||
"https://public-node.api.boraportal.com/bora/mainnet",
|
||||
"https://public-node.api.boraportal.io/bora/mainnet"
|
||||
],
|
||||
"shortName": "BORAchain",
|
||||
"slip44": 8217,
|
||||
|
||||
@@ -16,12 +16,6 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmVhezQHkqSZ5Tvtsw18giA1yBjV1URSsBQ7HenUh6p6oC",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://octa.space",
|
||||
"name": "OctaSpace",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -10,6 +10,7 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://bartio.faucet.berachain.com",
|
||||
"https://bartio.faucet.berachain.com/"
|
||||
],
|
||||
"features": [],
|
||||
@@ -19,6 +20,7 @@ export default {
|
||||
"height": 360,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://www.berachain.com",
|
||||
"name": "Berachain bArtio",
|
||||
"nativeCurrency": {
|
||||
"name": "BERA",
|
||||
@@ -31,7 +33,8 @@ export default {
|
||||
"https://80084.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://quicknode-rpc.berachain.com",
|
||||
"https://bartio.rpc.berachain.com",
|
||||
"https://rpc.ankr.com/berachain_testnet"
|
||||
"https://rpc.ankr.com/berachain_testnet",
|
||||
"https://bera-testnet.nodeinfra.com"
|
||||
],
|
||||
"shortName": "Berachain",
|
||||
"slug": "berachain-bartio",
|
||||
|
||||
@@ -25,6 +25,6 @@ export default {
|
||||
"https://subnets.avax.network/testsize/testnet/rpc"
|
||||
],
|
||||
"shortName": "Test Using Resources",
|
||||
"slug": "test-using-resources",
|
||||
"slug": "test-using-resources-test using resources",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -12,12 +12,6 @@ export default {
|
||||
"faucets": [
|
||||
"https://faucet.blocktonscan.com/"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreig3hoedafisrgc6iffdo2jcblm6kov35h72gcblc3zkmt7t4ucwhy",
|
||||
"width": 800,
|
||||
"height": 800,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://blocktoncoin.com",
|
||||
"name": "Blockton Blockchain",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 85405,
|
||||
"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": "QR0614T1tS",
|
||||
"nativeCurrency": {
|
||||
"name": "QR0614T1tS Token",
|
||||
"symbol": "FTW",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 85405,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://85405.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/qr0614t1ts/testnet/rpc"
|
||||
],
|
||||
"shortName": "QR0614T1tS",
|
||||
"slug": "qr0614t1ts",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -6,24 +6,12 @@ export default {
|
||||
{
|
||||
"name": "mmtscan",
|
||||
"url": "https://mmtscan.io",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmaF5gi2CbDKsJ2UchNkjBqmWjv8JEDP3vePBmxeUHiaK4",
|
||||
"width": 250,
|
||||
"height": 250,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.mmtscan.io/"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmaF5gi2CbDKsJ2UchNkjBqmWjv8JEDP3vePBmxeUHiaK4",
|
||||
"width": 250,
|
||||
"height": 250,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://mmtchain.io/",
|
||||
"name": "Mammoth Mainnet",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -6,24 +6,12 @@ export default {
|
||||
{
|
||||
"name": "Shidoblock Testnet Explorer",
|
||||
"url": "https://testnet.shidoscan.com",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreiatrf5pp7ywvrwvsv4otrex73u6v6bvhorqkxiop2hy2i572zjrba",
|
||||
"width": 1080,
|
||||
"height": 1080,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://testnet.shidoscan.com/faucet"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreiatrf5pp7ywvrwvsv4otrex73u6v6bvhorqkxiop2hy2i572zjrba",
|
||||
"width": 1080,
|
||||
"height": 1080,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://www.nexablock.io",
|
||||
"name": "Shido Testnet Block",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -6,22 +6,10 @@ export default {
|
||||
{
|
||||
"name": "Shidoblock Mainnet Explorer",
|
||||
"url": "https://shidoscan.com",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreiatrf5pp7ywvrwvsv4otrex73u6v6bvhorqkxiop2hy2i572zjrba",
|
||||
"width": 1080,
|
||||
"height": 1080,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreiatrf5pp7ywvrwvsv4otrex73u6v6bvhorqkxiop2hy2i572zjrba",
|
||||
"width": 1080,
|
||||
"height": 1080,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://shido.io",
|
||||
"name": "Shido Mainnet Block",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/chains",
|
||||
"version": "0.1.118",
|
||||
"version": "0.1.120",
|
||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||
"exports": {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,34 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.14.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`321cf26`](https://github.com/thirdweb-dev/js/commit/321cf26342d0755204aa465bc2390e052d5ed071)]:
|
||||
- @thirdweb-dev/chains@0.1.120
|
||||
- @thirdweb-dev/sdk@4.0.98
|
||||
- @thirdweb-dev/wallets@2.5.38
|
||||
- @thirdweb-dev/auth@4.1.96
|
||||
|
||||
## 0.14.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.97
|
||||
- @thirdweb-dev/wallets@2.5.37
|
||||
- @thirdweb-dev/auth@4.1.95
|
||||
|
||||
## 0.14.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`8b74602`](https://github.com/thirdweb-dev/js/commit/8b74602e3b7fbe011bf886b9d5ee0e2ea62f7447)]:
|
||||
- @thirdweb-dev/chains@0.1.119
|
||||
- @thirdweb-dev/sdk@4.0.96
|
||||
- @thirdweb-dev/wallets@2.5.36
|
||||
- @thirdweb-dev/auth@4.1.94
|
||||
|
||||
## 0.14.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/cli",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.14.8",
|
||||
"version": "0.14.11",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"@typescript-eslint/parser": "7.9.0",
|
||||
"eslint-config-next": "14.2.1",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-config-turbo": "1.13.2",
|
||||
"eslint-config-turbo": "2.0.4",
|
||||
"eslint-plugin-react": "7.34.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,5 +1,34 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 4.9.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`321cf26`](https://github.com/thirdweb-dev/js/commit/321cf26342d0755204aa465bc2390e052d5ed071)]:
|
||||
- @thirdweb-dev/chains@0.1.120
|
||||
- @thirdweb-dev/sdk@4.0.98
|
||||
- @thirdweb-dev/wallets@2.5.38
|
||||
- @thirdweb-dev/auth@4.1.96
|
||||
|
||||
## 4.9.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.97
|
||||
- @thirdweb-dev/wallets@2.5.37
|
||||
- @thirdweb-dev/auth@4.1.95
|
||||
|
||||
## 4.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`8b74602`](https://github.com/thirdweb-dev/js/commit/8b74602e3b7fbe011bf886b9d5ee0e2ea62f7447)]:
|
||||
- @thirdweb-dev/chains@0.1.119
|
||||
- @thirdweb-dev/sdk@4.0.96
|
||||
- @thirdweb-dev/wallets@2.5.36
|
||||
- @thirdweb-dev/auth@4.1.94
|
||||
|
||||
## 4.9.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "4.9.0",
|
||||
"version": "4.9.3",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,34 @@
|
||||
# @thirdweb-dev/react
|
||||
|
||||
## 4.9.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`321cf26`](https://github.com/thirdweb-dev/js/commit/321cf26342d0755204aa465bc2390e052d5ed071)]:
|
||||
- @thirdweb-dev/chains@0.1.120
|
||||
- @thirdweb-dev/sdk@4.0.98
|
||||
- @thirdweb-dev/react-core@4.9.3
|
||||
- @thirdweb-dev/wallets@2.5.38
|
||||
|
||||
## 4.9.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.97
|
||||
- @thirdweb-dev/react-core@4.9.2
|
||||
- @thirdweb-dev/wallets@2.5.37
|
||||
|
||||
## 4.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`8b74602`](https://github.com/thirdweb-dev/js/commit/8b74602e3b7fbe011bf886b9d5ee0e2ea62f7447)]:
|
||||
- @thirdweb-dev/chains@0.1.119
|
||||
- @thirdweb-dev/sdk@4.0.96
|
||||
- @thirdweb-dev/react-core@4.9.1
|
||||
- @thirdweb-dev/wallets@2.5.36
|
||||
|
||||
## 4.9.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react",
|
||||
"version": "4.9.0",
|
||||
"version": "4.9.3",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,28 @@
|
||||
# @thirdweb-dev/sdk
|
||||
|
||||
## 4.0.98
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2d7ebe2`](https://github.com/thirdweb-dev/js/commit/2d7ebe2111d24448dd85ace25fc9fdbef987a57d), [`7304c5b`](https://github.com/thirdweb-dev/js/commit/7304c5b0c7060080f302160dc9b24b2becc17524), [`a9ce10f`](https://github.com/thirdweb-dev/js/commit/a9ce10f39ad47f386e8086e230679093aab08754), [`321cf26`](https://github.com/thirdweb-dev/js/commit/321cf26342d0755204aa465bc2390e052d5ed071)]:
|
||||
- thirdweb@5.29.5
|
||||
- @thirdweb-dev/chains@0.1.120
|
||||
|
||||
## 4.0.97
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`79e6a04`](https://github.com/thirdweb-dev/js/commit/79e6a047d6ae6cb341fdad22137bd83ad6e611d4)]:
|
||||
- thirdweb@5.29.4
|
||||
|
||||
## 4.0.96
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`c94bcd5`](https://github.com/thirdweb-dev/js/commit/c94bcd574aa4eaf2bd76ab8b6379302de4731ed4), [`1c533ef`](https://github.com/thirdweb-dev/js/commit/1c533efcd5fbc8a72fd03c98510fa601ee5f34b5), [`ffaff74`](https://github.com/thirdweb-dev/js/commit/ffaff744f72d2cb22896e7501677b48f76ea857a), [`8b74602`](https://github.com/thirdweb-dev/js/commit/8b74602e3b7fbe011bf886b9d5ee0e2ea62f7447), [`9cf3a1d`](https://github.com/thirdweb-dev/js/commit/9cf3a1d6636fcd56559e889ab2bfe3249d51162a)]:
|
||||
- thirdweb@5.29.3
|
||||
- @thirdweb-dev/chains@0.1.119
|
||||
|
||||
## 4.0.95
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/sdk",
|
||||
"version": "4.0.95",
|
||||
"version": "4.0.98",
|
||||
"description": "The main thirdweb SDK.",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/sdk",
|
||||
"license": "Apache-2.0",
|
||||
@@ -129,7 +129,7 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@eth-optimism/sdk": "3.3.0",
|
||||
"@eth-optimism/sdk": "3.3.2",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/contracts-js": "workspace:*",
|
||||
"@thirdweb-dev/crypto": "workspace:*",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,36 @@
|
||||
# @thirdweb-dev/unity-js-bridge
|
||||
|
||||
## 0.6.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`321cf26`](https://github.com/thirdweb-dev/js/commit/321cf26342d0755204aa465bc2390e052d5ed071)]:
|
||||
- @thirdweb-dev/chains@0.1.120
|
||||
- @thirdweb-dev/sdk@4.0.98
|
||||
- @thirdweb-dev/wallets@2.5.38
|
||||
- @thirdweb-dev/auth@4.1.96
|
||||
|
||||
## 0.6.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.97
|
||||
- @thirdweb-dev/wallets@2.5.37
|
||||
- @thirdweb-dev/auth@4.1.95
|
||||
|
||||
## 0.6.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3317](https://github.com/thirdweb-dev/js/pull/3317) [`198f72c`](https://github.com/thirdweb-dev/js/commit/198f72c4933633d44185ff7b1d7e995e90c4d618) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - [Unity] fix tx builder type parsing
|
||||
|
||||
- Updated dependencies [[`8b74602`](https://github.com/thirdweb-dev/js/commit/8b74602e3b7fbe011bf886b9d5ee0e2ea62f7447)]:
|
||||
- @thirdweb-dev/chains@0.1.119
|
||||
- @thirdweb-dev/sdk@4.0.96
|
||||
- @thirdweb-dev/wallets@2.5.36
|
||||
- @thirdweb-dev/auth@4.1.94
|
||||
|
||||
## 0.6.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/unity-js-bridge",
|
||||
"version": "0.6.44",
|
||||
"version": "0.6.47",
|
||||
"main": "dist/thirdweb-unity-bridge.js",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -173,7 +173,7 @@ class ThirdwebBridge implements TWBridge {
|
||||
// biome-ignore lint/suspicious/noExplicitAny: TODO: fix use of any
|
||||
(globalThis as any).X_SDK_PLATFORM = "unity";
|
||||
// biome-ignore lint/suspicious/noExplicitAny: TODO: fix use of any
|
||||
(globalThis as any).X_SDK_VERSION = "4.16.3";
|
||||
(globalThis as any).X_SDK_VERSION = "4.16.4";
|
||||
// biome-ignore lint/suspicious/noExplicitAny: TODO: fix use of any
|
||||
(globalThis as any).X_SDK_OS = browser?.os ?? "unknown";
|
||||
}
|
||||
@@ -610,7 +610,9 @@ class ThirdwebBridge implements TWBridge {
|
||||
maxFeePerGas: txInput?.maxFeePerGas,
|
||||
maxPriorityFeePerGas: txInput?.maxPriorityFeePerGas,
|
||||
nonce: txInput?.nonce,
|
||||
type: txInput?.type?.toNumber(),
|
||||
type: txInput?.type
|
||||
? BigNumber.from(txInput.type).toNumber()
|
||||
: undefined,
|
||||
accessList: txInput?.accessList,
|
||||
// customData: txInput.data,
|
||||
// ccipReadEnabled: txInput.ccipReadEnabled,
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
# @thirdweb-dev/wallets
|
||||
|
||||
## 2.5.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`321cf26`](https://github.com/thirdweb-dev/js/commit/321cf26342d0755204aa465bc2390e052d5ed071)]:
|
||||
- @thirdweb-dev/chains@0.1.120
|
||||
- @thirdweb-dev/sdk@4.0.98
|
||||
|
||||
## 2.5.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.97
|
||||
|
||||
## 2.5.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`8b74602`](https://github.com/thirdweb-dev/js/commit/8b74602e3b7fbe011bf886b9d5ee0e2ea62f7447)]:
|
||||
- @thirdweb-dev/chains@0.1.119
|
||||
- @thirdweb-dev/sdk@4.0.96
|
||||
|
||||
## 2.5.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/wallets",
|
||||
"version": "2.5.35",
|
||||
"version": "2.5.38",
|
||||
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
||||
"module": "dist/thirdweb-dev-wallets.esm.js",
|
||||
"browser": {
|
||||
|
||||
Binary file not shown.
+9
-6
@@ -12,7 +12,7 @@
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"test": "turbo run test --filter=./packages/*",
|
||||
"test:legacy": "turbo run test --filter=./legacy_packages/* --filter=!sdk --filter=!auth",
|
||||
"test:legacy": "turbo run test --filter=./legacy_packages/* --filter=!@thirdweb-dev/sdk --filter=!@thirdweb-dev/auth",
|
||||
"e2e": "turbo run e2e --filter=./packages/*",
|
||||
"e2e:legacy": "turbo run e2e --filter=./legacy_packages/*",
|
||||
"build:packages": "turbo run build --filter=./packages/*",
|
||||
@@ -44,7 +44,7 @@
|
||||
"@manypkg/get-packages": "2.2.1",
|
||||
"@playwright/test": "1.31.2",
|
||||
"@types/node": "20.12.7",
|
||||
"turbo": "1.13.3",
|
||||
"turbo": "2.0.4",
|
||||
"yalc": "1.0.0-pre.53"
|
||||
},
|
||||
"_______ALL_PACKAGE_DEV_DEPENDENCIES_GO_IN_HERE_SO_CONSUMERS_DONT_END_UP_INSTALLING_THEM______": "_______ALL_PACKAGE_DEV_DEPENDENCIES_GO_IN_HERE_SO_CONSUMERS_DONT_END_UP_INSTALLING_THEM______",
|
||||
@@ -62,13 +62,13 @@
|
||||
"@viem/anvil": "0.0.9",
|
||||
"@vitest/coverage-v8": "1.5.0",
|
||||
"dotenv-mono": "1.3.14",
|
||||
"ethers5": "npm:[email protected]",
|
||||
"ethers6": "npm:[email protected]",
|
||||
"eslint-plugin-i18next": "^6.0.3",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-inclusive-language": "^2.2.1",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-tsdoc": "^0.2.17",
|
||||
"ethers5": "npm:[email protected]",
|
||||
"ethers6": "npm:[email protected]",
|
||||
"knip": "5.9.4",
|
||||
"mitata": "0.1.11",
|
||||
"react": "18.2.0",
|
||||
@@ -98,7 +98,10 @@
|
||||
"protobufjs@>=6.10.0 <7.2.4": ">=7.2.4",
|
||||
"tough-cookie@<4.1.3": ">=4.1.3",
|
||||
"@ethereumjs/util@<9.0.0": ">=9.0.0",
|
||||
"axios@<0.28.0": ">=0.28.0"
|
||||
"axios@<0.28.0": ">=0.28.0",
|
||||
"@grpc/grpc-js@<1.10.9": "1.10.9",
|
||||
"braces@<3.0.3": "3.0.3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"packageManager": "[email protected]"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# thirdweb
|
||||
|
||||
## 5.29.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3356](https://github.com/thirdweb-dev/js/pull/3356) [`2d7ebe2`](https://github.com/thirdweb-dev/js/commit/2d7ebe2111d24448dd85ace25fc9fdbef987a57d) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix ConnectButton theming prop
|
||||
|
||||
- [#3364](https://github.com/thirdweb-dev/js/pull/3364) [`7304c5b`](https://github.com/thirdweb-dev/js/commit/7304c5b0c7060080f302160dc9b24b2becc17524) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Respect coinbase wallet create settings when preloading the provider
|
||||
|
||||
- [#3347](https://github.com/thirdweb-dev/js/pull/3347) [`a9ce10f`](https://github.com/thirdweb-dev/js/commit/a9ce10f39ad47f386e8086e230679093aab08754) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Add ERC721 extension: updateMetadata
|
||||
|
||||
## 5.29.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3345](https://github.com/thirdweb-dev/js/pull/3345) [`79e6a04`](https://github.com/thirdweb-dev/js/commit/79e6a047d6ae6cb341fdad22137bd83ad6e611d4) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix react native inAppWallet creation
|
||||
|
||||
## 5.29.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3329](https://github.com/thirdweb-dev/js/pull/3329) [`c94bcd5`](https://github.com/thirdweb-dev/js/commit/c94bcd574aa4eaf2bd76ab8b6379302de4731ed4) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Dynamically import coinbase sdk to avoid cloudflare bundler issues
|
||||
|
||||
- [#3341](https://github.com/thirdweb-dev/js/pull/3341) [`1c533ef`](https://github.com/thirdweb-dev/js/commit/1c533efcd5fbc8a72fd03c98510fa601ee5f34b5) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix transaction button not respecting theme prop
|
||||
|
||||
- [#3298](https://github.com/thirdweb-dev/js/pull/3298) [`ffaff74`](https://github.com/thirdweb-dev/js/commit/ffaff744f72d2cb22896e7501677b48f76ea857a) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - refactor exports to handle native vs non-native dependencies
|
||||
|
||||
- [#3330](https://github.com/thirdweb-dev/js/pull/3330) [`9cf3a1d`](https://github.com/thirdweb-dev/js/commit/9cf3a1d6636fcd56559e889ab2bfe3249d51162a) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix coinbase wallet popup sometimes not opening on safari + improve inAppWallet web performance
|
||||
|
||||
## 5.29.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"version": "5.29.2",
|
||||
"version": "5.29.5",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/thirdweb-dev/js.git#main"
|
||||
@@ -68,7 +68,7 @@
|
||||
"./react": {
|
||||
"types": "./dist/types/exports/react.d.ts",
|
||||
"import": "./dist/esm/exports/react.js",
|
||||
"react-native": "./dist/esm/exports/react-native.js",
|
||||
"react-native": "./dist/esm/exports/react.native.js",
|
||||
"default": "./dist/cjs/exports/react.js"
|
||||
},
|
||||
"./react-native": {
|
||||
@@ -99,8 +99,15 @@
|
||||
"./wallets": {
|
||||
"types": "./dist/types/exports/wallets.d.ts",
|
||||
"import": "./dist/esm/exports/wallets.js",
|
||||
"react-native": "./dist/esm/exports/wallets.native.js",
|
||||
"default": "./dist/cjs/exports/wallets.js"
|
||||
},
|
||||
"./wallets/in-app": {
|
||||
"types": "./dist/types/exports/wallets/in-app.d.ts",
|
||||
"import": "./dist/esm/exports/wallets/in-app.js",
|
||||
"react-native": "./dist/esm/exports/wallets/in-app.native.js",
|
||||
"default": "./dist/cjs/exports/wallets/in-app.js"
|
||||
},
|
||||
"./wallets/*": {
|
||||
"types": "./dist/types/exports/wallets/*.d.ts",
|
||||
"import": "./dist/esm/exports/wallets/*.js",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[
|
||||
"function updateBatchBaseURI(uint256 _index, string calldata _uri)",
|
||||
"function freezeBatchBaseURI(uint256 _index)",
|
||||
"function setMaxTotalSupply(uint256 _maxTotalSupply)"
|
||||
]
|
||||
@@ -55,7 +55,7 @@ export async function generateFromAbi(
|
||||
events.map(async (e) => {
|
||||
await writeFile(
|
||||
join(outFolder, extensionFileName, "./events", `${e.name}.ts`),
|
||||
format(generateEvent(e, extensionName), {
|
||||
await format(generateEvent(e, extensionName), {
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
}),
|
||||
@@ -74,7 +74,7 @@ export async function generateFromAbi(
|
||||
readFunctions.map(async (f) => {
|
||||
await writeFile(
|
||||
join(outFolder, extensionFileName, "./read", `${f.name}.ts`),
|
||||
format(generateReadFunction(f, extensionName), {
|
||||
await format(generateReadFunction(f, extensionName), {
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
}),
|
||||
@@ -93,7 +93,7 @@ export async function generateFromAbi(
|
||||
writeFunctions.map(async (f) => {
|
||||
await writeFile(
|
||||
join(outFolder, extensionFileName, "./write", `${f.name}.ts`),
|
||||
format(generateWriteFunction(f, extensionName), {
|
||||
await format(generateWriteFunction(f, extensionName), {
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
}),
|
||||
|
||||
@@ -163,3 +163,7 @@ export {
|
||||
type BatchToReveal,
|
||||
getBatchesToReveal,
|
||||
} from "../../extensions/erc721/lazyMinting/read/getBatchesToReveal.js";
|
||||
export {
|
||||
updateMetadata,
|
||||
type UpdateMetadataParams,
|
||||
} from "../../extensions/erc721/drops/write/updateMetadata.js";
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
export { ThirdwebProvider } from "../react/core/providers/thirdweb-provider.js";
|
||||
|
||||
// react/core
|
||||
export {
|
||||
useSetActiveWallet,
|
||||
useActiveWalletChain,
|
||||
useConnect,
|
||||
useDisconnect,
|
||||
useActiveAccount,
|
||||
useActiveWallet,
|
||||
useConnectedWallets,
|
||||
useSwitchActiveWalletChain,
|
||||
useActiveWalletConnectionStatus,
|
||||
useSetActiveWalletConnectionStatus,
|
||||
useIsAutoConnecting,
|
||||
} from "../react/core/hooks/wallets/wallet-hooks.js";
|
||||
export { useWalletBalance } from "../react/core/hooks/others/useWalletBalance.js";
|
||||
|
||||
// contract related
|
||||
export { useReadContract } from "../react/core/hooks/contract/useReadContract.js";
|
||||
|
||||
export { useEstimateGas } from "../react/core/hooks/contract/useEstimateGas.js";
|
||||
export { useWaitForReceipt } from "../react/core/hooks/contract/useWaitForReceipt.js";
|
||||
export { useContractEvents } from "../react/core/hooks/contract/useContractEvents.js";
|
||||
|
||||
// rpc related
|
||||
export {
|
||||
useBlockNumber,
|
||||
type UseBlockNumberOptions,
|
||||
} from "../react/core/hooks/rpc/useBlockNumber.js";
|
||||
|
||||
// utils
|
||||
export { createContractQuery } from "../react/core/utils/createQuery.js";
|
||||
export { useInvalidateContractQuery } from "../react/core/hooks/others/useInvalidateQueries.js";
|
||||
|
||||
// pay
|
||||
export {
|
||||
useBuyWithCryptoQuote,
|
||||
type BuyWithCryptoQuoteQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyWithCryptoQuote.js";
|
||||
export { useBuyWithCryptoStatus } from "../react/core/hooks/pay/useBuyWithCryptoStatus.js";
|
||||
export {
|
||||
useBuyWithCryptoHistory,
|
||||
type BuyWithCryptoHistoryQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyWithCryptoHistory.js";
|
||||
export {
|
||||
useBuyWithFiatQuote,
|
||||
type BuyWithFiatQuoteQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyWithFiatQuote.js";
|
||||
export { useBuyWithFiatStatus } from "../react/core/hooks/pay/useBuyWithFiatStatus.js";
|
||||
export {
|
||||
useBuyWithFiatHistory,
|
||||
type BuyWithFiatHistoryQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyWithFiatHistory.js";
|
||||
export {
|
||||
useBuyHistory,
|
||||
type BuyHistoryQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyHistory.js";
|
||||
export {
|
||||
usePostOnRampQuote,
|
||||
type PostOnRampQuoteQueryOptions,
|
||||
} from "../react/core/hooks/pay/usePostOnrampQuote.js";
|
||||
|
||||
import { useSendTransactionCore } from "../react/core/hooks/contract/useSendTransaction.js";
|
||||
|
||||
/**
|
||||
* A hook to send a transaction.
|
||||
* @returns A mutation object to send a transaction.
|
||||
* @example
|
||||
* ```jsx
|
||||
* import { useSendTransaction } from "thirdweb/react-native";
|
||||
* const { mutate: sendTx, data: transactionResult } = useSendTransaction();
|
||||
*
|
||||
* // later
|
||||
* sendTx(tx);
|
||||
* ```
|
||||
* @transaction
|
||||
*/
|
||||
export const useSendTransaction = useSendTransactionCore;
|
||||
export { useSendBatchTransaction } from "../react/core/hooks/contract/useSendBatchTransaction.js";
|
||||
export { useSendAndConfirmTransaction } from "../react/core/hooks/contract/useSendAndConfirmTransaction.js";
|
||||
export { useEstimateGasCost } from "../react/core/hooks/contract/useEstimateGasCost.js";
|
||||
|
||||
// Components
|
||||
export {
|
||||
AutoConnect,
|
||||
type AutoConnectProps,
|
||||
} from "../react/core/hooks/connection/AutoConnect.js";
|
||||
export { useAutoConnect } from "../react/core/hooks/connection/useAutoConnect.js";
|
||||
|
||||
export { TransactionButton } from "../react/native/ui/TransactionButton/TrabsactionButton.js";
|
||||
export type { TransactionButtonProps } from "../react/core/hooks/transaction/button-core.js";
|
||||
|
||||
// wallet info
|
||||
export {
|
||||
useWalletInfo,
|
||||
useWalletImage,
|
||||
} from "../react/web/ui/hooks/useWalletInfo.js";
|
||||
@@ -0,0 +1,87 @@
|
||||
export { ThirdwebProvider } from "../react/core/providers/thirdweb-provider.js";
|
||||
|
||||
// wallet hooks
|
||||
export { useActiveWallet } from "../react/native/hooks/wallets/useActiveWallet.js";
|
||||
export { useActiveWalletChain } from "../react/native/hooks/wallets/useActiveWalletChain.js";
|
||||
export { useActiveWalletConnectionStatus } from "../react/native/hooks/wallets/useActiveWalletConnectionStatus.js";
|
||||
export { useActiveAccount } from "../react/native/hooks/wallets/useActiveAccount.js";
|
||||
export { useAutoConnect } from "../react/native/hooks/wallets/useAutoConnect.js";
|
||||
export { useCapabilities } from "../react/native/hooks/wallets/useCapabilities.js";
|
||||
export { useConnect } from "../react/native/hooks/wallets/useConnect.js";
|
||||
export { useConnectedWallets } from "../react/native/hooks/wallets/useConnectedWallets.js";
|
||||
export { useDisconnect } from "../react/native/hooks/wallets/useDisconnect.js";
|
||||
export { useIsAutoConnecting } from "../react/native/hooks/wallets/useIsAutoConnecting.js";
|
||||
export { useSetActiveWallet } from "../react/native/hooks/wallets/useSetActiveWallet.js";
|
||||
export { useSetActiveWalletConnectionStatus } from "../react/native/hooks/wallets/useSetActiveWalletConnectionStatus.js";
|
||||
export { useSendCalls } from "../react/native/hooks/wallets/useSendCalls.js";
|
||||
export { useSwitchActiveWalletChain } from "../react/native/hooks/wallets/useSwitchActiveWalletChain.js";
|
||||
export { useCallsStatus } from "../react/native/hooks/wallets/useCallsStatus.js";
|
||||
export { useWalletBalance } from "../react/core/hooks/others/useWalletBalance.js";
|
||||
|
||||
// contract
|
||||
export { useReadContract } from "../react/core/hooks/contract/useReadContract.js";
|
||||
export { useWaitForReceipt } from "../react/core/hooks/contract/useWaitForReceipt.js";
|
||||
export { useContractEvents } from "../react/core/hooks/contract/useContractEvents.js";
|
||||
|
||||
// transaction
|
||||
export {
|
||||
type SendTransactionConfig,
|
||||
type SendTransactionPayModalConfig,
|
||||
} from "../react/core/hooks/transaction/useSendTransaction.js";
|
||||
export { useSimulateTransaction } from "../react/core/hooks/transaction/useSimulateTransaction.js";
|
||||
export { useSendTransaction } from "../react/native/hooks/transaction/useSendTransaction.js";
|
||||
export { useSendBatchTransaction } from "../react/native/hooks/transaction/useSendBatchTransaction.js";
|
||||
export { useSendAndConfirmTransaction } from "../react/native/hooks/transaction/useSendAndConfirmTransaction.js";
|
||||
export { useEstimateGas } from "../react/native/hooks/transaction/useEstimateGas.js";
|
||||
export { useEstimateGasCost } from "../react/native/hooks/transaction/useEstimateGasCost.js";
|
||||
|
||||
// rpc related
|
||||
export {
|
||||
useBlockNumber,
|
||||
type UseBlockNumberOptions,
|
||||
} from "../react/core/hooks/rpc/useBlockNumber.js";
|
||||
|
||||
// utils
|
||||
export { createContractQuery } from "../react/core/utils/createQuery.js";
|
||||
export { useInvalidateContractQuery } from "../react/core/hooks/others/useInvalidateQueries.js";
|
||||
|
||||
// pay
|
||||
export {
|
||||
useBuyWithCryptoQuote,
|
||||
type BuyWithCryptoQuoteQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyWithCryptoQuote.js";
|
||||
export { useBuyWithCryptoStatus } from "../react/core/hooks/pay/useBuyWithCryptoStatus.js";
|
||||
export {
|
||||
useBuyWithCryptoHistory,
|
||||
type BuyWithCryptoHistoryQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyWithCryptoHistory.js";
|
||||
export {
|
||||
useBuyWithFiatQuote,
|
||||
type BuyWithFiatQuoteQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyWithFiatQuote.js";
|
||||
export { useBuyWithFiatStatus } from "../react/core/hooks/pay/useBuyWithFiatStatus.js";
|
||||
export {
|
||||
useBuyWithFiatHistory,
|
||||
type BuyWithFiatHistoryQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyWithFiatHistory.js";
|
||||
export {
|
||||
useBuyHistory,
|
||||
type BuyHistoryQueryOptions,
|
||||
} from "../react/core/hooks/pay/useBuyHistory.js";
|
||||
export {
|
||||
usePostOnRampQuote,
|
||||
type PostOnRampQuoteQueryOptions,
|
||||
} from "../react/core/hooks/pay/usePostOnrampQuote.js";
|
||||
|
||||
// Components
|
||||
export { AutoConnect } from "../react/native/ui/AutoConnect/AutoConnect.js";
|
||||
export type { AutoConnectProps } from "../react/core/hooks/connection/types.js";
|
||||
|
||||
export { TransactionButton } from "../react/native/ui/TransactionButton/TrabsactionButton.js";
|
||||
export type { TransactionButtonProps } from "../react/core/hooks/transaction/transaction-button-utils.js";
|
||||
|
||||
// wallet info
|
||||
export {
|
||||
useWalletInfo,
|
||||
useWalletImage,
|
||||
} from "../react/web/ui/hooks/useWalletInfo.js";
|
||||
@@ -22,7 +22,7 @@ export type { WelcomeScreen } from "../react/web/ui/ConnectWallet/screens/types.
|
||||
export type { LocaleId } from "../react/web/ui/types.js";
|
||||
|
||||
export { TransactionButton } from "../react/web/ui/TransactionButton/index.js";
|
||||
export type { TransactionButtonProps } from "../react/core/hooks/transaction/button-core.js";
|
||||
export type { TransactionButtonProps } from "../react/core/hooks/transaction/transaction-button-utils.js";
|
||||
|
||||
export { ThirdwebProvider } from "../react/core/providers/thirdweb-provider.js";
|
||||
|
||||
@@ -37,38 +37,43 @@ export { defaultTokens } from "../react/web/ui/ConnectWallet/defaultTokens.js";
|
||||
export { MediaRenderer } from "../react/web/ui/MediaRenderer/MediaRenderer.js";
|
||||
export type { MediaRendererProps } from "../react/web/ui/MediaRenderer/types.js";
|
||||
|
||||
// react/core
|
||||
export {
|
||||
useSetActiveWallet,
|
||||
useActiveWalletChain,
|
||||
useConnect,
|
||||
useDisconnect,
|
||||
useActiveAccount,
|
||||
useActiveWallet,
|
||||
useConnectedWallets,
|
||||
useSwitchActiveWalletChain,
|
||||
useActiveWalletConnectionStatus,
|
||||
useSetActiveWalletConnectionStatus,
|
||||
useIsAutoConnecting,
|
||||
} from "../react/core/hooks/wallets/wallet-hooks.js";
|
||||
// wallet hooks
|
||||
export { useActiveWallet } from "../react/web/hooks/wallets/useActiveWallet.js";
|
||||
export { useActiveWalletChain } from "../react/web/hooks/wallets/useActiveWalletChain.js";
|
||||
export { useActiveWalletConnectionStatus } from "../react/web/hooks/wallets/useActiveWalletConnectionStatus.js";
|
||||
export { useActiveAccount } from "../react/web/hooks/wallets/useActiveAccount.js";
|
||||
export { useAutoConnect } from "../react/web/hooks/wallets/useAutoConnect.js";
|
||||
export { useCapabilities } from "../react/web/hooks/wallets/useCapabilities.js";
|
||||
export { useConnect } from "../react/web/hooks/wallets/useConnect.js";
|
||||
export { useConnectedWallets } from "../react/web/hooks/wallets/useConnectedWallets.js";
|
||||
export { useDisconnect } from "../react/web/hooks/wallets/useDisconnect.js";
|
||||
export { useIsAutoConnecting } from "../react/web/hooks/wallets/useIsAutoConnecting.js";
|
||||
export { useSetActiveWallet } from "../react/web/hooks/wallets/useSetActiveWallet.js";
|
||||
export { useSetActiveWalletConnectionStatus } from "../react/web/hooks/wallets/useSetActiveWalletConnectionStatus.js";
|
||||
export { useSendCalls } from "../react/web/hooks/wallets/useSendCalls.js";
|
||||
export { useSwitchActiveWalletChain } from "../react/web/hooks/wallets/useSwitchActiveWalletChain.js";
|
||||
export { useCallsStatus } from "../react/web/hooks/wallets/useCallsStatus.js";
|
||||
export { useWalletBalance } from "../react/core/hooks/others/useWalletBalance.js";
|
||||
|
||||
export type { ConnectManagerOptions } from "../wallets/manager/index.js";
|
||||
|
||||
// contract related
|
||||
// contract
|
||||
export { useReadContract } from "../react/core/hooks/contract/useReadContract.js";
|
||||
export {
|
||||
useSendTransaction,
|
||||
type SendTransactionConfig,
|
||||
type SendTransactionPayModalConfig,
|
||||
} from "../react/web/hooks/useSendTransaction.js";
|
||||
export { useSendBatchTransaction } from "../react/core/hooks/contract/useSendBatchTransaction.js";
|
||||
export { useSendAndConfirmTransaction } from "../react/core/hooks/contract/useSendAndConfirmTransaction.js";
|
||||
export { useEstimateGas } from "../react/core/hooks/contract/useEstimateGas.js";
|
||||
export { useEstimateGasCost } from "../react/core/hooks/contract/useEstimateGasCost.js";
|
||||
export { useWaitForReceipt } from "../react/core/hooks/contract/useWaitForReceipt.js";
|
||||
export { useContractEvents } from "../react/core/hooks/contract/useContractEvents.js";
|
||||
|
||||
// transaction
|
||||
export {
|
||||
type SendTransactionConfig,
|
||||
type SendTransactionPayModalConfig,
|
||||
} from "../react/core/hooks/transaction/useSendTransaction.js";
|
||||
export { useSimulateTransaction } from "../react/core/hooks/transaction/useSimulateTransaction.js";
|
||||
export { useSendTransaction } from "../react/web/hooks/transaction/useSendTransaction.js";
|
||||
export { useSendBatchTransaction } from "../react/web/hooks/transaction/useSendBatchTransaction.js";
|
||||
export { useSendAndConfirmTransaction } from "../react/web/hooks/transaction/useSendAndConfirmTransaction.js";
|
||||
export { useEstimateGas } from "../react/web/hooks/transaction/useEstimateGas.js";
|
||||
export { useEstimateGasCost } from "../react/web/hooks/transaction/useEstimateGasCost.js";
|
||||
|
||||
// rpc related
|
||||
export {
|
||||
useBlockNumber,
|
||||
@@ -107,11 +112,8 @@ export {
|
||||
type PostOnRampQuoteQueryOptions,
|
||||
} from "../react/core/hooks/pay/usePostOnrampQuote.js";
|
||||
|
||||
export {
|
||||
AutoConnect,
|
||||
type AutoConnectProps,
|
||||
} from "../react/core/hooks/connection/AutoConnect.js";
|
||||
export { useAutoConnect } from "../react/core/hooks/connection/useAutoConnect.js";
|
||||
export { AutoConnect } from "../react/web/ui/AutoConnect/AutoConnect.js";
|
||||
export type { AutoConnectProps } from "../react/core/hooks/connection/types.js";
|
||||
|
||||
// auth
|
||||
export { type SiweAuthOptions } from "../react/core/hooks/auth/useSiweAuth.js";
|
||||
@@ -138,8 +140,3 @@ export {
|
||||
useWalletDetailsModal,
|
||||
type UseWalletDetailsModalOptions,
|
||||
} from "../react/web/ui/ConnectWallet/Details.js";
|
||||
|
||||
// eip5792 hooks
|
||||
export { useSendCalls } from "../react/core/hooks/wallets/useSendCalls.js";
|
||||
export { useCallsStatus } from "../react/core/hooks/wallets/useCallsStatus.js";
|
||||
export { useCapabilities } from "../react/core/hooks/wallets/useCapabilities.js";
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
// --- KEEEP IN SYNC with exports/wallets.ts ---
|
||||
|
||||
export {
|
||||
createWallet,
|
||||
walletConnect,
|
||||
} from "../wallets/native/create-wallet.js";
|
||||
export { inAppWallet } from "../wallets/in-app/native/in-app.js";
|
||||
export { smartWallet } from "../wallets/smart/smart-wallet.js";
|
||||
|
||||
export type { Wallet, Account } from "../wallets/interfaces/wallet.js";
|
||||
export type { ConnectionStatus } from "../wallets/manager/index.js";
|
||||
|
||||
// utils
|
||||
export {
|
||||
getWalletBalance,
|
||||
type GetWalletBalanceOptions,
|
||||
} from "../wallets/utils/getWalletBalance.js";
|
||||
export {
|
||||
generateAccount,
|
||||
type GenerateAccountOptions,
|
||||
} from "../wallets/utils/generateAccount.js";
|
||||
|
||||
// private-key
|
||||
export {
|
||||
privateKeyToAccount,
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated - use {@link privateKeyToAccount} instead
|
||||
*/
|
||||
privateKeyToAccount as privateKeyAccount,
|
||||
type PrivateKeyToAccountOptions,
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated - use {@link PrivateKeyToAccountOptions} instead
|
||||
*/
|
||||
type PrivateKeyToAccountOptions as PrivateKeyAccountOptions,
|
||||
} from "../wallets/private-key.js";
|
||||
|
||||
export type {
|
||||
WalletId,
|
||||
WalletAutoConnectionOption,
|
||||
WalletCreationOptions,
|
||||
WalletConnectionOption,
|
||||
CreateWalletArgs,
|
||||
} from "../wallets/wallet-types.js";
|
||||
|
||||
export type {
|
||||
WCSupportedWalletIds,
|
||||
InjectedSupportedWalletIds,
|
||||
} from "../wallets/__generated__/wallet-ids.js";
|
||||
|
||||
export type {
|
||||
WCConnectOptions,
|
||||
WCAutoConnectOptions,
|
||||
} from "../wallets/wallet-connect/types.js";
|
||||
|
||||
export type {
|
||||
SmartWalletConnectionOptions,
|
||||
SmartWalletOptions,
|
||||
} from "../wallets/smart/types.js";
|
||||
|
||||
export type {
|
||||
InAppWalletAuth,
|
||||
/**
|
||||
* @deprecated use InAppWalletAuth instead
|
||||
*/
|
||||
InAppWalletAuth as EmbeddedWalletAuth,
|
||||
InAppWalletAutoConnectOptions,
|
||||
/**
|
||||
* @deprecated use InAppWalletAutoConnectOptions instead
|
||||
*/
|
||||
InAppWalletAutoConnectOptions as EmbeddedWalletAutoConnectOptions,
|
||||
InAppWalletConnectionOptions,
|
||||
/**
|
||||
* @deprecated use InAppWalletConnectionOptions instead
|
||||
*/
|
||||
InAppWalletConnectionOptions as EmbeddedWalletConnectionOptions,
|
||||
InAppWalletSocialAuth,
|
||||
/**
|
||||
* @deprecated use InAppWalletSocialAuth instead
|
||||
*/
|
||||
InAppWalletSocialAuth as EmbeddedWalletSocialAuth,
|
||||
} from "../wallets/in-app/core/wallet/types.js";
|
||||
|
||||
export type { CoinbaseSDKWalletConnectionOptions } from "../wallets/coinbase/coinbaseWebSDK.js";
|
||||
|
||||
export type {
|
||||
WalletEmitter,
|
||||
WalletEmitterEvents,
|
||||
} from "../wallets/wallet-emitter.js";
|
||||
|
||||
export { getAllWalletsList } from "../wallets/getAllWalletsList.js";
|
||||
export { getWalletInfo } from "../wallets/__generated__/getWalletInfo.js";
|
||||
export { type WalletInfo } from "../wallets/wallet-info.js";
|
||||
|
||||
export { createWalletAdapter } from "../adapters/wallet-adapter.js";
|
||||
|
||||
// NOT SUPPORTED
|
||||
|
||||
export const injectedProvider = () => {
|
||||
throw new Error("Not supported in native");
|
||||
};
|
||||
@@ -1,13 +1,17 @@
|
||||
// --- KEEEP IN SYNC with exports/wallets.native.ts ---
|
||||
|
||||
export {
|
||||
createWallet,
|
||||
smartWallet,
|
||||
walletConnect,
|
||||
} from "../wallets/create-wallet.js";
|
||||
export {
|
||||
inAppWallet,
|
||||
/**
|
||||
* @deprecated use inAppWallet instead
|
||||
*/
|
||||
inAppWallet as embeddedWallet,
|
||||
walletConnect,
|
||||
} from "../wallets/create-wallet.js";
|
||||
} from "../wallets/in-app/web/in-app.js";
|
||||
export { smartWallet } from "../wallets/smart/smart-wallet.js";
|
||||
|
||||
export type { Wallet, Account } from "../wallets/interfaces/wallet.js";
|
||||
export type { ConnectionStatus } from "../wallets/manager/index.js";
|
||||
@@ -38,9 +42,6 @@ export {
|
||||
type PrivateKeyToAccountOptions as PrivateKeyAccountOptions,
|
||||
} from "../wallets/private-key.js";
|
||||
|
||||
// injected
|
||||
export { injectedProvider } from "../wallets/injected/mipdStore.js";
|
||||
|
||||
export type {
|
||||
WalletId,
|
||||
WalletAutoConnectionOption,
|
||||
@@ -87,7 +88,7 @@ export type {
|
||||
InAppWalletSocialAuth as EmbeddedWalletSocialAuth,
|
||||
} from "../wallets/in-app/core/wallet/types.js";
|
||||
|
||||
export type { CoinbaseSDKWalletConnectionOptions } from "../wallets/coinbase/coinbaseSDKWallet.js";
|
||||
export type { CoinbaseSDKWalletConnectionOptions } from "../wallets/coinbase/coinbaseWebSDK.js";
|
||||
|
||||
export type {
|
||||
WalletEmitter,
|
||||
@@ -99,3 +100,8 @@ export { getWalletInfo } from "../wallets/__generated__/getWalletInfo.js";
|
||||
export { type WalletInfo } from "../wallets/wallet-info.js";
|
||||
|
||||
export { createWalletAdapter } from "../adapters/wallet-adapter.js";
|
||||
|
||||
// WEB ONLY EXPORTS
|
||||
|
||||
// injected
|
||||
export { injectedProvider } from "../wallets/injected/mipdStore.js";
|
||||
|
||||
@@ -26,6 +26,3 @@ export type {
|
||||
GetCallsStatusResponse,
|
||||
WalletCallReceipt,
|
||||
} from "../../wallets/eip5792/types.js";
|
||||
export { useSendCalls } from "../../react/core/hooks/wallets/useSendCalls.js";
|
||||
export { useCallsStatus } from "../../react/core/hooks/wallets/useCallsStatus.js";
|
||||
export { useCapabilities } from "../../react/core/hooks/wallets/useCapabilities.js";
|
||||
|
||||
@@ -4,11 +4,12 @@ export {
|
||||
* @deprecated use inAppWallet instead
|
||||
*/
|
||||
inAppWallet as embeddedWallet,
|
||||
} from "../../wallets/create-wallet.js";
|
||||
} from "../../wallets/in-app/web/in-app.js";
|
||||
|
||||
export {
|
||||
preAuthenticate,
|
||||
authenticate,
|
||||
getUserEmail,
|
||||
type GetAuthenticatedUserParams,
|
||||
} from "../../wallets/in-app/core/authentication/index.js";
|
||||
} from "../../wallets/in-app/web/lib/auth/index.js";
|
||||
|
||||
export { type GetAuthenticatedUserParams } from "../../wallets/in-app/core/authentication/type.js";
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// --- KEEEP IN SYNC with exports/wallets/in-app.ts ---
|
||||
|
||||
export { inAppWallet } from "../../wallets/in-app/native/in-app.js";
|
||||
|
||||
export {
|
||||
preAuthenticate,
|
||||
authenticate,
|
||||
getUserEmail,
|
||||
getUserPhoneNumber,
|
||||
} from "../../wallets/in-app/native/auth/index.js";
|
||||
|
||||
export { type GetAuthenticatedUserParams } from "../../wallets/in-app/core/authentication/type.js";
|
||||
|
||||
// NOT SUPPORTED (yet)
|
||||
|
||||
export const hasStoredPasskey = () => {
|
||||
throw new Error("Not supported in native");
|
||||
};
|
||||
@@ -1,12 +1,15 @@
|
||||
export { inAppWallet } from "../../wallets/create-wallet.js";
|
||||
// --- KEEEP IN SYNC with exports/wallets/in-app.native.ts ---
|
||||
|
||||
export { inAppWallet } from "../../wallets/in-app/web/in-app.js";
|
||||
|
||||
export {
|
||||
preAuthenticate,
|
||||
authenticate,
|
||||
getUserEmail,
|
||||
getUserPhoneNumber,
|
||||
type GetAuthenticatedUserParams,
|
||||
} from "../../wallets/in-app/core/authentication/index.js";
|
||||
} from "../../wallets/in-app/web/lib/auth/index.js";
|
||||
|
||||
export { type GetAuthenticatedUserParams } from "../../wallets/in-app/core/authentication/type.js";
|
||||
|
||||
export { hasStoredPasskey } from "../../wallets/in-app/web/lib/auth/passkeys.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export { smartWallet } from "../../wallets/create-wallet.js";
|
||||
export { smartWallet } from "../../wallets/smart/smart-wallet.js";
|
||||
|
||||
export type {
|
||||
SmartWalletConnectionOptions,
|
||||
|
||||
Generated
+141
@@ -0,0 +1,141 @@
|
||||
import type { AbiParameterToPrimitiveType } from "abitype";
|
||||
import type {
|
||||
BaseTransactionOptions,
|
||||
WithOverrides,
|
||||
} from "../../../../../transaction/types.js";
|
||||
import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js";
|
||||
import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js";
|
||||
import { once } from "../../../../../utils/promise/once.js";
|
||||
import type { ThirdwebContract } from "../../../../../contract/contract.js";
|
||||
import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
|
||||
|
||||
/**
|
||||
* Represents the parameters for the "freezeBatchBaseURI" function.
|
||||
*/
|
||||
export type FreezeBatchBaseURIParams = WithOverrides<{
|
||||
index: AbiParameterToPrimitiveType<{ type: "uint256"; name: "_index" }>;
|
||||
}>;
|
||||
|
||||
export const FN_SELECTOR = "0xa07ced9e" as const;
|
||||
const FN_INPUTS = [
|
||||
{
|
||||
type: "uint256",
|
||||
name: "_index",
|
||||
},
|
||||
] as const;
|
||||
const FN_OUTPUTS = [] as const;
|
||||
|
||||
/**
|
||||
* Checks if the `freezeBatchBaseURI` method is supported by the given contract.
|
||||
* @param contract The ThirdwebContract.
|
||||
* @returns A promise that resolves to a boolean indicating if the `freezeBatchBaseURI` method is supported.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isFreezeBatchBaseURISupported } from "thirdweb/extensions/erc721";
|
||||
*
|
||||
* const supported = await isFreezeBatchBaseURISupported(contract);
|
||||
* ```
|
||||
*/
|
||||
export async function isFreezeBatchBaseURISupported(
|
||||
contract: ThirdwebContract<any>,
|
||||
) {
|
||||
return detectMethod({
|
||||
contract,
|
||||
method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the parameters for the "freezeBatchBaseURI" function.
|
||||
* @param options - The options for the freezeBatchBaseURI function.
|
||||
* @returns The encoded ABI parameters.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeFreezeBatchBaseURIParams } "thirdweb/extensions/erc721";
|
||||
* const result = encodeFreezeBatchBaseURIParams({
|
||||
* index: ...,
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function encodeFreezeBatchBaseURIParams(
|
||||
options: FreezeBatchBaseURIParams,
|
||||
) {
|
||||
return encodeAbiParameters(FN_INPUTS, [options.index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the "freezeBatchBaseURI" function into a Hex string with its parameters.
|
||||
* @param options - The options for the freezeBatchBaseURI function.
|
||||
* @returns The encoded hexadecimal string.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeFreezeBatchBaseURI } "thirdweb/extensions/erc721";
|
||||
* const result = encodeFreezeBatchBaseURI({
|
||||
* index: ...,
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function encodeFreezeBatchBaseURI(options: FreezeBatchBaseURIParams) {
|
||||
// we do a "manual" concat here to avoid the overhead of the "concatHex" function
|
||||
// we can do this because we know the specific formats of the values
|
||||
return (FN_SELECTOR +
|
||||
encodeFreezeBatchBaseURIParams(options).slice(
|
||||
2,
|
||||
)) as `${typeof FN_SELECTOR}${string}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares a transaction to call the "freezeBatchBaseURI" function on the contract.
|
||||
* @param options - The options for the "freezeBatchBaseURI" function.
|
||||
* @returns A prepared transaction object.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { freezeBatchBaseURI } from "thirdweb/extensions/erc721";
|
||||
*
|
||||
* const transaction = freezeBatchBaseURI({
|
||||
* contract,
|
||||
* index: ...,
|
||||
* overrides: {
|
||||
* ...
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
export function freezeBatchBaseURI(
|
||||
options: BaseTransactionOptions<
|
||||
| FreezeBatchBaseURIParams
|
||||
| {
|
||||
asyncParams: () => Promise<FreezeBatchBaseURIParams>;
|
||||
}
|
||||
>,
|
||||
) {
|
||||
const asyncOptions = once(async () => {
|
||||
return "asyncParams" in options ? await options.asyncParams() : options;
|
||||
});
|
||||
|
||||
return prepareContractCall({
|
||||
contract: options.contract,
|
||||
method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
|
||||
params: async () => {
|
||||
const resolvedOptions = await asyncOptions();
|
||||
return [resolvedOptions.index] as const;
|
||||
},
|
||||
value: async () => (await asyncOptions()).overrides?.value,
|
||||
accessList: async () => (await asyncOptions()).overrides?.accessList,
|
||||
gas: async () => (await asyncOptions()).overrides?.gas,
|
||||
gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
|
||||
maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
|
||||
maxPriorityFeePerGas: async () =>
|
||||
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
|
||||
nonce: async () => (await asyncOptions()).overrides?.nonce,
|
||||
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
|
||||
});
|
||||
}
|
||||
Generated
+144
@@ -0,0 +1,144 @@
|
||||
import type { AbiParameterToPrimitiveType } from "abitype";
|
||||
import type {
|
||||
BaseTransactionOptions,
|
||||
WithOverrides,
|
||||
} from "../../../../../transaction/types.js";
|
||||
import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js";
|
||||
import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js";
|
||||
import { once } from "../../../../../utils/promise/once.js";
|
||||
import type { ThirdwebContract } from "../../../../../contract/contract.js";
|
||||
import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
|
||||
|
||||
/**
|
||||
* Represents the parameters for the "setMaxTotalSupply" function.
|
||||
*/
|
||||
export type SetMaxTotalSupplyParams = WithOverrides<{
|
||||
maxTotalSupply: AbiParameterToPrimitiveType<{
|
||||
type: "uint256";
|
||||
name: "_maxTotalSupply";
|
||||
}>;
|
||||
}>;
|
||||
|
||||
export const FN_SELECTOR = "0x3f3e4c11" as const;
|
||||
const FN_INPUTS = [
|
||||
{
|
||||
type: "uint256",
|
||||
name: "_maxTotalSupply",
|
||||
},
|
||||
] as const;
|
||||
const FN_OUTPUTS = [] as const;
|
||||
|
||||
/**
|
||||
* Checks if the `setMaxTotalSupply` method is supported by the given contract.
|
||||
* @param contract The ThirdwebContract.
|
||||
* @returns A promise that resolves to a boolean indicating if the `setMaxTotalSupply` method is supported.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isSetMaxTotalSupplySupported } from "thirdweb/extensions/erc721";
|
||||
*
|
||||
* const supported = await isSetMaxTotalSupplySupported(contract);
|
||||
* ```
|
||||
*/
|
||||
export async function isSetMaxTotalSupplySupported(
|
||||
contract: ThirdwebContract<any>,
|
||||
) {
|
||||
return detectMethod({
|
||||
contract,
|
||||
method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the parameters for the "setMaxTotalSupply" function.
|
||||
* @param options - The options for the setMaxTotalSupply function.
|
||||
* @returns The encoded ABI parameters.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetMaxTotalSupplyParams } "thirdweb/extensions/erc721";
|
||||
* const result = encodeSetMaxTotalSupplyParams({
|
||||
* maxTotalSupply: ...,
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function encodeSetMaxTotalSupplyParams(
|
||||
options: SetMaxTotalSupplyParams,
|
||||
) {
|
||||
return encodeAbiParameters(FN_INPUTS, [options.maxTotalSupply]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the "setMaxTotalSupply" function into a Hex string with its parameters.
|
||||
* @param options - The options for the setMaxTotalSupply function.
|
||||
* @returns The encoded hexadecimal string.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetMaxTotalSupply } "thirdweb/extensions/erc721";
|
||||
* const result = encodeSetMaxTotalSupply({
|
||||
* maxTotalSupply: ...,
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function encodeSetMaxTotalSupply(options: SetMaxTotalSupplyParams) {
|
||||
// we do a "manual" concat here to avoid the overhead of the "concatHex" function
|
||||
// we can do this because we know the specific formats of the values
|
||||
return (FN_SELECTOR +
|
||||
encodeSetMaxTotalSupplyParams(options).slice(
|
||||
2,
|
||||
)) as `${typeof FN_SELECTOR}${string}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares a transaction to call the "setMaxTotalSupply" function on the contract.
|
||||
* @param options - The options for the "setMaxTotalSupply" function.
|
||||
* @returns A prepared transaction object.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { setMaxTotalSupply } from "thirdweb/extensions/erc721";
|
||||
*
|
||||
* const transaction = setMaxTotalSupply({
|
||||
* contract,
|
||||
* maxTotalSupply: ...,
|
||||
* overrides: {
|
||||
* ...
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
export function setMaxTotalSupply(
|
||||
options: BaseTransactionOptions<
|
||||
| SetMaxTotalSupplyParams
|
||||
| {
|
||||
asyncParams: () => Promise<SetMaxTotalSupplyParams>;
|
||||
}
|
||||
>,
|
||||
) {
|
||||
const asyncOptions = once(async () => {
|
||||
return "asyncParams" in options ? await options.asyncParams() : options;
|
||||
});
|
||||
|
||||
return prepareContractCall({
|
||||
contract: options.contract,
|
||||
method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
|
||||
params: async () => {
|
||||
const resolvedOptions = await asyncOptions();
|
||||
return [resolvedOptions.maxTotalSupply] as const;
|
||||
},
|
||||
value: async () => (await asyncOptions()).overrides?.value,
|
||||
accessList: async () => (await asyncOptions()).overrides?.accessList,
|
||||
gas: async () => (await asyncOptions()).overrides?.gas,
|
||||
gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
|
||||
maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
|
||||
maxPriorityFeePerGas: async () =>
|
||||
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
|
||||
nonce: async () => (await asyncOptions()).overrides?.nonce,
|
||||
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
|
||||
});
|
||||
}
|
||||
Generated
+149
@@ -0,0 +1,149 @@
|
||||
import type { AbiParameterToPrimitiveType } from "abitype";
|
||||
import type {
|
||||
BaseTransactionOptions,
|
||||
WithOverrides,
|
||||
} from "../../../../../transaction/types.js";
|
||||
import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js";
|
||||
import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js";
|
||||
import { once } from "../../../../../utils/promise/once.js";
|
||||
import type { ThirdwebContract } from "../../../../../contract/contract.js";
|
||||
import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
|
||||
|
||||
/**
|
||||
* Represents the parameters for the "updateBatchBaseURI" function.
|
||||
*/
|
||||
export type UpdateBatchBaseURIParams = WithOverrides<{
|
||||
index: AbiParameterToPrimitiveType<{ type: "uint256"; name: "_index" }>;
|
||||
uri: AbiParameterToPrimitiveType<{ type: "string"; name: "_uri" }>;
|
||||
}>;
|
||||
|
||||
export const FN_SELECTOR = "0xde903ddd" as const;
|
||||
const FN_INPUTS = [
|
||||
{
|
||||
type: "uint256",
|
||||
name: "_index",
|
||||
},
|
||||
{
|
||||
type: "string",
|
||||
name: "_uri",
|
||||
},
|
||||
] as const;
|
||||
const FN_OUTPUTS = [] as const;
|
||||
|
||||
/**
|
||||
* Checks if the `updateBatchBaseURI` method is supported by the given contract.
|
||||
* @param contract The ThirdwebContract.
|
||||
* @returns A promise that resolves to a boolean indicating if the `updateBatchBaseURI` method is supported.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isUpdateBatchBaseURISupported } from "thirdweb/extensions/erc721";
|
||||
*
|
||||
* const supported = await isUpdateBatchBaseURISupported(contract);
|
||||
* ```
|
||||
*/
|
||||
export async function isUpdateBatchBaseURISupported(
|
||||
contract: ThirdwebContract<any>,
|
||||
) {
|
||||
return detectMethod({
|
||||
contract,
|
||||
method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the parameters for the "updateBatchBaseURI" function.
|
||||
* @param options - The options for the updateBatchBaseURI function.
|
||||
* @returns The encoded ABI parameters.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeUpdateBatchBaseURIParams } "thirdweb/extensions/erc721";
|
||||
* const result = encodeUpdateBatchBaseURIParams({
|
||||
* index: ...,
|
||||
* uri: ...,
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function encodeUpdateBatchBaseURIParams(
|
||||
options: UpdateBatchBaseURIParams,
|
||||
) {
|
||||
return encodeAbiParameters(FN_INPUTS, [options.index, options.uri]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the "updateBatchBaseURI" function into a Hex string with its parameters.
|
||||
* @param options - The options for the updateBatchBaseURI function.
|
||||
* @returns The encoded hexadecimal string.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeUpdateBatchBaseURI } "thirdweb/extensions/erc721";
|
||||
* const result = encodeUpdateBatchBaseURI({
|
||||
* index: ...,
|
||||
* uri: ...,
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function encodeUpdateBatchBaseURI(options: UpdateBatchBaseURIParams) {
|
||||
// we do a "manual" concat here to avoid the overhead of the "concatHex" function
|
||||
// we can do this because we know the specific formats of the values
|
||||
return (FN_SELECTOR +
|
||||
encodeUpdateBatchBaseURIParams(options).slice(
|
||||
2,
|
||||
)) as `${typeof FN_SELECTOR}${string}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares a transaction to call the "updateBatchBaseURI" function on the contract.
|
||||
* @param options - The options for the "updateBatchBaseURI" function.
|
||||
* @returns A prepared transaction object.
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { updateBatchBaseURI } from "thirdweb/extensions/erc721";
|
||||
*
|
||||
* const transaction = updateBatchBaseURI({
|
||||
* contract,
|
||||
* index: ...,
|
||||
* uri: ...,
|
||||
* overrides: {
|
||||
* ...
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
export function updateBatchBaseURI(
|
||||
options: BaseTransactionOptions<
|
||||
| UpdateBatchBaseURIParams
|
||||
| {
|
||||
asyncParams: () => Promise<UpdateBatchBaseURIParams>;
|
||||
}
|
||||
>,
|
||||
) {
|
||||
const asyncOptions = once(async () => {
|
||||
return "asyncParams" in options ? await options.asyncParams() : options;
|
||||
});
|
||||
|
||||
return prepareContractCall({
|
||||
contract: options.contract,
|
||||
method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
|
||||
params: async () => {
|
||||
const resolvedOptions = await asyncOptions();
|
||||
return [resolvedOptions.index, resolvedOptions.uri] as const;
|
||||
},
|
||||
value: async () => (await asyncOptions()).overrides?.value,
|
||||
accessList: async () => (await asyncOptions()).overrides?.accessList,
|
||||
gas: async () => (await asyncOptions()).overrides?.gas,
|
||||
gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
|
||||
maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
|
||||
maxPriorityFeePerGas: async () =>
|
||||
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
|
||||
nonce: async () => (await asyncOptions()).overrides?.nonce,
|
||||
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { ANVIL_CHAIN } from "~test/chains.js";
|
||||
import { TEST_CLIENT } from "~test/test-clients.js";
|
||||
import { TEST_ACCOUNT_A } from "~test/test-wallets.js";
|
||||
|
||||
import {
|
||||
type ThirdwebContract,
|
||||
getContract,
|
||||
} from "../../../../contract/contract.js";
|
||||
import { deployERC721Contract } from "../../../../extensions/prebuilts/deploy-erc721.js";
|
||||
import { sendAndConfirmTransaction } from "../../../../transaction/actions/send-and-confirm-transaction.js";
|
||||
import type { NFTInput } from "../../../../utils/nft/parseNft.js";
|
||||
import { getNFT } from "../../read/getNFT.js";
|
||||
import { getNFTs } from "../../read/getNFTs.js";
|
||||
import { lazyMint } from "../../write/lazyMint.js";
|
||||
import { getUpdateMetadataParams, updateMetadata } from "./updateMetadata.js";
|
||||
|
||||
let contract: ThirdwebContract;
|
||||
const account = TEST_ACCOUNT_A;
|
||||
const client = TEST_CLIENT;
|
||||
const chain = ANVIL_CHAIN;
|
||||
|
||||
describe("erc721: updateMetadata", () => {
|
||||
beforeEach(async () => {
|
||||
const address = await deployERC721Contract({
|
||||
client,
|
||||
chain,
|
||||
account,
|
||||
type: "DropERC721",
|
||||
params: {
|
||||
name: "NFTDrop",
|
||||
},
|
||||
});
|
||||
contract = getContract({
|
||||
address,
|
||||
client,
|
||||
chain,
|
||||
});
|
||||
});
|
||||
|
||||
it("should update the metadata for the selected token | case 1", async () => {
|
||||
const metadatas: NFTInput[] = [
|
||||
{ name: "token 0" },
|
||||
{ name: "token 1" },
|
||||
{ name: "token 2" },
|
||||
];
|
||||
|
||||
const lazyMintTx = lazyMint({ contract, nfts: metadatas });
|
||||
await sendAndConfirmTransaction({ transaction: lazyMintTx, account });
|
||||
|
||||
const transaction = updateMetadata({
|
||||
contract,
|
||||
targetTokenId: 0n,
|
||||
newMetadata: { name: "token 0 - updated" },
|
||||
client,
|
||||
});
|
||||
await sendAndConfirmTransaction({ transaction, account });
|
||||
const nfts = await getNFTs({ contract });
|
||||
expect(nfts[0]?.metadata.name).toBe("token 0 - updated");
|
||||
|
||||
// The other tokens should not change
|
||||
expect(nfts[1]?.metadata.name).toBe("token 1");
|
||||
expect(nfts[2]?.metadata.name).toBe("token 2");
|
||||
});
|
||||
|
||||
it("should update the metadata for the selected token | case 2", async () => {
|
||||
const nftBatch1: NFTInput[] = [
|
||||
{ name: "token 0" },
|
||||
{ name: "token 1" },
|
||||
{ name: "token 2" },
|
||||
];
|
||||
|
||||
const batch1 = lazyMint({ contract, nfts: nftBatch1 });
|
||||
await sendAndConfirmTransaction({ transaction: batch1, account });
|
||||
|
||||
const nftBatch2: NFTInput[] = [
|
||||
{ name: "token 3" },
|
||||
{ name: "token 4" },
|
||||
{ name: "token 5" },
|
||||
];
|
||||
const batch2 = lazyMint({ contract, nfts: nftBatch2 });
|
||||
await sendAndConfirmTransaction({ transaction: batch2, account });
|
||||
|
||||
// firstly, update the token in the first batch
|
||||
const transaction1 = updateMetadata({
|
||||
contract,
|
||||
targetTokenId: 0n,
|
||||
newMetadata: { name: "token 0 - updated" },
|
||||
client,
|
||||
});
|
||||
await sendAndConfirmTransaction({ transaction: transaction1, account });
|
||||
const nft = await getNFT({ contract, tokenId: 0n });
|
||||
expect(nft.metadata.name).toBe("token 0 - updated");
|
||||
|
||||
const tokenUriAfterUpdatedFirstTime = nft.tokenURI;
|
||||
|
||||
// Update token in the second batch
|
||||
const transaction2 = updateMetadata({
|
||||
contract,
|
||||
targetTokenId: 5n,
|
||||
newMetadata: { name: "token 5 - updated" },
|
||||
client,
|
||||
});
|
||||
await sendAndConfirmTransaction({ transaction: transaction2, account });
|
||||
|
||||
const allNfts = await getNFTs({ contract });
|
||||
expect(allNfts[0]?.metadata.name).toBe("token 0 - updated");
|
||||
expect(allNfts.at(-1)?.metadata.name).toBe("token 5 - updated");
|
||||
|
||||
// The tokenUri of tokenId#0 after the second updateMetadata should still be the same
|
||||
// since it belong to another batch
|
||||
expect(allNfts[0]?.tokenURI).toBe(tokenUriAfterUpdatedFirstTime);
|
||||
});
|
||||
|
||||
it("should throw error if there's no batch", async () => {
|
||||
await expect(() =>
|
||||
getUpdateMetadataParams({
|
||||
contract,
|
||||
targetTokenId: 0n,
|
||||
newMetadata: { name: "token 0 - updated" },
|
||||
client,
|
||||
}),
|
||||
).rejects.toThrowError(
|
||||
"No base URI set. Please set a base URI before updating metadata",
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,123 @@
|
||||
import type { ThirdwebClient } from "../../../../client/client.js";
|
||||
import type { BaseTransactionOptions } from "../../../../transaction/types.js";
|
||||
import type { NFT, NFTInput } from "../../../../utils/nft/parseNft.js";
|
||||
import {
|
||||
type UpdateBatchBaseURIParams,
|
||||
updateBatchBaseURI,
|
||||
} from "../../__generated__/DropERC721/write/updateBatchBaseURI.js";
|
||||
import { getBaseURICount } from "../../__generated__/IBatchMintMetadata/read/getBaseURICount.js";
|
||||
|
||||
export type UpdateMetadataParams = {
|
||||
targetTokenId: bigint;
|
||||
newMetadata: NFTInput;
|
||||
client: ThirdwebClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export async function getUpdateMetadataParams(
|
||||
options: BaseTransactionOptions<UpdateMetadataParams>,
|
||||
): Promise<UpdateBatchBaseURIParams> {
|
||||
const { contract, targetTokenId, newMetadata, client } = options;
|
||||
const batchCount = await getBaseURICount(options);
|
||||
if (batchCount === 0n) {
|
||||
throw new Error(
|
||||
"No base URI set. Please set a base URI before updating metadata",
|
||||
);
|
||||
}
|
||||
|
||||
// Look for the batchId & determine the start + end tokenId of the batch
|
||||
const [{ getBatchIdAtIndex }, { getNFT }] = await Promise.all([
|
||||
import("../../__generated__/IBatchMintMetadata/read/getBatchIdAtIndex.js"),
|
||||
import("../../read/getNFT.js"),
|
||||
]);
|
||||
let startTokenId = 0n;
|
||||
let endTokenId = 0n;
|
||||
let batchIndex = 0n;
|
||||
for (let i = 0n; i < batchCount; i += 1n) {
|
||||
batchIndex = i;
|
||||
endTokenId = await getBatchIdAtIndex({ contract, index: batchIndex });
|
||||
if (endTokenId > targetTokenId) {
|
||||
break;
|
||||
}
|
||||
startTokenId = endTokenId;
|
||||
}
|
||||
|
||||
const range = Array.from(
|
||||
{ length: Number(endTokenId - startTokenId) },
|
||||
(_, k) => BigInt(k) + startTokenId,
|
||||
);
|
||||
|
||||
const currentMetadatas = await Promise.all(
|
||||
range.map((id) => getNFT({ contract, tokenId: id, includeOwner: false })),
|
||||
);
|
||||
|
||||
// Abort if any of the items failed to load
|
||||
if (currentMetadatas.some((item) => item === undefined || !item.tokenURI)) {
|
||||
throw new Error(
|
||||
`Failed to load all ${range.length} items from batchIndex: ${batchIndex}`,
|
||||
);
|
||||
}
|
||||
|
||||
const newMetadatas: NFTInput[] = [];
|
||||
for (let i = 0; i < currentMetadatas.length; i++) {
|
||||
const { id, metadata } = currentMetadatas[i] as NFT;
|
||||
if (targetTokenId === id) {
|
||||
newMetadatas.push(newMetadata);
|
||||
} else {
|
||||
newMetadatas.push(metadata);
|
||||
}
|
||||
}
|
||||
|
||||
const { uploadOrExtractURIs } = await import("../../../../utils/ipfs.js");
|
||||
const batchOfUris = await uploadOrExtractURIs(
|
||||
newMetadatas,
|
||||
client,
|
||||
Number(startTokenId),
|
||||
);
|
||||
|
||||
if (!batchOfUris || !batchOfUris.length || !batchOfUris[0]) {
|
||||
throw new Error("Failed to upload batch of new metadatas");
|
||||
}
|
||||
|
||||
const baseUri = batchOfUris[0].substring(0, batchOfUris[0].lastIndexOf("/"));
|
||||
|
||||
// IMPORTANT: The new ipfs URI must have the trailing slash at the end
|
||||
// this is required by the Drop contract
|
||||
const uri = `${baseUri}/`;
|
||||
|
||||
return { index: batchIndex, uri };
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the metadata of the single token in an NFT Drop (DropERC721) collection
|
||||
* For NFT Collection, please use `setTokenURI`
|
||||
* @param options
|
||||
* @returns the prepared transaction
|
||||
* @extension ERC721
|
||||
* @example
|
||||
* ```ts
|
||||
* import { updateMetadata } from "thirdweb/extensions/erc721";
|
||||
*
|
||||
* const transaction = updateMetadata({
|
||||
* contract,
|
||||
* targetTokenId: 0n,
|
||||
* newMetadata: {
|
||||
* name: "this is the new nft name",
|
||||
* description: "...",
|
||||
* image: "new image uri"
|
||||
* // ...
|
||||
* }
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function updateMetadata(
|
||||
options: BaseTransactionOptions<UpdateMetadataParams>,
|
||||
) {
|
||||
const { contract } = options;
|
||||
return updateBatchBaseURI({
|
||||
contract,
|
||||
asyncParams: async () => getUpdateMetadataParams(options),
|
||||
});
|
||||
}
|
||||
@@ -1,6 +1,14 @@
|
||||
import { createConnectionManager } from "../../wallets/manager/index.js";
|
||||
import { getStorage } from "./storage.js";
|
||||
import type { AsyncStorage } from "../../utils/storage/AsyncStorage.js";
|
||||
import {
|
||||
type ConnectionManager,
|
||||
createConnectionManager,
|
||||
} from "../../wallets/manager/index.js";
|
||||
|
||||
export const connectionManager = /* @__PURE__ */ createConnectionManager(
|
||||
/* @__PURE__ */ getStorage(),
|
||||
);
|
||||
let _connectManager: ConnectionManager;
|
||||
|
||||
export function connectionManagerSingleton(storage: AsyncStorage) {
|
||||
if (_connectManager) {
|
||||
return _connectManager;
|
||||
}
|
||||
return createConnectionManager(storage);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export function CustomThemeProvider(props: {
|
||||
}
|
||||
|
||||
export function parseTheme(theme: "light" | "dark" | Theme | undefined): Theme {
|
||||
if (!theme) {
|
||||
if (!theme || !isValidTheme(theme)) {
|
||||
return darkThemeObj;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,14 @@ export function parseTheme(theme: "light" | "dark" | Theme | undefined): Theme {
|
||||
return themeObj;
|
||||
}
|
||||
|
||||
export function isValidTheme(theme: unknown): theme is Theme {
|
||||
return (
|
||||
theme === "dark" ||
|
||||
theme === "light" ||
|
||||
(typeof theme === "object" && theme !== null && "colors" in theme)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @internal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import type { LoginPayload } from "../../../../auth/core/types.js";
|
||||
import type { VerifyLoginPayloadParams } from "../../../../auth/core/verify-login-payload.js";
|
||||
import { useActiveWallet } from "../../../core/hooks/wallets/wallet-hooks.js";
|
||||
import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
|
||||
|
||||
/**
|
||||
* Options for Setting up SIWE (Sign in with Ethereum) Authentication
|
||||
@@ -46,8 +46,10 @@ export type SiweAuthOptions = {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function useSiweAuth(authOptions?: SiweAuthOptions) {
|
||||
const activeWallet = useActiveWallet();
|
||||
export function useSiweAuth(
|
||||
activeWallet?: Wallet,
|
||||
authOptions?: SiweAuthOptions,
|
||||
) {
|
||||
const activeAccount = activeWallet?.getAccount();
|
||||
|
||||
const requiresAuth = !!authOptions;
|
||||
|
||||
-58
@@ -1,11 +1,7 @@
|
||||
"use client";
|
||||
import { useEffect } from "react";
|
||||
import type { ThirdwebClient } from "../../../../client/client.js";
|
||||
import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
|
||||
import type { SmartWalletOptions } from "../../../../wallets/smart/types.js";
|
||||
import type { AppMetadata } from "../../../../wallets/types.js";
|
||||
import { useSetActiveWalletConnectionStatus } from "../wallets/wallet-hooks.js";
|
||||
import { useAutoConnect } from "./useAutoConnect.js";
|
||||
|
||||
export type AutoConnectProps = {
|
||||
/**
|
||||
@@ -112,57 +108,3 @@ export type AutoConnectProps = {
|
||||
*/
|
||||
onConnect?: (wallet: Wallet) => void;
|
||||
};
|
||||
|
||||
/**
|
||||
* AutoConnect last connected wallet on page reload or revisit.
|
||||
* Note: If you are using `ConnectButton` or `ConnectEmbed` components, You don't need to use this component as it is already included.
|
||||
*
|
||||
* This is useful if you are manually connecting the wallets using the [`useConnect`](https://portal.thirdweb.com/references/typescript/v5/useConnect) hook and want to auto connect the last connected wallets on page reload or revisit.
|
||||
* @param props - Object of type `AutoConnectProps`. Refer to [`AutoConnectProps`](https://portal.thirdweb.com/references/typescript/v5/AutoConnectProps)
|
||||
* @example
|
||||
* ```tsx
|
||||
* import { AutoConnect } from "thirdweb/react";
|
||||
* import { createWallet, inAppWallet } from "thirdweb/wallets";
|
||||
*
|
||||
*
|
||||
* // list of wallets that your app uses
|
||||
* const wallets = [
|
||||
* inAppWallet(),
|
||||
* createWallet('io.metamask'),
|
||||
* createWallet("me.rainbow"),
|
||||
* ]
|
||||
*
|
||||
* function Example() {
|
||||
* return (
|
||||
* <AutoConnect
|
||||
* wallets={wallets}
|
||||
* client={client}
|
||||
* appMetadata={appMetadata}
|
||||
* />
|
||||
* );
|
||||
* }
|
||||
* ```
|
||||
* @component
|
||||
*/
|
||||
export function AutoConnect(props: AutoConnectProps) {
|
||||
useAutoConnect(props);
|
||||
return <></>;
|
||||
}
|
||||
|
||||
let noAutoConnectDone = false;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function NoAutoConnect() {
|
||||
const setConnectionStatus = useSetActiveWalletConnectionStatus();
|
||||
useEffect(() => {
|
||||
if (noAutoConnectDone) {
|
||||
return;
|
||||
}
|
||||
noAutoConnectDone = true;
|
||||
setConnectionStatus("disconnected");
|
||||
});
|
||||
|
||||
return null;
|
||||
}
|
||||
+36
-48
@@ -1,4 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import type { TransactionReceipt } from "viem";
|
||||
import type { GaslessOptions } from "../../../../transaction/actions/gasless/types.js";
|
||||
import {
|
||||
@@ -7,12 +7,11 @@ import {
|
||||
} from "../../../../transaction/actions/wait-for-tx-receipt.js";
|
||||
import type { PreparedTransaction } from "../../../../transaction/prepare-transaction.js";
|
||||
import { stringify } from "../../../../utils/json.js";
|
||||
import {
|
||||
type SendTransactionPayModalConfig,
|
||||
useSendTransaction,
|
||||
} from "../../../web/hooks/useSendTransaction.js";
|
||||
import type { Theme } from "../../design-system/index.js";
|
||||
import { useActiveAccount } from "../wallets/wallet-hooks.js";
|
||||
import type {
|
||||
SendTransactionPayModalConfig,
|
||||
useSendTransactionCore,
|
||||
} from "./useSendTransaction.js";
|
||||
|
||||
/**
|
||||
* Props for the [`TransactionButton`](https://portal.thirdweb.com/references/typescript/v5/TransactionButton) component.
|
||||
@@ -103,56 +102,45 @@ export type TransactionButtonProps = {
|
||||
theme?: "dark" | "light" | Theme;
|
||||
};
|
||||
|
||||
export function useTransactionButtonCore(props: TransactionButtonProps) {
|
||||
export const useTransactionButtonMutation = (
|
||||
props: TransactionButtonProps,
|
||||
sendTransactionFn: ReturnType<typeof useSendTransactionCore>["mutateAsync"],
|
||||
) => {
|
||||
const {
|
||||
transaction,
|
||||
onTransactionSent,
|
||||
onTransactionConfirmed,
|
||||
onError,
|
||||
onClick,
|
||||
gasless,
|
||||
payModal,
|
||||
} = props;
|
||||
const account = useActiveAccount();
|
||||
const [isPending, setIsPending] = useState(false);
|
||||
|
||||
const sendTransaction = useSendTransaction({
|
||||
gasless,
|
||||
payModal,
|
||||
});
|
||||
|
||||
const handleClick = async () => {
|
||||
if (onClick) {
|
||||
onClick();
|
||||
}
|
||||
try {
|
||||
setIsPending(true);
|
||||
const resolvedTx = await transaction();
|
||||
const result = await sendTransaction.mutateAsync(resolvedTx);
|
||||
|
||||
if (onTransactionSent) {
|
||||
onTransactionSent(result);
|
||||
return useMutation({
|
||||
mutationFn: async () => {
|
||||
if (onClick) {
|
||||
onClick();
|
||||
}
|
||||
try {
|
||||
const resolvedTx = await transaction();
|
||||
const result = await sendTransactionFn(resolvedTx);
|
||||
|
||||
if (onTransactionConfirmed) {
|
||||
const receipt = await waitForReceipt(result);
|
||||
if (receipt.status === "reverted") {
|
||||
throw new Error(`Execution reverted: ${stringify(receipt, null, 2)}`);
|
||||
if (onTransactionSent) {
|
||||
onTransactionSent(result);
|
||||
}
|
||||
onTransactionConfirmed(receipt);
|
||||
}
|
||||
} catch (error) {
|
||||
if (onError) {
|
||||
onError(error as Error);
|
||||
}
|
||||
} finally {
|
||||
setIsPending(false);
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
account,
|
||||
handleClick,
|
||||
isPending,
|
||||
};
|
||||
}
|
||||
if (onTransactionConfirmed) {
|
||||
const receipt = await waitForReceipt(result);
|
||||
if (receipt.status === "reverted") {
|
||||
throw new Error(
|
||||
`Execution reverted: ${stringify(receipt, null, 2)}`,
|
||||
);
|
||||
}
|
||||
onTransactionConfirmed(receipt);
|
||||
}
|
||||
} catch (error) {
|
||||
if (onError) {
|
||||
onError(error as Error);
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
import { type UseMutationResult, useMutation } from "@tanstack/react-query";
|
||||
import {
|
||||
type EstimateGasResult,
|
||||
estimateGas,
|
||||
} from "../../../../transaction/actions/estimate-gas.js";
|
||||
import type { PreparedTransaction } from "../../../../transaction/prepare-transaction.js";
|
||||
import type { Account } from "../../../../wallets/interfaces/wallet.js";
|
||||
|
||||
export function useEstimateGasCore(
|
||||
account: Account | undefined,
|
||||
): UseMutationResult<EstimateGasResult, Error, PreparedTransaction> {
|
||||
return useMutation({
|
||||
mutationFn: (transaction) => estimateGas({ transaction, account }),
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { type UseMutationResult, useMutation } from "@tanstack/react-query";
|
||||
import {
|
||||
type EstimateGasCostResult,
|
||||
estimateGasCost,
|
||||
} from "../../../../transaction/actions/estimate-gas-cost.js";
|
||||
import type { PreparedTransaction } from "../../../../transaction/prepare-transaction.js";
|
||||
import type { Account } from "../../../../wallets/interfaces/wallet.js";
|
||||
|
||||
export function useEstimateGasCost(
|
||||
account: Account | undefined,
|
||||
): UseMutationResult<EstimateGasCostResult, Error, PreparedTransaction> {
|
||||
return useMutation({
|
||||
mutationFn: (transaction) => estimateGasCost({ transaction, account }),
|
||||
});
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user