Skip to content

Conversation

@Samuel1-ona
Copy link
Contributor

@Samuel1-ona Samuel1-ona commented Jan 25, 2026

So I figured out that when I was performing the calculation of the addresses, i was hashing it manually, which is not possible on Soroban. Therefore, what i did was to use
The Soroban SDK's deployer.with_current_contract(salt).deployed_address() this method``

  • Uses the same internal logic as deploy_v2() to calculate the deterministic address
  • Takes into account the deployer's address (current contract) + salt + WASM hash
  • Returns the exact address that would be deployed without actually deploying

And this method is "counterfactual deployment" pattern in Soroban use for calculating addresses

Closes #2

@manoahLinks
Copy link
Contributor

Thanks for your great detailed work, having a deterministics address is part of our architecture. emails will be used as salt

@manoahLinks manoahLinks merged commit f68f62a into crowdpass-live:main Jan 27, 2026
2 of 3 checks passed
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.

[contract] TBA Registry Contract - Factory & Address Calculation

2 participants