Cover photo

Analog 激励测试网教程(更新Developer合约部署等任务)

简介

Analog 是一个完全去中心化的第 0 层平台,用于通过时间证明共识机制传达经过验证的事件数据。该平台的核心是 tesseracts 和时间节点,它们可以从主权链私下获取和确认事件数据,允许不同的生态系统使用相同的语言。 Analog旨在引入无需信任的全链互操作性,允许开发人员通过通用协议和API轻松构建他们的应用程序。 Analog 还推出了一种新颖、超快的 PoT 协议,该协议在时间链上创建可验证的事件数据,允许 DApp 开发人员构建下一代基于事件的应用程序。

Twitter

x.com

https://twitter.com/OneAnalog

Discord

Join the Analog (Official) Discord Server!

https://discord.gg/analog

融资情况

Analog完成了由Tribe Capital领投,NGC Ventures、Wintermute、GSR、NEAR、Orange DAO、Mike Novogratz 的另类资产管理公司 Samara Asset Group、Balaji Srinivasan 等参投的1600万美元种子轮及战略轮融资。

空投预期

代币分配:ANLOG的总供应量上限为90,579,710。总供应量的一定比例将在主网启动时铸造,剩余的代币将在未来几个月内归属,并按以下方式分发:

种子轮 26.8% 线性分发27个月

机构投资#1 1.9% 线性分发24个月

机构投资#2 0.5% 线性分发24个月

机构投资#3 0.6% 线性分发18个月

机构投资#4 0.5% 线性分发18个月

私募 10.1% 线性分发24个月

战略投资 3.7% 线性分发18个月

团队/顾问 15.4%

资金 14.6%

社区 26%

-市场 4.5%

-空投 2%

-公售 5%

-剩余 14.5%

原文地址:

Timechain Tokenomics Documentation.docx

https://docs.google.com/document/d/e/2PACX-1vRCpMd7VmDxqGYXYZfj-1RyHdWRU6DfBf1tTad4vlpmmvp4Coavwh9mmT42Te665A/pub

交互准备

下载安装浏览器钱包

1.SubWallet(推荐)

SubWallet - Polkadot Wallet

https://chromewebstore.google.com/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn

2.Talisman

Talisman - Ethereum and Polkadot Wallet

https://chromewebstore.google.com/detail/talisman-ethereum-and-pol/fijngjgcjhjmmpcmkeiomlglpeiijkld

3.Polkadot.JS

polkadot{.js} extension

https://chromewebstore.google.com/detail/polkadot%7Bjs%7D-extension/mopnmbcafieddcagagdcbnhejhlodfdd

4.Enkrypt

Enkrypt Crypto Wallet: ETH, BTC, KDA & more!

https://chromewebstore.google.com/detail/enkrypt-multichain-crypto/kkpllkodjeloidieedojogacfhpaihoh

添加网络并领水

以SubWallet钱包为例(建议第二个方法添加)

post image

在URL处填写:wss://rpc.testnet.analog.one 然后保存即可

post image

钱包首页下拉找到添加的代币,进入复制地址

post image

或者前往(推荐此方法):

Analog Watch

https://watch.testnet.analog.one/#/

链接钱包

post image

链接好钱包之后点击右上角的钱包,复制第2个an开头的地址即可

post image

前往DC的**#faucet**频道输入:!faucet+钱包地址 领水

post image

交互流程

前往

Analog Incentivized Testnet

https://testnet.analog.one/#/?signup&referral=YJCC50

注册账号

post image

绑定EVM钱包

post image

然后点击银河链接,跳转至银河页面,完成社交任务即可

post image

完成银河任务之后返回任务页面,Claim积分即可

post image

WATCH GAME栏任务,需要在有会议和投票的时候才可以参加并获得积分,等待任务不定时开启

post image

开启WATCH GAME之后,进入,点击START VOTING

post image

任意挑选一个投票

post image

完成之后WATCH GAME栏积分增加10,获胜后可以得到更多积分(建议大家都投票给1号)

post image

Developer任务栏

在Quests类目内点击右方的Developer栏

post image

下来页面,分别连接钱包(Sub和小狐狸)

post image

Create an API Key

点击之后跳转页面

post image

点击API Keys,然后选择创建新的API Key

post image

输入名称并钱包签名,然后Next

post image

创建完成即可

剩下的任务是合约部署和bug反馈这类的开发者任务,能力有限,需要花时间研究,完成后更新

部署一个智能合约

前往Remix

Remix - Ethereum IDE

https://remix.ethereum.org/

新建一个.sol文件(名字任意)

post image

复制以下代码填入:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
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 that 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 the GMP message
     */
    function onGmpReceived(bytes32 id, uint128 network, bytes32 source, bytes calldata payload)
        external
        payable
        returns (bytes32);
}

contract Counter is IGmpReceiver {
    // sepolia 0xB5D83c2436Ad54046d57Cd48c00D619D702F3814
    // shibuya 0xF871c929bE8Cd8382148C69053cE5ED1a9593EA7
    address private immutable _gateway;
    uint256 public number;

    constructor(address gateway) {
        _gateway = gateway;
    }

    function onGmpReceived(bytes32, uint128, bytes32, bytes calldata) external payable override returns (bytes32) {
        require(msg.sender == _gateway, "unauthorized");
        number++;
        return bytes32(number);
    }
}
post image

然后编译合约

post image

编译完成之后,部署合约

post image

Sepolia的gateway地址:

钱包确认之后部署成功

复制合约地址

post image

前往

Sepolia blockchain explorer - View Sepolia stats | Blockscout

https://eth-sepolia.blockscout.com/

输入刚刚复制的合约地址搜索并进入

post image

下拉页面,点击Contract和Verify & publish

post image

跳转页面如截图选择,code处输入以下代码

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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 that sent 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 the 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 
        override 
        returns (bytes32) 
    {
        // Verify that the sender is the gateway contract
        require(msg.sender == _gateway, "unauthorized");
        
        // Increment the counter
        number++;
        
        // Return the new value of the counter as a bytes32
        return bytes32(number);
    }
}
post image

然后前往

Analog Watch

https://watch.testnet.analog.one/#/

点击顶部的Smart Contracts

post image

弹出窗口,将部署的合约地址复制填入

post image

返回合约部署页面,复制ABI

post image

然后填入Analog watch的下一步

post image

勾选后点击List即上传成功

post image

Build and deploy a View

上传成功之后点击See Smart Contract进入合约

点击Create View

post image

选择我们的合约,然后随意修改一下数值然后保存即可

post image

报错,暂停研究

Sponsor/Fund a Unique View

前往

Analog Watch

https://watch.testnet.analog.one/#/library

点击任意项目进入(上一步完成,也可以进入自己的项目)

post image

点击Add Funds捐赠一部分测试币即可

post image

GMP

Build and deploy a smart contract using Analog GMP interfaces on Sepolia and Shibuya Testnet

复制创建的智能合约地址然后Claim即可

post image

Send a message using a GMP gateway contract

前往

sepolia.etherscan.io

https://sepolia.etherscan.io/address/0xB5D83c2436Ad54046d57Cd48c00D619D702F3814#writeContract

连接小狐狸钱包

post image

然后拉开第三项填入如图数值

地址:

0xB5D83c2436Ad54046d57Cd48c00D619D702F3814

post image

钱包确认之后view跳转页面复制tx

post image

然后返回任务页面填入并Claim

post image

DMAIL任务(项目方暂停,开启后更新)

点击DMAIL下的链接,跳转至DMAIL

post image

使用Gmail登录

post image

暂时积分任务就这些很简单的交互,本教程将持续更新

https://x.com/superzhou520