251
Підписники
-124 години
-57 днів
-230 днів
Архів дописів
🔺Copy That Contract Address & Paste In Quest Website
🔺You Can Complete This Task Max 5 Times Per Day
// SPDX-License-Identifier: MIT
// File: IGmpReceiver.sol
pragma solidity >=0.8.0;
/**
* @dev Required interface of an 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);
}
// File: counter.sol
pragma solidity ^0.8.0;
contract Counter is IGmpReceiver {
address private immutable _gateway;
uint256 public number;
constructor(address gateway) {
_gateway = gateway;
}
function onGmpReceived(bytes32, uint128, bytes32, bytes calldata) external override payable returns (bytes32) {
require(msg.sender == _gateway, "unauthorized");
number++;
return bytes32(number);
}
}
🔺Also Remove ✅ Tick Mark From All Boxes
🔺Paste This Code In Last Paragraph
🔺& Click On Verify & Publish 👇
🔺Select Mit License (MIT) on Contract License
🔺Select Solidity (Flattened source Code) In Verification Method
🔺Also Select v 0.8.0 In Compiler
🔺Then Go Here - https://eth-sepolia.blockscout.com
🔺Connect Metamask & Search Your Own Address
🔺Go To Trxn - U Will See Your Contract
🔺Copy Contract Address & Search Again
🔺Then Add Gateway Address 👇
0xB5D83c2436Ad54046d57Cd48c00D619D702F3814
🔺& Click On Deploy & Complete Trxn🔺Then Click On Deploy & Run Trxn
🔺Select Injected Provider - Metamask
🔺Note That U Selected Sepolia Eth On Your Metamask Wallet
+1
🔺Then Go To Counter.sol File
🔺Remove Analog-gmp/interface And Put A Dot "
. "🔺Then Again Create A File
🔺Set Name -
IGmpReceiver.sol
🔺And Paste This 👇
// 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 an 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);
}🔺Then Paste This 👇
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IGmpReceiver} from "@analog-gmp/interfaces/IGmpReceiver.sol";
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);
}
}🔺Go To - https://remix.ethereum.org
🔺Click On Create A File
🔺Set Name -
counter.sol+2
🔺Click On Open Wallet - U Will Be Redirected To Particle Wallet
🔺Deposit Some Testnet Bnb In Particle Wallet & Complete A Trxn
🔺Must Complete Daily Checkin & Trxn In Particle Wallet For Maximum Points👀
🔺Per Trxn 50 Points / Max 100 Times Per Day
🔺It Means U Can Earn Up To 5000 Points Daily 👀
🔺Now Complete Daily CheckIn
🔺Daily Check In Is Compulsory For More Points
🔺Go To - https://pioneer.particle.network/en/universalGas
🔺Bridge From Eth Sepolia Or Bnb Testnet To Particle Testnet For USDG
🔺Faucet - https://testnet.bnbchain.org/faucet-smart
