casper-ecosystem / casper-js-sdk

TypeScript Casper Client SDK
Apache License 2.0
71 stars 60 forks source link

Unable to send nested tuples as named argument value #381

Open meywood opened 6 months ago

meywood commented 6 months ago

Describe the bug

When sending a CLTuple3 containing CLTuple3 as inner elements the following exception is thrown:

TypeError: e.clType is not a function
    at Function.toBytesWithType (webpack://casper-js-sdk/./src/lib/CLValue/Abstract.ts:95:31)
    at e.toBytes (webpack://casper-js-sdk/./src/lib/RuntimeArgs.ts:24:34)
    at map (webpack://casper-js-sdk/./src/lib/ByteConverters.ts:145:40)
    at toBytesVector (webpack://casper-js-sdk/./src/lib/ByteConverters.ts:145:29)
    at e.toBytes (webpack://casper-js-sdk/./src/lib/RuntimeArgs.ts:101:15)
    at toBytes (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:690:37)
    at e.toBytes (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:757:29)
    at serializeBody (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:1285:54)
    at Object.F [as makeDeploy] (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:1357:26)

Steps to reproduce the behavior: See Nested Tuple Feature in standard test repo: https://github.com/stormeye2000/cspr-sdk-standard-tests-typescript/blob/main/src/features/nested_tuples.feature https://github.com/stormeye2000/cspr-sdk-standard-tests-typescript/blob/main/src/step-definitions/nested-tuples.steps.ts

Expected behavior Above test feature passes

Screenshots N.A.

Additional context Exercised against V2.15.3

Defect Type