hyperledger-solang / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.26k stars 210 forks source link

Soroban counter.sol example #1645

Closed salaheldinsoliman closed 3 months ago

salaheldinsoliman commented 4 months ago

This PR aims to make Solang support a simple counter.sol example on Soroban, where a storage variable is instatiated, modified and retrieved. The counter contract is only limited to uint64 data types, and only supports instance soroban storage.

This can be considered a "skeleton" for supporting more data and storage types, as well as more host function invokations.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 92.87671% with 26 lines in your changes missing coverage. Please review.

Project coverage is 88.58%. Comparing base (08dbe49) to head (1a8cb27).

Files Patch % Lines
src/linker/soroban_wasm.rs 80.00% 9 Missing :warning:
src/emit/soroban/mod.rs 93.00% 7 Missing :warning:
src/emit/instructions.rs 89.13% 5 Missing :warning:
src/emit/soroban/target.rs 93.02% 3 Missing :warning:
src/codegen/dispatch/soroban.rs 98.23% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1645 +/- ## ========================================== + Coverage 88.51% 88.58% +0.07% ========================================== Files 163 164 +1 Lines 72869 73152 +283 ========================================== + Hits 64497 64802 +305 + Misses 8372 8350 -22 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.