-
Notifications
You must be signed in to change notification settings - Fork 124
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 lookup-methods post-action for solidity verifier #682
base: main
Are you sure you want to change the base?
Conversation
smart-contract-verifier/smart-contract-verifier-server/src/services/solidity_verifier.rs
Outdated
Show resolved
Hide resolved
|
||
fn from_str(s: &str) -> Result<Self, Self::Err> { | ||
match s { | ||
"lookup-methods" => Ok(VerifyPostAction::LookupMethods), |
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 this option to comment on this protobuf field. It will make this field appear in comment in swagger
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.
btw, why kebab-case?
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.
Lines 135 to 137 in fe12b77
/// Additional actions the client wants the result to be returned. | |
/// Currently supports only: "lookup-methods" for Solidity contracts. | |
repeated string post_actions = 9; |
It was added in the previous PR
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.
@sevenzing What is your suggestion instead of kebab-case?
smart-contract-verifier/smart-contract-verifier-server/tests/solidity_types.rs
Outdated
Show resolved
Hide resolved
smart-contract-verifier/smart-contract-verifier-server/src/services/solidity_verifier.rs
Outdated
Show resolved
Hide resolved
smart-contract-verifier/smart-contract-verifier/src/lookup_methods/find_methods.rs
Outdated
Show resolved
Hide resolved
smart-contract-verifier/smart-contract-verifier/src/lookup_methods/find_methods.rs
Outdated
Show resolved
Hide resolved
smart-contract-verifier/smart-contract-verifier/src/lookup_methods/find_methods.rs
Outdated
Show resolved
Hide resolved
smart-contract-verifier/smart-contract-verifier-server/src/services/solidity_verifier.rs
Outdated
Show resolved
Hide resolved
smart-contract-verifier/smart-contract-verifier-server/src/types/verify_response.rs
Outdated
Show resolved
Hide resolved
pub fn find_methods_from_compiler_output( | ||
contract_name: &String, | ||
output: &CompilerOutput, | ||
) -> anyhow::Result<LookupMethodsResponse> { |
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'm not sure if that would be easier and better overall, but as an option, we may also get all required data from the compilation_artifacts
, deployed_code_artifacts
and local_bytecode_parts
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.
As these fields are stored as raw JSON values we have to clone and parse them. Not sure about this approach
ff7b6e7
to
6adbcca
Compare
lookup-methods
post-action handler for solidity verifier service.