Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soroban counter.sol example #1645

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

salaheldinsoliman
Copy link
Contributor

@salaheldinsoliman salaheldinsoliman commented May 18, 2024

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.

  • Support Soroban storage function calls put_contract_data, get_contract_data and has_contract_data
  • Implement a wrapper init for storage_initializer
  • Implement wrappers for public functions
  • Insert decoding/encoding instructions into the wrapper functions
  • Soroban doesn't have function return codes. This needs to be handled all over emit
  • Add integration tests and MockVm tests

salaheldinsoliman and others added 19 commits May 8, 2024 16:11
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant