diff --git a/src/utils.ts b/src/utils.ts index 539d68b..4b8b58d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -631,9 +631,14 @@ export async function getERC20DefaultBridgeData( ? 18 : await token.methods.decimals().call(); + + const nameBytes = web3Abi.encodeParameters(['string'], [name]); + const symbolBytes = web3Abi.encodeParameters(['string'], [symbol]); + const decimalsBytes = web3Abi.encodeParameters(['uint256'], [decimals]); + return web3Abi.encodeParameters( - ['string', 'string', 'uint256'], - [name, symbol, Number(decimals)], + ['bytes', 'bytes', 'bytes'], + [nameBytes, symbolBytes, decimalsBytes], ); }