all files / contracts/interfaces/ IInterchainProposalExecutor.sol

100% Statements 0/0
100% Branches 0/0
100% Functions 0/0
100% Lines 0/0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48                                                                                               
// SPDX-License-Identifier: MIT
 
pragma solidity ^0.8.0;
 
interface IInterchainProposalExecutor {
    // An event emitted when the proposal caller is whitelisted
    event WhitelistedProposalCallerSet(string indexed sourceChain, bytes indexed sourceCaller, bool whitelisted);
 
    // An event emitted when the proposal sender is whitelisted
    event WhitelistedProposalSenderSet(string indexed sourceChain, string sourceSender, bool whitelisted);
 
    // An event emitted when the proposal is executed
    event ProposalExecuted(bytes32 indexed payloadHash);
 
    // An error emitted when the proposal execution failed
    error ProposalExecuteFailed();
 
    // An error emitted when the proposal caller is not whitelisted
    error NotWhitelistedCaller();
 
    // An error emitted when the proposal sender is not whitelisted
    error NotWhitelistedSourceAddress();
 
    /**
     * @notice set the whitelisted status of a proposal sender which is the `InterchainProposalSender` contract address on the source chain
     * @param sourceChain The source chain
     * @param sourceSender The source interchain sender address
     * @param whitelisted The whitelisted status
     */
    function setWhitelistedProposalSender(
        string calldata sourceChain,
        string calldata sourceSender,
        bool whitelisted
    ) external;
 
    /**
     * @notice set the whitelisted status of a proposal caller which normally set to the `Timelock` contract address on the source chain
     * @param sourceChain The source chain
     * @param sourceCaller The source interchain caller address
     * @param whitelisted The whitelisted status
     */
    function setWhitelistedProposalCaller(
        string calldata sourceChain,
        bytes memory sourceCaller,
        bool whitelisted
    ) external;
}