Purpose
The factory serves as the entry point for the programmable address system:- Address generation: Computes programmable addresses without on-chain transactions
- Contract deployment: Deploys programmable address contracts when funds are received
- Configuration storage: Holds immutable settings for all programmable address contracts it creates
Constructor
| Parameter | Type | Description |
|---|---|---|
_destinationChain | uint64 | Target chain ID |
_sourceToken | address | Token on source chain |
_targetToken | bytes32 | Token on destination (bytes32 for cross-VM) |
_portalAddress | address | Routes Portal contract |
_proverAddress | address | Cross-chain prover |
_destinationPortal | bytes32 | Portal on destination chain |
_intentDeadlineDuration | uint64 | Intent validity period |
Functions
getDepositAddress
Computes the deterministic programmable address for a given destination.destinationAddress: Solana wallet address as bytes32
- The EVM address where the user should send tokens
isDeployed
Checks if a programmable address contract has been deployed for a destination.deploy
Deploys a new programmable address contract for the specified destination.destinationAddress: Solana wallet address as bytes32depositor: Address authorized to trigger refunds
- Address of the deployed programmable address contract
getConfiguration
Returns all factory configuration values.Configuration Getters
Individual getters for each configuration value:DESTINATION_CHAIN()- Target chain IDSOURCE_TOKEN()- Source token addressTARGET_TOKEN()- Target token (bytes32)PORTAL_ADDRESS()- Portal contract addressPROVER_ADDRESS()- Prover contract addressDESTINATION_PORTAL()- Destination portal (bytes32)INTENT_DEADLINE_DURATION()- Deadline durationDEPOSIT_IMPLEMENTATION()- Implementation contract address
Events
DepositContractDeployed
| Field | Type | Indexed | Description |
|---|---|---|---|
destinationAddress | bytes32 | Yes | Solana wallet address |
depositAddress | address | Yes | Deployed contract address |
