File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
packages/thirdweb/src/assets Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -38,16 +38,14 @@ export async function createToken(options: CreateTokenOptions) {
3838
3939 let salt : Hex = "0x" ;
4040 if ( ! options . salt ) {
41- salt =
42- "0x1f" +
43- toHex ( blockNumber , {
44- size : 32 ,
45- } ) . substring ( 4 ) ;
41+ salt = `0x1f${ toHex ( blockNumber , {
42+ size : 32 ,
43+ } ) . substring ( 4 ) } `;
4644 } else {
4745 if ( options . salt . startsWith ( "0x" ) && options . salt . length === 66 ) {
48- salt = options . salt as `0x${ string } ` ;
46+ salt = options . salt ;
4947 } else {
50- salt = " 0x1f" + keccakId ( options . salt ) . substring ( 4 ) ;
48+ salt = ` 0x1f${ keccakId ( options . salt ) . substring ( 4 ) } ` ;
5149 }
5250 }
5351
Original file line number Diff line number Diff line change 1+ import type { Hex } from "viem" ;
12import type { FileOrBufferOrString } from "../storage/upload/types.js" ;
23import type { ClientAndChainAndAccount } from "../utils/types.js" ;
34
@@ -45,7 +46,7 @@ type LaunchConfig =
4546 | { kind : "distribute" ; config : DistributeConfig } ;
4647
4748export type CreateTokenOptions = ClientAndChainAndAccount & {
48- salt ?: string ;
49+ salt ?: Hex ;
4950 params : TokenParams ;
5051 launchConfig ?: LaunchConfig ;
5152 referrerAddress ?: string ;
You can’t perform that action at this time.
0 commit comments