Update callContract function to convert value to hexadecimal format

- Modified the value parameter in the callContract function to convert numeric values to hexadecimal format, ensuring compatibility with contract calls.
- This change enhances the handling of value inputs, improving the robustness of contract interactions.
This commit is contained in:
2026-01-07 20:55:22 +07:00
parent fa66568ea2
commit 7f06088161

View File

@@ -248,7 +248,7 @@ export async function callContract(
to: contractAddress, to: contractAddress,
data: data, data: data,
chain_id: sdk.chainId, chain_id: sdk.chainId,
value: opts.value ? Number(opts.value) : undefined, value: opts.value ? '0x' + BigInt(opts.value).toString(16) : undefined,
gas_limit: Number(gasLimit) gas_limit: Number(gasLimit)
} }
}, },