Skip to content

Commit

Permalink
Add back condition for decimals over 36
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstph-dvx committed Oct 24, 2024
1 parent 4dc32b4 commit 3e0b46a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/createRollupPrepareTransactionRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ export async function createRollupPrepareTransactionRequest<TChain extends Chain
}
}

// custom fee token is only allowed to have 18 decimals
if (
params.nativeToken &&
(await getNativeTokenDecimals({ nativeTokenAddress: params.nativeToken, publicClient })) > 36n
) {
throw new Error(
`"params.nativeToken" can only be configured with a token that uses 36 decimals or less.`,
);
}

let maxDataSize: bigint;

if (parentChainIsCustom) {
Expand Down

0 comments on commit 3e0b46a

Please sign in to comment.