-
Notifications
You must be signed in to change notification settings - Fork 8
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
intents: add new contractCall transaction type #157
Conversation
pkieltyka
commented
Sep 26, 2024
- deprecate "delayedEncode" transaction type as its a confusing name, but we leave it to maintain backwards compat
- introduce name "contractCall" transaction type
- new "contractCall" has a bit of sugar so you don't have to pass "func" name if the "abi" field is just a function
- we remove named args support, as it feels unnecessary and confusing
- "value" is optional, and will default to "0"
// And it must always return it encoded, like this: | ||
// - transferFrom(address,address,uint256) | ||
// making sure that the method matches the returned one | ||
func getMethodFromAbi(abi string, method string) (string, []string, error) { |
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 code was moved, its still used
"1000000000000000000", | ||
"[\"0x8541D65829f98f7D71A4655cCD7B2bB8494673bF\"]", | ||
{ | ||
"abi": "notExpired(uint256,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.
the nested encoding is cool.. but what is very confusing, and maybe is actually completely invalid, is the "notExpired(uint256,string)" function name..? the encoder will actually include the "notExpired" name, is that intended..? or do we just want "(uint256,string)" for the encoding without including the method selector into the encoding..?
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.
Looks good, thanks! Just small comments