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:
@@ -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)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user