Skip to main content

Anchor, On-chain Linked List pallet and Name Service

  • Team Name: Fuu
  • Payment Address: 13u5kLGrt4n1Smc78ZXtYVedgp1U1LyGAAHtPFtVcv6Z1BtR (USDT)
  • Level: 1

Project Overview 📄


  • Anchor is a on-chain linked list system base on substrate 3.0.0. It is used to support cApp ( Chain Application ) development. On another hand, Anchor can alse be treated as Name Service or on-chain key-value storage system.

  • Anchor is a isolated substrate pallet. It is currently used in the application of freeSaying. It can provide flexible data structure on the chain and handle complex logic without upgrading the substrate node itself. You can access the freeSaying ( Only applicable to mobile ) demo to know well. Anchor network is the very important basic storage system. Anchor.js is a isolate JS library to access Anchor network, can read and write data easily. Anchor pallet is a part of EasyPolka, the relationship as follow :


QR to access to easypolka.png

  • With Anchor, you can use run a substate network just need a bit upgrade. Through the highly customizable data structure and the ability of cApp, the threshold of application development on the chain is greatly reduced. It means that new developers who even does not know blockchain well can build cApp just by Javascript and publish it nearly free.

  • As a web developer, I firmly believe in the future of blockchain technology, but when I turn to blockchain development, I encounter a huge threshold. It takes a lot of time to get familiar with both language and various concepts. At the same time, technology is still improving, and a stable development environment cannot be obtained. All of these prompted me to improve EasyPolka for my own development. So far, only one person myself can develop complex cApp ( on-chain applications ). I believe that this can help other developers to build cApps more efficiently. Will try to apply the left part, it is a bit complex, I am working on regrouping them now. The image show the whole structure.


Project Details

  • Anchor development itself has been done, and it is deployed here check "wss://" on One cApp is deployed to test too, the URL is This React project load the target Anchor "freeSaying" from, then run the cApp which is a socail media application.

  • There are 4 methods and 2 stores to implement the on-chain linked list function in Anchor pallet.

  • Substrate 3.0.0 and Rust for Anchor pallet. Javascript for anchor.js.

  • Code here, the document is the next step.

  • Treat Anchor as Name Service, there is no available pallet can be use. Have checked here Open Source Polkadot Stack. easypolka.png

  • The function of Anchor has been finalized and will not be further expanded on substrate side. The function of the current version is the final form.

Ecosystem Fit

  • An available Name Services on Substrate 3.0.0, and it is extended to a On-chain Linked List system.

  • Developers who have not yet used substrate/Polkadot. Developers who do not like Smart Contract way to develop application.

  • Developer can build application flexibly without understanding the whole blockchain system. I think this is attractive to many developers.

  • From the Open Source Polkadot Stack, there are 4 Name Service pallets, 2 red ( can not compatible to substrate 3.0.0 ) and 2 yellow ( code not updated more than 2 months by checking github ).

Team 👥

Team members

  • Zhongqiang Fu, individual developer.


  • Individual

Team's experience

  • On substrate, Substrate with Anchor pallet has been build successful and run at I have tried to load a three nodes network successful.

Team Code Repos

Team LinkedIn Profiles (if available)

Development Status 📖

  • Demo cApp freeSaying is published now. The test network is available, you can access Anchor pallet functions have been developed, but not tested entirely.

Development Roadmap 🔩

Anchor pallet

  • There are 4 methods exposed. One for setting data, Three for trading anchor. easypolka.png

    1. setAnchor, set Anchor data method.
    pub fn set_anchor(
    origin: OriginFor<T>, //default
    key: Vec<u8>, //Anchor name
    raw: Vec<u8>, //raw data to storage
    protocol: Vec<u8>, //data protocol, used to decide how to decode raw data
    pre:T::BlockNumber //the previous block number which storage anchor data
    ) -> DispatchResult {
    // code here.
    1. sellAnchor, sell your Anchor publish or to target account.
    pub fn sell_anchor(
    origin: OriginFor<T>, //default
    key: Vec<u8>, //Anchor name
    cost: u32, //unit accuracy
    target:<T::Lookup as StaticLookup>::Source //target buyer SS58 address. If the same as owner, can be sold to anyone.
    ) -> DispatchResult {
    // code here.
    1. unsellAnchor, revoke Anchor sell status.
      pub fn unsell_anchor(
    origin: OriginFor<T>, //default
    key: Vec<u8>, //Anchor name
    ) -> DispatchResult {
    // code here.
    1. buyAnchor, buy target Anchor which is on sell.
      pub fn buy_anchor(
    origin: OriginFor<T>, //default
    key: Vec<u8>, //Anchor name
    ) -> DispatchResult {
    // code here.
  • There are two Runtime Storage. One for the anchor data status, one for the on-sell list. easypolka.png

      // (T::AccountId,T::BlockNumber)
    // T::AccountId, the anchor owner ss58 address
    // T::BlockNumber, last block number when updated data successfully.
    pub(super) type AnchorOwner<T: Config> = StorageMap<_, Twox64Concat, Vec<u8>, (T::AccountId,T::BlockNumber)>;

    // (T::AccountId, u32,T::AccountId)
    // T::AccountId, the anchor owner ss58 address
    // u32, the sell price for the anchor
    // T::AccountId, the target buyer. If the same as owner, it is free to buy.
    pub(super) type SellList<T: Config> = StorageMap<_, Twox64Concat, Vec<u8>, (T::AccountId, u32,T::AccountId)>;


  • exposed methods. Three parts : basic substrate functions, anchor data I/O functions, anchor exchange functions. It has been used in the demo freeSaying, but no isolated yet. And exchange part need to code this time. Anchor.js can help developer accessing Anchor network by this single JS.

    /* substrate related functions */

    //link to target substrate node,callback){
    /* return callback && callback(PolkadotJS.API) */

    //load encry file to get pair
    /* return callback && callback(pair) */

    //subcribe the latest block
    /* return callback && callback(anchorDataList) */

    //check account balance
    /* return callback && callback(amount) */

    /* Anchor pallet related functions */

    /* data part */
    //get the latest anchor data
    /* return callback && callback(formattedAnchorData) */

    //get the anchor data on special block.,block,callback){
    /* return callback && callback(formattedAnchorData) */

    //get the list data of anchor.
    /* return callback && callback(listofAnchorsData) */

    //set target Anchor data.
    /* return callback && callback(toChainProcessStatus) */

    /* market part */
    //set Anchor status to sell.
    /* return callback && callback(true/false) */

    //buy anchor on sell.,anchor,callback){
    /* return callback && callback(true/false) */

    //revoke anchor from selling.
    /* return callback && callback(true/false) */


  • Total Estimated Duration: 1 month
  • Full-Time Equivalent (FTE): 1
  • Total Costs: 6,000 USDT

Milestone 1 — Anchor pallet testing & documents, anchor.js full function

  • Estimated duration: 1 month
  • FTE: 1
  • Costs: 6,000 USDT
0a.LicenseApache 2.0 / GPLv3
0b.DocumentationWe will provide both inline documentation of the code and a basic tutorial that explains how a user can (for example) spin up one of our Substrate nodes and send test transactions, which will show how the new functionality works.
0c.Testing GuideCore functions will be fully covered by unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. On anchor.js, will supply demo to test.
0d.DockerWe will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. I am not so fimilar with Docker, that will take a bit long time.
0e.Anchor palletWill fix if neccessary. Mainly testing this time.
0f.anchor.jsA demo with all functions will be developed by React

Future Plans

  • Anchor is the data storage part of EasyPolka, it is the most important component. Next, the whole EasyPolka will be open source. At present, it includes the following contents.
1Anchorwss://dev.metanchor.net list on chian & Name service
2Sayinghttps://freesay.netNot yetPlinth for cApp
3cSayingon block 2,220Not yetFreeSaying cApp , pure JS app
4vGateway yetGateway access to vServices
5vManager yetManagement portal for vServices
6vHistoryNo domain, node.js appNot yetAnchor cache vService
7vSayingNo domain, node.js appNot yet]FreeSaying comment vService
8vMarketNo domain, node.js appNot yetFree charge vService
9vMixNo domain, node.js appNot yetFront mixer vService
10vSocialNo domain, node.js appNot yetFav & tread vService


  • The functions above, you can test on the cApp freeSaying. It is not very stable to access Github here, so the left codes are on my private git server.

  • The whole EasyPolka framework works properly, but still so many details to fix and neccesary function to add.

Additional Information

How did you hear about the Grants Program? Web3 Foundation Website.

  • Demo cApp freeSaying is published now. The test network is available, you can access

  • I have tried twice to apply the Gant Application but not accepted. Anchor, a key-value storage system for substate. Now, it is extended, and applying again, :-) SimPolk, simulator of Polkadot.