File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Top Open diff view settings
packages/thirdweb/src/assets Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Top Open diff view settings Original file line number Diff line number Diff line change @@ -46,9 +46,17 @@ export async function createToken(options: CreateTokenOptions) {
4646 const entrypoint = await getOrDeployEntrypointERC20 ( options ) ;
4747
4848 let hookData : Hex = "0x" ;
49-
49+ let amount = toUnits (
50+ params . maxSupply . toString ( ) || DEFAULT_MAX_SUPPLY_ERC20 . toString ( ) ,
51+ 18 ,
52+ ) ;
5053 if ( launchConfig ?. kind === "pool" ) {
5154 hookData = encodePoolConfig ( launchConfig . config ) ;
55+ amount = toUnits (
56+ launchConfig . config . amount . toString ( ) ||
57+ DEFAULT_MAX_SUPPLY_ERC20 . toString ( ) ,
58+ 18 ,
59+ ) ;
5260 } else if ( launchConfig ?. kind === "market" ) {
5361 const currencyContract =
5462 launchConfig . config . tokenOut &&
@@ -77,10 +85,7 @@ export async function createToken(options: CreateTokenOptions) {
7785 contract : entrypoint ,
7886 creator,
7987 createParams : {
80- amount : toUnits (
81- params . maxSupply . toString ( ) || DEFAULT_MAX_SUPPLY_ERC20 . toString ( ) ,
82- 18 ,
83- ) ,
88+ amount,
8489 referrer : ZERO_ADDRESS ,
8590 salt,
8691 data : encodedInitData ,
You can’t perform that action at this time.
0 commit comments