CctpV2BridgeAdapter
Inherits: BridgeAdapter, ICctpV2DestinationCaller
Constants
CCTP_V2_BRIDGE_ID
uint16 private constant CCTP_V2_BRIDGE_ID = 3;Functions
constructor
constructor(address _registry, address _tokenMessenger, address _messageTransmitter)
BridgeAdapter(_registry, _tokenMessenger, _tokenMessenger, _messageTransmitter);Parameters
| Name | Type | Description |
|---|---|---|
| _registry | address | |
| _tokenMessenger | address | |
| _messageTransmitter | address |
initialize
Initializer of the contract.
function initialize(address _controller, bytes calldata) external override initializer;Parameters
| Name | Type | Description |
|---|---|---|
| _controller | address | The bridge controller contract. |
| _ | bytes | The optional initialization data. |
receiveCctpV2Message
Handles reception of a CCTP V2 message and signature.
function receiveCctpV2Message(bytes calldata message, bytes calldata attestation) external override nonReentrant;Parameters
| Name | Type | Description |
|---|---|---|
| message | bytes | The CCTP V2 message raw bytes. |
| attestation | bytes | The message signature. |
_outBridgeTransferCancelDefault
Internal logic for outgoing bridge transfer cancellation default.
function _outBridgeTransferCancelDefault(uint256 transferId) internal view override returns (uint256);Parameters
| Name | Type | Description |
|---|---|---|
| transferId | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |
_checkOutBridgeTransferIsCancellable
Checks if an outgoing bridge transfer is in a cancellable state.
function _checkOutBridgeTransferIsCancellable(uint256 transferId) internal override;Parameters
| Name | Type | Description |
|---|---|---|
| transferId | uint256 |
_sendOutBridgeTransfer
Handles logic specific to the external bridge protocol for sending out a bridge transfer.
function _sendOutBridgeTransfer(uint256 transferId, bytes calldata data) internal override;Parameters
| Name | Type | Description |
|---|---|---|
| transferId | uint256 | |
| data | bytes |