solang
solang copied to clipboard
Solidity Compiler for Solana and Polkadot
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...
After multiple calling of add to mapping and delete from mapping, smart contract has storage leak. Look like Key-values pairs are not deleted after calling delete example[id]; but nullified and...
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 =...
Unable to initialize empty mapping as described in solidity documentation. Using solana. campaigns[campaignID] = Campaign(beneficiary, goal, 0, 0); gives error on line 25 - "struct 'Campaign' has 5 fields, not...
Complex types (e.g. loading arrays of structs) has complex code gen. The code for accessing storage variables has the following problems: - [ ] Code generation is done in the...
The default size for `int` and `uint` is currently 256 bits. This is very inefficient on all the chains we support. We should change the default for solidity and yul....
When calling a contract deployed on account data on a PDA, we need to able to provide the seeds on external call. This should be an external argument.
When calling a solidity contract, the data account and sender account is passed in the input. Use the account metas instead. The first two entries should be: 1. Account data...
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...