Uniscan is a NFT Explorer for blockchains.
- Ruby
- Ruby on Rails - Web framework
- Hotwire - An alternative approach to building modern web applications
- MySQL
- Redis
- ImageMagick - Convert image, resize image, identify image
- FFmpeg - Convert video to gif
- Alibabacloud OSS - Online image storage and access service
- Sidekiq - Simple, efficient background processing for Ruby
Provide web pages for users to use.
Track and get the NFT on the blockchains.
There are now trackers for Ethereum and Darwinia as examples.
A NFT worker is a long-running process.
It is responsible for collecting the NFT discovered by the tracker and storing it in the database.
The data from the tracker is packaged into a sidekiq
message for delivery.
It reads the token_uri of NFT from the database, and then obtains the metadata.
And, it will download and process the image from the metadata.
A model is a Ruby class that is used to represent data. Additionally, models can have most of the application's logic.
- {Account}
- {Blockchain}
- {Collection}
- {Token}
- {Property}
- {TokenOwnership}
- {Transfer}
The relationship between the models:
Controllers handle the incoming web requests and eventually respond with a rendered view.
- {WelcomeController}
- {TokensController}
- {CollectionsController}
- {AccountsController}
You can also test in docker container.
-
Install Ruby ~> 2.7.0
See Installing Ruby -
Install ImageMagick & FFmpeg
-
Download code
Download or clone the code to local, and go to the root directory. -
Install Rubygems
bundle install
rails test
rails test test/models/transfer_test.rb
- Run mysql and redis.
docker-compose up -d db redis
- Create tables and generate seed data.
docker-compose run --rm uniscan rails db:migrate
docker-compose run --rm uniscan rails db:seed
- Run services
docker-compose up -d parse_token_uri update_creator
docker-compose up -d eth_scan sidekiq uniscan
- Run mysql if not running
docker-compose up -d db
- Create test database
docker-compose run --rm uniscan_test rails db:create
docker-compose run --rm uniscan_test rails db:migrate
- Run tests
docker-compose run --rm uniscan rails test
Bug reports and pull requests are welcome on GitHub at https://github.com/uni-arts-chain/uniscan.
The gem is available as open source under the terms of the MIT License.