-
Notifications
You must be signed in to change notification settings - Fork 980
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 support for send builtin #2212
Conversation
I think we should convert |
This is converting to the same operation that solidity is:
Did you mean to change this for both Solidity and Vyper? |
@@ -114,6 +114,7 @@ | |||
"_abi_encode()": [], | |||
"slice()": [], | |||
"uint2str()": ["string"], | |||
"send()": [], |
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 part is telling me that we are doing something off:
- On the solidity side, we parse the send as a high level call (
slither/slither/slithir/convert.py
Line 1224 in a2d88b8
def convert_to_low_level( - but on vyper we use a solidity variable as a placeholder to parse them
It sounds to me that we are creating a disparity in the way we handle these type of operations between solidity and vyper, which will likely create issues in the long term
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.
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.
I explained that in the comment. There may be another way, but raw_call and send are use this same codepath since we create a MemberAccess which is then converted to a HighLevelCall in extract_tmp_call
slither/slither/slithir/convert.py
Line 1113 in a2d88b8
msgcall = HighLevelCall( |
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.
In vyper the builtin are Call
unliked Solidity where they are FunctionCall(MemberAccess...)
The use of SolidityFunction
allows us to know we are dealing with builtins to special case here. I guess we could add a LowLevelCallExpression that is only used by Vyper and add new code to support it in the IR conversion step
if isinstance(called, Identifier) and isinstance(called.value, SolidityFunction): |
closes #2190