REQUIREMENTS : Substrate wallet extension and Metamask Wallet extension
after clicking on connect wallet it will take you to the docs. locate developer and click on basic under it.
after clicking on connect wallet, and have cconnected your wallet youll just select the onboarding tips randomly
this faucet is working for new wallets now https://cloud.google.com/application/web3/faucet/ethereum/sepolia
it will pop your wallet up for connection, once it's connected successfully you'll see your wallet address at the account box
copy the contract address and head to https://eth-sepolia.blockscout.com/
paste your contract address in the search bar and click on it. sometimes it shows the contract address
the next page is where you'll fill the compiler and evm version. Remember i told you to take note of them?
should be the one that you used when you were compiling. They may be different from mine and sometimes they may not
// SPDX-License-Identifier: MIT
// Analog's Contracts (last updated v0.1.0) (src/interfaces/IGmpReceiver.sol)
pragma solidity >=0.8.0;
/**
* @dev Required interface of a GMP compliant contract
*/
interface IGmpReceiver {
/**
* @dev Handles the receipt of a single GMP message.
* The contract must verify the msg.sender, it must be the Gateway Contract address.
*
* @param id The EIP-712 hash of the message payload, used as GMP unique identifier
* @param network The chain_id of the source chain who send the message
* @param source The pubkey/address which sent the GMP message
* @param payload The message payload with no specified format
* @return 32 byte result which will be stored together with GMP message
*/
function onGmpReceived(bytes32 id, uint128 network, bytes32 source, bytes calldata payload)
external
payable
returns (bytes32);
}
contract Counter is IGmpReceiver {
address private immutable _gateway;
uint256 public number;
constructor(address gateway) {
_gateway = gateway;
}
function onGmpReceived(bytes32, uint128, bytes32, bytes calldata) external payable returns (bytes32) {
require(msg.sender == _gateway, "unauthorized");
number++;
return bytes32(number);
}
}
copy it and take it to the analog testnet page. paste it in the first gmp fiel and click on the side icon
0x000000007f56768de3133034fa730a909003a165