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

By [0xZc](https://paragraph.com/@0xzc) · 2024-06-06

---

**简介**
------

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

**Twitter**
-----------

[**x.com**](https://twitter.com/OneAnalog)

[https://twitter.com/OneAnalog](https://twitter.com/OneAnalog)

**Discord**
-----------

[**Join the Analog (Official) Discord Server!**](https://discord.gg/analog)

[https://discord.gg/analog](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)

[https://docs.google.com/document/d/e/2PACX-1vRCpMd7VmDxqGYXYZfj-1RyHdWRU6DfBf1tTad4vlpmmvp4Coavwh9mmT42Te665A/pub](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)

[https://chromewebstore.google.com/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn](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)

[https://chromewebstore.google.com/detail/talisman-ethereum-and-pol/fijngjgcjhjmmpcmkeiomlglpeiijkld](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)

[https://chromewebstore.google.com/detail/polkadot%7Bjs%7D-extension/mopnmbcafieddcagagdcbnhejhlodfdd](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)

[https://chromewebstore.google.com/detail/enkrypt-multichain-crypto/kkpllkodjeloidieedojogacfhpaihoh](https://chromewebstore.google.com/detail/enkrypt-multichain-crypto/kkpllkodjeloidieedojogacfhpaihoh)

添加网络并领水

以SubWallet钱包为例（建议第二个方法添加）

![](https://storage.googleapis.com/papyrus_images/118b215d6c321646be6f197b6ad7cba943d39aebb402c1df8a84c998ce715ef7.png)

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

![](https://storage.googleapis.com/papyrus_images/e3b2afbc0153735e790451648ac902cfa8e681041650ed40e4f3d13cf2b2c8ca.png)

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

![](https://storage.googleapis.com/papyrus_images/6f23a36e5dc72998fb4e130aff7ecba11108a3e2b447e46d46e771c89acb1e3f.png)

或者前往（推荐此方法）：

[**Analog Watch**](https://watch.testnet.analog.one/#/)

[https://watch.testnet.analog.one/#/](https://watch.testnet.analog.one/#/)

链接钱包

![](https://storage.googleapis.com/papyrus_images/0c090461c9fade6890d2af93c5177ee76d5225a0247275ee32dbe0af06dc2396.png)

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

![](https://storage.googleapis.com/papyrus_images/f743a458b7e47d709b1248451e82cee155996c9c767f32428b91e904c6d0fe37.png)

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

![](https://storage.googleapis.com/papyrus_images/33bbf441a014a0786788cd8a08fa0e1f7108b1c6da23f6b15770225733dac5a6.png)

**交互流程**
--------

前往

[**Analog Incentivized Testnet**](https://testnet.analog.one/#/?signup&referral=YJCC50)

[https://testnet.analog.one/#/?signup&referral=YJCC50](https://testnet.analog.one/#/?signup&referral=YJCC50)

注册账号

![](https://storage.googleapis.com/papyrus_images/73491715027938a95baa0f6590301f238a09e49e017d8a0fe7e50a74a8c61040.png)

绑定EVM钱包

![](https://storage.googleapis.com/papyrus_images/b408b4add24a91a2b9b7d6d58366e7813d47140703f1118e2a62dcd25b46f4e2.png)

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

![](https://storage.googleapis.com/papyrus_images/bf1045d1c4b9aafeb5c09f498062430ae31ad6ac5ef898bfb85c7fdeee1182e9.png)

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

![](https://storage.googleapis.com/papyrus_images/c819c3d1941594ec7ffe0d0bde3b36fa9408e16d176d8101eb39109e4125390f.png)

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

![](https://storage.googleapis.com/papyrus_images/034761c153f7f38f6d881cfd0d9966571891d2c3f542fb1919e3f1e28c9c670b.png)

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

![](https://storage.googleapis.com/papyrus_images/78cf02c3d0e5153f34b21aef4a7ddbd8f502913b77f87cac1f51a92846c36f41.png)

任意挑选一个投票

![](https://storage.googleapis.com/papyrus_images/78e9bac8ae9a0d76b6e35c5b4c87f7a1b6ca730ebfe3f3c203d6e3ee4b9fc835.png)

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

![](https://storage.googleapis.com/papyrus_images/1ae3d7c0c5ecef7e353e2713e1ab8416b37834cbdea34773fe0652b3d9e3147b.png)

**Developer任务栏**
----------------

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

![](https://storage.googleapis.com/papyrus_images/5c4489735e29618554dfe9a6886dbdf68e7289407d2315ce1c46f7c2952991b5.png)

下来页面，分别连接钱包（Sub和小狐狸）

![](https://storage.googleapis.com/papyrus_images/d9f2fc12ca11b53a0a92e2a73ce7e1a9e067144c5fa7d1b5443c62de8f4ce6b5.png)

**Create an API Key**

点击之后跳转页面

![](https://storage.googleapis.com/papyrus_images/4e4ad05ebb8b5989a68d2298ac4edfc9d4b69fc60c8b18d4a2abdecc723658db.png)

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

![](https://storage.googleapis.com/papyrus_images/96070fd408b9a28cd41e81ab72c4fb9e530b7612a58861241454f7c0faeafe75.png)

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

![](https://storage.googleapis.com/papyrus_images/3d4c7291ce8e9d951a42a4f3a86071db3ccd0e9293e2c1517f01a98ce96e0928.png)

创建完成即可

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

**部署一个智能合约**
------------

前往Remix

[**Remix - Ethereum IDE**](https://remix.ethereum.org/)

[https://remix.ethereum.org/](https://remix.ethereum.org/)

新建一个.sol文件（名字任意）

![](https://storage.googleapis.com/papyrus_images/9a2952de2703f2f157ded9c6c89651361d6a3527bfc0060aa24e23680ecb2d32.png)

复制以下代码填入：

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

![](https://storage.googleapis.com/papyrus_images/b1c77953d20ebf4f4664dc1a92c20e3961881e047e017aba969afd64a7f5137d.png)

然后编译合约

![](https://storage.googleapis.com/papyrus_images/e74c3826a89894d12f699968253d3dc276836cd3eb83ca86dd5574f69d01f0d7.png)

编译完成之后，部署合约

![](https://storage.googleapis.com/papyrus_images/368a3e4c4d1f886622b57e76f4374fd1e9f5fcefe3ec3598ea3027e2c28a1b2c.png)

**Sepolia的gateway地址：**

钱包确认之后部署成功

复制合约地址

![](https://storage.googleapis.com/papyrus_images/d238a38d84b2d28494b1f6de0a4b090e6a7198dd48b73f8f0391f20961ce59fa.png)

前往

[**Sepolia blockchain explorer - View Sepolia stats | Blockscout**](https://eth-sepolia.blockscout.com/)

[https://eth-sepolia.blockscout.com/](https://eth-sepolia.blockscout.com/)

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

![](https://storage.googleapis.com/papyrus_images/391ac05a3f47b541c7a5f860de6236901b28121249dd6421f621a4ae3503cbe3.png)

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

![](https://storage.googleapis.com/papyrus_images/bf5a8313b6bb0137aeaa090156c37705d21df7169ef52315dab256b421619b63.png)

跳转页面如截图选择，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);
        }
    }
    

![](https://storage.googleapis.com/papyrus_images/a838b9a2644d91fd698886dd520b56fd8ad8fba1df2eb39be3664644f7a2a29c.png)

然后前往

[**Analog Watch**](https://watch.testnet.analog.one/#/)

[https://watch.testnet.analog.one/#/](https://watch.testnet.analog.one/#/)

点击顶部的Smart Contracts

![](https://storage.googleapis.com/papyrus_images/d82fec17d1b729a6889e2b4839e939e651e79109c4978c74dd47f9b73c35286d.png)

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

![](https://storage.googleapis.com/papyrus_images/ff6ebe731d287778792f9d3b1c8f467c9ecc861144bb49dd4e1aa64524c29516.png)

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

![](https://storage.googleapis.com/papyrus_images/965b328b6752bc3c5f5e734eab97539912946e2b1c2a20fb9b8bd98e00f29564.png)

然后填入Analog watch的下一步

![](https://storage.googleapis.com/papyrus_images/b3295b08e01379c565bac957dcc15b85f34757e6b4f180b2bbaf4b4b7c4941a1.png)

勾选后点击List即上传成功

![](https://storage.googleapis.com/papyrus_images/8be045d82b2e00d5a1071e0742497b98a24b8694ebac374318c202cb2cace1f0.png)

**Build and deploy a View**

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

点击Create View

![](https://storage.googleapis.com/papyrus_images/e939ff0794f18532b3d099d9c142afab15b76f3ceec1fe5ffa4bc9805839bdba.png)

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

![](https://storage.googleapis.com/papyrus_images/f1bcfcc042073f9f269a8978e85a723ff16e49aee7605213b05d6dbb0cbcba75.png)

报错，暂停研究

**Sponsor/Fund a Unique View**

前往

[**Analog Watch**](https://watch.testnet.analog.one/#/library)

[https://watch.testnet.analog.one/#/library](https://watch.testnet.analog.one/#/library)

点击任意项目进入（上一步完成，也可以进入自己的项目）

![](https://storage.googleapis.com/papyrus_images/6f30a69d90a68e01b98c74343ab98646c55ff1cd3b2df5415729604b11787877.png)

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

![](https://storage.googleapis.com/papyrus_images/6c7549de3248f785c6f3362fa470cd78a88231969fc220ea40b20926c47539a5.png)

**GMP**
-------

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

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

![](https://storage.googleapis.com/papyrus_images/56a0e36d8aec1391466b88c17d825cfd55d1774819b5148c596f0d78ef834dfc.png)

**Send a message using a GMP gateway contract**

前往

[**sepolia.etherscan.io**](https://sepolia.etherscan.io/address/0xB5D83c2436Ad54046d57Cd48c00D619D702F3814#writeContract)

[https://sepolia.etherscan.io/address/0xB5D83c2436Ad54046d57Cd48c00D619D702F3814#writeContract](https://sepolia.etherscan.io/address/0xB5D83c2436Ad54046d57Cd48c00D619D702F3814#writeContract)

连接小狐狸钱包

![](https://storage.googleapis.com/papyrus_images/fa2c9bbee43718e2ca74dd253b2bf44d93fb04ee207b12025f1aa99af70f0c90.png)

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

地址：

0xB5D83c2436Ad54046d57Cd48c00D619D702F3814

![](https://storage.googleapis.com/papyrus_images/94bf6ea84632252db1d8103b3295cec2e84f4cac9cb801aa9048d182efde2878.png)

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

![](https://storage.googleapis.com/papyrus_images/bd29e694dc6e9b2ac1e4d0fa7ded01e2127e37221feb706000a8f32803ad8842.png)

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

![](https://storage.googleapis.com/papyrus_images/cf6c46dc52c952de61eb623f170dfced215a0bb81dde66921b5f80c14488a674.png)

DMAIL任务（项目方暂停，开启后更新）

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

![](https://storage.googleapis.com/papyrus_images/4d3dda81224f0216c73c2d49e1dc9d7c85d63217abdd27e6e962eb9db042abd9.png)

使用Gmail登录

![](https://storage.googleapis.com/papyrus_images/fb9efcee8ffd87b4101980b9779c3a813148cdeedf9a533ee0859cda86004ee3.png)

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

[https://x.com/superzhou520](https://x.com/superzhou520)

---

*Originally published on [0xZc](https://paragraph.com/@0xzc/analog-developer)*
