Skip to content

Conversation

@dtribble
Copy link
Member

refs:

Description

This pull request introduces a major refactor to the EVM account provisioning flow for the portfolio contract, shifting from asynchronous remote address resolution via Axelar upcalls to deterministic local precomputation of the remote account address using the CREATE2 formula. This change reduces latency, simplifies orchestration, and improves reliability by removing callback dependencies. To support this, new configuration fields and helper utilities are added, and the contract context and flow logic are updated accordingly.

  • The provideEVMAccount flow deterministically computes the remote EVM account address locally using the CREATE2 formula and resolves immediately, removing the dependency on Axelar upcall for address retrieval.

  • The EVMContractAddresses type and related config files are extended to include gateway and gasService addresses, which are required for address computation and deployment orchestration.

  • The contract context (PortfolioInstanceContext) and flow wiring are updated to include the new addresses, a Wallet artifact reference, and chain info for EVM chains.

  • A new module wallet-artifact.ts is introduced to hold the Wallet contract's creation bytecode, which will be used for local address prediction. This likely need to

  • A utility module create2.ts is added, providing helpers for salt derivation, init code hash computation, and deterministic address prediction using the same formulas as Solidity's CREATE2.

Security Considerations

Eliminates the need for EVM chains to send the address back

Scaling Considerations

N/A

Documentation Considerations

N/A

Testing Considerations

  • Test mocks are updated to include the new gateway and gasService fields, ensuring coverage of the new deterministic address computation logic.
  • TODO this needs tooling to confirm that we are computing the right addresses.

Upgrade Considerations

Already-existing accounts shoudl continue to work.

Tests cannot pass because it doesn't have any wallet bytecodes configured.
@dckc
Copy link
Member

dckc commented Nov 13, 2025

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.

3 participants