Warp brings Solidity to StarkNet, making it possible to transpile Ethereum smart contracts to Cairo, and use them on StarkNet.
To get the dependencies:
yarn
Additionally, solc 0.8.11 must be installed and usable via 'solc' Instructions can be found at https://docs.soliditylang.org/en/v0.8.11/installing-solidity.html
Compile the project:
yarn tsc
To transpile a contract:
bin/warp transpile example_contracts/ERC20.sol
To test run warp on all example contracts:
bin/warp test
For this to work, you must be able to run
starknet-compile
Instructions to set this up can be found at https://www.cairo-lang.org/docs/quickstart.html
To examine a solidity file in unwarped AST form:
bin/warp analyse example_contracts/ERC20.sol
---New tests--- The old tests check for successfully compiling cairo code The new tests check for correctly running cairo code
First run the setup script:
tests/behaviour/setup.sh
Second, in a separate terminal, start a starknet-testnet server:
yarn testnet
then to run the tests:
yarn test
Contributions are welcome but please reach out to the team before attempting any large modifications to the source. You can get an overview of the project's progress on our notion board along with good starting issues and descriptions of the intended solutions for a number of others.