Prerequisites

Getting Started

Integration of IGMPReceived interface

Integration of IGateway interface

Making a GMP request

  1. Deploy a contract using the gateway address of the selected network. https://docs.analog.one/documentation/developers/analog-gmp/gateway-addresses-and-network-ids
  2. Estimate the task message/gas cost by calling estimateMessageCost on gateway passing it networkidmessageSize and gasLimit.

Function Signature:

estimateMessageCost(uint16 networkid, uint256 messageSize, uint256 gasLimit)
  1. While requesting submitMessage you must pass the GMP task gas fee as a value with the GMP request. If the amount passed is lower than the estimated message cost call the transaction will fail with an error execution reverted: insufficient tx value.
  2. You can make the GMP call using submitMessage

Example

	gateway.submitMessage{value: msg.value}(dest_address, dest_network, GMP_GAS_LIMIT, payload);
  1. Once the block is finalized on the source side, the task will be created on the Timechain. You can track the status of your task on our explorer.
  2. Once your task is completed, your destination chain contract state will be updated.