ethjs-abi icon indicating copy to clipboard operation
ethjs-abi copied to clipboard

Result object is now an array, also with named properties

Open kumavis opened this issue 6 years ago • 2 comments

the ensures the result is iterable, useful for easy destructuring

Fixes https://github.com/ethjs/ethjs/issues/36

kumavis avatar Apr 19 '20 05:04 kumavis

array with properties example

> x=[]
[]
> x.a=1
1
> x.b=2
2
> x
[ a: 1, b: 2 ]
> x.push('a')
1
> x.push('b')
2
> x.push('c')
3
> x
[ 'a', 'b', 'c', a: 1, b: 2 ]

kumavis avatar Apr 19 '20 05:04 kumavis

I’d suggest using the ethers encoding and decoding library for this.

It’s been a while since I’ve maintained this package.

Sent from my iPhone

On Apr 19, 2020, at 1:42 AM, kumavis [email protected] wrote:

array with properties example

x=[] [] x.a=1 1 x.b=2 2 x [ a: 1, b: 2 ] x.push('a') 1 x.push('b') 2 x.push('c') 3 x [ 'a', 'b', 'c', a: 1, b: 2 ] — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

SilentCicero avatar Apr 19 '20 11:04 SilentCicero