NethermindEth Warp Save Abandoned

Warp - Bringing Solidity to Starknet at warp speed. Warp is a Solidity to Cairo Compiler, this allows teams to write/migrate Solidity to Cairo for easy onboarding into the StarkNet ecosystem.

Project README

Warp

📢 Warp is no longer maintained. Feel free to fork it. You can start developing warp by checking supported features and issues. Development instructions are here.

Warp brings Solidity to Starknet, making it possible to transpile Ethereum smart contracts to Starknet Cairo Contracts.

:warning: Note: Cairo 1 is not fully supported yet. For more details see supported features.

:warning: Note: Cairo 0 implementation of warp can be found at this tag.

Quickstart

Note: Executing Warp using Docker works only for x86 architecture. If you're using ARM architecture (such as Apple's M1) you can find warp installation instructions here.

Note: The method refers to warp for cairo 0. If you are looking for cairo 1 warp see installing from source. You might be also interested in supported features in cairo 1 warp.

The easiest way to start with warp is using docker. To do that navigate to the directory where you store your contracts and run command:

docker run --rm -v "$PWD:/dapp" nethermind/warp transpile <contract-path>

You can find docker installation guide here.

Libraries


Libraries are bundled into the point of use, therefore if you try transpile a standalone library it will result in no output. If you would like to transpile and deploy a standalone library please alter its declaration to `contract`.

Supported features

Solidity: Warp supports Solidity 0.8. In order to support newer versions nethersolc has to be updated, and nethersolc binaries within warp repository have to be updated.

Cairo: The latest version of Cairo compiler supported by warp is 1.1. You can find compiler binaries together with warp plugin executable in cairo1 directory. Warp plugin repository is located here.

Warp doesn't support all features of Cairo 1 yet. You can find an example contract supported by warp in tests/behaviour/contracts/if/localVariables.sol:

https://github.com/NethermindEth/warp/blob/321bfe76b27790327e5574c0d5c86c2acf95d750/tests/behaviour/contracts/if/localVariables.sol#L5-L25

For more fully working examples see here. Uncommented lines are Solidity files that are passing tests. Those files are located in tests/behaviour/contracts/. There is also a list of compilation tests here. It contains contracts that are partially working ie. they are compiling, but the code might not yield correct results in runtime.

You can find a list of missing features here. Feel free to pick one of those and implement it yourself!

Open Source Agenda is not affiliated with "NethermindEth Warp" Project. README Source: NethermindEth/warp
Stars
752
Open Issues
65
Last Commit
8 months ago
License

Open Source Agenda Badge

Open Source Agenda Rating