Content pfp
Content
@
0 reply
0 recast
2 reactions

0age pfp
0age
@0age
torn on an interface choice and would love some opinions here we've got an array of (uint256, uint256) pairs, used in both an EIP712 payload and a function arg is it best to: * use 2 uint256[] arguments & ensure they're the same length * use 1 uint256[2][] argument * use an array of structs with 2 uint256 elements
7 replies
0 recast
45 reactions

0age pfp
0age
@0age
2 uint256[] args is gonna be way cheaper to build an EIP712 hash for 1 uint256[2][] arg is going to have the smallest memory footprint by default the struct is arguably the "cleanest" from the perspective of interface clarity you could also use two versions, one for the function call and one for the EIP712 payload
0 reply
0 recast
3 reactions

Wilson Cusack pfp
Wilson Cusack
@wilsoncusack
Array of structs. Be explicit :)
0 reply
0 recast
3 reactions

Brent Fitzgerald pfp
Brent Fitzgerald
@bf
Since EIP-712 is largely about user-friendly presentation of structured data, presumably this will be signed in wallets by various humans? So maybe experiment to see how the different options look in different wallet UIs. I'm going to guess the second or third option will be nicer.
1 reply
0 recast
1 reaction

Pierrick pfp
Pierrick
@pierrick
First option. Way simpler than the two others.
0 reply
0 recast
1 reaction

Vignesh pfp
Vignesh
@vigneshka
2 arrays is easier to input on etherscan if that matters Single array of structs feels cleaner on client side and holds more semantic meaning that it’s a pair of related values
0 reply
0 recast
1 reaction

SonOfMosiah pfp
SonOfMosiah
@sonofmosiah.eth
How price sensitive are the targeted users to gas?
0 reply
0 recast
0 reaction

flick the dev 🎩📦 pfp
flick the dev 🎩📦
@flick
used the first version when I needed them for a signature the last version feels the best though
0 reply
0 recast
0 reaction