Compare commits

..
Author SHA1 Message Date
149160bec6 Version Packages (#2930)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-05-08 08:53:44 +12:00
greg 55d519b537 Remove faulty test check to fix typedoc (#2952) 2024-05-08 08:31:40 +12:00
greg 49d4494008 Fix(Marketplace): Increase gas on writes (#2951) 2024-05-07 19:37:32 +00:00
greg 44680c65c1 Adds extraGas override for transaction preparation (#2948) 2024-05-07 18:13:18 +00:00
Kien NgoandKien Ngo 0e19911668 Docs: Fix typos + add code snippet (#2949)
Co-authored-by: Kien Ngo <[email protected]>
2024-05-07 17:10:22 +00:00
greg ec149f3834 Read RPC on Viem chain adapter (#2946) 2024-05-07 11:02:47 +00:00
greg b64c8e7b6e Remove old CLI templates (#2945) 2024-05-07 02:06:30 +00:00
greg 795a59e436 Feature: Adds blockRange option to getContractEvents (#2941) 2024-05-07 00:02:29 +00:00
Joaquim VergesandManan Tank 82e89116af feat: show auth provider icon when connected to inapp wallet (#2944)
Co-authored-by: Manan Tank <[email protected]>
2024-05-06 23:28:47 +00:00
greg bdb919f32a Update CLI to v5 templates (#2934) 2024-05-06 21:13:36 +00:00
Manan Tank a692154924 Fix OTP input entered by clicking on “from messages” option in iOS safari (#2936) 2024-05-06 20:23:18 +00:00
Manan Tank 1d327b6bb7 Fix radix warning for switch network button ref (#2935) 2024-05-06 19:36:12 +00:00
Manan Tank 8e0a3cea1e Integrate Pay Modal with TransactionButton, disable Pay Modal for gasless (#2933) 2024-05-06 18:17:31 +00:00
gregandJoaquim Verges 86105c9d91 TransactionButton: Throw error on reverted txn (#2932)
Co-authored-by: Joaquim Verges <[email protected]>
2024-05-06 05:17:46 +00:00
greg cea736c7e4 Filter out invalid listings with invalid currencies (#2928) 2024-05-06 10:41:56 +12:00
Joaquim Verges 9f817cf812 feat: tweak connected modal UI layout (#2929) 2024-05-05 09:35:59 +00:00
greg b3dd90b886 Improve useReadContract example (#2924) 2024-05-04 06:16:02 +00:00
271 changed files with 901 additions and 216 deletions
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/auth
## 4.1.74
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@2.5.16
## 4.1.73
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "4.1.73",
"version": "4.1.74",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
+18
View File
@@ -1,5 +1,23 @@
# thirdweb
## 0.13.82
### Patch Changes
- [#2934](https://github.com/thirdweb-dev/js/pull/2934) [`bdb919f`](https://github.com/thirdweb-dev/js/commit/bdb919f32ae459608b29dd1e4d511afc226470c6) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Updates the CLI `create` command to use the v5 templates for Next.js and Vite
Other templates will be updated in the future from within their existing repositories
Removes React Native starters from the CLI menu
Removes JS template support from the CLI
- [#2945](https://github.com/thirdweb-dev/js/pull/2945) [`b64c8e7`](https://github.com/thirdweb-dev/js/commit/b64c8e7b6efaf09be2afc73b92624c5576a4b24e) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Removes deprecated template options from the CLI, specifically PWA Vite, Express, and React
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.76
- @thirdweb-dev/wallets@2.5.16
- @thirdweb-dev/auth@4.1.74
## 0.13.81
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/cli",
"main": "dist/cli/index.js",
"version": "0.13.81",
"version": "0.13.82",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
-6
View File
@@ -250,18 +250,12 @@ const main = async () => {
)
.option("--app", "Create a web3 app.")
.option("--contract", "Create a web3 contract project")
.option("--ts, --typescript", "Initialize as a TypeScript project.")
.option("--js, --javascript", "Initialize as a JavaScript project.")
.option("--forge", "Initialize as a Forge project.")
.option("--hardhat", "Initialize as a Hardhat project.")
.option("--extension", "Create a smart contract extension.")
.option("--react", "Initialize as a Create React App project.")
.option("--next", "Initialize as a Next.js project.")
.option("--vite", "Initialize as a Vite project.")
.option("--reactNative", "Initialize as a React Native project.")
.option("--express", "Initialize as a Express project.")
.option("--node", "Initialize as a Node project.")
.option("--pwaVite", "Initialize as a PWA project.")
.option(
"--use-npm",
"Explicitly tell the CLI to bootstrap the app using npm",
-92
View File
@@ -16,7 +16,6 @@ let contractName: string = "";
let projectPath: string = "";
let projectType: string = "";
let framework: string = "";
let language: string = "";
let baseContract: string = "";
let chain: string = "";
let createExtension: boolean = false;
@@ -45,78 +44,32 @@ export async function twCreate(
// case where users use `npx thirdweb create --option` directly
if (!projectType && Object.keys(options).length > 0) {
if (options.react) {
projectType = "app";
language = "typescript";
framework = "cra";
}
if (options.next) {
projectType = "app";
language = "typescript";
framework = "next";
}
if (options.vite) {
projectType = "app";
language = "typescript";
framework = "vite";
}
if (options.node) {
projectType = "app";
language = "typescript";
framework = "node";
}
if (options.express) {
projectType = "app";
language = "typescript";
framework = "express";
}
if (options.pwaVite) {
projectType = "app";
language = "typescript";
framework = "pwa-vite";
}
if (options.reactNative) {
projectType = "app";
language = "typescript";
framework = "react-native";
}
}
if (projectType === "app") {
if (options.typescript) {
language = "typescript";
}
if (options.javascript) {
language = "javascript";
}
if (options.next) {
framework = "next";
}
if (options.react) {
framework = "cra";
}
if (options.vite) {
framework = "vite";
}
if (options.node) {
framework = "node";
}
if (options.express) {
framework = "express";
}
if (options.reactNative) {
framework = "react-native";
}
if (options.pwaVite) {
framework = "pwa-vite";
}
if (options.evm) {
chain = "evm";
@@ -258,12 +211,7 @@ export async function twCreate(
message: CREATE_MESSAGES.framework,
choices: [
{ title: "Next.js", value: "next" },
{ title: "Create React App", value: "cra" },
{ title: "Vite", value: "vite" },
{ title: "PWA Vite", value: "pwa-vite" },
{ title: "React Native", value: "react-native" },
{ title: "Node.js", value: "node" },
{ title: "Express", value: "express" },
],
});
@@ -272,40 +220,6 @@ export async function twCreate(
}
}
if (projectType === "app" && !language) {
if (framework === "react-native") {
const res = await prompts({
type: "select",
name: "project",
message: CREATE_MESSAGES.reactNative,
choices: [
{ title: "Expo Project", value: "expo" },
{ title: "React Native CLI", value: "typescript" },
],
});
if (typeof res.project === "string") {
language = res.project.trim();
}
} else if (framework === "pwa-vite" || framework === "pwa-next") {
language = "typescript";
} else {
const res = await prompts({
type: "select",
name: "language",
message: CREATE_MESSAGES.language,
choices: [
{ title: "JavaScript", value: "javascript" },
{ title: "TypeScript", value: "typescript" },
],
});
if (typeof res.language === "string") {
language = res.language.trim();
}
}
}
if (
(projectType === "contract" || projectType === "extension") &&
framework !== "forge" &&
@@ -330,11 +244,6 @@ export async function twCreate(
console.log("Please specify a framework");
process.exit(1);
}
if (!language) {
// Default = JavaScript
language = "javascript";
}
}
}
@@ -483,7 +392,6 @@ export async function twCreate(
appPath: projectPath,
packageManager,
framework,
language,
template,
});
} else {
@@ -22,13 +22,11 @@ export async function createApp({
appPath,
packageManager,
framework,
language,
template,
}: {
appPath: string;
packageManager: PackageManager;
framework?: string;
language?: string;
template?: string;
}): Promise<void> {
let frameworkPath = "";
@@ -45,7 +43,7 @@ export async function createApp({
process.exit(1);
}
} else if (framework) {
frameworkPath = `${framework}-${language || "javascript"}-starter`;
frameworkPath = `${framework}-starter`;
const found = await hasTemplate(frameworkPath);
if (!found) {
@@ -63,7 +61,7 @@ export async function createApp({
function isReactNativeCLI() {
return (
isReactNative &&
(language === "typescript" || (template && !template.includes("expo")))
(template && !template.includes("expo"))
);
}
+1 -1
View File
@@ -467,4 +467,4 @@
"build": "bun ./scripts/revert-exports.ts && pnpm typechain && tsc && pnpm preconstruct build && pnpm extract-abi",
"push": "yalc push"
}
}
}
+9
View File
@@ -1,5 +1,14 @@
# @thirdweb-dev/react-core
## 4.6.15
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.76
- @thirdweb-dev/wallets@2.5.16
- @thirdweb-dev/auth@4.1.74
## 4.6.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "4.6.14",
"version": "4.6.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -1,5 +1,7 @@
# @thirdweb-dev/react-native-compat
## 0.7.47
## 0.7.46
## 0.7.45
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects",
"version": "0.7.46",
"version": "0.7.47",
"author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react-native-compat",
"license": "Apache-2.0",
@@ -1,5 +1,14 @@
# @thirdweb-dev/react-native
## 0.7.47
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.76
- @thirdweb-dev/react-core@4.6.15
- @thirdweb-dev/wallets@2.5.16
## 0.7.46
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-native",
"version": "0.7.46",
"version": "0.7.47",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react-native",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+11
View File
@@ -1,5 +1,16 @@
# @thirdweb-dev/react
## 4.6.15
### Patch Changes
- [#2936](https://github.com/thirdweb-dev/js/pull/2936) [`a692154`](https://github.com/thirdweb-dev/js/commit/a6921549244e3a0a959fa0611f3ab92328c06f4b) Thanks [@MananTank](https://github.com/MananTank)! - Fix OTP input entered by by clicking on “from messages” option in iOS safari
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.76
- @thirdweb-dev/react-core@4.6.15
- @thirdweb-dev/wallets@2.5.16
## 4.6.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "4.6.14",
"version": "4.6.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -94,13 +94,11 @@ export function OTPInput(props: {
}
}}
onChange={(e) => {
let value = e.target.value;
const value = e.target.value;
if (value.length > 1) {
const lastValue = value[value.length - 1];
if (lastValue) {
value = lastValue;
}
setOTP(value.split("").filter((n) => /\d/.test(n)).map(Number));
return;
}
if (!/\d/.test(value) && value !== "") {
Binary file not shown.
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/sdk
## 4.0.76
### Patch Changes
- Updated dependencies [[`a692154`](https://github.com/thirdweb-dev/js/commit/a6921549244e3a0a959fa0611f3ab92328c06f4b), [`bdb919f`](https://github.com/thirdweb-dev/js/commit/bdb919f32ae459608b29dd1e4d511afc226470c6), [`795a59e`](https://github.com/thirdweb-dev/js/commit/795a59e436d791fcfef093971d295622951c832c), [`b64c8e7`](https://github.com/thirdweb-dev/js/commit/b64c8e7b6efaf09be2afc73b92624c5576a4b24e), [`49d4494`](https://github.com/thirdweb-dev/js/commit/49d44940084dc43fb48836f9d628b8e36dcb917a), [`44680c6`](https://github.com/thirdweb-dev/js/commit/44680c65c1cb8aeb0643fff5084b3b013460c610), [`86105c9`](https://github.com/thirdweb-dev/js/commit/86105c9d918852da86215ec0806aadbcf8eafdea), [`ec149f3`](https://github.com/thirdweb-dev/js/commit/ec149f383415722d34e0de68b0807c84ad3dc55a), [`cea736c`](https://github.com/thirdweb-dev/js/commit/cea736c7e4031b5eaebcd788488314f24d5cab83), [`0e19911`](https://github.com/thirdweb-dev/js/commit/0e199116682727f72b87b81f027f67b223bccfad), [`82e8911`](https://github.com/thirdweb-dev/js/commit/82e89116af8ef6e8c3c7faef1829e0e323e146ae), [`8e0a3ce`](https://github.com/thirdweb-dev/js/commit/8e0a3cea1e354f45e7aa107851909e7d57604f0d), [`9f817cf`](https://github.com/thirdweb-dev/js/commit/9f817cf812e3fff6f64382778df1f99739fc3379)]:
- thirdweb@5.16.1
## 4.0.75
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/sdk",
"version": "4.0.75",
"version": "4.0.76",
"description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/sdk",
"license": "Apache-2.0",
Binary file not shown.
@@ -1,5 +1,14 @@
# @thirdweb-dev/unity-js-bridge
## 0.6.25
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.76
- @thirdweb-dev/wallets@2.5.16
- @thirdweb-dev/auth@4.1.74
## 0.6.24
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/unity-js-bridge",
"version": "0.6.24",
"version": "0.6.25",
"main": "dist/thirdweb-unity-bridge.js",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
"license": "Apache-2.0",
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/wallets
## 2.5.16
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.76
## 2.5.15
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/wallets",
"version": "2.5.15",
"version": "2.5.16",
"main": "dist/thirdweb-dev-wallets.cjs.js",
"module": "dist/thirdweb-dev-wallets.esm.js",
"browser": {
@@ -116,8 +116,9 @@ describeIf(!!SECRET_KEY)(
expect(balance.toNumber()).toEqual(7);
});
it("can sign and verify 1271 old factory", {
timeout: 240_000,
// FIXME flaky test
it.todo("can sign and verify 1271 old factory", {
timeout: 300_000,
}, async () => {
const message = "0x1234";
const sig = await smartWallet.signMessage(message);
@@ -139,8 +140,9 @@ describeIf(!!SECRET_KEY)(
expect(isValidV2).toEqual(true);
});
it("can sign and verify 1271 new factory", {
timeout: 240_000,
// FIXME flaky test
it.todo("can sign and verify 1271 new factory", {
timeout: 300_000,
}, async () => {
smartWallet = new SmartWallet({
chain,
+108
View File
@@ -1,5 +1,113 @@
# thirdweb
## 5.16.1
### Patch Changes
- [#2936](https://github.com/thirdweb-dev/js/pull/2936) [`a692154`](https://github.com/thirdweb-dev/js/commit/a6921549244e3a0a959fa0611f3ab92328c06f4b) Thanks [@MananTank](https://github.com/MananTank)! - Fix OTP input entered by by clicking on “from messages” option in iOS safari
- [#2934](https://github.com/thirdweb-dev/js/pull/2934) [`bdb919f`](https://github.com/thirdweb-dev/js/commit/bdb919f32ae459608b29dd1e4d511afc226470c6) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Updates the CLI `create` command to use the v5 templates for Next.js and Vite
Other templates will be updated in the future from within their existing repositories
Removes React Native starters from the CLI menu
Removes JS template support from the CLI
- [#2941](https://github.com/thirdweb-dev/js/pull/2941) [`795a59e`](https://github.com/thirdweb-dev/js/commit/795a59e436d791fcfef093971d295622951c832c) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Can now optionally specify `blockRange` on `getContractEvents` in combination with `toBlock` and `fromBlock`.
## Usage
Specify a `blockRange`, defaulting `toBlock` to the current block number.
```ts
await getContractEvents({
contract: myContract,
blockRange: 123456n,
events: [preparedEvent, preparedEvent2],
});
```
Specify a block range with `toBlock`.
```ts
await getContractEvents({
contract: myContract,
toBlock: endBlock,
blockRange: 123456n,
events: [preparedEvent, preparedEvent2],
});
```
Specify a block range starting from `fromBlock` (great for pagination).
```ts
await getContractEvents({
contract: myContract,
fromBlock: lastBlockFetched,
blockRange: 123456n,
events: [preparedEvent, preparedEvent2],
});
```
- [#2945](https://github.com/thirdweb-dev/js/pull/2945) [`b64c8e7`](https://github.com/thirdweb-dev/js/commit/b64c8e7b6efaf09be2afc73b92624c5576a4b24e) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Removes deprecated template options from the CLI, specifically PWA Vite, Express, and React
- [#2951](https://github.com/thirdweb-dev/js/pull/2951) [`49d4494`](https://github.com/thirdweb-dev/js/commit/49d44940084dc43fb48836f9d628b8e36dcb917a) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Increase gas on MarketplaceV3 writes
- [#2948](https://github.com/thirdweb-dev/js/pull/2948) [`44680c6`](https://github.com/thirdweb-dev/js/commit/44680c65c1cb8aeb0643fff5084b3b013460c610) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Adds extraGas override to transactions. Useful when gas estimates are faulty or to ensure a transaction goes through.
## Usage
```ts
const transaction = prepareTransaction({
to: "0x1234567890123456789012345678901234567890",
chain: ethereum,
client: thirdwebClient,
value: toWei("1.0"),
gasPrice: 30n,
extraGas: 50_000n,
});
```
- [#2932](https://github.com/thirdweb-dev/js/pull/2932) [`86105c9`](https://github.com/thirdweb-dev/js/commit/86105c9d918852da86215ec0806aadbcf8eafdea) Thanks [@gregfromstl](https://github.com/gregfromstl)! - TransactionButton throws error on reverted transaction
- [#2946](https://github.com/thirdweb-dev/js/pull/2946) [`ec149f3`](https://github.com/thirdweb-dev/js/commit/ec149f383415722d34e0de68b0807c84ad3dc55a) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Read RPC url from viem chain in viem chain adapter
- [#2928](https://github.com/thirdweb-dev/js/pull/2928) [`cea736c`](https://github.com/thirdweb-dev/js/commit/cea736c7e4031b5eaebcd788488314f24d5cab83) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Filters invalid listings and auctions from marketplace
- [#2949](https://github.com/thirdweb-dev/js/pull/2949) [`0e19911`](https://github.com/thirdweb-dev/js/commit/0e199116682727f72b87b81f027f67b223bccfad) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Docs update: fix typos and add code snippet
- [#2944](https://github.com/thirdweb-dev/js/pull/2944) [`82e8911`](https://github.com/thirdweb-dev/js/commit/82e89116af8ef6e8c3c7faef1829e0e323e146ae) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Show auth provider icon in connect UI when connected to in app wallet
- [#2933](https://github.com/thirdweb-dev/js/pull/2933) [`8e0a3ce`](https://github.com/thirdweb-dev/js/commit/8e0a3cea1e354f45e7aa107851909e7d57604f0d) Thanks [@MananTank](https://github.com/MananTank)! - ### Integrate Pay Modal with TransactionButton
By default, the Pay Modal is integrated with the `TransactionButton` component. If the user performs a transaction and does not have enough funds to execute it and if [thirdweb pay](https://portal.thirdweb.com/connect/pay/buy-with-crypto) is available for that blockchain, the Pay Modal will be displayed to allow user to buy the required amount of tokens
A new prop `payModal` is added to the `TransactionButton` component customize the Pay Modal UI or disable it entirely
Example: Disable Pay Modal
```tsx
<TransactionButton payModal={false}> Example 1 </TransactionButton>
```
Example: Customize Pay Modal UI
```tsx
<TransactionButton
payModal={{
theme: "light",
}}
>
Example 2
</TransactionButton>
```
### Disable Pay Modal for certain configurations in `useSendTransaction` hook
If `useSendTransaction` hook is passed `gasless: true` configuration or if current active wallet is a smart wallet with `sponsorGas: true` configuration - the Pay Modal will be disabled
- [#2929](https://github.com/thirdweb-dev/js/pull/2929) [`9f817cf`](https://github.com/thirdweb-dev/js/commit/9f817cf812e3fff6f64382778df1f99739fc3379) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Tweaked connected modal UI layout
## 5.16.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "thirdweb",
"version": "5.16.0",
"version": "5.16.1",
"repository": {
"type": "git",
"url": "git+https://github.com/thirdweb-dev/js.git#main"
@@ -275,6 +275,7 @@ export function ${f.name}(
maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
maxPriorityFeePerGas: async () => (await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
`
: ""
}
+1 -1
View File
@@ -14,7 +14,7 @@ import { verifyLoginPayload } from "./core/verify-login-payload.js";
*
* const auth = createAuth({...});
*
* // 1. genererate a login payload for a client on the server side
* // 1. generate a login payload for a client on the server side
* const loginPayload = await auth.generatePayload({ address: '0x123...' });
*
* // 2. send the login payload to the client
@@ -0,0 +1,32 @@
import { defineChain as viemChain } from "viem";
import { describe, expect, it } from "vitest";
import { defineChain } from "./utils.js";
describe("defineChain", () => {
it("should convert viem chain to thirdweb chain", () => {
const zoraViem = viemChain({
id: 7777777,
name: "Zora",
nativeCurrency: {
decimals: 18,
name: "Ether",
symbol: "ETH",
},
rpcUrls: {
default: {
http: ["https://rpc.zora.energy"],
webSocket: ["wss://rpc.zora.energy"],
},
},
blockExplorers: {
default: { name: "Explorer", url: "https://explorer.zora.energy" },
},
});
const thirdwebViem = defineChain(zoraViem);
expect(thirdwebViem.id).toEqual(zoraViem.id);
expect(thirdwebViem.name).toEqual(zoraViem.name);
expect(thirdwebViem.nativeCurrency).toEqual(zoraViem.nativeCurrency);
expect(thirdwebViem.rpc).toEqual(zoraViem.rpcUrls.default.http[0]);
});
});
+3
View File
@@ -91,6 +91,9 @@ function convertViemChain(viemChain: ViemChain): Chain {
symbol: viemChain.nativeCurrency.symbol,
decimals: viemChain.nativeCurrency.decimals,
},
rpc:
viemChain.rpcUrls.default.http[0] ??
`https://${viemChain.id}.rpc.thirdweb.com`,
blockExplorers: viemChain?.blockExplorers
? Object.values(viemChain?.blockExplorers).map((explorer) => {
return {
@@ -7,21 +7,72 @@ import { transferEvent } from "../../extensions/erc721/__generated__/IERC721A/ev
import { prepareEvent } from "../prepare-event.js";
import { getContractEvents } from "./get-events.js";
const LATEST_SIMULATED_BLOCK = 19139495n;
// skip this test suite if there is no secret key available to test with
// TODO: remove reliance on secret key during unit tests entirely
describe.runIf(process.env.TW_SECRET_KEY)("getEvents", () => {
it("should get all events", async () => {
const events = await getContractEvents({
contract: USDT_CONTRACT,
fromBlock: 19139495n - 10n,
fromBlock: LATEST_SIMULATED_BLOCK - 10n,
});
expect(events.length).toBe(261);
});
it("should get events for blockHash", async () => {
const BLOCK_HASH =
"0xb0ad5ee7b4912b50e5a2d7993796944653a4c0632c57740fe4a7a1c61e426324";
const events = await getContractEvents({
contract: USDT_CONTRACT,
blockHash: BLOCK_HASH,
});
expect(events.length).toBe(14);
});
it("should get events for blockRange", async () => {
const events = await getContractEvents({
contract: USDT_CONTRACT,
blockRange: 10n,
});
expect(events.length).toBe(261);
const explicitEvents = await getContractEvents({
contract: USDT_CONTRACT,
fromBlock: LATEST_SIMULATED_BLOCK - 10n,
toBlock: LATEST_SIMULATED_BLOCK,
});
expect(explicitEvents.length).toEqual(events.length);
});
it("should get events for blockRange using fromBlock and toBlock", async () => {
const eventsFromBlock = await getContractEvents({
contract: USDT_CONTRACT,
fromBlock: LATEST_SIMULATED_BLOCK - 50n,
blockRange: 20n,
});
expect(eventsFromBlock.length).toBe(426);
const eventsToBlock = await getContractEvents({
contract: USDT_CONTRACT,
toBlock: LATEST_SIMULATED_BLOCK - 30n,
blockRange: 20n,
});
expect(eventsToBlock.length).toBe(426);
const explicitEvents = await getContractEvents({
contract: USDT_CONTRACT,
fromBlock: LATEST_SIMULATED_BLOCK - 50n,
toBlock: LATEST_SIMULATED_BLOCK - 30n,
});
expect(explicitEvents.length).toEqual(eventsFromBlock.length);
});
it("should get individual events with signature", async () => {
const events = await getContractEvents({
contract: USDT_CONTRACT,
fromBlock: 19139495n - 100n,
fromBlock: LATEST_SIMULATED_BLOCK - 100n,
events: [
prepareEvent({
signature: "event Burn(address indexed burner, uint256 amount)",
@@ -34,7 +85,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("getEvents", () => {
it("should get specified events", async () => {
const events = await getContractEvents({
contract: USDT_CONTRACT,
fromBlock: 19139495n - 10n,
fromBlock: LATEST_SIMULATED_BLOCK - 10n,
events: [
prepareEvent({
signature: "event Burn(address indexed burner, uint256 amount)",
@@ -74,7 +125,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("getEvents", () => {
it("should get individual events with extension", async () => {
const events = await getContractEvents({
contract: DOODLES_CONTRACT,
fromBlock: 19139495n - 1000n,
fromBlock: LATEST_SIMULATED_BLOCK - 1000n,
events: [transferEvent()],
});
expect(events.length).toBe(38);
@@ -13,6 +13,7 @@ import type {
} from "abitype";
import { resolveContractAbi } from "../../contract/actions/resolve-abi.js";
import type { ThirdwebContract } from "../../contract/contract.js";
import { eth_blockNumber } from "../../rpc/actions/eth_blockNumber.js";
import {
type GetLogsBlockParams,
type GetLogsParams,
@@ -61,6 +62,37 @@ export type GetContractEventsResult<
* events: [preparedEvent, preparedEvent2],
* });
* ```
* @example
* Optionally specify a blockRange as the number of blocks to retrieve. toBlock will default to the current block number.
* ```ts
* import { getContractEvents } from "thirdweb";
* const events = await getContractEvents({
* contract: myContract,
* blockRange: 123456n,
* events: [preparedEvent, preparedEvent2],
* });
* ```
* @example
* Use fromBlock with blockRange for pagination.
* ```ts
* import { getContractEvents } from "thirdweb";
* const events = await getContractEvents({
* contract: myContract,
* fromBlock: lastBlockFetched,
* blockRange: 123456n,
* events: [preparedEvent, preparedEvent2],
* });
* ```
* @example
* Retrieve events for a specific block hash.
* ```ts
* import { getContractEvents } from "thirdweb";
* const events = await getContractEvents({
* contract: myContract,
* blockHash: "0x...",
* events: [preparedEvent, preparedEvent2],
* });
* ```
* @contract
*/
export async function getContractEvents<
@@ -72,7 +104,42 @@ export async function getContractEvents<
>(
options: GetContractEventsOptions<abi, abiEvents, TStrict>,
): Promise<GetContractEventsResult<abiEvents, TStrict>> {
const { contract, events, ...restParams } = options;
const { contract, events, blockRange, ...restParams } = options;
const rpcRequest = getRpcClient(contract);
if (
restParams.blockHash &&
(blockRange || restParams.fromBlock || restParams.toBlock)
) {
throw new Error("Cannot specify blockHash and range simultaneously,");
}
// Compute toBlock and fromBlock if blockRange was passed
if (blockRange) {
const { fromBlock, toBlock } = restParams;
// Make sure the inputs were properly defined
if (
fromBlock &&
toBlock &&
BigInt(toBlock) - BigInt(fromBlock) !== BigInt(blockRange)
) {
throw new Error(
"Incompatible blockRange with specified fromBlock and toBlock. Please only define fromBlock or toBlock when specifying blockRange.",
);
}
if (fromBlock) {
restParams.toBlock = BigInt(fromBlock) + BigInt(blockRange);
} else if (toBlock) {
restParams.fromBlock = BigInt(toBlock) - BigInt(blockRange);
} else {
// If no from or to block specified, use the latest block as the to block
restParams.toBlock = await eth_blockNumber(rpcRequest);
restParams.fromBlock = BigInt(restParams.toBlock) - BigInt(blockRange);
}
}
let resolvedEvents = events ?? [];
@@ -104,7 +171,6 @@ export async function getContractEvents<
: // otherwise we want "all" events (aka not pass any topics at all)
[{ ...restParams, address: contract?.address }];
const rpcRequest = getRpcClient(contract);
const logs = await Promise.all(
logsParams.map((ethLogParams) => eth_getLogs(rpcRequest, ethLogParams)),
);
+1
View File
@@ -61,6 +61,7 @@ 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";
@@ -177,5 +177,6 @@ export function airdropERC1155(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -210,5 +210,6 @@ export function airdropERC1155WithSignature(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -169,5 +169,6 @@ export function airdropERC20(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -204,5 +204,6 @@ export function airdropERC20WithSignature(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -171,5 +171,6 @@ export function airdropERC721(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -204,5 +204,6 @@ export function airdropERC721WithSignature(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -157,5 +157,6 @@ export function airdropNativeToken(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -201,5 +201,6 @@ export function claimERC1155(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -186,5 +186,6 @@ export function claimERC20(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -186,5 +186,6 @@ export function claimERC721(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -137,5 +137,6 @@ export function initialize(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -173,5 +173,6 @@ export function setMerkleRoot(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -135,5 +135,6 @@ export function setOwner(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -200,5 +200,6 @@ export function setClaimConditions(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -134,5 +134,6 @@ export function setContractURI(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -137,5 +137,6 @@ export function multicall(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -130,5 +130,6 @@ export function setOwner(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -156,5 +156,6 @@ export function setPlatformFeeInfo(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -141,5 +141,6 @@ export function setPrimarySaleRecipient(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -158,5 +158,6 @@ export function setDefaultRoyaltyInfo(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -165,5 +165,6 @@ export function setRoyaltyInfoForToken(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -168,5 +168,6 @@ export function getRoyalty(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -137,5 +137,6 @@ export function setRoyaltyEngine(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -186,5 +186,6 @@ export function airdropERC1155(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -177,5 +177,6 @@ export function claim(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -154,5 +154,6 @@ export function burn(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -156,5 +156,6 @@ export function burnBatch(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -154,5 +154,6 @@ export function claim(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -224,5 +224,6 @@ export function claim(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -210,5 +210,6 @@ export function setClaimConditions(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -185,5 +185,6 @@ export function safeBatchTransferFrom(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -178,5 +178,6 @@ export function safeTransferFrom(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -144,5 +144,6 @@ export function setApprovalForAll(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -186,5 +186,6 @@ export function onERC1155BatchReceived(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -184,5 +184,6 @@ export function onERC1155Received(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -136,5 +136,6 @@ export function depositRewardTokens(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -138,5 +138,6 @@ export function withdrawRewardTokens(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -162,5 +162,6 @@ export function lazyMint(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -164,5 +164,6 @@ export function mintTo(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -140,5 +140,6 @@ export function setTokenURI(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -234,5 +234,6 @@ export function createPack(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -163,5 +163,6 @@ export function openPack(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -172,5 +172,6 @@ export function openPackAndClaimRewards(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -211,5 +211,6 @@ export function mintWithSignature(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -132,5 +132,6 @@ export function claimRewards(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -138,5 +138,6 @@ export function stake(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -138,5 +138,6 @@ export function withdraw(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -179,5 +179,6 @@ export function airdropERC20(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -167,5 +167,6 @@ export function claim(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -130,5 +130,6 @@ export function burn(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -138,5 +138,6 @@ export function burnFrom(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -214,5 +214,6 @@ export function claim(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -200,5 +200,6 @@ export function setClaimConditions(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -142,5 +142,6 @@ export function approve(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -142,5 +142,6 @@ export function transfer(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -160,5 +160,6 @@ export function transferFrom(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -194,5 +194,6 @@ export function permit(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -138,5 +138,6 @@ export function mintTo(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -191,5 +191,6 @@ export function mintWithSignature(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -130,5 +130,6 @@ export function stake(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}
@@ -130,5 +130,6 @@ export function withdraw(
maxPriorityFeePerGas: async () =>
(await asyncOptions()).overrides?.maxPriorityFeePerGas,
nonce: async () => (await asyncOptions()).overrides?.nonce,
extraGas: async () => (await asyncOptions()).overrides?.extraGas,
});
}

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