Lucas Ste
Lucas Ste
The following contract enters unreachable code when we build it for Solana: ```solidity contract testing { function doThis(int a) public view returns (int) { return a+2; } function IlikeTests() public...
This contract works on Solc, however fails on Solang: ```solidity contract Array{ function remove(uint256[] memory arr, uint256 e) internal pure { unchecked { uint idx = 0; for(uint i =...
The function overriding is not working for the following contract: ```solidity /** *Submitted for verification at polygonscan.com on 2021-10-11 */ // SPDX-License-Identifier: MIT // Amended by HashLips /** !Disclaimer! These...
This contract works on Solc, but fails on Solang ```solidity contract Code { function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0...
### Raison D’être The Solang compiler has a VSCode extension that allows developers to visualize errors and warnings directly on the editor. This extension works, but needs many improvements to...
There should be overflow checking in arithmetic operations using constants. E.g. `uint8 = 128 + 128` should raise an error. Ideally, this check can be done in function `eval_const_number` in...
We aim at moving the dispatch code to codegen. It means we'll need new instructions and builtin structs there, like the `switch` instruction, utilized in [this line](https://github.com/hyperledger/solang/blob/6083938df34d288ba85a19d72338ee5abcb85b85/src/emit/dispatch.rs#L103). This PR wires...
Functions that modify the state, like the SPL-token `mint_to`, are not `view` functions, but the compiler warns that they can be declared as view. Example: ```solidity function mint_to(address mint, address...
The `Instr::AssertFailure` is utilized throughout codegen to stop execution when something invalid happens. We do not display any useful message for the developer about why the code stopped working. The...
The Solang Solidity compiler is adding Anchor compatibly for Solidity contracts on Solana. Our goal is to have developers write their contracts in Solidity and use Anchor for the client...