You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tried to create the following job specs which fetch data from an API, parse the response, and returns the result as bytes32. Not 100% sure but I think this was possible with the ethbytes32 legacy adapter
The job fails while encoding the data ( the response that I got after parsing is "Kraken" which indeed is of length 6)
ETHABIEncode: while converting argument 'value' from <nil> to bytes32: incorrect length: expected 32, got 6: bad input for task: bad input for task
abi: (bytes32 value)
data: { "value": $(parse) }
I had a discussion with @pinebit: the legacy ethbytes32 converted the input to string before encoding it to bytes32. Here, I was trying to directly encode to bytes32 and that s why I had an issue.
The best is to work with generic jobs that provide specific data types like it is done here:
Get > bytes
Get > int256
Get > uint256
Get > bool
Get > string
Hence, this Example should be updated to use a "Get > string" job
Description
Hello,
tried to create the following job specs which fetch data from an API, parse the response, and returns the result as bytes32. Not 100% sure but I think this was possible with the ethbytes32 legacy adapter
The job fails while encoding the data ( the response that I got after parsing is "Kraken" which indeed is of length 6)
Steps to Reproduce
Additional Information
How to configure the ethabiencode task to get bytes32 like it was done for the ethbytes32 legacy adapter
The text was updated successfully, but these errors were encountered: