EVM Compatibility

The ICON Strategy Team has been actively looking into how to make ICON 2.0 EVM (Ethereum Virtual Machine) compatible. Firstly, for those that don’t know, EVM compatibility, in simple terms, will allow developers to deploy smart contracts written in Solidity on ICON.

This is beneficial for 2 key reasons:

1.) LOTS of code has been written in Solidity. We can reuse the libraries, dev tools, dev environments and audited code from the Ethereum Ecosystem. This allows us to iterate and innovate on products much faster.

2.) Developers that consider leaving Ethereum for a faster & cheaper blockchain will be able to easily redeploy their smart contracts on ICON without needing to rewrite code in Python/Java

Now, getting back to where we stand. We have researched a few different options with the help of @robcio and the Insight P-Rep team along with ICONLOOP developers:

1.) Add a 3rd runtime environment to ICON and support EVM natively - this idea has been mostly ruled out because it adds significant complexity to ICON’s core code. We also want to get the community involved in this project and expand our core contributor set, but this idea would need to be mostly done by internal ICON developers.

2.) Build a Transcompiler - This is one of our top ideas right now. We have spoken at length with Web3Labs and are awaiting a proposal and timeline to build and maintain the Transcompiler. For those that don’t know, a Transcompiler will take Solidity source code and translate it into Java bytecode so it can execute in the JVM (Java Virtual Machine) which is what ICON 2.0 has.

3.) Connect to a Substrate-based (PolkaDot) Parachain/blockchain that runs the EVM - this route is also still on the table and is currently in discussion thanks to the introduction to the PolkaDot team by @Icon-4-Business. The plan would be to deploy (or connect to an existing) parachain that supports EVM, deploy Solidity contracts on this chain, and connect to this chain with BTP so we can send ICX to and from these contracts.

Overall, this is an exciting and important feature for the ICON Public Blockchain. I will follow up on this thread as our strategy progresses. Thank you to the community members that have supported us in this endeavor and if anybody has any ideas, feedback, or developers that would be interested in participating in this work please let me know!

16 Likes

Very exciting information! Bonus thanks to everyone involved in the networking side of things.

3 Likes

@BennyOptions_LL Great summary! Regarding the option 2, I’d like to add a small comment on it to avoid unnecessary confusion though. What they propose was actually a source to source conversion, not source to bytecode conversion (i.e. Solidity source to Java source). Of course, this plan may change in the future, depending on the actual work progress.

2 Likes

Sorry to dig up old posts, but instead of writing a new one, I figured i’d query here!

Has there been an official decision on which approach is being used to address this?

Yep we are going to use either Cosmos SDK or Substrate SDK for this, will follow up with more details in the coming weeks

2 Likes

Awesome. Thanks for the quick reply!!

1 Like

Here’s an update of what we decided to do.

4 Likes

Solidity to Java, Try this.

Yes there’s a tool called web3j for converting solidity to java. For using this on Windows

1.install npm 2.npm install web3j 3.install solidity Compile your smart contract in remix ide (online)and generate abi and save it to a new file namely contract_name.abi.

Also get the bytecode from remix and save it to a new file called contract _name.bin Open command prompt and run the following command

web3j solidity generate contract _name.bin contract_name.abi -o out -p packagename

For running above command the .abi and .bin files must be in same directory.The output file will be in a folder “out”.filename is contract_name.java.

2 Likes