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.
This PR do three things:
1 - deal with unsafe operations inside unchecked blocks.
2 - remove unnecessary warplib functions and replace it for their respective operations.
3 - remove input checks.
given the following function:
function add(uint x, uint y) external pure returns (uint) {
unchecked {
return x + y;
}
}
This PR do three things: 1 - deal with unsafe operations inside unchecked blocks. 2 - remove unnecessary warplib functions and replace it for their respective operations. 3 - remove input checks.
given the following function:
old transpilation:
new transpilation:
new transpilation for when the operation is bellow than 256 bits
In the case of an operation outside an unchecked block like the following:
old transpilation:
new transpilation: