diff --git a/.changeset/cool-maps-smash.md b/.changeset/cool-maps-smash.md new file mode 100644 index 00000000..6288e9a4 --- /dev/null +++ b/.changeset/cool-maps-smash.md @@ -0,0 +1,5 @@ +--- +"@delvtech/evm-client": patch +--- + +Fix param prep for contract calls with single params diff --git a/packages/evm-client/src/contract/utils/friendlyToArray.ts b/packages/evm-client/src/contract/utils/friendlyToArray.ts index 7c873e24..6859d5bb 100644 --- a/packages/evm-client/src/contract/utils/friendlyToArray.ts +++ b/packages/evm-client/src/contract/utils/friendlyToArray.ts @@ -76,9 +76,9 @@ export function friendlyToArray< parameters = (abiEntry as any)[kind]; } - // Single or no parameters - if (parameters.length <= 1) { - return [] as AbiArrayType; + // No parameters + if (!parameters.length) { + return [value] as AbiArrayType; } const valueObject: Record =