Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

remix-solidity: add compiler.setEvmVersion() #1193

Conversation

scottt
Copy link
Contributor

@scottt scottt commented May 20, 2019

Add a way to pass the evmVersion parameter
to solc by:

  1. Simplify the Compiler.compileJSON() interface from
    compileJSON(source, optimize) to compileJSON(source)

Whether optimization is enabled is then always determined by
the Compiler.optimize object field which simplifies data flow.

  1. Add a Compiler.evmVersion field and a setter and
    make compileJSON() honor that.

Specifying evmVersion is useful when targetting an older
private chain with the latest solc or when using
an EVM-compatible chain that's slightly behind Ethereum
main-net in terms of features.

The unused userAgent variable in onInternalCompilerLoaded was
only removed to fix npm run test for remix-solidity'.

Add a way to pass the `evmVersion` parameter
to `solc` by:

1. Simplify the `Compiler.compileJSON()` interface from
`compileJSON(source, optimize)` to `compileJSON(source)`

Whether optimization is enabled is then always determined by
the `Compiler.optimize` object field which simplifies data flow.

2. Add a `Compiler.evmVersion` field and a setter and
make `compileJSON()` honor that.

Specifying `evmVersion` is useful when targetting an older
private chain with the latest `solc` or when using
an EVM-compatible chain that's slightly behind Ethereum
main-net in terms of features.

The unused `userAgent` variable in `onInternalCompilerLoaded` was
only removed to fix `npm run test` for `remix-solidity`'.
scottt added a commit to thundercore/remix-ide that referenced this pull request May 20, 2019
Specifying a specific EVM version for `solc` to target
is useful when targetting older private chains deployments
with the latest compiler.

This work in progress patch adds an "EVM Version" drop down menu
in the compiler tab.

This patch depends on ethereum/remix#1193
in `remix-solidity` to pass down the `evmVersion` option.
@yann300 yann300 merged commit 7cbc24e into ethereum:master Jun 13, 2019
yann300 pushed a commit to thundercore/remix-ide that referenced this pull request Jun 13, 2019
Specifying a specific EVM version for `solc` to target
is useful when targetting older private chains deployments
with the latest compiler.

This work in progress patch adds an "EVM Version" drop down menu
in the compiler tab.

This patch depends on ethereum/remix#1193
in `remix-solidity` to pass down the `evmVersion` option.
yann300 pushed a commit to thundercore/remix-ide that referenced this pull request Jun 17, 2019
Specifying a specific EVM version for `solc` to target
is useful when targetting older private chains deployments
with the latest compiler.

This work in progress patch adds an "EVM Version" drop down menu
in the compiler tab.

This patch depends on ethereum/remix#1193
in `remix-solidity` to pass down the `evmVersion` option.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants