Jimmy Liao, core developer and founding father of R3E Community, revealed that he’s engaged on Neo Solidity Compiler, a software that compiles Solidity 0.8.x good contracts into Neo N3 bytecode. This challenge will allow builders to create contracts in Solidity and deploy them to the Neo N3 blockchain.
What’s NeoSolidity?
Neo Solidity Compiler converts Solidity good contracts into Neo N3-compatible bytecode and manifest information. The compiler is primarily written in Rust and contains testing infrastructure for each primary and superior options of Solidity. The challenge documentation states that its aim is to permit Ethereum builders to make use of their present Solidity data to construct on Neo N3, relatively than studying Neo’s native good contract language.
The compiler accepts Solidity 0.8.x supply code and outputs Neo N3. .nef bytecode file and .manifest.json file. Uncover ERC token customary patterns (ERC-20, ERC-721) in Solidity contracts and map them to their Neo equal requirements (NEP-17, NEP-11).
Builders can select from 4 optimization ranges (0-3) when compiling a contract. The software works by way of a command-line interface and contains scaffolding for integration with Hardhat and Foundry, two growth frameworks generally utilized in Ethereum growth.
Neo Solidity differs from the Neo X challenge in that it’s an EVM sidechain the place builders deploy Solidity contracts instantly onto that community with out making any adjustments. In distinction, Neo Solidity compiles Solidity supply code into Neo N3-compatible bytecode, permitting contracts to be deployed natively to the Neo N3 principal community relatively than a separate EVM-compatible chain.
technical structure
The compilation course of transforms Solidity supply code right into a Yul intermediate illustration and performs semantic evaluation for sort checking and validation. A multilevel optimizer applies Neo-specific transformations earlier than the code generator generates NeoVM bytecode and manifest information.
The compiler contains runtime libraries that present reminiscence administration, storage operations, ABI encoding, and cryptographic capabilities designed to match EVM conduct inside Neo’s execution setting.
For builders focused on figuring out the interior structure and implementation of the compiler, detailed technical design specs can be found within the challenge repository.
Contract instance
The repository accommodates a number of pattern contracts that show the capabilities of the compiler. WGAS is a wrapped GAS token implementation that follows the WETH9 sample and is NEP-17 compliant. FlashLoan implements Aave V2 fashion flash mortgage swimming pools with 0.09% charges. SimpleAMM is an automatic market maker for fixed merchandise based mostly on the Uniswap V2 design.
Further examples embrace TokenVesting, which gives a linear vesting schedule just like OpenZeppelin’s VestingWallet. SimpleLending adapts Compound’s single-asset lending pool construction. SimpleDAO implements MolochDAO fashion governance with staking and options.
In response to the challenge documentation, all pattern contracts have been deployed on Neo Categorical, Neo’s native growth setting, and examined with state change operations.
Improvement standing
Venture documentation signifies that the core compiler is roughly 85% full and described as production-ready. Runtime libraries are listed at 75% full, developer instruments at 70% and totally useful CLI, and documentation at 80% full.
The challenge documentation lists some present limitations. Perform overloading is partially supported. Features may be overloaded with totally different argument counts utilizing mangled names within the signature, however overloading with the identical argument rely is rejected. EVM invocation choices are: {gasoline: ...} and {worth: 0} Accepted however ignored. NEP-17 native calls should be used to switch non-zero values. Gasoline accounting is estimated by way of gasoline hints per system name, and opcode-level fees are roughly 80% correct.
The documentation recommends validating TestNet earlier than deploying MainNet.
Technical design specs may be discovered right here and pull challenge repositories may be discovered beneath.
https://github.com/r3e-network/neo-solidity/tree/principal

Leave a Reply