GithubHelp home page GithubHelp logo

quantadex / quanta_explorer Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 4.87 MB

QUANTA blockchain explorer

Home Page: https://quantadex.github.io/quanta_explorer/

HTML 0.13% CSS 0.05% JavaScript 98.07% Dockerfile 0.05% Shell 0.10% Makefile 0.02% SCSS 1.58%

quanta_explorer's People

Contributors

blacknightfury avatar coderfi avatar quocble avatar tinymolecule avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

quanta_explorer's Issues

search account by public key

User may now remember their account id, only by their public key.. please give them a choice for public key. Some public key may reveal multiple accounts.

I believe this one: QA4yeoMtbdDQeSh92HahSg1GPmh1yxg8Em1qRV94ZwJXvSu1huyq
or QA71zQPZCNMBNreR7mP3z22vQRSzq5USYhrLVnvW2msfyeURqRsS yields multiple accounts

If it yields multiple accounts:
Present the user with a screen to pick from a list.

Crosschain history

Requirements:

Display the crosschain transactions. There are 3 nodes, and here are the API.

  1. Drop down box of 3 nodes to switch between the data
  2. Show header status of the node
  3. Show the transactions of deposit/withdrawal
  4. Support ERC20 coin linking

image

API

https://wya99cec1d.execute-api.us-east-1.amazonaws.com/testnet/node1/status
https://wya99cec1d.execute-api.us-east-1.amazonaws.com/testnet/node2/status
https://wya99cec1d.execute-api.us-east-1.amazonaws.com/testnet/node3/status

https://wya99cec1d.execute-api.us-east-1.amazonaws.com/testnet/node1/history
https://wya99cec1d.execute-api.us-east-1.amazonaws.com/testnet/node2/history
https://wya99cec1d.execute-api.us-east-1.amazonaws.com/testnet/node3/history

Data mapping:

/status
TotalTransactions (used for calculating pages)
CURRENTBLOCK:ETH: "4869260",
CURRENTBLOCK:QUANTA: "2635475",
Public Key

/history
SourceTX = TX , BlockNumber= Source Block
SubmitTxHash = ToHash , SubmitBlock_num = To Block

From = From
For Deposit, link to https://ropsten.etherscan.io/address/<from>
For Withdrawal, link to http://testnet.quantadex.com/account/<from>
If BOUNCE, link to http://testnet.quantadex.com/ledgers/<ledger>

To:
Normal deposit, withdrawal - Reverses with FROM
If BOUNCE, link to http://testnet.quantadex.com/ledgers/<ledger>

Hover on from From TX, or TO TX displays respective Block #

Amount calculation:
Retrieve the Coin from get_asset on QUANTA, to get the precision. Use the precision and calculate
the decimals of the amount.

ERC20 Linking
Split the Coin for "0X", if length is == 2 , then use first one as coin, and second one (with prefix 0x.. ), and lowercase, to link to ERC20 token when the user click on the tool tip

https://ropsten.etherscan.io/token/<token>

Dependent on quantadex/distributed_quanta_bridge#25

Asset lists, and rich list

Motivation

Users are asking how many people holding certain coins.. Let's provide a rich list of these coins.

Design

https://open-explorer.io/#/assets
We have fewer columns.

  • Name
  • Description
  • Circulating Supply (sum up from all the account holders)
  • Total Supply (get_object 2.3.0 which is the dynamic asset object for 1.3.0)
  • Holders (see get_asset_holders_count)

Clicking on Asset takes to top holders

https://open-explorer.io/#/assets/1.3.113

  • Account
  • Amount

with paging , see get_asset_holders api

Sample code

const fetch = require('node-fetch');
var wsString = "ws://testnet-01.quantachain.io:8090";
import GrapheneApi from "@quantadex/bitsharesjs-ws/cjs/src/GrapheneApi";
import ChainWebSocket from "@quantadex/bitsharesjs-ws/cjs/src/ChainWebSocket";

import { hash } from "@quantadex/bitsharesjs";
// import GrapheneApi from "@quantadex/bitsharesjs-ws/es/src/GrapheneApi";
import createHash from "create-hash";

var url = "https://wya99cec1d.execute-api.us-east-1.amazonaws.com/testnet/account?filter_field=operation_type&filter_value=50&size=1000"

async function main() {
	// await Apis.instance(wsString, true, 3000, { enableOrders: false }).init_promise
	let conn = new ChainWebSocket(wsString, () => { }, 3000, true,() =>{});
	await conn.login("","")

	var api = new GrapheneApi(conn,"asset");
	console.log("connect?");
	try {
		const out = await api.init()
		console.log("connected");
		const block = await api.exec("get_asset_holders", ["1.3.0", 0, 100])
		console.log(block);
		
		const count = await api.exec("get_asset_holders_count", ["1.3.0"])
		console.log("Count",count);

	}catch(e) {
		console.log(e);
	}
}

main().then(e=> {})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.