-
Notifications
You must be signed in to change notification settings - Fork 6
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
Generate preamble code #62
Generate preamble code #62
Conversation
d1b33ea
to
2c992cd
Compare
hmcdk/codegen/src/lib.rs
Outdated
}; | ||
Ok(a) | ||
} | ||
None => Err("invalid arg type".to_string()) |
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.
please add type and argument info to error message
None => Err("invalid arg type".to_string()) | ||
} | ||
} | ||
_ => Err("invalid arg type".to_string()) |
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.
please add type and argument info to error message
hmcdk/abi/src/types.rs
Outdated
Integer(AbiInteger), | ||
Bytes, | ||
Address, | ||
Hash, |
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.
Where does Hash
comes from?
hmcdk/abi/src/types.rs
Outdated
@@ -0,0 +1,54 @@ | |||
|
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.
do rustfmt
The code generation in #64 is done based on the parsed ast of a source file. |
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.
LGTM 👍
I'd like to pass parameters to a contract as function arguments in rust code.
This might be helpful for client code generation because we can easily determine
what parameters each contract entry point has by just parsing a source code.
I'm not sure what kind of types should be accepted as parameters.
Do you think everything (convertible to bytes) should be ok or there should be
a certain group of types which is acceptable for entry points.