You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
paste your contract address in the search bar and click on it. sometimes it shows the contract address
as EOA just refresh the page and give it some minutes
Scroll down and click on contract then click on verify & publish
the next page is where you'll fill the compiler and evm version. Remember i told you to take note of them?
the first two field are to be selected as in the screenshot and the compiler and the evm versions
should be the one that you used when you were compiling. They may be different from mine and sometimes they may not
at the last field, you need to paste the smart contract source code. just copy it here :
// 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 */interfaceIGmpReceiver {
/** * @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(bytes32id, uint128network, bytes32source, bytescalldatapayload)
externalpayablereturns (bytes32);
}
contractCounterisIGmpReceiver {
addressprivateimmutable _gateway;
uint256public number;
constructor(addressgateway) {
_gateway = gateway;
}
function onGmpReceived(bytes32, uint128, bytes32, bytescalldata) externalpayablereturns (bytes32) {
require(msg.sender== _gateway, "unauthorized");
number++;
returnbytes32(number);
}
}
the next is you'll see your contract verified.
copy it and take it to the analog testnet page. paste it in the first gmp fiel and click on the side icon
Tada! you got 15ATP
Now we need to deploy the contract on shibuya testnet too
nothing much; just go to the file and compile
change your metamask network to shibuya
change the environment to injected provider - metamask
at the deploy field paste this :
0x000000007f56768de3133034fa730a909003a165
check that everything is set; be sure your metamask is on the shibuya network; click on deploy
Confirm the transaction in your metamask
TaDa! your contract is created on the shibuya network. Remains verification