Skip to content

Add support for soroban auth framework 🚀 #1748

Merged
salaheldinsoliman merged 3 commits intohyperledger-solang:mainfrom
salaheldinsoliman:feat/soroban_auth_framework
Mar 8, 2025
Merged

Add support for soroban auth framework 🚀 #1748
salaheldinsoliman merged 3 commits intohyperledger-solang:mainfrom
salaheldinsoliman:feat/soroban_auth_framework

Conversation

@salaheldinsoliman
Copy link
Copy Markdown
Contributor

@salaheldinsoliman salaheldinsoliman commented Mar 1, 2025

This PR aims to support Soroban authorization framework:

Here are some keynotes to consider:

1- Unlike Solidity, Soroban performs its auth checks using the host. For instance, Soroban doesn't have the construct of if msg.sender == addr, however this check is done via a host function addr.require_auth.

2- Another function was added authAsCurrContract. This is needed for deeper calls. To understand this, take a look at https://github.com/stellar/soroban-examples/tree/main/deep_contract_auth.
What I have done here actually is test the auth framework using the above provided example of nested calls.

Signed-off-by: salaheldinsoliman <salaheldin_sameh@aucegypt.edu>
@salaheldinsoliman salaheldinsoliman force-pushed the feat/soroban_auth_framework branch from c383464 to 5820c61 Compare March 1, 2025 00:33
Signed-off-by: salaheldinsoliman <salaheldin_sameh@aucegypt.edu>
Signed-off-by: salaheldinsoliman <salaheldin_sameh@aucegypt.edu>
@salaheldinsoliman salaheldinsoliman self-assigned this Mar 1, 2025
@salaheldinsoliman salaheldinsoliman merged commit 6c93fb5 into hyperledger-solang:main Mar 8, 2025
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant