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 venture 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 recordsdata. The compiler is primarily written in Rust and consists of testing infrastructure for each fundamental and superior options of Solidity. The venture documentation states that its purpose is to permit Ethereum builders to make use of their present Solidity information to construct on Neo N3, quite than studying Neo's native good contract language.
The compiler accepts Solidity 0.8.x supply code and outputs Neo N3 supply code. .nef bytecode file and .manifest.json file. Uncover ERC token commonplace 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 via a command-line interface and consists of scaffolding for integration with Hardhat and Foundry, two growth frameworks generally utilized in Ethereum growth.
Neo Solidity differs from the Neo X venture 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 predominant community quite 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 kind checking and validation. A multilevel optimizer applies Neo-specific transformations earlier than the code generator generates NeoVM bytecode and manifest recordsdata.
The compiler consists of runtime libraries that present reminiscence administration, storage operations, ABI encoding, and cryptographic capabilities designed to match EVM conduct inside Neo's execution surroundings.
For builders considering figuring out the interior structure and implementation of the compiler, detailed technical design specs can be found within the venture repository.
Contract instance
The repository comprises 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 embody TokenVesting, which affords 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 recommendations.
In response to the venture documentation, all pattern contracts had been deployed on Neo Categorical, Neo's native growth surroundings, and examined with state change operations.
Growth standing
Undertaking 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 purposeful CLI, and documentation at 80% full.
The venture documentation lists some present limitations. Operate overloading is partially supported. Capabilities will 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 via gasoline hints per system name, and opcode-level prices are roughly 80% correct.
The documentation recommends validating TestNet earlier than deploying MainNet.
Technical design specs will be discovered right here and pull venture repositories will be discovered beneath.
https://github.com/r3e-network/neo-solidity/tree/predominant

