Skip to content

Conversation

@Samuel1-ona
Copy link

@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

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

1 participant