-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Null-Checking for bytecode in solc-transpiler #66
Conversation
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.
Was your only material change adding the if statement? If so I think this is probably good to go once you change it to use continue, but just @willmeister or @ben-chain y'all should check my work that the if statement doesn't break anything nuanced.
contractName | ||
) | ||
log.debug(`Transpiled contract ${contractName}.`) | ||
if (!!contractJson && !!contractJson.evm && !!contractJson.evm.bytecode && !!contractJson.evm.deployedBytecode) { |
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.
Probably cleaner to replace with an if(...) continue
instead of a big if statement wrapper.
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!
* transpiler null-checking bytecode * lint, use continue in transpiler
* chore: rename isthmus to interop on solidity files * chore: rename test file * chore: update contracts versions (#66)
* chore: rename isthmus to interop on solidity files * chore: rename test file * chore: update contracts versions (ethereum-optimism#66)
Description
When, for example, we transpile an interface, we will use
solc.compile
, which will output an empty bytecode and null deployedBytecode object. We shouldn't be trying to transpile non-existent bytecodeContributing Agreement