No commit activity in last 3 years
No release in over 3 years
A substrate nft tracker using scale.rb
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.3.2
~> 1.4, >= 1.4.2
 Project Readme

Substrate Nft Tracker

This is a tool for tracking NFT in the evm pallet of substrate based blockchain.

This tool is part of The NFT Explorer. It gets NFT-related events by listening to the substrate's native events.

The advantage of this approach is that it does not rely on the rpc interfaces provided by the Ethereum, but uses the native rpc interface provided by substrate. This approach is more reliable in the polkadot ecosystem.

Usage

Installation

$ gem install substrate-nft-tracker

Run

Run an example(it is for Darwinia Pangolin Network) that has been implemented here.

$ pangolin 1234

The only parameter is the start block height.

Develop a new NFT tracker for a new blockchain

You can create a new project yourself, or you can fork the project and add files on top of it, I recommend the latter:

  1. Create the client of the blockchain

    You can refer to lib/testnets/pangolin.rb as an example.

    You need to add types for this chain and implement two methods get_latest_block_number() and get_events_by_block_number(block_number).

  2. Create an executable program

    You can refer to exe/pangolin as an example.

Test

run rake spec to run the tests.

Docker

$ docker build -t substrate-nft-tracker .
$ docker run -it --rm substrate-nft-tracker pangolin 167421

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/uni-arts-chain/substrate-nft-tracker.

License

The gem is available as open source under the terms of the MIT License.