unoparty2mysql is a php script which populates a mysql database with unoparty data.
unoparty2mysql loads Unoparty data by requesting 'messages' data for a block from the Unoparty API, and then processing each message. The Unoparty 'messages' table holds a list of all of the insert and update actions performed on unoparty tables.
By default unoparty2mysql starts at the first block with a Unoparty transaction (mainnet=1777464, testnet=700) and parses data for all blocks between the starting block and the current block.
If no starting block is given, unoparty2mysql will try to resume parsing at the last successfully parsed block, or use the first block with a unoparty transaction.
- Index all assets, addresses, transactions, and contracts
- create assets table with up to date summary information
- create balances table to track address/asset balance information
- create blocks table and index transaction hashes
- create index_tx table to track tx_index/type information
- create dispenses table to track dispenser dispenses
- create markets table to track decentralized exchange (DEX) market info
echo "CREATE DATABASE IF NOT EXISTS Unoparty" | mysql
echo "CREATE DATABASE IF NOT EXISTS Unoparty_Testnet" | mysql
cat sql/*.sql | mysql Unoparty
cat sql/*.sql | mysql Unoparty_Testnet
- Unoparty.sql.gz (Mainnet Block # 702,735)
- Unoparty_Testnet.sql.gz (Testnet Block # 2,096,832)
--testnet Load testnet data
--regtest Load regtest data
--block=# Load data for given block
--single Load single block
--rollback=# Rollback data to a given block
--silent Fail silently on insert errors
Unoparty tables (populated via 'messages')
- addresses
- bets
- bet_expirations
- bet_match_expirations
- bet_match_resolutions
- bet_matches
- broadcasts
- btcpays
- burns
- cancels
- credits
- debits
- destructions
- dispensers
- dispenses
- dividends
- issuances
- order_expirations
- order_match_expirations
- order_matches
- orders
- rps
- rps_expirations
- rps_match_expirations
- rps_matches
- rpsresolves
- sends
EVM-related tables
Additional tables (populated by unoparty2mysql):
- assets
- balances
- blocks
- markets
- index_addresses
- index_contracts
- index_transactions
- index_tx
- index_tx_types
Helpful? Donate BTC, XCP or any Unoparty asset to 188gkL7ZYcsoGShuv7VTFtZaG5RUcxcwhQ