Skip to content

intellygentle/analogTask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 

Repository files navigation

analogTask

REQUIREMENTS : Substrate wallet extension and Metamask Wallet extension

Register here if you havent registered before and connect the wallets

1000005086 1000005088 1000005090

go to quests

1000005092

community tasks are what you can do but some of them require technicality

1000005094

Lets go to developer task

1000005099

lets do two tasks here and come back later.

connect wallet

1000005101 after clicking on connect wallet it will take you to the docs. locate developer and click on basic under it. 1000005105

click on the link from there or just copy it from here

1000005108

make sure to use desktop site when connecting wallet

1000005115 1000005111

after clicking on connect wallet, and have cconnected your wallet youll just select the onboarding tips randomly

1000005113

once youre connected go back go analog testnet page to verify the task

1000005117

Developer Task2

Lets create apikey

1000005119 1000005121 1000005123 1000005125 1000005127

after clicking on the refresh icon, it should look like this

1000005129

Lets skip to the GMP task now we'll come back to the remaining watch tasks later

connect metamask

1000005131

ERROR

it will show this at the gmp page when you click on connect

1000005133

clear your cookies and reload

1000005135 1000005137

then reload the page and log in. go to the quest page and at the gmp connect your metamask wallet.

1000005139

There are three tasks here but only two is working now. These tasks earn you points daily.

1000005141

You will deploy smartcontract and d verify it to complete the tasks.

Once you get it done the first time, you'll find it easy running it everyday

LET'S DO IT !

First you need sepolia address. You will need to ask for this from friends.

create alchemy account though because you may need it for other updates

When a friend has sent you sepoliaEth. follow the guide below to change your network.

1000005143 1000005145 1000005147

Now you need the Shibuya faucet too. Don't worry it is easier to get

1000005149 1000005151 1000005153 1000005157 1000005159 1000005161

Astar portal is having issues now but team is aware already. I got SYB faucet from their Discord

you can hit me up in the community if you need SYB faucet

1000005165

Now let's go deploy

download the zipfile from the repository below and extract

1000005167

1000005169

the zip file will look like this

1000005263

it will look like this after extraction

1000005265

Head to remixIDE

Import the extracted folder to RemixIDE

1000005267

for one reason that i dont know, remix is not importing the whole folder

1000005269

we only need two files from everything, so we'll import the two files alone

1000005271 1000005273 1000005275 1000005277 1000005279 1000005281

now let's compile the contract and deploy it on the sepolia network

firstly, confirm that your wallet is on the sepolia network

1000005283

click on the counter.sol file

1000005285

click on the third icon at the left side and click on compile. take note of the compiler version

in the screenshot below the compiler is 0.8.26commit...

1000005287

click on the 4th icon on, change the environment to ' injected provider- metamask '

1000005293

it will pop your wallet up for connection, once it's connected successfully you'll see your wallet address at the account box

take note of the evm version in this screenshot it is cancun

add this gateway address to the deploy box 0x000000007f56768de3133034fa730a909003a165

then click on deploy

1000005295

chech your metamask to confirm the transaction

1000005297 1000005299

now you have successfully deployed the smartcontrat

1000005301

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

as EOA just refresh the page and give it some minutes

1000005304

Scroll down and click on contract then click on verify & publish

1000005306

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

1000005308

at the last field, you need to paste the smart contract source code. just copy it here :

1000005325

// 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);
    }
}

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

1000005329

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

1000005332

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

1000005334

Confirm the transaction in your metamask

1000005336

TaDa! your contract is created on the shibuya network. Remains verification

1000005338

Copy the contract and head to https://shibuya.blockscout.com/

paste your smart contract address like we did the other time

scroll down and click on contract, select verify and publish, fill the fields and submit

1000005340

1000005342

now, you can go do galxe and intract quests to get more points before i drop the other guide

you can also watch their tutorials to complete some of the watch tasks

You only need to deploy those contracts and verify them on the two chains daily and you'll earn 30ATP for the two everyday

WAGMI

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published