-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add encode
to ContractEncoder
#287
base: master
Are you sure you want to change the base?
Conversation
src/types/FateString.js
Outdated
if (isUnicodeString(this._value)) { | ||
return this.toString() | ||
} | ||
|
||
return this._value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the most tricky part, I am not sure how to make it without breaking changes
I'd like to take a look into details:
If you could split that in separate PR's it would be easier |
Decoding the variant gives us a value, its type, and arities of other variants without knowing their types. I need arities to serialize the same variant value back. The idea is to use |
I'll check the docs and the referral implementation again, but IIRC that's correct.
What's the real use-case of this? |
@davidyuk could you rebase please |
91c205d
to
4447e0e
Compare
In the case of contract encoding, I need this to encode the decoded contract without losing a variant type, to get the same bytecode. It is generally needed to decode and then encode some fate raw value without ACI. |
This PR is supported by the Æternity Foundation