Skip to content
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

Merged
merged 2 commits into from
Apr 10, 2020

Conversation

K-Ho
Copy link
Contributor

@K-Ho K-Ho commented Apr 2, 2020

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 bytecode

Contributing Agreement

Copy link
Contributor

@karlfloersch karlfloersch left a 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) {
Copy link
Contributor

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.

Copy link

@willmeister willmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

willmeister pushed a commit that referenced this pull request Apr 2, 2020
* transpiler null-checking bytecode

* lint, use continue in transpiler
@K-Ho K-Ho merged commit a2493c4 into master Apr 10, 2020
@K-Ho K-Ho deleted the Hotfix/solc-transpiler-bug branch May 13, 2020 21:20
snario pushed a commit that referenced this pull request Apr 14, 2021
protolambda pushed a commit to protolambda/optimism that referenced this pull request May 1, 2022
bap2pecs pushed a commit to babylonlabs-io/optimism that referenced this pull request Jul 31, 2024
github-merge-queue bot pushed a commit that referenced this pull request Sep 26, 2024
* chore: rename isthmus to interop on solidity files

* chore: rename test file

* chore: update contracts versions (#66)
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* chore: rename isthmus to interop on solidity files

* chore: rename test file

* chore: update contracts versions (ethereum-optimism#66)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants