AcrossAdapter
Inherits: BaseAdapter
Title: AcrossAdapter
Adapter for settling Across bridge claims and forwarding to MetaIntentReceiver
Receives bridged tokens directly from Across and forwards actual received amounts
Functions
constructor
constructor(address receiver) BaseAdapter(receiver);
settle
Settle bridged tokens and forward actual received amount to MetaIntentReceiver
function settle(RelayedOrderOutput calldata expectedOutput) external payable returns (bytes32 payloadHash);
Parameters
| Name | Type | Description |
|---|---|---|
expectedOutput | RelayedOrderOutput | The expected output details (amount is minimum required) |
Returns
| Name | Type | Description |
|---|---|---|
payloadHash | bytes32 | The payload hash returned by the receiver |
_fulfillToReceiverWithAmount
Internal helper to fulfill to receiver with a specific amount
This allows us to use the expectedOutput structure but with the actual received amount
function _fulfillToReceiverWithAmount(RelayedOrderOutput calldata baseOutput, uint256 actualAmount)
internal
returns (bytes32 payloadHash);
_decodeMessage
Override _decodeMessage for BaseAdapter compliance
function _decodeMessage(bytes calldata message) internal pure override returns (RelayedOrderOutput memory output);
Parameters
| Name | Type | Description |
|---|---|---|
message | bytes | The encoded message bytes |
Returns
| Name | Type | Description |
|---|---|---|
output | RelayedOrderOutput | The decoded RelayedOrderOutput |
receive
receive() external payable override;
Errors
InsufficientSettlementAmount
error InsufficientSettlementAmount(uint256 received, uint256 expected);