Skip to content

Null-Checking for bytecode in solc-transpiler#66

Merged
K-Ho merged 2 commits intomasterfrom
Hotfix/solc-transpiler-bug
Apr 10, 2020
Merged

Null-Checking for bytecode in solc-transpiler#66
K-Ho merged 2 commits intomasterfrom
Hotfix/solc-transpiler-bug

Conversation

@K-Ho
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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)
blockchaindevsh added a commit to blockchaindevsh/optimism that referenced this pull request Aug 11, 2025
theochap pushed a commit that referenced this pull request Jan 15, 2026
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