-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Overview
This is a feature request for the ICTT contracts to add Teleporter message IDs to function returns and additional events.
Proposed Changes
1. Return Message IDs from Send Functions
Currently, these functions don't return values:
function send(
SendTokensInput calldata input
) external;
function sendAndCall(
SendAndCallInput calldata input
) external;
Proposed Change:
Modify these functions to return the bytes32
teleporterMessageID:
function send(
SendTokensInput calldata input
) external returns (bytes32);
function sendAndCall(
SendAndCallInput calldata input
) external returns (bytes32);
2. Add Message IDs to Events
Currently, these events are emitted when receiving messages:
event TokensWithdrawn(address indexed recipient, uint256 amount);
event CallSucceeded(address indexed recipientContract, uint256 amount);
event CallFailed(address indexed recipientContract, uint256 amount);
Proposed Change:
Add the teleporterMessageID as the first parameter (and indexed) to these events:
event TokensWithdrawn(bytes32 indexed teleporterMessageID, address indexed recipient, uint256 amount);
event CallSucceeded(bytes32 indexed teleporterMessageID, address indexed recipientContract, uint256 amount);
event CallFailed(bytes32 indexed teleporterMessageID, address indexed recipientContract, uint256 amount);
Suggestion for Implementation of Change #2
For implementing change #2, we suggest the ITeleporterReceiver interface could be updated to pass the message ID:
interface ITeleporterReceiver {
function receiveTeleporterMessage(
bytes32 teleporterMessageID,
bytes32 sourceBlockchainID,
address originSenderAddress,
bytes calldata message
) external;
}
This is just a suggestion for one possible implementation approach and could benefit other ITeleporterReceiver implementers as well.
Rationale
We're building on top of ICTT and would like to use the message ID in our own logs for tracking cross-chain messages.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status