Open Nix-01 opened 2 months ago
I tested with the MethodID: 0xc9ccb402 and it works, it's not a clean way to fix, but I can confirm this works if we force the right MethodID
function getAutomanRebalanceCalldata(mintParams, tokenId, feeBips = BigInt(0), permitInfo, swapData = '0x') {
if (permitInfo === undefined) {
return (0, viem_1.encodeFunctionData)({
abi: index_1.Automan__factory.abi,
args: [mintParams, tokenId, feeBips, swapData],
functionName: 'rebalance',
});
}
const { v, r, s } = (0, viem_1.hexToSignature)(permitInfo.signature);
return (0, viem_1.encodeFunctionData)({
abi: index_1.Automan__factory.abi,
args: [
mintParams,
tokenId,
feeBips,
swapData,
BigInt(permitInfo.deadline),
Number(v),
r,
s,
],
functionName: '0xc9ccb402',
});
}
Ack, will check later, but I think this function should be working for our frontend
This function do not works if you provide perimtInfo path : \viem\automan\automan.js
Error : Uncaught AbiEncodingLengthMismatchError AbiEncodingLengthMismatchError: ABI encoding params/values length mismatch. Expected length (params): 4 Given length (values): 8
I hope this feedback will be helpful