Compare commits
26
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
600a51d509 | ||
|
|
32d923bd70 | ||
|
|
82156cc727 | ||
|
|
349b5c1e02 | ||
|
|
ed639d659d | ||
|
|
a8d93a34c0 | ||
|
|
f6b24a5b06 | ||
|
|
821383e26f | ||
|
|
46ad691a16 | ||
|
|
f9067eb79b | ||
|
|
5bb92c3163 | ||
|
|
00015fa958 | ||
|
|
74640b23bf | ||
|
|
280b786e07 | ||
|
|
127bc50217 | ||
|
|
81e9a4a475 | ||
|
|
6b10e0d9e6 | ||
|
|
c075435be6 | ||
|
|
5731ac2f50 | ||
|
|
5d8654a222 | ||
|
|
c52a43c886 | ||
|
|
5f2c7063f3 | ||
|
|
c7850ac4f7 | ||
|
|
3f77fc8b59 | ||
|
|
c4556a8026 | ||
|
|
a5de09b513 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
|
||||
"changelog": "@changesets/cli/changelog",
|
||||
"changelog": ["@changesets/changelog-github", { "repo": "thirdweb-dev/js" }],
|
||||
"commit": false,
|
||||
"fixed": [],
|
||||
"linked": [],
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
types: [opened, synchronize]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
@@ -23,9 +23,10 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
name: Integration tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
integration-tests:
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: Run e2e tests
|
||||
run: yarn e2e
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: packages/react/playwright-report/
|
||||
retention-days: 30
|
||||
@@ -5,8 +5,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release Nightly
|
||||
@@ -23,11 +21,12 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Create an .npmrc
|
||||
- name: Create an .npmrc for nightly release
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: |
|
||||
@@ -36,6 +35,6 @@ jobs:
|
||||
EOF
|
||||
|
||||
- name: Publish Nightly version to NPM
|
||||
run: yarn ci:release:nightly
|
||||
run: yarn release:nightly
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,6 +1,6 @@
|
||||
<p align="center">
|
||||
<br />
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/typescript-sdk/blob/main/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/packages/sdk/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<br />
|
||||
</p>
|
||||
<h1 align="center">thirdweb JavaScript/TypeScript monorepo</h1>
|
||||
@@ -20,7 +20,7 @@
|
||||
| [/auth](./packages/auth/README.md) | Best in class wallet authentication for Node backends | <a href="https://www.npmjs.com/package/@thirdweb-dev/auth"><img src="https://img.shields.io/npm/v/@thirdweb-dev/auth?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/storage](./packages/storage/README.md) | Best in class decentralized storage SDK for Browser and Node | <a href="https://www.npmjs.com/package/@thirdweb-dev/storage"><img src="https://img.shields.io/npm/v/@thirdweb-dev/storage?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/cli](./packages/cli/README.md) | Publish and deploy smart contracts without dealing with private keys | <a href="https://www.npmjs.com/package/thirdweb"><img src="https://img.shields.io/npm/v/thirdweb?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/solana](./packages/cli/README.md) | Solana SDK for Browser, Node and React Native | <a href="https://www.npmjs.com/package/@thirdweb-dev/solana"><img src="https://img.shields.io/npm/v/@thirdweb-dev/solana?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/solana](./packages/solana/README.md) | Solana SDK for Browser, Node and React Native | <a href="https://www.npmjs.com/package/@thirdweb-dev/solana"><img src="https://img.shields.io/npm/v/@thirdweb-dev/solana?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
|
||||
## How this monorepo functions
|
||||
|
||||
|
||||
+8
-3
@@ -12,10 +12,12 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/changelog-github": "^0.4.6",
|
||||
"@changesets/cli": "^2.24.3",
|
||||
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-thirdweb": "*",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"prettier": "^2.7.1",
|
||||
"turbo": "latest",
|
||||
"yarn-deduplicate": "^5.0.2"
|
||||
@@ -23,18 +25,21 @@
|
||||
"scripts": {
|
||||
"postinstall": "yarn-deduplicate yarn.lock",
|
||||
"test": "turbo run test",
|
||||
"e2e": "turbo run e2e",
|
||||
"build": "turbo run build",
|
||||
"build:release": "turbo run build --force",
|
||||
"dev": "turbo run dev --no-cache --parallel --continue",
|
||||
"lint": "turbo run lint",
|
||||
"clean": "turbo run clean && rm -rf node_modules",
|
||||
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
||||
"changeset": "changeset",
|
||||
"release": "turbo run build && changeset publish",
|
||||
"ci:release:nightly": "turbo run build && yarn changeset version --snapshot nightly && yarn changeset publish --tag nightly --no-git-tag"
|
||||
"release": "yarn build:release && changeset publish",
|
||||
"release:nightly": "yarn build:release && changeset version --snapshot nightly && changeset publish --tag nightly --no-git-tag"
|
||||
},
|
||||
"preconstruct": {
|
||||
"packages": [
|
||||
"packages/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"packageManager": "[email protected]"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"presets": [
|
||||
"@babel/preset-typescript",
|
||||
"@babel/preset-env"
|
||||
["@babel/preset-env", { "targets": "defaults, not ie 11" }]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 1.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#38](https://github.com/thirdweb-dev/js/pull/38) [`74640b2`](https://github.com/thirdweb-dev/js/commit/74640b23bf2c537f873186d3537e49b3289e8197) Thanks [@adam-maj](https://github.com/adam-maj)! - Add callbacks to express and next auth
|
||||
|
||||
- [#43](https://github.com/thirdweb-dev/js/pull/43) [`821383e`](https://github.com/thirdweb-dev/js/commit/821383e26f0e9f489e49be708a47823ac2de1473) Thanks [@jnsdls](https://github.com/jnsdls)! - export all entrypoints from main package
|
||||
|
||||
- [#39](https://github.com/thirdweb-dev/js/pull/39) [`00015fa`](https://github.com/thirdweb-dev/js/commit/00015fa958fbaea72526f42b95d919382694bbcd) Thanks [@adam-maj](https://github.com/adam-maj)! - Update auth build CI
|
||||
|
||||
- [#44](https://github.com/thirdweb-dev/js/pull/44) [`f6b24a5`](https://github.com/thirdweb-dev/js/commit/f6b24a5b06b034435785a2b788096e834bcefef9) Thanks [@jnsdls](https://github.com/jnsdls)! - attempt to fix auth build
|
||||
|
||||
- [#46](https://github.com/thirdweb-dev/js/pull/46) [`349b5c1`](https://github.com/thirdweb-dev/js/commit/349b5c1e028a06616d40de84257fd8d1cf05df83) Thanks [@jnsdls](https://github.com/jnsdls)! - imrprove babel & tsconfig settings
|
||||
|
||||
- [#47](https://github.com/thirdweb-dev/js/pull/47) [`82156cc`](https://github.com/thirdweb-dev/js/commit/82156cc727166230d301eeaf8fdc422332b06a8e) Thanks [@jnsdls](https://github.com/jnsdls)! - re-enable cache for auth build output
|
||||
|
||||
- [#37](https://github.com/thirdweb-dev/js/pull/37) [`5d8654a`](https://github.com/thirdweb-dev/js/commit/5d8654a22231c6205829f1731f91fb47d3410e98) Thanks [@adam-maj](https://github.com/adam-maj)! - Update user endpoints for express and next
|
||||
|
||||
- [#30](https://github.com/thirdweb-dev/js/pull/30) [`c52a43c`](https://github.com/thirdweb-dev/js/commit/c52a43c8863052b6d1bc9b8c3e1e86d0e1759d39) Thanks [@adam-maj](https://github.com/adam-maj)! - Add support for next-auth
|
||||
|
||||
- Updated dependencies [[`ed639d6`](https://github.com/thirdweb-dev/js/commit/ed639d659d9d746321fb8858212d22cc16d9cd19), [`349b5c1`](https://github.com/thirdweb-dev/js/commit/349b5c1e028a06616d40de84257fd8d1cf05df83), [`46ad691`](https://github.com/thirdweb-dev/js/commit/46ad691a1636dbc7915ade22067ccfa1d39f7851), [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95), [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95)]:
|
||||
- @thirdweb-dev/sdk@2.4.2
|
||||
|
||||
## 1.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<p align="center">
|
||||
<br />
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/typescript-sdk/blob/main/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/packages/sdk/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<br />
|
||||
</p>
|
||||
<h1 align="center">thirdweb Auth</h1>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"main": "dist/thirdweb-dev-auth-express.cjs.js"
|
||||
"main": "dist/thirdweb-dev-auth-express.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth-express.esm.js"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"main": "dist/thirdweb-dev-auth-next-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth-next-auth.esm.js"
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"main": "dist/thirdweb-dev-auth-next.cjs.js"
|
||||
"main": "dist/thirdweb-dev-auth-next.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth-next.esm.js"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
"./express": {
|
||||
"module": "./express/dist/thirdweb-dev-auth-express.esm.js",
|
||||
"default": "./express/dist/thirdweb-dev-auth-express.cjs.js"
|
||||
},
|
||||
"./next": {
|
||||
"module": "./next/dist/thirdweb-dev-auth-next.esm.js",
|
||||
"default": "./next/dist/thirdweb-dev-auth-express.cjs.js"
|
||||
},
|
||||
"./next-auth": {
|
||||
"module": "./next-auth/dist/thirdweb-dev-auth-next-auth.esm.js",
|
||||
"default": "./next-auth/dist/thirdweb-dev-auth-next-auth.cjs.js"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"directory": "packages/auth",
|
||||
"type": "git",
|
||||
@@ -9,9 +24,10 @@
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
"files": [
|
||||
"dist/",
|
||||
"next/",
|
||||
"express/"
|
||||
"dist/**/*",
|
||||
"next/**/*",
|
||||
"express/**/*",
|
||||
"next-auth/**/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "preconstruct build",
|
||||
@@ -20,7 +36,8 @@
|
||||
"preconstruct": {
|
||||
"entrypoints": [
|
||||
"next/index.ts",
|
||||
"express/index.ts"
|
||||
"express/index.ts",
|
||||
"next-auth/index.ts"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -45,6 +62,7 @@
|
||||
"ethers": ">=5.5.1",
|
||||
"express": "^4.18.1",
|
||||
"next": "12.2.0",
|
||||
"next-auth": "^4.10.3",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
@@ -52,7 +70,19 @@
|
||||
"@thirdweb-dev/sdk": "*",
|
||||
"ethers": ">=5.5.1",
|
||||
"express": "^4.18.1",
|
||||
"next": "12.2.0"
|
||||
"next": "12.2.0",
|
||||
"next-auth": "^4.10.3"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"express": {
|
||||
"optional": true
|
||||
},
|
||||
"next": {
|
||||
"optional": true
|
||||
},
|
||||
"next-auth": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"cookie": "^0.5.0",
|
||||
|
||||
@@ -34,13 +34,18 @@ export function ThirdwebAuth(app: Express, cfg: ThirdwebAuthConfig) {
|
||||
if (token) {
|
||||
try {
|
||||
const address = await sdk.auth.authenticate(domain, token);
|
||||
user = { address };
|
||||
|
||||
if (ctx.callbacks?.user) {
|
||||
user = await ctx.callbacks.user(address);
|
||||
}
|
||||
|
||||
user = { ...user, address };
|
||||
} catch {
|
||||
// No-op
|
||||
}
|
||||
}
|
||||
|
||||
req.user = user;
|
||||
req.user = user as ThirdwebAuthUser | null;
|
||||
next();
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ThirdwebAuthContext } from "../types";
|
||||
import { LoginPayload } from "@thirdweb-dev/sdk/dist/src/schema";
|
||||
import { LoginPayload } from "@thirdweb-dev/sdk";
|
||||
import { serialize } from "cookie";
|
||||
import { Request, Response } from "express";
|
||||
|
||||
@@ -47,5 +47,10 @@ export default async function handler(
|
||||
})
|
||||
);
|
||||
|
||||
if (ctx.callbacks?.login) {
|
||||
const address = sdk.auth.verify(domain, payload);
|
||||
await ctx.callbacks.login(address);
|
||||
}
|
||||
|
||||
return res.status(301).redirect(req.query.redirect as string);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { Request, Response } from "express";
|
||||
|
||||
export default async function handler(req: Request, res: Response) {
|
||||
if (req.method !== "GET") {
|
||||
return res.status(400).json({
|
||||
error: "Invalid method. Only GET supported.",
|
||||
});
|
||||
}
|
||||
|
||||
return res.status(200).json(req.user);
|
||||
}
|
||||
|
||||
@@ -7,15 +7,24 @@ export type ThirdwebAuthConfig = {
|
||||
privateKey: string;
|
||||
domain: string;
|
||||
authUrl?: string;
|
||||
callbacks?: {
|
||||
login?: (address: string) => (Promise<void> | void);
|
||||
user?: (address: string) => (Promise<Omit<ThirdwebAuthUser, "address">> | Omit<ThirdwebAuthUser, "address">);
|
||||
};
|
||||
};
|
||||
|
||||
export type ThirdwebAuthContext = {
|
||||
sdk: ThirdwebSDK;
|
||||
domain: string;
|
||||
callbacks?: {
|
||||
login?: (address: string) => (Promise<void> | void);
|
||||
user?: (address: string) => (Promise<Omit<ThirdwebAuthUser, "address">> | Omit<ThirdwebAuthUser, "address">);
|
||||
};
|
||||
};
|
||||
|
||||
export type ThirdwebAuthUser = {
|
||||
address: string;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export type RequestWithUser = Request & {
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
import { ThirdwebNextAuthConfig } from "./types";
|
||||
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
|
||||
import { serialize } from "cookie";
|
||||
import { GetServerSidePropsContext, NextApiRequest, NextApiResponse } from "next";
|
||||
import NextAuth, { NextAuthOptions, Session, unstable_getServerSession } from "next-auth";
|
||||
import CredentialsProvider from "next-auth/providers/credentials";
|
||||
|
||||
export function ThirdwebNextAuth(cfg: ThirdwebNextAuthConfig) {
|
||||
const sdk = ThirdwebSDK.fromPrivateKey(cfg.privateKey, "mainnet");
|
||||
|
||||
function ThirdwebProvider(res: GetServerSidePropsContext["res"]) {
|
||||
return CredentialsProvider({
|
||||
name: "ThirdwebAuth",
|
||||
credentials: {
|
||||
payload: {
|
||||
label: "Payload",
|
||||
type: "text",
|
||||
placeholder: "",
|
||||
},
|
||||
},
|
||||
async authorize({ payload }: any) {
|
||||
try {
|
||||
const parsed = JSON.parse(payload);
|
||||
const token = await sdk.auth.generateAuthToken(
|
||||
cfg.domain,
|
||||
parsed
|
||||
);
|
||||
const address = await sdk.auth.authenticate(cfg.domain, token);
|
||||
|
||||
// Securely set httpOnly cookie on request to prevent XSS on frontend
|
||||
// And set path to / to enable thirdweb_auth_token usage on all endpoints
|
||||
res.setHeader(
|
||||
"Set-Cookie",
|
||||
serialize("thirdweb_auth_token", token, {
|
||||
path: "/",
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
sameSite: "strict",
|
||||
})
|
||||
);
|
||||
|
||||
return { address };
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function nextOptions (
|
||||
req: GetServerSidePropsContext["req"],
|
||||
res: GetServerSidePropsContext["res"]
|
||||
): NextAuthOptions {
|
||||
|
||||
async function session({ session }: { session: Session }) {
|
||||
const token = req.cookies.thirdweb_auth_token || "";
|
||||
try {
|
||||
const address = await sdk.auth.authenticate(cfg.domain, token);
|
||||
session.user = { ...session.user, address } as Session["user"];
|
||||
return session;
|
||||
} catch {
|
||||
return session;
|
||||
}
|
||||
}
|
||||
|
||||
function signOut() {
|
||||
res.setHeader(
|
||||
"Set-Cookie",
|
||||
serialize("thirdweb_auth_token", "", {
|
||||
path: "/",
|
||||
expires: new Date(Date.now() + 5 * 1000),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
const providers: NextAuthOptions["providers"] = [
|
||||
...cfg.nextOptions.providers,
|
||||
ThirdwebProvider(res),
|
||||
]
|
||||
|
||||
const configSession = cfg.nextOptions.callbacks?.session
|
||||
const callbacks: NextAuthOptions["callbacks"] = {
|
||||
...cfg.nextOptions.callbacks,
|
||||
session: configSession
|
||||
? async (params) => {
|
||||
params.session = await session(params);
|
||||
return configSession(params);
|
||||
}
|
||||
: session
|
||||
};
|
||||
|
||||
const configSignOut = cfg.nextOptions.events?.signOut
|
||||
const events: NextAuthOptions["events"] = {
|
||||
...cfg.nextOptions.events,
|
||||
signOut: configSignOut
|
||||
? async (params) => {
|
||||
signOut();
|
||||
return configSignOut(params);
|
||||
}
|
||||
: signOut
|
||||
};
|
||||
|
||||
return {
|
||||
...cfg.nextOptions,
|
||||
providers,
|
||||
callbacks,
|
||||
events,
|
||||
};
|
||||
};
|
||||
|
||||
async function getUser(
|
||||
...args:
|
||||
| [NextApiRequest, NextApiResponse]
|
||||
| [GetServerSidePropsContext["req"], GetServerSidePropsContext["res"]]
|
||||
) {
|
||||
return unstable_getServerSession(args[0], args[1], nextOptions(args[0], args[1]));
|
||||
}
|
||||
|
||||
function NextAuthHandler(
|
||||
...args: [] | [NextApiRequest, NextApiResponse]
|
||||
) {
|
||||
if (args.length === 0) {
|
||||
return (req: NextApiRequest, res: NextApiResponse) => {
|
||||
return NextAuth(req, res, nextOptions(req, res));
|
||||
}
|
||||
}
|
||||
|
||||
return NextAuth(args[0], args[1], nextOptions(args[0], args[1]));
|
||||
}
|
||||
|
||||
return {
|
||||
NextAuthHandler,
|
||||
getUser
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { NextAuthOptions } from "next-auth";
|
||||
|
||||
export type ThirdwebNextAuthConfig = {
|
||||
privateKey: string;
|
||||
domain: string;
|
||||
nextOptions: NextAuthOptions;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ThirdwebAuthContext } from "../types";
|
||||
import { LoginPayload } from "@thirdweb-dev/sdk/dist/src/schema";
|
||||
import { LoginPayload } from "@thirdweb-dev/sdk";
|
||||
import { serialize } from "cookie";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
@@ -51,5 +51,10 @@ export default async function handler(
|
||||
})
|
||||
);
|
||||
|
||||
if (ctx.callbacks?.login) {
|
||||
const address = sdk.auth.verify(domain, payload);
|
||||
await ctx.callbacks.login(address);
|
||||
}
|
||||
|
||||
return res.status(301).redirect(req.query.redirect as string);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ThirdwebAuthContext } from "../types";
|
||||
import { ThirdwebAuthContext, ThirdwebAuthUser } from "../types";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
export default async function handler(
|
||||
@@ -6,6 +6,12 @@ export default async function handler(
|
||||
res: NextApiResponse,
|
||||
ctx: ThirdwebAuthContext
|
||||
) {
|
||||
if (req.method !== "GET") {
|
||||
return res.status(400).json({
|
||||
error: "Invalid method. Only GET supported.",
|
||||
});
|
||||
}
|
||||
|
||||
const { sdk, domain } = ctx;
|
||||
let user = null;
|
||||
const token = req.cookies.thirdweb_auth_token;
|
||||
@@ -13,11 +19,16 @@ export default async function handler(
|
||||
if (token) {
|
||||
try {
|
||||
const address = await sdk.auth.authenticate(domain, token);
|
||||
user = { address };
|
||||
|
||||
if (ctx.callbacks?.user) {
|
||||
user = await ctx.callbacks.user(address);
|
||||
}
|
||||
|
||||
user = { ...user, address };
|
||||
} catch {
|
||||
// No-op
|
||||
}
|
||||
}
|
||||
|
||||
return res.status(200).json(user);
|
||||
return res.status(200).json(user as ThirdwebAuthUser | null);
|
||||
}
|
||||
|
||||
@@ -5,13 +5,22 @@ export type ThirdwebAuthRoute = "login" | "logout" | "user";
|
||||
export type ThirdwebAuthConfig = {
|
||||
privateKey: string;
|
||||
domain: string;
|
||||
callbacks?: {
|
||||
login?: (address: string) => (Promise<void> | void);
|
||||
user?: (address: string) => (Promise<Omit<ThirdwebAuthUser, "address">> | Omit<ThirdwebAuthUser, "address">);
|
||||
};
|
||||
};
|
||||
|
||||
export type ThirdwebAuthContext = {
|
||||
sdk: ThirdwebSDK;
|
||||
domain: string;
|
||||
callbacks?: {
|
||||
login?: (address: string) => (Promise<void> | void);
|
||||
user?: (address: string) => (Promise<Omit<ThirdwebAuthUser, "address">> | Omit<ThirdwebAuthUser, "address">);
|
||||
};
|
||||
};
|
||||
|
||||
export type ThirdwebAuthUser = {
|
||||
address: string;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.7.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#42](https://github.com/thirdweb-dev/js/pull/42) [`46ad691`](https://github.com/thirdweb-dev/js/commit/46ad691a1636dbc7915ade22067ccfa1d39f7851) Thanks [@jnsdls](https://github.com/jnsdls)! - switch build to tsup
|
||||
|
||||
- [#34](https://github.com/thirdweb-dev/js/pull/34) [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95) Thanks [@jnsdls](https://github.com/jnsdls)! - add e2e tests
|
||||
|
||||
- Updated dependencies [[`ed639d6`](https://github.com/thirdweb-dev/js/commit/ed639d659d9d746321fb8858212d22cc16d9cd19), [`349b5c1`](https://github.com/thirdweb-dev/js/commit/349b5c1e028a06616d40de84257fd8d1cf05df83), [`46ad691`](https://github.com/thirdweb-dev/js/commit/46ad691a1636dbc7915ade22067ccfa1d39f7851), [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95), [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95)]:
|
||||
- @thirdweb-dev/sdk@2.4.2
|
||||
|
||||
## 0.7.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<p align="center">
|
||||
<br />
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/typescript-sdk/blob/main/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/packages/sdk/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<br />
|
||||
</p>
|
||||
<h1 align="center">thirdweb CLI</h1>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import { prepareEnvironment } from "@gmrchk/cli-testing-library";
|
||||
|
||||
// this creates an app, can take some time that's fine
|
||||
jest.setTimeout(120_000);
|
||||
|
||||
describe("npx thirdweb create", () => {
|
||||
it("should create app successfully", async () => {
|
||||
const { spawn, cleanup, exists } = await prepareEnvironment();
|
||||
const {
|
||||
// wait,
|
||||
waitForText,
|
||||
waitForFinish,
|
||||
// getStdout,
|
||||
// getStderr,
|
||||
getExitCode,
|
||||
// debug,
|
||||
pressKey,
|
||||
} = await spawn("node", "./dist/cli/index.js create");
|
||||
|
||||
await waitForText("What type of project do you want to create?");
|
||||
await pressKey("enter");
|
||||
await waitForText("What is your project named?");
|
||||
await pressKey("enter");
|
||||
await waitForText("What framework do you want to use?");
|
||||
await pressKey("arrowDown");
|
||||
await pressKey("enter");
|
||||
await waitForText("What language do you want to use?");
|
||||
await pressKey("enter");
|
||||
|
||||
// wait for program to finish
|
||||
await waitForFinish();
|
||||
|
||||
//check if the app was created
|
||||
expect(await exists("thirdweb-app/package.json")).toEqual(true);
|
||||
|
||||
// the process should exit with code 0
|
||||
expect(getExitCode()).toEqual(0);
|
||||
|
||||
await cleanup(); // cleanup after test
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.7.3",
|
||||
"version": "0.7.4",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com:thirdweb-dev/js.git",
|
||||
@@ -13,9 +13,11 @@
|
||||
"node": ">=14.0.0 <19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gmrchk/cli-testing-library": "^0.1.2",
|
||||
"@types/async-retry": "1.3.0",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/inquirer": "^8.2.1",
|
||||
"@types/jest": "^29.0.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/prompts": "^2.0.14",
|
||||
"@types/rimraf": "^3.0.0",
|
||||
@@ -23,7 +25,9 @@
|
||||
"@types/update-notifier": "^5.1.0",
|
||||
"@types/validate-npm-package-name": "^4.0.0",
|
||||
"hardhat": "^2.9.3",
|
||||
"jest": "^29.0.1",
|
||||
"prettier": "^2.6.2",
|
||||
"ts-jest": "^28.0.8",
|
||||
"ts-node": "^10.7.0",
|
||||
"tsc": "^2.0.4",
|
||||
"tsup": "^6.2.3",
|
||||
@@ -63,8 +67,8 @@
|
||||
"cli": "node -r ts-node/register src/cli/index.ts",
|
||||
"build": "yarn clean && tsc --noEmit && tsup --env.NODE_ENV production --minify --format cjs --external hardhat --dts-resolve",
|
||||
"build:watch": "yarn run build --watch",
|
||||
"prepublishOnly": "yarn build",
|
||||
"generate-thirdweb-package": "node scripts/generate-thirdweb-package.js"
|
||||
"generate-thirdweb-package": "node scripts/generate-thirdweb-package.js",
|
||||
"e2e": "jest"
|
||||
},
|
||||
"files": [
|
||||
"src/",
|
||||
|
||||
@@ -59,7 +59,7 @@ $$$$$$\\ $$$$$$$\\ $$\\ $$$$$$\\ $$$$$$$ |$$\\ $$\\ $$\\ $$$$$$\\ $$$$
|
||||
.option("--ci", "Continuous Integration mode")
|
||||
.action(async (options) => {
|
||||
logger.warn(
|
||||
"'publish' is deprecated adn will be removed in a future update. Please use 'release' instead.",
|
||||
"'publish' is deprecated and will be removed in a future update. Please use 'release' instead.",
|
||||
);
|
||||
const url = await processProject(options, "release");
|
||||
info(`Open this link to release your contracts:`);
|
||||
|
||||
@@ -5,14 +5,11 @@ import { logger, spinner, warn, info } from "../core/helpers/logger";
|
||||
import { createContractsPrompt } from "../core/helpers/selector";
|
||||
import { ContractFeatures, Feature } from "../core/interfaces/ContractFeatures";
|
||||
import { ContractPayload } from "../core/interfaces/ContractPayload";
|
||||
import { detectFeatures } from "@thirdweb-dev/sdk";
|
||||
import { FeatureWithEnabled } from "@thirdweb-dev/sdk/dist/declarations/src/constants/contract-features";
|
||||
import { detectFeatures, FeatureWithEnabled } from "@thirdweb-dev/sdk";
|
||||
import chalk from "chalk";
|
||||
import ora from "ora";
|
||||
import path from "path";
|
||||
|
||||
const { MultiSelect } = require("enquirer");
|
||||
|
||||
export async function detectExtensions(options: any) {
|
||||
logger.setSettings({
|
||||
minLevel: options.debug ? "debug" : "info",
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"presets": ["@babel/preset-typescript", "@babel/preset-env"]
|
||||
"presets": [
|
||||
"@babel/preset-typescript",
|
||||
["@babel/preset-env", { "targets": "defaults, not ie 11" }]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @thirdweb-dev/contracts-js
|
||||
|
||||
## 1.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#36](https://github.com/thirdweb-dev/js/pull/36) [`127bc50`](https://github.com/thirdweb-dev/js/commit/127bc50217139345dd44a09114a9bec2c3ac9e97) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update to Contracts SDK v3.1.5
|
||||
|
||||
- [#46](https://github.com/thirdweb-dev/js/pull/46) [`349b5c1`](https://github.com/thirdweb-dev/js/commit/349b5c1e028a06616d40de84257fd8d1cf05df83) Thanks [@jnsdls](https://github.com/jnsdls)! - imrprove babel & tsconfig settings
|
||||
|
||||
- [#30](https://github.com/thirdweb-dev/js/pull/30) [`c52a43c`](https://github.com/thirdweb-dev/js/commit/c52a43c8863052b6d1bc9b8c3e1e86d0e1759d39) Thanks [@adam-maj](https://github.com/adam-maj)! - Pin contracts to v3.1.3
|
||||
|
||||
- [#34](https://github.com/thirdweb-dev/js/pull/34) [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95) Thanks [@jnsdls](https://github.com/jnsdls)! - pin `@thirdweb-dev/contracts` version
|
||||
|
||||
## 1.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -323,34 +323,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "_tokenIds",
|
||||
"type": "uint256[]"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "_amounts",
|
||||
"type": "uint256[]"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"name": "batchMintTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -397,6 +369,29 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_receiver",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "contractURI",
|
||||
@@ -623,34 +618,6 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "mintTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -982,5 +949,28 @@
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_claimer",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "verifyClaim",
|
||||
"outputs": [],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
@@ -304,34 +304,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "_tokenIds",
|
||||
"type": "uint256[]"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256[]",
|
||||
"name": "_amounts",
|
||||
"type": "uint256[]"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"name": "batchMintTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -378,6 +350,29 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_receiver",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "contractURI",
|
||||
@@ -518,34 +513,6 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "mintTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -853,5 +820,28 @@
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_claimer",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_tokenId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "verifyClaim",
|
||||
"outputs": [],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
@@ -334,34 +334,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "_data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "batchMintTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -375,6 +347,24 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_receiver",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "contractURI",
|
||||
@@ -572,30 +562,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_operator",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_tokenId",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "isApprovedOrOwner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "isApprovedOrOwnerOf",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -644,24 +610,6 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"name": "mintTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -694,6 +642,19 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "nextTokenIdToClaim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "nextTokenIdToMint",
|
||||
@@ -1014,5 +975,23 @@
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_claimer",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "verifyClaim",
|
||||
"outputs": [],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
@@ -856,6 +856,19 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "nextTokenIdToClaim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "nextTokenIdToMint",
|
||||
|
||||
@@ -315,34 +315,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "_data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "batchMintTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -356,6 +328,24 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_receiver",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "claim",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "contractURI",
|
||||
@@ -486,30 +476,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_operator",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_tokenId",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "isApprovedOrOwner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "isApprovedOrOwnerOf",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -539,24 +505,6 @@
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"name": "mintTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
@@ -589,6 +537,19 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "nextTokenIdToClaim",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "nextTokenIdToMint",
|
||||
@@ -885,5 +846,23 @@
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_claimer",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_quantity",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "verifyClaim",
|
||||
"outputs": [],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
@@ -5,11 +5,6 @@
|
||||
"internalType": "address",
|
||||
"name": "_nativeTokenWrapper",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_thirdwebFee",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
@@ -1177,19 +1172,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "thirdwebFee",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract ITWFee",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "timeBuffer",
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
[
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_thirdwebFee",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"inputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
@@ -607,19 +601,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "thirdwebFee",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract ITWFee",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
[
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_thirdwebFee",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"inputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
@@ -1336,19 +1330,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "thirdwebFee",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract ITWFee",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
[
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_thirdwebFee",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"inputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
[
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_thirdwebFee",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"inputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
@@ -1229,19 +1223,6 @@
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "thirdwebFee",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract ITWFee",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/contracts-js",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
|
||||
"module": "dist/thirdweb-dev-contracts-js.esm.js",
|
||||
"license": "Apache-2.0",
|
||||
@@ -10,7 +10,7 @@
|
||||
"url": "https://github.com/thirdweb-dev/js.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/contracts": "^3.1.3"
|
||||
"@thirdweb-dev/contracts": "3.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.18.10",
|
||||
|
||||
@@ -23,6 +23,7 @@ import type {
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PayableOverrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
@@ -32,9 +33,9 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
functions: {
|
||||
"balanceOf(address,uint256)": FunctionFragment;
|
||||
"balanceOfBatch(address[],uint256[])": FunctionFragment;
|
||||
"batchMintTo(address,uint256[],uint256[],string)": FunctionFragment;
|
||||
"burn(address,uint256,uint256)": FunctionFragment;
|
||||
"burnBatch(address,uint256[],uint256[])": FunctionFragment;
|
||||
"claim(address,uint256,uint256)": FunctionFragment;
|
||||
"contractURI()": FunctionFragment;
|
||||
"encryptDecrypt(bytes,bytes)": FunctionFragment;
|
||||
"encryptedData(uint256)": FunctionFragment;
|
||||
@@ -46,7 +47,6 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
"isApprovedForAll(address,address)": FunctionFragment;
|
||||
"isEncryptedBatch(uint256)": FunctionFragment;
|
||||
"lazyMint(uint256,string,bytes)": FunctionFragment;
|
||||
"mintTo(address,uint256,string,uint256)": FunctionFragment;
|
||||
"multicall(bytes[])": FunctionFragment;
|
||||
"name()": FunctionFragment;
|
||||
"nextTokenIdToMint()": FunctionFragment;
|
||||
@@ -64,15 +64,16 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
"symbol()": FunctionFragment;
|
||||
"totalSupply(uint256)": FunctionFragment;
|
||||
"uri(uint256)": FunctionFragment;
|
||||
"verifyClaim(address,uint256,uint256)": FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "balanceOf"
|
||||
| "balanceOfBatch"
|
||||
| "batchMintTo"
|
||||
| "burn"
|
||||
| "burnBatch"
|
||||
| "claim"
|
||||
| "contractURI"
|
||||
| "encryptDecrypt"
|
||||
| "encryptedData"
|
||||
@@ -84,7 +85,6 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
| "isApprovedForAll"
|
||||
| "isEncryptedBatch"
|
||||
| "lazyMint"
|
||||
| "mintTo"
|
||||
| "multicall"
|
||||
| "name"
|
||||
| "nextTokenIdToMint"
|
||||
@@ -102,6 +102,7 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
| "symbol"
|
||||
| "totalSupply"
|
||||
| "uri"
|
||||
| "verifyClaim"
|
||||
): FunctionFragment;
|
||||
|
||||
encodeFunctionData(
|
||||
@@ -112,10 +113,6 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
functionFragment: "balanceOfBatch",
|
||||
values: [string[], BigNumberish[]]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "batchMintTo",
|
||||
values: [string, BigNumberish[], BigNumberish[], string]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "burn",
|
||||
values: [string, BigNumberish, BigNumberish]
|
||||
@@ -124,6 +121,10 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
functionFragment: "burnBatch",
|
||||
values: [string, BigNumberish[], BigNumberish[]]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "claim",
|
||||
values: [string, BigNumberish, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "contractURI",
|
||||
values?: undefined
|
||||
@@ -168,10 +169,6 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
functionFragment: "lazyMint",
|
||||
values: [BigNumberish, string, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "mintTo",
|
||||
values: [string, BigNumberish, string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "multicall",
|
||||
values: [BytesLike[]]
|
||||
@@ -225,18 +222,19 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
values: [BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "uri", values: [BigNumberish]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "verifyClaim",
|
||||
values: [string, BigNumberish, BigNumberish]
|
||||
): string;
|
||||
|
||||
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "balanceOfBatch",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "batchMintTo",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "burnBatch", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "contractURI",
|
||||
data: BytesLike
|
||||
@@ -278,7 +276,6 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "lazyMint", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "mintTo", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
@@ -326,6 +323,10 @@ export interface ERC1155DelayedRevealInterface extends utils.Interface {
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "uri", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "verifyClaim",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
|
||||
events: {
|
||||
"ApprovalForAll(address,address,bool)": EventFragment;
|
||||
@@ -511,14 +512,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<[BigNumber[]]>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -533,6 +526,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -584,14 +584,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -677,6 +669,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
): Promise<[BigNumber]>;
|
||||
|
||||
uri(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[void]>;
|
||||
};
|
||||
|
||||
balanceOf(
|
||||
@@ -691,14 +690,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber[]>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -713,6 +704,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -761,14 +759,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -855,6 +845,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
|
||||
uri(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
callStatic: {
|
||||
balanceOf(
|
||||
arg0: string,
|
||||
@@ -868,14 +865,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber[]>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -890,6 +879,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -941,14 +937,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
multicall(data: BytesLike[], overrides?: CallOverrides): Promise<string[]>;
|
||||
|
||||
name(overrides?: CallOverrides): Promise<string>;
|
||||
@@ -1025,6 +1013,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
): Promise<BigNumber>;
|
||||
|
||||
uri(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
};
|
||||
|
||||
filters: {
|
||||
@@ -1149,14 +1144,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -1171,6 +1158,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -1222,14 +1216,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -1313,6 +1299,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
): Promise<BigNumber>;
|
||||
|
||||
uri(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
@@ -1328,14 +1321,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -1350,6 +1335,13 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -1403,14 +1395,6 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -1497,5 +1481,12 @@ export interface ERC1155DelayedReveal extends BaseContract {
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import type {
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PayableOverrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
@@ -32,9 +33,9 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
functions: {
|
||||
"balanceOf(address,uint256)": FunctionFragment;
|
||||
"balanceOfBatch(address[],uint256[])": FunctionFragment;
|
||||
"batchMintTo(address,uint256[],uint256[],string)": FunctionFragment;
|
||||
"burn(address,uint256,uint256)": FunctionFragment;
|
||||
"burnBatch(address,uint256[],uint256[])": FunctionFragment;
|
||||
"claim(address,uint256,uint256)": FunctionFragment;
|
||||
"contractURI()": FunctionFragment;
|
||||
"getBaseURICount()": FunctionFragment;
|
||||
"getBatchIdAtIndex(uint256)": FunctionFragment;
|
||||
@@ -42,7 +43,6 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
"getRoyaltyInfoForToken(uint256)": FunctionFragment;
|
||||
"isApprovedForAll(address,address)": FunctionFragment;
|
||||
"lazyMint(uint256,string,bytes)": FunctionFragment;
|
||||
"mintTo(address,uint256,string,uint256)": FunctionFragment;
|
||||
"multicall(bytes[])": FunctionFragment;
|
||||
"name()": FunctionFragment;
|
||||
"nextTokenIdToMint()": FunctionFragment;
|
||||
@@ -59,15 +59,16 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
"symbol()": FunctionFragment;
|
||||
"totalSupply(uint256)": FunctionFragment;
|
||||
"uri(uint256)": FunctionFragment;
|
||||
"verifyClaim(address,uint256,uint256)": FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "balanceOf"
|
||||
| "balanceOfBatch"
|
||||
| "batchMintTo"
|
||||
| "burn"
|
||||
| "burnBatch"
|
||||
| "claim"
|
||||
| "contractURI"
|
||||
| "getBaseURICount"
|
||||
| "getBatchIdAtIndex"
|
||||
@@ -75,7 +76,6 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
| "getRoyaltyInfoForToken"
|
||||
| "isApprovedForAll"
|
||||
| "lazyMint"
|
||||
| "mintTo"
|
||||
| "multicall"
|
||||
| "name"
|
||||
| "nextTokenIdToMint"
|
||||
@@ -92,6 +92,7 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
| "symbol"
|
||||
| "totalSupply"
|
||||
| "uri"
|
||||
| "verifyClaim"
|
||||
): FunctionFragment;
|
||||
|
||||
encodeFunctionData(
|
||||
@@ -102,10 +103,6 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
functionFragment: "balanceOfBatch",
|
||||
values: [string[], BigNumberish[]]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "batchMintTo",
|
||||
values: [string, BigNumberish[], BigNumberish[], string]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "burn",
|
||||
values: [string, BigNumberish, BigNumberish]
|
||||
@@ -114,6 +111,10 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
functionFragment: "burnBatch",
|
||||
values: [string, BigNumberish[], BigNumberish[]]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "claim",
|
||||
values: [string, BigNumberish, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "contractURI",
|
||||
values?: undefined
|
||||
@@ -142,10 +143,6 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
functionFragment: "lazyMint",
|
||||
values: [BigNumberish, string, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "mintTo",
|
||||
values: [string, BigNumberish, string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "multicall",
|
||||
values: [BytesLike[]]
|
||||
@@ -195,18 +192,19 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
values: [BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "uri", values: [BigNumberish]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "verifyClaim",
|
||||
values: [string, BigNumberish, BigNumberish]
|
||||
): string;
|
||||
|
||||
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "balanceOfBatch",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "batchMintTo",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "burnBatch", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "contractURI",
|
||||
data: BytesLike
|
||||
@@ -232,7 +230,6 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "lazyMint", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "mintTo", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
@@ -279,6 +276,10 @@ export interface ERC1155LazyMintInterface extends utils.Interface {
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "uri", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "verifyClaim",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
|
||||
events: {
|
||||
"ApprovalForAll(address,address,bool)": EventFragment;
|
||||
@@ -450,14 +451,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<[BigNumber[]]>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -472,6 +465,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
getBaseURICount(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
@@ -501,14 +501,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -588,6 +580,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
): Promise<[BigNumber]>;
|
||||
|
||||
uri(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[void]>;
|
||||
};
|
||||
|
||||
balanceOf(
|
||||
@@ -602,14 +601,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber[]>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -624,6 +615,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
getBaseURICount(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -653,14 +651,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -741,6 +731,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
|
||||
uri(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
callStatic: {
|
||||
balanceOf(
|
||||
arg0: string,
|
||||
@@ -754,14 +751,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber[]>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -776,6 +765,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
getBaseURICount(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -805,14 +801,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
multicall(data: BytesLike[], overrides?: CallOverrides): Promise<string[]>;
|
||||
|
||||
name(overrides?: CallOverrides): Promise<string>;
|
||||
@@ -883,6 +871,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
): Promise<BigNumber>;
|
||||
|
||||
uri(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
};
|
||||
|
||||
filters: {
|
||||
@@ -998,14 +993,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -1020,6 +1007,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
getBaseURICount(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -1049,14 +1043,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -1134,6 +1120,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
): Promise<BigNumber>;
|
||||
|
||||
uri(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
@@ -1149,14 +1142,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_tokenIds: BigNumberish[],
|
||||
_amounts: BigNumberish[],
|
||||
arg3: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
burn(
|
||||
_owner: string,
|
||||
_tokenId: BigNumberish,
|
||||
@@ -1171,6 +1156,13 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
getBaseURICount(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
@@ -1202,14 +1194,6 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
_tokenId: BigNumberish,
|
||||
arg2: string,
|
||||
_amount: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -1290,5 +1274,12 @@ export interface ERC1155LazyMint extends BaseContract {
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_tokenId: BigNumberish,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import type {
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PayableOverrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
@@ -32,8 +33,8 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
functions: {
|
||||
"approve(address,uint256)": FunctionFragment;
|
||||
"balanceOf(address)": FunctionFragment;
|
||||
"batchMintTo(address,uint256,string,bytes)": FunctionFragment;
|
||||
"burn(uint256)": FunctionFragment;
|
||||
"claim(address,uint256)": FunctionFragment;
|
||||
"contractURI()": FunctionFragment;
|
||||
"encryptDecrypt(bytes,bytes)": FunctionFragment;
|
||||
"encryptedData(uint256)": FunctionFragment;
|
||||
@@ -44,12 +45,11 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
"getRevealURI(uint256,bytes)": FunctionFragment;
|
||||
"getRoyaltyInfoForToken(uint256)": FunctionFragment;
|
||||
"isApprovedForAll(address,address)": FunctionFragment;
|
||||
"isApprovedOrOwner(address,uint256)": FunctionFragment;
|
||||
"isEncryptedBatch(uint256)": FunctionFragment;
|
||||
"lazyMint(uint256,string,bytes)": FunctionFragment;
|
||||
"mintTo(address,string)": FunctionFragment;
|
||||
"multicall(bytes[])": FunctionFragment;
|
||||
"name()": FunctionFragment;
|
||||
"nextTokenIdToClaim()": FunctionFragment;
|
||||
"nextTokenIdToMint()": FunctionFragment;
|
||||
"owner()": FunctionFragment;
|
||||
"ownerOf(uint256)": FunctionFragment;
|
||||
@@ -67,14 +67,15 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
"tokenURI(uint256)": FunctionFragment;
|
||||
"totalSupply()": FunctionFragment;
|
||||
"transferFrom(address,address,uint256)": FunctionFragment;
|
||||
"verifyClaim(address,uint256)": FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "approve"
|
||||
| "balanceOf"
|
||||
| "batchMintTo"
|
||||
| "burn"
|
||||
| "claim"
|
||||
| "contractURI"
|
||||
| "encryptDecrypt"
|
||||
| "encryptedData"
|
||||
@@ -85,12 +86,11 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
| "getRevealURI"
|
||||
| "getRoyaltyInfoForToken"
|
||||
| "isApprovedForAll"
|
||||
| "isApprovedOrOwner"
|
||||
| "isEncryptedBatch"
|
||||
| "lazyMint"
|
||||
| "mintTo"
|
||||
| "multicall"
|
||||
| "name"
|
||||
| "nextTokenIdToClaim"
|
||||
| "nextTokenIdToMint"
|
||||
| "owner"
|
||||
| "ownerOf"
|
||||
@@ -108,6 +108,7 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
| "tokenURI"
|
||||
| "totalSupply"
|
||||
| "transferFrom"
|
||||
| "verifyClaim"
|
||||
): FunctionFragment;
|
||||
|
||||
encodeFunctionData(
|
||||
@@ -115,11 +116,11 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "balanceOf", values: [string]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "batchMintTo",
|
||||
values: [string, BigNumberish, string, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "claim",
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "contractURI",
|
||||
values?: undefined
|
||||
@@ -160,10 +161,6 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
functionFragment: "isApprovedForAll",
|
||||
values: [string, string]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "isApprovedOrOwner",
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "isEncryptedBatch",
|
||||
values: [BigNumberish]
|
||||
@@ -172,15 +169,15 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
functionFragment: "lazyMint",
|
||||
values: [BigNumberish, string, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "mintTo",
|
||||
values: [string, string]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "multicall",
|
||||
values: [BytesLike[]]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "name", values?: undefined): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "nextTokenIdToClaim",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "nextTokenIdToMint",
|
||||
values?: undefined
|
||||
@@ -240,14 +237,15 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
functionFragment: "transferFrom",
|
||||
values: [string, string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "verifyClaim",
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
|
||||
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "batchMintTo",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "contractURI",
|
||||
data: BytesLike
|
||||
@@ -288,18 +286,17 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
functionFragment: "isApprovedForAll",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "isApprovedOrOwner",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "isEncryptedBatch",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "lazyMint", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "mintTo", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "nextTokenIdToClaim",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "nextTokenIdToMint",
|
||||
data: BytesLike
|
||||
@@ -350,6 +347,10 @@ export interface ERC721DelayedRevealInterface extends utils.Interface {
|
||||
functionFragment: "transferFrom",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "verifyClaim",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
|
||||
events: {
|
||||
"Approval(address,address,uint256)": EventFragment;
|
||||
@@ -517,19 +518,17 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
|
||||
balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
burn(
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -574,12 +573,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean]>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean] & { isApprovedOrOwnerOf: boolean }>;
|
||||
|
||||
isEncryptedBatch(
|
||||
_batchId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -592,12 +585,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
arg1: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -605,6 +592,8 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<[string]>;
|
||||
@@ -692,6 +681,12 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[void]>;
|
||||
};
|
||||
|
||||
approve(
|
||||
@@ -702,19 +697,17 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
|
||||
balanceOf(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
burn(
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -756,12 +749,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
isEncryptedBatch(
|
||||
_batchId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -774,12 +761,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
arg1: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -787,6 +768,8 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<string>;
|
||||
@@ -869,6 +852,12 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
callStatic: {
|
||||
approve(
|
||||
to: string,
|
||||
@@ -878,16 +867,14 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
|
||||
balanceOf(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
burn(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
burn(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -932,12 +919,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
isEncryptedBatch(
|
||||
_batchId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -950,12 +931,12 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
mintTo(_to: string, arg1: string, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
multicall(data: BytesLike[], overrides?: CallOverrides): Promise<string[]>;
|
||||
|
||||
name(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<string>;
|
||||
@@ -1034,6 +1015,12 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
};
|
||||
|
||||
filters: {
|
||||
@@ -1140,19 +1127,17 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
|
||||
balanceOf(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
burn(
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -1197,12 +1182,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
isEncryptedBatch(
|
||||
_batchId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -1215,12 +1194,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
arg1: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -1228,6 +1201,8 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -1313,6 +1288,12 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
@@ -1327,19 +1308,17 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
burn(
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
encryptDecrypt(
|
||||
@@ -1386,12 +1365,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
isEncryptedBatch(
|
||||
_batchId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -1404,12 +1377,6 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
arg1: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -1417,6 +1384,10 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
nextTokenIdToClaim(
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
@@ -1502,5 +1473,11 @@ export interface ERC721DelayedReveal extends BaseContract {
|
||||
tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ export interface ERC721DropInterface extends utils.Interface {
|
||||
"lazyMint(uint256,string,bytes)": FunctionFragment;
|
||||
"multicall(bytes[])": FunctionFragment;
|
||||
"name()": FunctionFragment;
|
||||
"nextTokenIdToClaim()": FunctionFragment;
|
||||
"nextTokenIdToMint()": FunctionFragment;
|
||||
"owner()": FunctionFragment;
|
||||
"ownerOf(uint256)": FunctionFragment;
|
||||
@@ -142,6 +143,7 @@ export interface ERC721DropInterface extends utils.Interface {
|
||||
| "lazyMint"
|
||||
| "multicall"
|
||||
| "name"
|
||||
| "nextTokenIdToClaim"
|
||||
| "nextTokenIdToMint"
|
||||
| "owner"
|
||||
| "ownerOf"
|
||||
@@ -244,6 +246,10 @@ export interface ERC721DropInterface extends utils.Interface {
|
||||
values: [BytesLike[]]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "name", values?: undefined): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "nextTokenIdToClaim",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "nextTokenIdToMint",
|
||||
values?: undefined
|
||||
@@ -383,6 +389,10 @@ export interface ERC721DropInterface extends utils.Interface {
|
||||
decodeFunctionResult(functionFragment: "lazyMint", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "nextTokenIdToClaim",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "nextTokenIdToMint",
|
||||
data: BytesLike
|
||||
@@ -776,6 +786,8 @@ export interface ERC721Drop extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<[string]>;
|
||||
@@ -1016,6 +1028,8 @@ export interface ERC721Drop extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<string>;
|
||||
@@ -1247,6 +1261,8 @@ export interface ERC721Drop extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<string>;
|
||||
@@ -1579,6 +1595,8 @@ export interface ERC721Drop extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -1794,6 +1812,10 @@ export interface ERC721Drop extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
nextTokenIdToClaim(
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
@@ -23,6 +23,7 @@ import type {
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PayableOverrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
@@ -32,8 +33,8 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
functions: {
|
||||
"approve(address,uint256)": FunctionFragment;
|
||||
"balanceOf(address)": FunctionFragment;
|
||||
"batchMintTo(address,uint256,string,bytes)": FunctionFragment;
|
||||
"burn(uint256)": FunctionFragment;
|
||||
"claim(address,uint256)": FunctionFragment;
|
||||
"contractURI()": FunctionFragment;
|
||||
"getApproved(uint256)": FunctionFragment;
|
||||
"getBaseURICount()": FunctionFragment;
|
||||
@@ -41,11 +42,10 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
"getDefaultRoyaltyInfo()": FunctionFragment;
|
||||
"getRoyaltyInfoForToken(uint256)": FunctionFragment;
|
||||
"isApprovedForAll(address,address)": FunctionFragment;
|
||||
"isApprovedOrOwner(address,uint256)": FunctionFragment;
|
||||
"lazyMint(uint256,string,bytes)": FunctionFragment;
|
||||
"mintTo(address,string)": FunctionFragment;
|
||||
"multicall(bytes[])": FunctionFragment;
|
||||
"name()": FunctionFragment;
|
||||
"nextTokenIdToClaim()": FunctionFragment;
|
||||
"nextTokenIdToMint()": FunctionFragment;
|
||||
"owner()": FunctionFragment;
|
||||
"ownerOf(uint256)": FunctionFragment;
|
||||
@@ -62,14 +62,15 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
"tokenURI(uint256)": FunctionFragment;
|
||||
"totalSupply()": FunctionFragment;
|
||||
"transferFrom(address,address,uint256)": FunctionFragment;
|
||||
"verifyClaim(address,uint256)": FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "approve"
|
||||
| "balanceOf"
|
||||
| "batchMintTo"
|
||||
| "burn"
|
||||
| "claim"
|
||||
| "contractURI"
|
||||
| "getApproved"
|
||||
| "getBaseURICount"
|
||||
@@ -77,11 +78,10 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
| "getDefaultRoyaltyInfo"
|
||||
| "getRoyaltyInfoForToken"
|
||||
| "isApprovedForAll"
|
||||
| "isApprovedOrOwner"
|
||||
| "lazyMint"
|
||||
| "mintTo"
|
||||
| "multicall"
|
||||
| "name"
|
||||
| "nextTokenIdToClaim"
|
||||
| "nextTokenIdToMint"
|
||||
| "owner"
|
||||
| "ownerOf"
|
||||
@@ -98,6 +98,7 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
| "tokenURI"
|
||||
| "totalSupply"
|
||||
| "transferFrom"
|
||||
| "verifyClaim"
|
||||
): FunctionFragment;
|
||||
|
||||
encodeFunctionData(
|
||||
@@ -105,11 +106,11 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "balanceOf", values: [string]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "batchMintTo",
|
||||
values: [string, BigNumberish, string, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "claim",
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "contractURI",
|
||||
values?: undefined
|
||||
@@ -138,23 +139,19 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
functionFragment: "isApprovedForAll",
|
||||
values: [string, string]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "isApprovedOrOwner",
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "lazyMint",
|
||||
values: [BigNumberish, string, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "mintTo",
|
||||
values: [string, string]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "multicall",
|
||||
values: [BytesLike[]]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "name", values?: undefined): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "nextTokenIdToClaim",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "nextTokenIdToMint",
|
||||
values?: undefined
|
||||
@@ -210,14 +207,15 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
functionFragment: "transferFrom",
|
||||
values: [string, string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "verifyClaim",
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
|
||||
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "batchMintTo",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "contractURI",
|
||||
data: BytesLike
|
||||
@@ -246,14 +244,13 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
functionFragment: "isApprovedForAll",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "isApprovedOrOwner",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "lazyMint", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "mintTo", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "nextTokenIdToClaim",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "nextTokenIdToMint",
|
||||
data: BytesLike
|
||||
@@ -303,6 +300,10 @@ export interface ERC721LazyMintInterface extends utils.Interface {
|
||||
functionFragment: "transferFrom",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "verifyClaim",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
|
||||
events: {
|
||||
"Approval(address,address,uint256)": EventFragment;
|
||||
@@ -456,19 +457,17 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
|
||||
balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
burn(
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
getApproved(
|
||||
@@ -496,12 +495,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean]>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean] & { isApprovedOrOwnerOf: boolean }>;
|
||||
|
||||
lazyMint(
|
||||
_amount: BigNumberish,
|
||||
_baseURIForTokens: string,
|
||||
@@ -509,12 +502,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
arg1: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -522,6 +509,8 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<[string]>;
|
||||
@@ -603,6 +592,12 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[void]>;
|
||||
};
|
||||
|
||||
approve(
|
||||
@@ -613,19 +608,17 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
|
||||
balanceOf(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
burn(
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
getApproved(
|
||||
@@ -653,12 +646,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
lazyMint(
|
||||
_amount: BigNumberish,
|
||||
_baseURIForTokens: string,
|
||||
@@ -666,12 +653,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
arg1: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -679,6 +660,8 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<string>;
|
||||
@@ -755,6 +738,12 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
callStatic: {
|
||||
approve(
|
||||
to: string,
|
||||
@@ -764,16 +753,14 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
|
||||
balanceOf(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
burn(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
burn(_tokenId: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
getApproved(
|
||||
@@ -801,12 +788,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
lazyMint(
|
||||
_amount: BigNumberish,
|
||||
_baseURIForTokens: string,
|
||||
@@ -814,12 +795,12 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
mintTo(_to: string, arg1: string, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
multicall(data: BytesLike[], overrides?: CallOverrides): Promise<string[]>;
|
||||
|
||||
name(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<string>;
|
||||
@@ -892,6 +873,12 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
};
|
||||
|
||||
filters: {
|
||||
@@ -989,19 +976,17 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
|
||||
balanceOf(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
burn(
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
getApproved(
|
||||
@@ -1029,12 +1014,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
lazyMint(
|
||||
_amount: BigNumberish,
|
||||
_baseURIForTokens: string,
|
||||
@@ -1042,12 +1021,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
arg1: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -1055,6 +1028,8 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToClaim(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -1134,6 +1109,12 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
@@ -1148,19 +1129,17 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
batchMintTo(
|
||||
_to: string,
|
||||
_quantity: BigNumberish,
|
||||
arg2: string,
|
||||
_data: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
burn(
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
claim(
|
||||
_receiver: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
contractURI(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
getApproved(
|
||||
@@ -1190,12 +1169,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
isApprovedOrOwner(
|
||||
_operator: string,
|
||||
_tokenId: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
lazyMint(
|
||||
_amount: BigNumberish,
|
||||
_baseURIForTokens: string,
|
||||
@@ -1203,12 +1176,6 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
mintTo(
|
||||
_to: string,
|
||||
arg1: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
multicall(
|
||||
data: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
@@ -1216,6 +1183,10 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
|
||||
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
nextTokenIdToClaim(
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
nextTokenIdToMint(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
@@ -1295,5 +1266,11 @@ export interface ERC721LazyMint extends BaseContract {
|
||||
tokenId: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
verifyClaim(
|
||||
_claimer: string,
|
||||
_quantity: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -142,7 +142,6 @@ export interface MarketplaceInterface extends utils.Interface {
|
||||
"setContractURI(string)": FunctionFragment;
|
||||
"setPlatformFeeInfo(address,uint256)": FunctionFragment;
|
||||
"supportsInterface(bytes4)": FunctionFragment;
|
||||
"thirdwebFee()": FunctionFragment;
|
||||
"timeBuffer()": FunctionFragment;
|
||||
"totalListings()": FunctionFragment;
|
||||
"updateListing(uint256,uint256,uint256,uint256,address,uint256,uint256)": FunctionFragment;
|
||||
@@ -183,7 +182,6 @@ export interface MarketplaceInterface extends utils.Interface {
|
||||
| "setContractURI"
|
||||
| "setPlatformFeeInfo"
|
||||
| "supportsInterface"
|
||||
| "thirdwebFee"
|
||||
| "timeBuffer"
|
||||
| "totalListings"
|
||||
| "updateListing"
|
||||
@@ -315,10 +313,6 @@ export interface MarketplaceInterface extends utils.Interface {
|
||||
functionFragment: "supportsInterface",
|
||||
values: [BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "thirdwebFee",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "timeBuffer",
|
||||
values?: undefined
|
||||
@@ -442,10 +436,6 @@ export interface MarketplaceInterface extends utils.Interface {
|
||||
functionFragment: "supportsInterface",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "thirdwebFee",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "timeBuffer", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "totalListings",
|
||||
@@ -859,8 +849,6 @@ export interface Marketplace extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean]>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
timeBuffer(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
totalListings(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
@@ -1099,8 +1087,6 @@ export interface Marketplace extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
timeBuffer(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
totalListings(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -1333,8 +1319,6 @@ export interface Marketplace extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
timeBuffer(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
totalListings(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -1670,8 +1654,6 @@ export interface Marketplace extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
timeBuffer(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
totalListings(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@@ -1872,8 +1854,6 @@ export interface Marketplace extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
timeBuffer(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
totalListings(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
@@ -55,7 +55,6 @@ export interface SplitInterface extends utils.Interface {
|
||||
"setContractURI(string)": FunctionFragment;
|
||||
"shares(address)": FunctionFragment;
|
||||
"supportsInterface(bytes4)": FunctionFragment;
|
||||
"thirdwebFee()": FunctionFragment;
|
||||
"totalReleased(address)": FunctionFragment;
|
||||
"totalReleased()": FunctionFragment;
|
||||
"totalShares()": FunctionFragment;
|
||||
@@ -88,7 +87,6 @@ export interface SplitInterface extends utils.Interface {
|
||||
| "setContractURI"
|
||||
| "shares"
|
||||
| "supportsInterface"
|
||||
| "thirdwebFee"
|
||||
| "totalReleased(address)"
|
||||
| "totalReleased()"
|
||||
| "totalShares"
|
||||
@@ -188,10 +186,6 @@ export interface SplitInterface extends utils.Interface {
|
||||
functionFragment: "supportsInterface",
|
||||
values: [BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "thirdwebFee",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "totalReleased(address)",
|
||||
values: [string]
|
||||
@@ -281,10 +275,6 @@ export interface SplitInterface extends utils.Interface {
|
||||
functionFragment: "supportsInterface",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "thirdwebFee",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "totalReleased(address)",
|
||||
data: BytesLike
|
||||
@@ -538,8 +528,6 @@ export interface Split extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean]>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
"totalReleased(address)"(
|
||||
token: string,
|
||||
overrides?: CallOverrides
|
||||
@@ -661,8 +649,6 @@ export interface Split extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
"totalReleased(address)"(
|
||||
token: string,
|
||||
overrides?: CallOverrides
|
||||
@@ -776,8 +762,6 @@ export interface Split extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
"totalReleased(address)"(
|
||||
token: string,
|
||||
overrides?: CallOverrides
|
||||
@@ -967,8 +951,6 @@ export interface Split extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
"totalReleased(address)"(
|
||||
token: string,
|
||||
overrides?: CallOverrides
|
||||
@@ -1102,8 +1084,6 @@ export interface Split extends BaseContract {
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
"totalReleased(address)"(
|
||||
token: string,
|
||||
overrides?: CallOverrides
|
||||
|
||||
@@ -119,7 +119,6 @@ export interface TokenERC1155Interface extends utils.Interface {
|
||||
"setRoyaltyInfoForToken(uint256,address,uint256)": FunctionFragment;
|
||||
"supportsInterface(bytes4)": FunctionFragment;
|
||||
"symbol()": FunctionFragment;
|
||||
"thirdwebFee()": FunctionFragment;
|
||||
"totalSupply(uint256)": FunctionFragment;
|
||||
"uri(uint256)": FunctionFragment;
|
||||
"verify((address,address,uint256,address,uint256,string,uint256,uint256,address,uint128,uint128,bytes32),bytes)": FunctionFragment;
|
||||
@@ -170,7 +169,6 @@ export interface TokenERC1155Interface extends utils.Interface {
|
||||
| "setRoyaltyInfoForToken"
|
||||
| "supportsInterface"
|
||||
| "symbol"
|
||||
| "thirdwebFee"
|
||||
| "totalSupply"
|
||||
| "uri"
|
||||
| "verify"
|
||||
@@ -347,10 +345,6 @@ export interface TokenERC1155Interface extends utils.Interface {
|
||||
values: [BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "thirdwebFee",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "totalSupply",
|
||||
values: [BigNumberish]
|
||||
@@ -494,10 +488,6 @@ export interface TokenERC1155Interface extends utils.Interface {
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "thirdwebFee",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "totalSupply",
|
||||
data: BytesLike
|
||||
@@ -950,8 +940,6 @@ export interface TokenERC1155 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
totalSupply(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -1180,8 +1168,6 @@ export interface TokenERC1155 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
totalSupply(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -1401,8 +1387,6 @@ export interface TokenERC1155 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
totalSupply(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -1786,8 +1770,6 @@ export interface TokenERC1155 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
totalSupply(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -2028,8 +2010,6 @@ export interface TokenERC1155 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
totalSupply(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
|
||||
@@ -113,7 +113,6 @@ export interface TokenERC721Interface extends utils.Interface {
|
||||
"setRoyaltyInfoForToken(uint256,address,uint256)": FunctionFragment;
|
||||
"supportsInterface(bytes4)": FunctionFragment;
|
||||
"symbol()": FunctionFragment;
|
||||
"thirdwebFee()": FunctionFragment;
|
||||
"tokenByIndex(uint256)": FunctionFragment;
|
||||
"tokenOfOwnerByIndex(address,uint256)": FunctionFragment;
|
||||
"tokenURI(uint256)": FunctionFragment;
|
||||
@@ -167,7 +166,6 @@ export interface TokenERC721Interface extends utils.Interface {
|
||||
| "setRoyaltyInfoForToken"
|
||||
| "supportsInterface"
|
||||
| "symbol"
|
||||
| "thirdwebFee"
|
||||
| "tokenByIndex"
|
||||
| "tokenOfOwnerByIndex"
|
||||
| "tokenURI"
|
||||
@@ -341,10 +339,6 @@ export interface TokenERC721Interface extends utils.Interface {
|
||||
values: [BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "thirdwebFee",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "tokenByIndex",
|
||||
values: [BigNumberish]
|
||||
@@ -500,10 +494,6 @@ export interface TokenERC721Interface extends utils.Interface {
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "thirdwebFee",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "tokenByIndex",
|
||||
data: BytesLike
|
||||
@@ -940,8 +930,6 @@ export interface TokenERC721 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
tokenByIndex(
|
||||
index: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -1172,8 +1160,6 @@ export interface TokenERC721 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
tokenByIndex(
|
||||
index: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -1389,8 +1375,6 @@ export interface TokenERC721 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
tokenByIndex(
|
||||
index: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -1763,8 +1747,6 @@ export interface TokenERC721 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
tokenByIndex(
|
||||
index: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
@@ -2013,8 +1995,6 @@ export interface TokenERC721 extends BaseContract {
|
||||
|
||||
symbol(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
thirdwebFee(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
tokenByIndex(
|
||||
index: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2,6 +2,6 @@
|
||||
"presets": [
|
||||
"@babel/preset-typescript",
|
||||
["@babel/preset-react", { "runtime": "automatic" }],
|
||||
"@babel/preset-env"
|
||||
["@babel/preset-env", { "targets": "defaults, not ie 11" }]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
node_modules/
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/playwright/.cache/
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/playwright/.cache/
|
||||
@@ -1,5 +1,25 @@
|
||||
# @thirdweb-dev/react
|
||||
|
||||
## 2.9.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#42](https://github.com/thirdweb-dev/js/pull/42) [`46ad691`](https://github.com/thirdweb-dev/js/commit/46ad691a1636dbc7915ade22067ccfa1d39f7851) Thanks [@jnsdls](https://github.com/jnsdls)! - remove `functionName` + `params` option from `<Web3Button>` - use `action={...}` instead
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#45](https://github.com/thirdweb-dev/js/pull/45) [`ed639d6`](https://github.com/thirdweb-dev/js/commit/ed639d659d9d746321fb8858212d22cc16d9cd19) Thanks [@jnsdls](https://github.com/jnsdls)! - switch back to preconstruct for building
|
||||
|
||||
- [#46](https://github.com/thirdweb-dev/js/pull/46) [`349b5c1`](https://github.com/thirdweb-dev/js/commit/349b5c1e028a06616d40de84257fd8d1cf05df83) Thanks [@jnsdls](https://github.com/jnsdls)! - imrprove babel & tsconfig settings
|
||||
|
||||
- [#42](https://github.com/thirdweb-dev/js/pull/42) [`46ad691`](https://github.com/thirdweb-dev/js/commit/46ad691a1636dbc7915ade22067ccfa1d39f7851) Thanks [@jnsdls](https://github.com/jnsdls)! - switch build to tsup
|
||||
|
||||
- [#34](https://github.com/thirdweb-dev/js/pull/34) [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95) Thanks [@jnsdls](https://github.com/jnsdls)! - add e2e tests
|
||||
|
||||
- Updated dependencies [[`ed639d6`](https://github.com/thirdweb-dev/js/commit/ed639d659d9d746321fb8858212d22cc16d9cd19), [`349b5c1`](https://github.com/thirdweb-dev/js/commit/349b5c1e028a06616d40de84257fd8d1cf05df83), [`46ad691`](https://github.com/thirdweb-dev/js/commit/46ad691a1636dbc7915ade22067ccfa1d39f7851), [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95), [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95)]:
|
||||
- @thirdweb-dev/sdk@2.4.2
|
||||
- @thirdweb-dev/storage@0.2.3
|
||||
|
||||
## 2.8.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<p align="center">
|
||||
<br />
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/typescript-sdk/blob/main/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/packages/sdk/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<br />
|
||||
</p>
|
||||
<h1 align="center">thirdweb React SDK</h1>
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/@thirdweb-dev/react"><img src="https://img.shields.io/github/package-json/v/thirdweb-dev/react?color=red&label=npm&logo=npm" alt="npm version"/></a>
|
||||
<a href="https://github.com/thirdweb-dev/react/actions"><img alt="Build Status" src="https://github.com/thirdweb-dev/react/actions/workflows/build.yml/badge.svg"/></a>
|
||||
<a href="https://www.npmjs.com/package/@thirdweb-dev/react"><img src="https://img.shields.io/npm/v/@thirdweb-dev/react?color=red&label=npm&logo=npm" alt="npm version"/></a>
|
||||
<a href="https://github.com/thirdweb-dev/js/actions/workflows/CI.yml"><img alt="Build Status" src="https://github.com/thirdweb-dev/js/actions/workflows/CI.yml/badge.svg"/></a>
|
||||
<a href="https://discord.gg/thirdweb"><img alt="Join our Discord!" src="https://img.shields.io/discord/834227967404146718.svg?color=7289da&label=discord&logo=discord&style=flat"/></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react",
|
||||
"version": "2.8.1",
|
||||
"version": "2.9.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com:thirdweb-dev/js.git",
|
||||
@@ -11,23 +11,20 @@
|
||||
"main": "dist/thirdweb-dev-react.cjs.js",
|
||||
"types": "dist/thirdweb-dev-react.cjs.d.ts",
|
||||
"module": "dist/thirdweb-dev-react.esm.js",
|
||||
"browser": {
|
||||
"./dist/thirdweb-dev-react.cjs.js": "./dist/thirdweb-dev-react.browser.cjs.js",
|
||||
"./dist/thirdweb-dev-react.esm.js": "./dist/thirdweb-dev-react.browser.esm.js"
|
||||
},
|
||||
"files": [
|
||||
"dist/**/*"
|
||||
"dist/**/*",
|
||||
"patches/**/*"
|
||||
],
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"dev": "preconstruct watch",
|
||||
"lint": "eslint src/",
|
||||
"fix": "eslint src/ --fix",
|
||||
"extract-api": "api-extractor run --local",
|
||||
"generate:md-docs": "yarn api-documenter markdown -i ./temp -o ./docs",
|
||||
"generate-snippets": "node ./scripts/generate-snippets.mjs",
|
||||
"build": "tsc && preconstruct build",
|
||||
"prepublishOnly": "yarn build"
|
||||
"e2e": "yarn test-ct",
|
||||
"test-ct": "playwright test -c playwright-ct.config.ts"
|
||||
},
|
||||
"sideEffects:": false,
|
||||
"devDependencies": {
|
||||
@@ -38,6 +35,8 @@
|
||||
"@microsoft/api-documenter": "^7.15.3",
|
||||
"@microsoft/api-extractor": "^7.19.4",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@playwright/experimental-ct-react": "^1.25.1",
|
||||
"@playwright/test": "^1.25.1",
|
||||
"@preconstruct/cli": "^2.2.1",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/mime": "^3.0.1",
|
||||
@@ -64,10 +63,10 @@
|
||||
"@gnosis.pm/safe-ethers-adapters": "0.1.0-alpha.9",
|
||||
"@gnosis.pm/safe-ethers-lib": "1.1.0",
|
||||
"@tanstack/react-query": "^4.0.10",
|
||||
"@thirdweb-dev/storage": "*",
|
||||
"@thirdweb-dev/sdk": "*",
|
||||
"@thirdweb-dev/storage": "*",
|
||||
"@zag-js/menu": "^0.1.11",
|
||||
"@zag-js/react": "^0.1.13",
|
||||
"@zag-js/react": "0.1.16",
|
||||
"color": "^4.2.3",
|
||||
"copy-to-clipboard": "^3.3.2",
|
||||
"detect-browser": "^5.3.0",
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
import type { PlaywrightTestConfig } from '@playwright/experimental-ct-react';
|
||||
import { devices } from '@playwright/experimental-ct-react';
|
||||
|
||||
/**
|
||||
* See https://playwright.dev/docs/test-configuration.
|
||||
*/
|
||||
const config: PlaywrightTestConfig = {
|
||||
testDir: './',
|
||||
/* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */
|
||||
snapshotDir: './__snapshots__',
|
||||
/* Maximum time one test can run for. */
|
||||
timeout: 10 * 1000,
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: true,
|
||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||
forbidOnly: !!process.env.CI,
|
||||
/* Retry on CI only */
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: 'html',
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry',
|
||||
|
||||
/* Port to use for Playwright component endpoint. */
|
||||
ctPort: 3100,
|
||||
},
|
||||
|
||||
/* Configure projects for major browsers */
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'firefox',
|
||||
use: {
|
||||
...devices['Desktop Firefox'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'webkit',
|
||||
use: {
|
||||
...devices['Desktop Safari'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -0,0 +1,107 @@
|
||||
import type { PlaywrightTestConfig } from "@playwright/test";
|
||||
import { devices } from "@playwright/test";
|
||||
|
||||
/**
|
||||
* Read environment variables from file.
|
||||
* https://github.com/motdotla/dotenv
|
||||
*/
|
||||
// require('dotenv').config();
|
||||
|
||||
/**
|
||||
* See https://playwright.dev/docs/test-configuration.
|
||||
*/
|
||||
const config: PlaywrightTestConfig = {
|
||||
testDir: "./e2e",
|
||||
/* Maximum time one test can run for. */
|
||||
timeout: 30 * 1000,
|
||||
expect: {
|
||||
/**
|
||||
* Maximum time expect() should wait for the condition to be met.
|
||||
* For example in `await expect(locator).toHaveText();`
|
||||
*/
|
||||
timeout: 5000,
|
||||
},
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: true,
|
||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||
forbidOnly: !!process.env.CI,
|
||||
/* Retry on CI only */
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: "html",
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
|
||||
actionTimeout: 0,
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
// baseURL: 'http://localhost:3000',
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: "on-first-retry",
|
||||
},
|
||||
|
||||
/* Configure projects for major browsers */
|
||||
projects: [
|
||||
{
|
||||
name: "chromium",
|
||||
use: {
|
||||
...devices["Desktop Chrome"],
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "firefox",
|
||||
use: {
|
||||
...devices["Desktop Firefox"],
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "webkit",
|
||||
use: {
|
||||
...devices["Desktop Safari"],
|
||||
},
|
||||
},
|
||||
|
||||
/* Test against mobile viewports. */
|
||||
// {
|
||||
// name: 'Mobile Chrome',
|
||||
// use: {
|
||||
// ...devices['Pixel 5'],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: 'Mobile Safari',
|
||||
// use: {
|
||||
// ...devices['iPhone 12'],
|
||||
// },
|
||||
// },
|
||||
|
||||
/* Test against branded browsers. */
|
||||
// {
|
||||
// name: 'Microsoft Edge',
|
||||
// use: {
|
||||
// channel: 'msedge',
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: 'Google Chrome',
|
||||
// use: {
|
||||
// channel: 'chrome',
|
||||
// },
|
||||
// },
|
||||
],
|
||||
|
||||
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
|
||||
// outputDir: 'test-results/',
|
||||
|
||||
/* Run your local dev server before starting the tests */
|
||||
// webServer: {
|
||||
// command: 'npm run start',
|
||||
// port: 3000,
|
||||
// },
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Testing Page</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/playwright/index.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
// Import styles, initialize component theme here.
|
||||
// import '../src/common.css';
|
||||
|
||||
export {};
|
||||
@@ -25,8 +25,8 @@ import {
|
||||
SignerOrProvider,
|
||||
ThirdwebSDK,
|
||||
getProviderForNetwork,
|
||||
SDKOptionsOutput,
|
||||
} from "@thirdweb-dev/sdk";
|
||||
import { SDKOptionsOutput } from "@thirdweb-dev/sdk/dist/declarations/src/schema";
|
||||
import type { IStorage } from "@thirdweb-dev/storage";
|
||||
import { Signer } from "ethers";
|
||||
import React, { createContext, useEffect, useMemo } from "react";
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { ConnectWallet } from ".";
|
||||
import { ThirdwebProvider } from "../..";
|
||||
import { test, expect } from "@playwright/experimental-ct-react";
|
||||
|
||||
test.use({ viewport: { width: 500, height: 500 } });
|
||||
|
||||
test("should render the connect wallet button", async ({ mount }) => {
|
||||
const component = await mount(
|
||||
<ThirdwebProvider desiredChainId={1}>
|
||||
<ConnectWallet />
|
||||
</ThirdwebProvider>,
|
||||
);
|
||||
await expect(component).toContainText("Connect Wallet");
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Web3Button } from ".";
|
||||
import { ThirdwebProvider } from "../..";
|
||||
import { test, expect } from "@playwright/experimental-ct-react";
|
||||
|
||||
test.use({ viewport: { width: 500, height: 500 } });
|
||||
|
||||
test("should render the connect wallet button", async ({ mount }) => {
|
||||
const component = await mount(
|
||||
<ThirdwebProvider desiredChainId={1}>
|
||||
<Web3Button contractAddress="0x123" action={() => undefined}>
|
||||
Do the thing
|
||||
</Web3Button>
|
||||
</ThirdwebProvider>,
|
||||
);
|
||||
await expect(component).toContainText("Connect Wallet");
|
||||
});
|
||||
@@ -11,42 +11,30 @@ import { ConnectWallet } from "../ConnectWallet";
|
||||
import { Button } from "../shared/Button";
|
||||
import { ThemeProvider, ThemeProviderProps } from "../shared/ThemeProvider";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import {
|
||||
SmartContract,
|
||||
TransactionError,
|
||||
TransactionResult,
|
||||
} from "@thirdweb-dev/sdk";
|
||||
import { SmartContract } from "@thirdweb-dev/sdk";
|
||||
import type { CallOverrides } from "ethers";
|
||||
import { PropsWithChildren, useMemo } from "react";
|
||||
import invariant from "tiny-invariant";
|
||||
|
||||
interface SharedWeb3ButtonProps extends ThemeProviderProps {
|
||||
type ActionFn = (contract: SmartContract) => any;
|
||||
|
||||
interface Web3ButtonProps<TActionFn extends ActionFn>
|
||||
extends ThemeProviderProps {
|
||||
contractAddress: `0x${string}` | `${string}.eth` | string;
|
||||
|
||||
overrides?: CallOverrides;
|
||||
// called with the result
|
||||
onSuccess?: (result: TransactionResult) => void;
|
||||
onSuccess?: (result: Awaited<ReturnType<TActionFn>>) => void;
|
||||
// called with any error that might happen
|
||||
onError?: (error: TransactionError) => void;
|
||||
onError?: (error: Error) => void;
|
||||
// called when the function is called
|
||||
onSubmit?: () => void;
|
||||
// disabled state
|
||||
isDisabled?: boolean;
|
||||
// the fn to execute
|
||||
action: TActionFn;
|
||||
}
|
||||
|
||||
type ExecutableFn = (contract: SmartContract) => any;
|
||||
|
||||
type Web3ButtonPropsOptinalProps<TExecutableFn extends ExecutableFn> =
|
||||
| {
|
||||
functionName: string;
|
||||
params?: unknown[] | (() => Promise<unknown[]>);
|
||||
action?: never;
|
||||
}
|
||||
| { functionName?: never; params?: never; action: TExecutableFn };
|
||||
|
||||
type Web3ButtonProps<TExecutableFn extends ExecutableFn> =
|
||||
SharedWeb3ButtonProps & Web3ButtonPropsOptinalProps<TExecutableFn>;
|
||||
|
||||
/**
|
||||
* A component that allows the user to call an on-chain function on a contract.
|
||||
*
|
||||
@@ -54,12 +42,12 @@ type Web3ButtonProps<TExecutableFn extends ExecutableFn> =
|
||||
*
|
||||
* @example
|
||||
* ```javascript
|
||||
* import { Web3Button } from '@thirdweb-dev/react';
|
||||
* import { Web3Button } from "@thirdweb-dev/react";
|
||||
*
|
||||
* const App = () => {
|
||||
* return (
|
||||
* <div>
|
||||
* <Web3Button contractAddress="0x..." functionName="mint" />
|
||||
* <Web3Button contractAddress="0x..." action={(contract) => contract.erc721.transfer("0x...", 1)} />
|
||||
* </div>
|
||||
* )
|
||||
* }
|
||||
@@ -68,7 +56,7 @@ type Web3ButtonProps<TExecutableFn extends ExecutableFn> =
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
export const Web3Button = <TExecutableFn extends ExecutableFn>({
|
||||
export const Web3Button = <TAction extends ActionFn>({
|
||||
contractAddress,
|
||||
overrides,
|
||||
onSuccess,
|
||||
@@ -76,11 +64,9 @@ export const Web3Button = <TExecutableFn extends ExecutableFn>({
|
||||
onSubmit,
|
||||
isDisabled,
|
||||
children,
|
||||
functionName,
|
||||
params,
|
||||
action,
|
||||
...themeProps
|
||||
}: PropsWithChildren<Web3ButtonProps<TExecutableFn>>) => {
|
||||
}: PropsWithChildren<Web3ButtonProps<TAction>>) => {
|
||||
const address = useAddress();
|
||||
const walletChainId = useChainId();
|
||||
const sdkChainId = useActiveChainId();
|
||||
@@ -109,34 +95,24 @@ export const Web3Button = <TExecutableFn extends ExecutableFn>({
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!contractQuery.contract) {
|
||||
throw new Error("contract not ready yet");
|
||||
}
|
||||
if (action) {
|
||||
if (onSubmit) {
|
||||
onSubmit();
|
||||
}
|
||||
return await action(contractQuery.contract);
|
||||
}
|
||||
|
||||
const vars = typeof params === "function" ? await params() : params || [];
|
||||
const withOverrides =
|
||||
vars && overrides
|
||||
? [...vars, overrides]
|
||||
: overrides
|
||||
? [overrides]
|
||||
: vars;
|
||||
|
||||
invariant(functionName, "functionName is required");
|
||||
invariant(contractQuery.contract, "contract is not ready yet");
|
||||
|
||||
if (onSubmit) {
|
||||
onSubmit();
|
||||
}
|
||||
return await contractQuery.contract.call(functionName, ...withOverrides);
|
||||
return await action(contractQuery.contract);
|
||||
},
|
||||
{
|
||||
onSuccess,
|
||||
onError,
|
||||
onSuccess: (res) => {
|
||||
if (onSuccess) {
|
||||
onSuccess(res);
|
||||
}
|
||||
},
|
||||
onError: (err) => {
|
||||
if (onError) {
|
||||
onError(err as Error);
|
||||
}
|
||||
},
|
||||
onSettled: () =>
|
||||
queryClient.invalidateQueries(
|
||||
createCacheKeyWithNetwork(
|
||||
|
||||
@@ -11,11 +11,9 @@ import type {
|
||||
NFTMetadata,
|
||||
Price,
|
||||
SignatureDrop,
|
||||
} from "@thirdweb-dev/sdk";
|
||||
import {
|
||||
NFTMetadataInput,
|
||||
NFTMetadataOrUri,
|
||||
} from "@thirdweb-dev/sdk/dist/declarations/src/schema";
|
||||
NFTMetadataInput,
|
||||
} from "@thirdweb-dev/sdk";
|
||||
import type { BigNumberish } from "ethers";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"presets": ["@babel/preset-typescript", "@babel/preset-env"]
|
||||
"presets": [
|
||||
"@babel/preset-typescript",
|
||||
["@babel/preset-env", { "targets": "defaults, not ie 11" }]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# @thirdweb-dev/sdk
|
||||
|
||||
## 2.4.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#45](https://github.com/thirdweb-dev/js/pull/45) [`ed639d6`](https://github.com/thirdweb-dev/js/commit/ed639d659d9d746321fb8858212d22cc16d9cd19) Thanks [@jnsdls](https://github.com/jnsdls)! - switch back to preconstruct for building
|
||||
|
||||
- [#46](https://github.com/thirdweb-dev/js/pull/46) [`349b5c1`](https://github.com/thirdweb-dev/js/commit/349b5c1e028a06616d40de84257fd8d1cf05df83) Thanks [@jnsdls](https://github.com/jnsdls)! - imrprove babel & tsconfig settings
|
||||
|
||||
- [#42](https://github.com/thirdweb-dev/js/pull/42) [`46ad691`](https://github.com/thirdweb-dev/js/commit/46ad691a1636dbc7915ade22067ccfa1d39f7851) Thanks [@jnsdls](https://github.com/jnsdls)! - switch build to tsup
|
||||
|
||||
- [#34](https://github.com/thirdweb-dev/js/pull/34) [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95) Thanks [@jnsdls](https://github.com/jnsdls)! - add e2e tests
|
||||
|
||||
- [#34](https://github.com/thirdweb-dev/js/pull/34) [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95) Thanks [@jnsdls](https://github.com/jnsdls)! - fix build for CRA and vite builds (replaced `cbor` dependency with `cbor-web`)
|
||||
|
||||
- Updated dependencies [[`127bc50`](https://github.com/thirdweb-dev/js/commit/127bc50217139345dd44a09114a9bec2c3ac9e97), [`ed639d6`](https://github.com/thirdweb-dev/js/commit/ed639d659d9d746321fb8858212d22cc16d9cd19), [`349b5c1`](https://github.com/thirdweb-dev/js/commit/349b5c1e028a06616d40de84257fd8d1cf05df83), [`c52a43c`](https://github.com/thirdweb-dev/js/commit/c52a43c8863052b6d1bc9b8c3e1e86d0e1759d39), [`46ad691`](https://github.com/thirdweb-dev/js/commit/46ad691a1636dbc7915ade22067ccfa1d39f7851), [`5731ac2`](https://github.com/thirdweb-dev/js/commit/5731ac2f50ef63c243d3a6c2516e85920c325a95)]:
|
||||
- @thirdweb-dev/contracts-js@1.1.1
|
||||
- @thirdweb-dev/storage@0.2.3
|
||||
|
||||
## 2.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<p align="center">
|
||||
<br />
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/typescript-sdk/blob/main/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/packages/sdk/logo.svg?raw=true" width="200" alt=""/></a>
|
||||
<br />
|
||||
</p>
|
||||
<h1 align="center">thirdweb TypeScript SDK</h1>
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/@thirdweb-dev/sdk"><img src="https://img.shields.io/github/package-json/v/thirdweb-dev/typescript-sdk?color=red&label=npm&logo=npm" alt="npm version"/></a>
|
||||
<a href="https://github.com/thirdweb-dev/typescript-sdk/actions"><img alt="Build Status" src="https://github.com/thirdweb-dev/typescript-sdk/actions/workflows/tests.yml/badge.svg"/></a>
|
||||
<a href="https://www.npmjs.com/package/@thirdweb-dev/sdk"><img src="https://img.shields.io/npm/v/@thirdweb-dev/sdk?color=red&label=npm&logo=npm" alt="npm version"/></a>
|
||||
<a href="https://github.com/thirdweb-dev/js/actions/workflows/CI.yml"><img alt="Build Status" src="https://github.com/thirdweb-dev/js/actions/workflows/CI.yml/badge.svg"/></a>
|
||||
<a href="https://discord.gg/thirdweb"><img alt="Join our Discord!" src="https://img.shields.io/discord/834227967404146718.svg?color=7289da&label=discord&logo=discord&style=flat"/></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { prepareEnvironment } from "@gmrchk/cli-testing-library";
|
||||
import { expect } from "chai";
|
||||
|
||||
describe("node", () => {
|
||||
it("getContract().metadata.get()", async () => {
|
||||
const { execute, cleanup } = await prepareEnvironment();
|
||||
|
||||
const { code, stdout, stderr } = await execute(
|
||||
"node",
|
||||
"./e2e/node-scripts/basic.js",
|
||||
);
|
||||
|
||||
console.log("stderr", stderr);
|
||||
|
||||
expect(code).to.equal(0);
|
||||
expect(stdout[0]).to.contain("mintED Toasts");
|
||||
expect(stderr.length).to.equal(0);
|
||||
|
||||
await cleanup();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
const { ThirdwebSDK } = require("../..");
|
||||
|
||||
(async function () {
|
||||
const sdk = new ThirdwebSDK("rinkeby");
|
||||
const c = await sdk.getContract("0x10fDF181eDceAEF044328BeF07979FfaE209023f");
|
||||
console.log(await c.metadata.get());
|
||||
})();
|
||||
File diff suppressed because it is too large
Load Diff
+11
-16
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/sdk",
|
||||
"version": "2.4.1",
|
||||
"version": "2.4.2",
|
||||
"description": "The main thirdweb SDK.",
|
||||
"repository": {
|
||||
"directory": "packages/sdk",
|
||||
@@ -16,12 +16,9 @@
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"clean": "rm -rf dist/",
|
||||
"dev": "tsdx watch",
|
||||
"format": "prettier src/ --write",
|
||||
"prepublishOnly": "yarn lint && yarn build",
|
||||
"lint": "eslint src/",
|
||||
"fix": "eslint src/ --fix",
|
||||
"generate-types": "tsc",
|
||||
"extract-api": "api-extractor run --local",
|
||||
"full-build": "yarn build:lib && yarn extract-api",
|
||||
"generate-md-docs": "yarn api-documenter markdown -i ./temp -o ./docs",
|
||||
@@ -30,14 +27,18 @@
|
||||
"build": "tsc && preconstruct build",
|
||||
"test:all": "ts-mocha --parallel --paths -t 120000 -r esm -p tsconfig.testing.json './test/**/*.test.ts'",
|
||||
"test": "make test",
|
||||
"test:single": "ts-mocha --paths -t 120000 -r esm -p tsconfig.testing.json"
|
||||
"test:single": "ts-mocha --paths -t 120000 -r esm -p tsconfig.testing.json",
|
||||
"e2e": "ts-mocha --parallel --paths -t 120000 -r esm -p tsconfig.testing.json './e2e/**/*.test.ts'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cbor": "^8.1.0",
|
||||
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
|
||||
"@gmrchk/cli-testing-library": "^0.1.2",
|
||||
"@microsoft/api-documenter": "^7.13.53",
|
||||
"@microsoft/api-extractor": "^7.18.10",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@nomiclabs/hardhat-ethers": "2.0.5",
|
||||
"@preconstruct/cli": "^2.2.1",
|
||||
"@swc/core": "^1.2.177",
|
||||
"@typechain/ethers-v5": "10.0.0",
|
||||
"@types/chai": "^4.3.1",
|
||||
@@ -65,26 +66,20 @@
|
||||
"ts-mocha": "^10.0.0",
|
||||
"ts-node": "^10.7.0",
|
||||
"typechain": "^8.0.0",
|
||||
"typescript": "^4.6.2",
|
||||
"@preconstruct/cli": "^2.2.1"
|
||||
},
|
||||
"preconstruct": {
|
||||
"entrypoints": [
|
||||
"index.ts"
|
||||
]
|
||||
"typescript": "^4.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ethers": "^5"
|
||||
},
|
||||
"dependencies": {
|
||||
"merkletreejs": "^0.2.24",
|
||||
"@thirdweb-dev/contracts-js": "*",
|
||||
"@thirdweb-dev/storage": "*",
|
||||
"cbor": "^8.1.0",
|
||||
"cbor-web": "^8.1.0",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"form-data": "^4.0.0",
|
||||
"merkletreejs": "^0.2.24",
|
||||
"multihashes": "^4.0.3",
|
||||
"tiny-invariant": "^1.2.0",
|
||||
"uuid": "^8.3.2",
|
||||
@@ -96,8 +91,8 @@
|
||||
"@microsoft/tsdoc": "^0.14.1"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/thirdweb-dev/typescript-sdk/issues"
|
||||
"url": "https://github.com/thirdweb-dev/js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/thirdweb-dev/typescript-sdk#readme",
|
||||
"homepage": "https://github.com/thirdweb-dev/js/blob/main/packages/sdk/README.md",
|
||||
"author": "thirdweb eng <[email protected]>"
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
PublishedMetadata,
|
||||
} from "../schema/contracts/custom";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { decodeFirstSync } from "cbor";
|
||||
import { decodeFirstSync } from "cbor-web";
|
||||
import { BaseContract, ethers } from "ethers";
|
||||
import { toB58String } from "multihashes";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
import { Erc1155 } from "../core/classes/erc-1155";
|
||||
import { DropERC1155 } from "@thirdweb-dev/contracts-js";
|
||||
import { getRoleHash } from "../common";
|
||||
import { TransactionTask } from "../core/classes/TransactionTask";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { DropErc1155ClaimConditions } from "../core/classes/drop-erc1155-claim-conditions";
|
||||
import { DropErc1155History } from "../core/classes/drop-erc1155-history";
|
||||
import { Erc1155 } from "../core/classes/erc-1155";
|
||||
import { Erc1155Burnable } from "../core/classes/erc-1155-burnable";
|
||||
import { Erc1155Claimable } from "../core/classes/erc-1155-claimable";
|
||||
import { Erc1155Enumerable } from "../core/classes/erc-1155-enumerable";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { Erc1155Droppable } from "../core/index";
|
||||
import {
|
||||
NetworkOrSignerOrProvider,
|
||||
TransactionResult,
|
||||
TransactionResultWithId,
|
||||
} from "../core/types";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { NFTMetadata, NFTMetadataOrUri } from "../schema/tokens/common";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
import { DropErc1155ClaimConditions } from "../core/classes/drop-erc1155-claim-conditions";
|
||||
import { DropErc1155ContractSchema } from "../schema/contracts/drop-erc1155";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { QueryAllParams, UploadProgressEvent } from "../types";
|
||||
import { DropErc1155History } from "../core/classes/drop-erc1155-history";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { getRoleHash } from "../common";
|
||||
|
||||
import { EditionMetadata, EditionMetadataOwner } from "../schema";
|
||||
import { TransactionTask } from "../core/classes/TransactionTask";
|
||||
import { Erc1155Burnable } from "../core/classes/erc-1155-burnable";
|
||||
import { Erc1155Droppable } from "../core/index";
|
||||
import { Erc1155Claimable } from "../core/classes/erc-1155-claimable";
|
||||
import { DropErc1155ContractSchema } from "../schema/contracts/drop-erc1155";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { NFTMetadata, NFTMetadataOrUri } from "../schema/tokens/common";
|
||||
import { QueryAllParams, UploadProgressEvent } from "../types";
|
||||
import { DropERC1155 } from "@thirdweb-dev/contracts-js";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/DropERC1155.json";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
|
||||
/**
|
||||
* Setup a collection of NFTs with a customizable number of each NFT that are minted as users claim them.
|
||||
@@ -49,7 +49,7 @@ import { Erc1155Claimable } from "../core/classes/erc-1155-claimable";
|
||||
export class EditionDrop extends Erc1155<DropERC1155> {
|
||||
static contractType = "edition-drop" as const;
|
||||
static contractRoles = ["admin", "minter", "transfer"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/DropERC1155.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -1,36 +1,37 @@
|
||||
import { Erc1155 } from "../core/classes/erc-1155";
|
||||
import { TokenERC1155 } from "@thirdweb-dev/contracts-js";
|
||||
import { getRoleHash } from "../common";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { Erc1155 } from "../core/classes/erc-1155";
|
||||
import { Erc1155BatchMintable } from "../core/classes/erc-1155-batch-mintable";
|
||||
import { Erc1155Burnable } from "../core/classes/erc-1155-burnable";
|
||||
import { Erc1155Enumerable } from "../core/classes/erc-1155-enumerable";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { Erc1155Mintable } from "../core/classes/erc-1155-mintable";
|
||||
import { Erc1155SignatureMintable } from "../core/classes/erc-1155-signature-mintable";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import {
|
||||
NetworkOrSignerOrProvider,
|
||||
TransactionResult,
|
||||
TransactionResultWithId,
|
||||
} from "../core/types";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { TokenErc1155ContractSchema } from "../schema/contracts/token-erc1155";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import {
|
||||
EditionMetadata,
|
||||
EditionMetadataOrUri,
|
||||
EditionMetadataOwner,
|
||||
} from "../schema/tokens/edition";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { getRoleHash } from "../common";
|
||||
import { QueryAllParams } from "../types";
|
||||
import { Erc1155Mintable } from "../core/classes/erc-1155-mintable";
|
||||
import { Erc1155BatchMintable } from "../core/classes/erc-1155-batch-mintable";
|
||||
import { Erc1155SignatureMintable } from "../core/classes/erc-1155-signature-mintable";
|
||||
import { Erc1155Burnable } from "../core/classes/erc-1155-burnable";
|
||||
import { TokenERC1155 } from "@thirdweb-dev/contracts-js";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/TokenERC1155.json";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
|
||||
/**
|
||||
* Create a collection of NFTs that lets you mint multiple copies of each NFT.
|
||||
@@ -49,7 +50,7 @@ import { Erc1155Burnable } from "../core/classes/erc-1155-burnable";
|
||||
export class Edition extends Erc1155<TokenERC1155> {
|
||||
static contractType = "edition" as const;
|
||||
static contractRoles = ["admin", "minter", "transfer"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/TokenERC1155.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
import { Marketplace as MarketplaceContract } from "@thirdweb-dev/contracts-js";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ListingNotFoundError } from "../common";
|
||||
import { getRoleHash } from "../common/role";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { NetworkOrSignerOrProvider, TransactionResult } from "../core/types";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { MarketplaceAuction } from "../core/classes/marketplace-auction";
|
||||
import { MarketplaceDirect } from "../core/classes/marketplace-direct";
|
||||
import { UpdateableNetwork } from "../core/interfaces/contract";
|
||||
import { MarketplaceContractSchema } from "../schema/contracts/marketplace";
|
||||
import { AuctionListing, DirectListing } from "../types/marketplace";
|
||||
import { NetworkOrSignerOrProvider, TransactionResult } from "../core/types";
|
||||
import { ListingType } from "../enums";
|
||||
import { MarketplaceContractSchema } from "../schema/contracts/marketplace";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { DEFAULT_QUERY_ALL_COUNT } from "../types/QueryParams";
|
||||
import { AuctionListing, DirectListing } from "../types/marketplace";
|
||||
import { MarketplaceFilter } from "../types/marketplace/MarketPlaceFilter";
|
||||
import { Marketplace as MarketplaceContract } from "@thirdweb-dev/contracts-js";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/Marketplace.json";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
import invariant from "tiny-invariant";
|
||||
import { ListingNotFoundError } from "../common";
|
||||
import { MarketplaceFilter } from "../types/marketplace/MarketPlaceFilter";
|
||||
import { getRoleHash } from "../common/role";
|
||||
import { MarketplaceDirect } from "../core/classes/marketplace-direct";
|
||||
import { MarketplaceAuction } from "../core/classes/marketplace-auction";
|
||||
import { DEFAULT_QUERY_ALL_COUNT } from "../types/QueryParams";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
|
||||
/**
|
||||
* Create your own whitelabel marketplace that enables users to buy and sell any digital assets.
|
||||
@@ -40,7 +41,7 @@ import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
export class Marketplace implements UpdateableNetwork {
|
||||
static contractType = "marketplace" as const;
|
||||
static contractRoles = ["admin", "lister", "asset"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/Marketplace.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -1,19 +1,27 @@
|
||||
import {
|
||||
fetchCurrencyMetadata,
|
||||
hasERC20Allowance,
|
||||
normalizePriceValue,
|
||||
} from "../common/currency";
|
||||
import { isTokenApprovedForTransfer } from "../common/marketplace";
|
||||
import { uploadOrExtractURI } from "../common/nft";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { Erc721 } from "../core/classes/erc-721";
|
||||
import { Erc721Supply } from "../core/classes/erc-721-supply";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import {
|
||||
NetworkOrSignerOrProvider,
|
||||
TransactionResult,
|
||||
TransactionResultWithId,
|
||||
} from "../core/types";
|
||||
import { Erc721 } from "../core/classes/erc-721";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { NFTMetadataOrUri, NFTMetadataOwner, SDKOptions } from "../schema";
|
||||
import { Multiwrap as MultiwrapContract } from "@thirdweb-dev/contracts-js";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { uploadOrExtractURI } from "../common/nft";
|
||||
import { MultiwrapContractSchema } from "../schema/contracts/multiwrap";
|
||||
import { QueryAllParams } from "../types";
|
||||
import {
|
||||
ERC1155Wrappable,
|
||||
ERC20Wrappable,
|
||||
@@ -21,18 +29,14 @@ import {
|
||||
TokensToWrap,
|
||||
WrappedTokens,
|
||||
} from "../types/multiwrap";
|
||||
import { Multiwrap as MultiwrapContract } from "@thirdweb-dev/contracts-js";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/Multiwrap.json";
|
||||
import {
|
||||
fetchCurrencyMetadata,
|
||||
hasERC20Allowance,
|
||||
normalizePriceValue,
|
||||
} from "../common/currency";
|
||||
import { MultiwrapContractSchema } from "../schema/contracts/multiwrap";
|
||||
import { BigNumberish, ethers } from "ethers";
|
||||
import { QueryAllParams } from "../types";
|
||||
import { isTokenApprovedForTransfer } from "../common/marketplace";
|
||||
import { Erc721Supply } from "../core/classes/erc-721-supply";
|
||||
ITokenBundle,
|
||||
TokensWrappedEvent,
|
||||
} from "@thirdweb-dev/contracts-js/dist/declarations/src/Multiwrap";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { ITokenBundle, TokensWrappedEvent } from "@thirdweb-dev/contracts-js/dist/declarations/src/Multiwrap";
|
||||
import { BigNumberish, ethers } from "ethers";
|
||||
|
||||
/**
|
||||
* Multiwrap lets you wrap any number of ERC20, ERC721 and ERC1155 tokens you own into a single wrapped token bundle.
|
||||
@@ -51,7 +55,7 @@ import { ITokenBundle, TokensWrappedEvent } from "@thirdweb-dev/contracts-js/dis
|
||||
export class Multiwrap extends Erc721<MultiwrapContract> {
|
||||
static contractType = "multiwrap" as const;
|
||||
static contractRoles = ["transfer", "minter", "unwrap", "asset"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/Multiwrap.json");
|
||||
static contractAbi = ABI as any;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
||||
@@ -1,33 +1,34 @@
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { getRoleHash } from "../common";
|
||||
import { Erc721WithQuantitySignatureMintable } from "../core";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { Erc721 } from "../core/classes/erc-721";
|
||||
import { Erc721BatchMintable } from "../core/classes/erc-721-batch-mintable";
|
||||
import { Erc721Burnable } from "../core/classes/erc-721-burnable";
|
||||
import { Erc721Enumerable } from "../core/classes/erc-721-enumerable";
|
||||
import { Erc721Mintable } from "../core/classes/erc-721-mintable";
|
||||
import { Erc721Supply } from "../core/classes/erc-721-supply";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import type {
|
||||
NetworkOrSignerOrProvider,
|
||||
TransactionResult,
|
||||
TransactionResultWithId,
|
||||
} from "../core/types";
|
||||
import { Erc721BatchMintable } from "../core/classes/erc-721-batch-mintable";
|
||||
import { Erc721Enumerable } from "../core/classes/erc-721-enumerable";
|
||||
import { Erc721Mintable } from "../core/classes/erc-721-mintable";
|
||||
import { Erc721Supply } from "../core/classes/erc-721-supply";
|
||||
import { TokenErc721ContractSchema } from "../schema/contracts/token-erc721";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { TokenERC721 } from "@thirdweb-dev/contracts-js";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { Erc721 } from "../core/classes/erc-721";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { getRoleHash } from "../common";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
import { NFTMetadataOrUri, NFTMetadataOwner } from "../schema";
|
||||
import { TokenErc721ContractSchema } from "../schema/contracts/token-erc721";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { QueryAllParams } from "../types";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { Erc721WithQuantitySignatureMintable } from "../core";
|
||||
import { Erc721Burnable } from "../core/classes/erc-721-burnable";
|
||||
import { TokenERC721 } from "@thirdweb-dev/contracts-js";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/TokenERC721.json";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
|
||||
/**
|
||||
* Create a collection of one-of-one NFTs.
|
||||
@@ -46,7 +47,7 @@ import { Erc721Burnable } from "../core/classes/erc-721-burnable";
|
||||
export class NFTCollection extends Erc721<TokenERC721> {
|
||||
static contractType = "nft-collection" as const;
|
||||
static contractRoles = ["admin", "minter", "transfer"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/TokenERC721.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { BigNumber, BigNumberish, constants, ethers } from "ethers";
|
||||
import { getRoleHash } from "../common";
|
||||
import { prepareClaim } from "../common/claim-conditions";
|
||||
import { uploadOrExtractURIs } from "../common/nft";
|
||||
import { FEATURE_NFT_REVEALABLE } from "../constants/erc721-features";
|
||||
import { TransactionTask } from "../core/classes/TransactionTask";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { DelayedReveal } from "../core/classes/delayed-reveal";
|
||||
import { DropClaimConditions } from "../core/classes/drop-claim-conditions";
|
||||
import { Erc721 } from "../core/classes/erc-721";
|
||||
import { Erc721Burnable } from "../core/classes/erc-721-burnable";
|
||||
import { Erc721Enumerable } from "../core/classes/erc-721-enumerable";
|
||||
import { Erc721Supply } from "../core/classes/erc-721-supply";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import {
|
||||
NetworkOrSignerOrProvider,
|
||||
TransactionResult,
|
||||
@@ -16,28 +31,17 @@ import {
|
||||
NFTMetadataOrUri,
|
||||
NFTMetadataOwner,
|
||||
} from "../schema/tokens/common";
|
||||
import { DEFAULT_QUERY_ALL_COUNT, QueryAllParams } from "../types/QueryParams";
|
||||
import { DropClaimConditions } from "../core/classes/drop-claim-conditions";
|
||||
import { Erc721 } from "../core/classes/erc-721";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { prepareClaim } from "../common/claim-conditions";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { DelayedReveal } from "../core/classes/delayed-reveal";
|
||||
import { Erc721Enumerable } from "../core/classes/erc-721-enumerable";
|
||||
import { Erc721Supply } from "../core/classes/erc-721-supply";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { ClaimVerification } from "../types";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { getRoleHash } from "../common";
|
||||
import { DEFAULT_QUERY_ALL_COUNT, QueryAllParams } from "../types/QueryParams";
|
||||
import { UploadProgressEvent } from "../types/events";
|
||||
import { uploadOrExtractURIs } from "../common/nft";
|
||||
import { TransactionTask } from "../core/classes/TransactionTask";
|
||||
import { Erc721Burnable } from "../core/classes/erc-721-burnable";
|
||||
import { FEATURE_NFT_REVEALABLE } from "../constants/erc721-features";
|
||||
import { DropERC721 } from "@thirdweb-dev/contracts-js";
|
||||
import { TokensClaimedEvent, TokensLazyMintedEvent } from "@thirdweb-dev/contracts-js/dist/declarations/src/DropERC721";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/DropERC721.json";
|
||||
import {
|
||||
TokensClaimedEvent,
|
||||
TokensLazyMintedEvent,
|
||||
} from "@thirdweb-dev/contracts-js/dist/declarations/src/DropERC721";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { BigNumber, BigNumberish, constants, ethers } from "ethers";
|
||||
|
||||
/**
|
||||
* Setup a collection of one-of-one NFTs that are minted as users claim them.
|
||||
@@ -56,7 +60,7 @@ import { TokensClaimedEvent, TokensLazyMintedEvent } from "@thirdweb-dev/contrac
|
||||
export class NFTDrop extends Erc721<DropERC721> {
|
||||
static contractType = "nft-drop" as const;
|
||||
static contractRoles = ["admin", "minter", "transfer"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/DropERC721.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -1,28 +1,3 @@
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import {
|
||||
NetworkOrSignerOrProvider,
|
||||
TransactionResultWithId,
|
||||
} from "../core/types";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { Pack as PackContract } from "@thirdweb-dev/contracts-js";
|
||||
import { PackContractSchema } from "../schema/contracts/packs";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { Erc1155 } from "../core/classes/erc-1155";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import {
|
||||
PackMetadataInput,
|
||||
PackMetadataInputSchema,
|
||||
PackMetadataOutput,
|
||||
PackRewards,
|
||||
PackRewardsOutput,
|
||||
} from "../schema/tokens/pack";
|
||||
import { BigNumber, BigNumberish, ethers } from "ethers";
|
||||
import {
|
||||
fetchCurrencyMetadata,
|
||||
hasERC20Allowance,
|
||||
@@ -30,11 +5,41 @@ import {
|
||||
} from "../common/currency";
|
||||
import { isTokenApprovedForTransfer } from "../common/marketplace";
|
||||
import { uploadOrExtractURI } from "../common/nft";
|
||||
import { EditionMetadata, EditionMetadataOwner } from "../schema";
|
||||
import { Erc1155Enumerable } from "../core/classes/erc-1155-enumerable";
|
||||
import { QueryAllParams } from "../types";
|
||||
import { getRoleHash } from "../common/role";
|
||||
import { ITokenBundle, PackCreatedEvent, PackOpenedEvent } from "@thirdweb-dev/contracts-js/dist/declarations/src/Pack";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { Erc1155 } from "../core/classes/erc-1155";
|
||||
import { Erc1155Enumerable } from "../core/classes/erc-1155-enumerable";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import {
|
||||
NetworkOrSignerOrProvider,
|
||||
TransactionResultWithId,
|
||||
} from "../core/types";
|
||||
import { EditionMetadata, EditionMetadataOwner } from "../schema";
|
||||
import { PackContractSchema } from "../schema/contracts/packs";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import {
|
||||
PackMetadataInput,
|
||||
PackMetadataInputSchema,
|
||||
PackMetadataOutput,
|
||||
PackRewards,
|
||||
PackRewardsOutput,
|
||||
} from "../schema/tokens/pack";
|
||||
import { QueryAllParams } from "../types";
|
||||
import { Pack as PackContract } from "@thirdweb-dev/contracts-js";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/Pack.json";
|
||||
import {
|
||||
ITokenBundle,
|
||||
PackCreatedEvent,
|
||||
PackOpenedEvent,
|
||||
} from "@thirdweb-dev/contracts-js/dist/declarations/src/Pack";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { BigNumber, BigNumberish, ethers } from "ethers";
|
||||
|
||||
/**
|
||||
* Create lootboxes of NFTs with rarity based open mechanics.
|
||||
@@ -53,7 +58,7 @@ import { ITokenBundle, PackCreatedEvent, PackOpenedEvent } from "@thirdweb-dev/c
|
||||
export class Pack extends Erc1155<PackContract> {
|
||||
static contractType = "pack" as const;
|
||||
static contractRoles = ["admin", "minter", "pauser", "transfer"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/Pack.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,27 @@
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { SignatureDrop as SignatureDropContract } from "@thirdweb-dev/contracts-js";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
import { getRoleHash } from "../common";
|
||||
import { FEATURE_NFT_REVEALABLE } from "../constants/erc721-features";
|
||||
import { TransactionTask } from "../core/classes/TransactionTask";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractRoyalty } from "../core/classes/contract-royalty";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { Erc721 } from "../core/classes/erc-721";
|
||||
import { Erc721Burnable } from "../core/classes/erc-721-burnable";
|
||||
import { Erc721Enumerable } from "../core/classes/erc-721-enumerable";
|
||||
import { Erc721Supply } from "../core/classes/erc-721-supply";
|
||||
import { Erc721WithQuantitySignatureMintable } from "../core/classes/erc-721-with-quantity-signature-mintable";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import {
|
||||
DelayedReveal,
|
||||
DropClaimConditions,
|
||||
Erc721Claimable,
|
||||
Erc721Droppable,
|
||||
} from "../core/index";
|
||||
import {
|
||||
NetworkOrSignerOrProvider,
|
||||
TransactionResult,
|
||||
@@ -17,28 +34,12 @@ import {
|
||||
NFTMetadataOrUri,
|
||||
NFTMetadataOwner,
|
||||
} from "../schema/tokens/common";
|
||||
import { DEFAULT_QUERY_ALL_COUNT, QueryAllParams } from "../types/QueryParams";
|
||||
import { Erc721 } from "../core/classes/erc-721";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { Erc721Enumerable } from "../core/classes/erc-721-enumerable";
|
||||
import { Erc721Supply } from "../core/classes/erc-721-supply";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { UploadProgressEvent } from "../types";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { getRoleHash } from "../common";
|
||||
import {
|
||||
DelayedReveal,
|
||||
DropClaimConditions,
|
||||
Erc721Claimable,
|
||||
Erc721Droppable,
|
||||
} from "../core/index";
|
||||
import { Erc721WithQuantitySignatureMintable } from "../core/classes/erc-721-with-quantity-signature-mintable";
|
||||
import { TransactionTask } from "../core/classes/TransactionTask";
|
||||
import { Erc721Burnable } from "../core/classes/erc-721-burnable";
|
||||
import { FEATURE_NFT_REVEALABLE } from "../constants/erc721-features";
|
||||
import { DEFAULT_QUERY_ALL_COUNT, QueryAllParams } from "../types/QueryParams";
|
||||
import { SignatureDrop as SignatureDropContract } from "@thirdweb-dev/contracts-js";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/SignatureDrop.json";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||
|
||||
/**
|
||||
* Setup a collection of NFTs where when it comes to minting, you can authorize
|
||||
@@ -59,7 +60,7 @@ import { FEATURE_NFT_REVEALABLE } from "../constants/erc721-features";
|
||||
export class SignatureDrop extends Erc721<SignatureDropContract> {
|
||||
static contractType = "signature-drop" as const;
|
||||
static contractRoles = ["admin", "minter", "transfer"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/SignatureDrop.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
import { UpdateableNetwork } from "../core/interfaces/contract";
|
||||
import { IERC20, Split as SplitContract } from "@thirdweb-dev/contracts-js";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { NetworkOrSignerOrProvider, TransactionResult } from "../core/types";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { CurrencyValue } from "../types/currency";
|
||||
import { fetchCurrencyValue } from "../common/currency";
|
||||
import { BigNumber, Contract } from "ethers";
|
||||
import { SplitRecipient } from "../types/SplitRecipient";
|
||||
import { SplitsContractSchema } from "../schema/contracts/splits";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractEvents } from "../core/classes/contract-events";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { UpdateableNetwork } from "../core/interfaces/contract";
|
||||
import { NetworkOrSignerOrProvider, TransactionResult } from "../core/types";
|
||||
import { SplitsContractSchema } from "../schema/contracts/splits";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { SplitRecipient } from "../types/SplitRecipient";
|
||||
import { CurrencyValue } from "../types/currency";
|
||||
import { IERC20, Split as SplitContract } from "@thirdweb-dev/contracts-js";
|
||||
import ERC20Abi from "@thirdweb-dev/contracts-js/abis/IERC20.json";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/Split.json";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { BigNumber, Contract } from "ethers";
|
||||
|
||||
/**
|
||||
* Create custom royalty splits to distribute funds.
|
||||
@@ -32,7 +33,7 @@ import ERC20Abi from "@thirdweb-dev/contracts-js/abis/IERC20.json";
|
||||
*/
|
||||
export class Split implements UpdateableNetwork {
|
||||
static contractType = "split" as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/Split.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
import { DropERC20 } from "@thirdweb-dev/contracts-js";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { NetworkOrSignerOrProvider, TransactionResult } from "../core/types";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { constants } from "ethers";
|
||||
import { getRoleHash } from "../common";
|
||||
import { ContractEncoder } from "../core/classes/contract-encoder";
|
||||
import { ContractInterceptor } from "../core/classes/contract-interceptor";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractMetadata } from "../core/classes/contract-metadata";
|
||||
import { ContractPlatformFee } from "../core/classes/contract-platform-fee";
|
||||
import { ContractRoles } from "../core/classes/contract-roles";
|
||||
import { ContractPrimarySale } from "../core/classes/contract-sales";
|
||||
import { ContractWrapper } from "../core/classes/contract-wrapper";
|
||||
import { DropClaimConditions } from "../core/classes/drop-claim-conditions";
|
||||
import { Erc20 } from "../core/classes/erc-20";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { Amount, CurrencyValue } from "../types";
|
||||
import { DropErc20ContractSchema } from "../schema/contracts/drop-erc20";
|
||||
import { getRoleHash } from "../common";
|
||||
import { Erc20Burnable } from "../core/classes/erc-20-burnable";
|
||||
import { Erc20Claimable } from "../core/classes/erc-20-claimable";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { NetworkOrSignerOrProvider, TransactionResult } from "../core/types";
|
||||
import { DropErc20ContractSchema } from "../schema/contracts/drop-erc20";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { Amount, CurrencyValue } from "../types";
|
||||
import { DropERC20 } from "@thirdweb-dev/contracts-js";
|
||||
import ABI from "@thirdweb-dev/contracts-js/abis/DropERC20.json";
|
||||
import { IStorage } from "@thirdweb-dev/storage";
|
||||
import { constants } from "ethers";
|
||||
|
||||
/**
|
||||
* Create a Drop contract for a standard crypto token or cryptocurrency.
|
||||
@@ -35,7 +36,7 @@ import { Erc20Claimable } from "../core/classes/erc-20-claimable";
|
||||
export class TokenDrop extends Erc20<DropERC20> {
|
||||
static contractType = "token-drop" as const;
|
||||
static contractRoles = ["admin", "transfer"] as const;
|
||||
static contractAbi = require("@thirdweb-dev/contracts-js/abis/DropERC20.json");
|
||||
static contractAbi = ABI as any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user