Skip to content

Commit 3915624

Browse files
committed
feat: update create token to return a prepared tx
1 parent b01bdcd commit 3915624

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.changeset/twenty-bees-sink.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Update createToken to return a prepared transaction

packages/thirdweb/src/tokens/predict-address.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import {
1212
import type { CreateTokenOptions } from "./types.js";
1313

1414
export async function predictAddress(options: CreateTokenOptions) {
15-
const { client, account, params, launchConfig } = options;
15+
const { client, params, launchConfig } = options;
1616

17-
const creator = params.owner || account.address;
17+
const creator = params.owner;
1818
const encodedInitData = await encodeInitParams({
1919
client,
2020
creator,

packages/thirdweb/src/tokens/types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Hex } from "viem";
22
import type { FileOrBufferOrString } from "../storage/upload/types.js";
33
import type {
4-
ClientAndChainAndAccount,
54
ClientAndChain,
5+
ClientAndChainAndAccount,
66
} from "../utils/types.js";
77

88
export type TokenParams = {
@@ -47,6 +47,6 @@ export type CreateTokenOptions = ClientAndChain & {
4747

4848
export type CreateTokenByImplementationConfigOptions =
4949
ClientAndChainAndAccount &
50-
CreateTokenOptions & {
51-
implementationAddress: string;
52-
};
50+
CreateTokenOptions & {
51+
implementationAddress: string;
52+
};

0 commit comments

Comments
 (0)