Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add examples for encoding #1302

Closed
wants to merge 1 commit into from

Conversation

alexisgauba
Copy link

  • Add example for simple encoding
  • Add example for encoding with custom struct

@ricmoo
Copy link
Member

ricmoo commented Feb 17, 2021

Great idea! Thanks! I'll add this to the docs. :)

@ricmoo ricmoo added documentation Documentation related issue. on-deck This Enhancement or Bug is currently being worked on. labels Feb 17, 2021
@ricmoo
Copy link
Member

ricmoo commented Feb 17, 2021

I'll also add an example using human-readable, e.g.

utils.defaultAbiCoder.encode(
    [
        "(address a, (uint256 b1, bool b2)[] b, uint8 c)"
    ],
    [
        [
            constants.AddressZero,
            [
                { b1: 5, b2: false },
                [ 45, true ]
            ],
            56
        ]
    ]
)

@ricmoo
Copy link
Member

ricmoo commented Feb 17, 2021

Related: #1301 and #1147

@ricmoo
Copy link
Member

ricmoo commented Aug 9, 2021

Added some examples.

Thanks! :)

@ricmoo ricmoo closed this Aug 9, 2021
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants