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
does the current spec support decoding bytes into arbitrary arrays?
i'm trying to write a registry entry for uniswap's universal router. the main interface has multiple bytes arguments.
/// @notice Executes encoded commands along with provided inputs. Reverts if deadline has expired./// @param commands A set of concatenated commands, each 1 byte in length/// @param inputs An array of byte strings containing abi encoded inputs for each command/// @param deadline The deadline by which the transaction must be executedfunction execute(bytescalldatacommands, bytes[] calldatainputs, uint256deadline) externalpayable;
according to the spec, there are only 2 formats for bytes: raw and calldata. calldata can only decode other calls, which is not the case. i might be missing something, but it seems like this interface is significantly more complex than what's contemplated in the standard:
bytes commands is a packed array, not abi-decodable, each byte is a command
bytes[] inputs is an array of bytes
same number of elements as commands.length
each element is abi-decodable, but with different types and lengths depending on the corresponding command byte in commands (by index)
the dynamic length requires some kind of pagination. on the stax device it would probably make sense to have one screen per command in the approval flow. this could be somehow configured through the existing display.formats[signature].screens field
apart from uniswap itself, other applications use this same interface, like velodrome/aerodrome, and its usage is well spread, so it's important to support it.
The text was updated successfully, but these errors were encountered:
does the current spec support decoding
bytes
into arbitrary arrays?i'm trying to write a registry entry for uniswap's universal router. the main interface has multiple
bytes
arguments.according to the spec, there are only 2 formats for
bytes
:raw
andcalldata
.calldata
can only decode other calls, which is not the case. i might be missing something, but it seems like this interface is significantly more complex than what's contemplated in the standard:bytes commands
is a packed array, not abi-decodable, each byte is a commandbytes[] inputs
is an array ofbytes
commands.length
commands
(by index)display.formats[signature].screens
fieldapart from uniswap itself, other applications use this same interface, like velodrome/aerodrome, and its usage is well spread, so it's important to support it.
The text was updated successfully, but these errors were encountered: