Skip to content
New issue

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

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

Already on GitHub? # to your account

Split monolithic encoder/decoder #21

Open
axic opened this issue Jun 13, 2016 · 3 comments
Open

Split monolithic encoder/decoder #21

axic opened this issue Jun 13, 2016 · 3 comments

Comments

@axic
Copy link
Member

axic commented Jun 13, 2016

Each type should have a simple class with:

  • encode (input: variable type; output: Buffer)
  • decode (input: Buffer; output: variable type)
  • isValid? to check if a parameter can be encoded as the given type
@axic
Copy link
Member Author

axic commented Oct 4, 2016

@yann300 @chriseth any comments/ideas on designing this?

The main goal is to have a more flexible interface (and the ability to decode/encode more complex types) as well as to avoid code duplication in ethereum/remix#104.

Note, this library already has support for the ABI encoding as well as the packed Solidity encoding.

@chriseth
Copy link

chriseth commented Oct 5, 2016

I think this is too simple, because e.g. arrays need access to the current base offset.

In general, though, I think that we should go for an object-oriented approach like that, yes.

At some point (probably together with the API documentation of this library) we should als odefine the mapping between ABI types and javascript types.

@holgerd77
Copy link
Member

What is the status of this issue?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants