The Ethereum gateway is the connection between client and the relayer. Gateway implements the below given interface.
Gateway does two things mainly it accepts the tasks for preExecution for which it does payload hash verification and then logs out the new task for relayer to pick up and after the private computation it accepts the task for postExecution procedure where it does payload hash verification, result signature verification, packet signature verification and then call back the client with computed result for the task and logs out the task details. Initialize and updateRoute are periphary functions in which you can initialize a master verification address for the contract and then check the validity of the (route -> verification address) map for updateRoute and this map is to be stored onchain for postExecution validity checks.
Gateway Interface:
interface IGateway {/// @notice Initialize the verification address/// @param _masterVerificationAddress The verification input addressfunctioninitialize(address_masterVerificationAddress) external;/// @notice Updating the route/// @param _route Route name/// @param _verificationAddress Address corresponding to the route/// @param _signature Signed hashed inputs(_route + _verificationAddress)functionupdateRoute(stringmemory_route,address_verificationAddress,bytesmemory_signature) external;/// @notice Pre-Execution/// @param _task Task struct/// @param _info ExecutionInfo structfunctionpreExecution(Taskmemory_task,ExecutionInfomemory_info) external;/// @notice Post-Execution/// @param _taskId Task Id of the executed message/// @param _sourceNetwork Source network of the message/// @param _info PostExecutionInfo structfunctionpostExecution(uint256_taskId,stringmemory_sourceNetwork,PostExecutionInfomemory_info) external;}