zeta-chain / protocol-contracts

Protocol contracts implementing the core logic of the protocol, deployed on ZetaChain and on connected chains
MIT License
68 stars 55 forks source link

Rename `onCrossChainCall` to `onCall` and `zContext` to `messageContext` #345

Open fadeev opened 3 weeks ago

fadeev commented 3 weeks ago

https://github.com/zeta-chain/protocol-contracts/blob/2cf7ef24509bbf245d0821ffedf90007885d2d8e/v2/contracts/zevm/interfaces/UniversalContract.sol

interface UniversalContract {
    function onCall(
        messageContext calldata context,
        address zrc20,
        uint256 amount,
        bytes calldata message
    )
        external;

    function onRevert(RevertContext calldata revertContext) external;
}

Then we can have a similar interface on connected chains for "authenticated calls":

function onCall(
    messageContext calldata context,
    bytes calldata message
)