Purpose
Each programmable address contract serves a single destination:- Token reception: Receives tokens from users
- Action execution: Converts deposits into cross-chain intents via Portal
- Refund handling: Returns funds for expired/unfulfilled intents
Functions
initialize
Called by the factory immediately after deployment._destinationAddress: Destination wallet that will receive funds_depositor: Address authorized to trigger refunds
createIntent
Creates a cross-chain intent for the specified amount.amount: Amount of tokens to include in the intent
intentHash: Unique identifier for the created intent
refund
Triggers a refund for an expired intent.routeHash: Hash of the route parametersreward: Reward structure for the intent
View Functions
Reward Structure
The refund function requires a Reward struct:Events
IntentCreated
IntentRefunded
Errors
AlreadyInitialized
initialize() is called more than once.
NotInitialized
OnlyFactory
initialize().
