diff --git a/.gitmodules b/.gitmodules index fb23059e..19e2add0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,5 +4,5 @@ ignore = dirty [submodule "libraries/fc"] path = libraries/fc - url = git@git.syncad.com:blocktrades/fc.git + url = git@gitlab.pixelplex.by:595_peerplays/fc.git ignore = dirty diff --git a/genesis.json b/genesis.json index 9769d982..039e51b6 100644 --- a/genesis.json +++ b/genesis.json @@ -1,503 +1,584 @@ { - "initial_timestamp": "2016-11-29T21:00:00", - "max_core_supply": "100000000000", - "initial_parameters": { - "current_fees": { - "parameters": [[ - 0,{ - "fee": 2000000, - "price_per_kbyte": 1000000 - } - ],[ - 1,{ - "fee": 500000 - } - ],[ - 2,{ - "fee": 0 - } - ],[ - 3,{ - "fee": 2000000 - } - ],[ - 4,{} - ],[ - 5,{ - "basic_fee": 500000, - "premium_fee": 200000000, - "price_per_kbyte": 100000 - } - ],[ - 6,{ - "fee": 2000000, - "price_per_kbyte": 100000 - } - ],[ - 7,{ - "fee": 300000 - } - ],[ - 8,{ - "membership_annual_fee": 200000000, - "membership_lifetime_fee": 1000000000 - } - ],[ - 9,{ - "fee": 50000000 - } - ],[ - 10,{ - "symbol3": "50000000000", - "symbol4": "30000000000", - "long_symbol": 500000000, - "price_per_kbyte": 10 - } - ],[ - 11,{ - "fee": 50000000, - "price_per_kbyte": 10 - } - ],[ - 12,{ - "fee": 50000000 - } - ],[ - 13,{ - "fee": 50000000 - } - ],[ - 14,{ - "fee": 2000000, - "price_per_kbyte": 100000 - } - ],[ - 15,{ - "fee": 2000000 - } - ],[ - 16,{ - "fee": 100000 - } - ],[ - 17,{ - "fee": 10000000 - } - ],[ - 18,{ - "fee": 50000000 - } - ],[ - 19,{ - "fee": 100000 - } - ],[ - 20,{ - "fee": 500000000 - } - ],[ - 21,{ - "fee": 2000000 - } - ],[ - 22,{ - "fee": 2000000, - "price_per_kbyte": 10 - } - ],[ - 23,{ - "fee": 2000000, - "price_per_kbyte": 10 - } - ],[ - 24,{ - "fee": 100000 - } - ],[ - 25,{ - "fee": 100000 - } - ],[ - 26,{ - "fee": 100000 - } - ],[ - 27,{ - "fee": 2000000, - "price_per_kbyte": 10 - } - ],[ - 28,{ - "fee": 0 - } - ],[ - 29,{ - "fee": 500000000 - } - ],[ - 30,{ - "fee": 2000000 - } - ],[ - 31,{ - "fee": 100000 - } - ],[ - 32,{ - "fee": 100000 - } - ],[ - 33,{ - "fee": 2000000 - } - ],[ - 34,{ - "fee": 500000000 - } - ],[ - 35,{ - "fee": 100000, - "price_per_kbyte": 10 - } - ],[ - 36,{ - "fee": 100000 - } - ],[ - 37,{} - ],[ - 38,{ - "fee": 2000000, - "price_per_kbyte": 10 - } - ],[ - 39,{ - "fee": 500000, - "price_per_output": 500000 - } - ],[ - 40,{ - "fee": 500000, - "price_per_output": 500000 - } - ],[ - 41,{ - "fee": 500000 - } - ],[ - 42,{} - ],[ - 43,{ - "fee": 2000000 - } - ],[ - 44,{} - ],[ - 45,{ - "fee": 50000000 - } - ],[ - 46,{ - "distribution_base_fee": 0, - "distribution_fee_per_holder": 0 - } - ],[ - 47,{ - "fee": 100000 - } - ],[ - 48,{ - "fee": 51000000 - } - ],[ - 49,{} - ] - ], - "scale": 10 - }, - "block_interval": 3, - "maintenance_interval": 3600, - "maintenance_skip_slots": 2, - "committee_proposal_review_period": 3600, - "maximum_transaction_size": 2048, - "maximum_block_size": 2048000000, - "maximum_time_until_expiration": 86400, - "maximum_proposal_lifetime": 2419200, - "maximum_asset_whitelist_authorities": 10, - "maximum_asset_feed_publishers": 10, - "maximum_witness_count": 1001, - "maximum_committee_count": 1001, - "maximum_authority_membership": 20, - "reserve_percent_of_fee": 2000, - "network_percent_of_fee": 2000, - "lifetime_referrer_percent_of_fee": 3000, - "cashback_vesting_period_seconds": 31536000, - "cashback_vesting_threshold": 10000000, - "count_non_member_votes": true, - "allow_non_member_whitelists": false, - "witness_pay_per_block": 1000000, - "worker_budget_per_day": "50000000000", - "max_predicate_opcode": 1, - "fee_liquidation_threshold": 10000000, - "accounts_per_fee_scale": 1000, - "account_fee_scale_bitshifts": 4, - "max_authority_depth": 2, - "min_round_delay": 0, - "max_round_delay": 600, - "min_time_per_commit_move": 0, - "max_time_per_commit_move": 600, - "min_time_per_reveal_move": 0, - "max_time_per_reveal_move": 600, - "extensions": [] - }, - "initial_bts_accounts": [{ - "name": "auction-crowdfund-reserve", - "owner_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST67BZEhgZ9B483yokBszkA83NedJgUrFzhJXzGsTizKkUtoyxi6", - 1 - ] - ], - "address_auths": [] - }, - "active_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST67BZEhgZ9B483yokBszkA83NedJgUrFzhJXzGsTizKkUtoyxi6", - 1 - ] - ], - "address_auths": [] - }, - "core_balance": 50000000000 - },{ - "name": "presale-reserve", - "owner_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST8jS7B7pKHXaXnToP2nEdJ4pvj7fSuF88Ae17Ta3v8uuiTX9RmJ", - 1 - ] - ], - "address_auths": [] - }, - "active_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST8jS7B7pKHXaXnToP2nEdJ4pvj7fSuF88Ae17Ta3v8uuiTX9RmJ", - 1 - ] - ], - "address_auths": [] - }, - "core_balance": 20000000000 - },{ - "name": "partnerships-reserve", - "owner_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST6zCacbW4pWV6dTmDYTy164BCiZZZWVVQYuzw8JEgYbZ1MKcmD3", - 1 - ] - ], - "address_auths": [] - }, - "active_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST6zCacbW4pWV6dTmDYTy164BCiZZZWVVQYuzw8JEgYbZ1MKcmD3", - 1 - ] - ], - "address_auths": [] - }, - "core_balance": 10000000000 - },{ - "name": "development-reserve", - "owner_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST5brW8vLLLKMjyshBTUQdq1gdz3FWg7wgeLxcxyPHt6eqEWRhfh", - 1 - ] - ], - "address_auths": [] - }, - "active_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST5brW8vLLLKMjyshBTUQdq1gdz3FWg7wgeLxcxyPHt6eqEWRhfh", - 1 - ] - ], - "address_auths": [] - }, - "core_balance": 10000000000 - },{ - "name": "bts-sharedrop", - "owner_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST8fePLMjBQ2a9o6U9G4cPpLvJwJNrfaziKjEPNmecidcGuxgWAV", - 1 - ] - ], - "address_auths": [] - }, - "active_authority": { - "weight_threshold": 1, - "account_auths": [], - "key_auths": [[ - "TEST8fePLMjBQ2a9o6U9G4cPpLvJwJNrfaziKjEPNmecidcGuxgWAV", - 1 - ] - ], - "address_auths": [] - }, - "core_balance": 5000000000 - } - ], - "initial_accounts": [{ - "name": "init0", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init1", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init2", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init3", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init4", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init5", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init6", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init7", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init8", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init9", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - },{ - "name": "init10", - "owner_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "active_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM", - "is_lifetime_member": true - } - ], - "initial_assets": [], - "initial_balances": [{ - "owner": "TESTFAbAx7yuxt725qSZvfwWqkdCwp9ZnUama", - "asset_symbol": "TEST", - "amount": "1000000000000000" - } - ], - "initial_vesting_balances": [], - "initial_active_witnesses": 11, - "initial_witness_candidates": [{ - "owner_name": "init0", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init1", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init2", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init3", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init4", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init5", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init6", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init7", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init8", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init9", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - },{ - "owner_name": "init10", - "block_signing_key": "TEST5UbPsMhANF7jW1aYxTV546gJeNSGNiWJqmBuYmoSxPqRF9mpXM" - } - ], - "initial_committee_candidates": [{ - "owner_name": "init0" - },{ - "owner_name": "init1" - },{ - "owner_name": "init2" - },{ - "owner_name": "init3" - },{ - "owner_name": "init4" - },{ - "owner_name": "init5" - },{ - "owner_name": "init6" - },{ - "owner_name": "init7" - },{ - "owner_name": "init8" - },{ - "owner_name": "init9" - },{ - "owner_name": "init10" - } - ], - "initial_worker_candidates": [], - "initial_chain_id": "aa34045518f1469a28fa4578240d5f039afa9959c0b95ce3b39674efa691fb21", - "immutable_parameters": { - "min_committee_member_count": 11, - "min_witness_count": 11, - "num_special_accounts": 0, - "num_special_assets": 0 - } + "initial_timestamp": "2017-01-10T08:52:15", + "max_core_supply": "1000000000000000", + "initial_parameters": { + "current_fees": { + "parameters": [ + [ + 0, + { + "fee": 200, + "price_per_kbyte": 1000 + } + ], + [ + 1, + { + "fee": 50 + } + ], + [ + 2, + { + "fee": 0 + } + ], + [ + 3, + { + "fee": 200 + } + ], + [ + 4, + {} + ], + [ + 5, + { + "basic_fee": 500, + "premium_fee": 2000, + "price_per_kbyte": 100 + } + ], + [ + 6, + { + "fee": 200, + "price_per_kbyte": 100 + } + ], + [ + 7, + { + "fee": 300 + } + ], + [ + 8, + { + "membership_annual_fee": 20000, + "membership_lifetime_fee": 10000 + } + ], + [ + 9, + { + "fee": 5000 + } + ], + [ + 10, + { + "symbol3": "5000000", + "symbol4": "3000000", + "long_symbol": 5000, + "price_per_kbyte": 10 + } + ], + [ + 11, + { + "fee": 5000, + "price_per_kbyte": 10 + } + ], + [ + 12, + { + "fee": 5000 + } + ], + [ + 13, + { + "fee": 5000 + } + ], + [ + 14, + { + "fee": 200, + "price_per_kbyte": 100 + } + ], + [ + 15, + { + "fee": 200 + } + ], + [ + 16, + { + "fee": 100 + } + ], + [ + 17, + { + "fee": 100 + } + ], + [ + 18, + { + "fee": 5000 + } + ], + [ + 19, + { + "fee": 100 + } + ], + [ + 20, + { + "fee": 5000 + } + ], + [ + 21, + { + "fee": 200 + } + ], + [ + 22, + { + "fee": 200, + "price_per_kbyte": 10 + } + ], + [ + 23, + { + "fee": 200, + "price_per_kbyte": 10 + } + ], + [ + 24, + { + "fee": 100 + } + ], + [ + 25, + { + "fee": 100 + } + ], + [ + 26, + { + "fee": 100 + } + ], + [ + 27, + { + "fee": 200, + "price_per_kbyte": 10 + } + ], + [ + 28, + { + "fee": 0 + } + ], + [ + 29, + { + "fee": 5000 + } + ], + [ + 30, + { + "fee": 200 + } + ], + [ + 31, + { + "fee": 100 + } + ], + [ + 32, + { + "fee": 100 + } + ], + [ + 33, + { + "fee": 200 + } + ], + [ + 34, + { + "fee": 5000 + } + ], + [ + 35, + { + "fee": 100, + "price_per_kbyte": 10 + } + ], + [ + 36, + { + "fee": 100 + } + ], + [ + 37, + {} + ], + [ + 38, + { + "fee": 200, + "price_per_kbyte": 10 + } + ], + [ + 39, + { + "fee": 500, + "price_per_output": 500 + } + ], + [ + 40, + { + "fee": 500, + "price_per_output": 500 + } + ], + [ + 41, + { + "fee": 500 + } + ], + [ + 42, + {} + ], + [ + 43, + { + "fee": 200 + } + ], + [ + 44, + {} + ], + [ + 45, + { + "fee": 100 + } + ], + [ + 46, + { + "fee": 100 + } + ], + [ + 47, + { + "fee": 100 + } + ], + [ + 48, + { + "fee": 500 + } + ], + [ + 49, + { + "distribution_base_fee": 0, + "distribution_fee_per_holder": 0 + } + ], + [ + 50, + {} + ] + ], + "scale": 10000 + }, + "block_interval": 5, + "maintenance_interval": 86400, + "maintenance_skip_slots": 3, + "committee_proposal_review_period": 1209600, + "maximum_transaction_size": 2048, + "maximum_block_size": 2048000000, + "maximum_time_until_expiration": 86400, + "maximum_proposal_lifetime": 2419200, + "maximum_asset_whitelist_authorities": 10, + "maximum_asset_feed_publishers": 10, + "maximum_witness_count": 1001, + "maximum_committee_count": 1001, + "maximum_authority_membership": 10, + "reserve_percent_of_fee": 2000, + "network_percent_of_fee": 2000, + "lifetime_referrer_percent_of_fee": 3000, + "cashback_vesting_period_seconds": 31536000, + "cashback_vesting_threshold": 10000000, + "count_non_member_votes": true, + "allow_non_member_whitelists": false, + "witness_pay_per_block": 1000000, + "worker_budget_per_day": "50000000000", + "max_predicate_opcode": 1, + "fee_liquidation_threshold": 10000000, + "accounts_per_fee_scale": 1000, + "account_fee_scale_bitshifts": 4, + "max_authority_depth": 2, + "min_round_delay": 0, + "max_round_delay": 600, + "min_time_per_commit_move": 0, + "max_time_per_commit_move": 600, + "min_time_per_reveal_move": 0, + "max_time_per_reveal_move": 600, + "rake_fee_percentage": 300, + "maximum_registration_deadline": 2592000, + "extensions": [] + }, + "initial_bts_accounts": [], + "initial_accounts": [ + { + "name": "init0", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init1", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init2", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init3", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init4", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init5", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init6", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init7", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init8", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init9", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "init10", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "nathan", + "owner_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "active_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", + "is_lifetime_member": true + }, + { + "name": "pixel-gateway", + "owner_key": "TEST8dkWexMv9Z7fwoCdfKZfqpBUFB77D1PzfPBU2hHwMpN9B5t6wZ", + "active_key": "TEST8dkWexMv9Z7fwoCdfKZfqpBUFB77D1PzfPBU2hHwMpN9B5t6wZ", + "is_lifetime_member": true + } + ], + "initial_assets": [ + { + "accumulated_fees": 0, + "collateral_records": [ + { + "collateral": -1, + "debt": 100000000000000, + "owner": "TEST6eTLvHVD1Qg5rUoEnKgTvpXaW2p7xHyce" + } + ], + "description": "1 bitcoin", + "is_bitasset": true, + "issuer_name": "pixel-gateway", + "max_supply": "10000000000000000", + "precision": 3, + "symbol": "PIXEL.BITCOIN" + }, + { + "accumulated_fees": 0, + "collateral_records": [ + { + "collateral": -1, + "debt": 100000000000000, + "owner": "TEST6eTLvHVD1Qg5rUoEnKgTvpXaW2p7xHyce" + } + ], + "description": "1 steem", + "is_bitasset": true, + "issuer_name": "pixel-gateway", + "max_supply": "10000000000000000", + "precision": 3, + "symbol": "PIXEL.STEEM" + } + ], + "initial_balances": [ + { + "owner": "TESTFAbAx7yuxt725qSZvfwWqkdCwp9ZnUama", + "asset_symbol": "TESTPLAYS", + "amount": "1000000000000000" + }, + { + "owner": "TEST6eTLvHVD1Qg5rUoEnKgTvpXaW2p7xHyce", + "asset_symbol": "PIXEL.BITCOIN", + "amount": "1000000000000000" + }, + { + "owner": "TEST6eTLvHVD1Qg5rUoEnKgTvpXaW2p7xHyce", + "asset_symbol": "PIXEL.STEEM", + "amount": "1000000000000000" + } + ], + "initial_vesting_balances": [], + "initial_active_witnesses": 11, + "initial_witness_candidates": [ + { + "owner_name": "init0", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init1", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init2", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init3", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init4", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init5", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init6", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init7", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init8", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init9", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + }, + { + "owner_name": "init10", + "block_signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" + } + ], + "initial_committee_candidates": [ + { + "owner_name": "init0" + }, + { + "owner_name": "init1" + }, + { + "owner_name": "init2" + }, + { + "owner_name": "init3" + }, + { + "owner_name": "init4" + }, + { + "owner_name": "init5" + }, + { + "owner_name": "init6" + }, + { + "owner_name": "init7" + }, + { + "owner_name": "init8" + }, + { + "owner_name": "init9" + }, + { + "owner_name": "init10" + } + ], + "initial_worker_candidates": [], + "initial_chain_id": "aa34045518f1469a28fa4578240d5f039afa9959c0b95ce3b39674efa691fb21", + "immutable_parameters": { + "min_committee_member_count": 11, + "min_witness_count": 11, + "num_special_accounts": 0, + "num_special_assets": 0 + } } diff --git a/libraries/app/database_api.cpp b/libraries/app/database_api.cpp index 4fbff3d7..1cb20f65 100644 --- a/libraries/app/database_api.cpp +++ b/libraries/app/database_api.cpp @@ -143,6 +143,8 @@ class database_api_impl : public std::enable_shared_from_this // Tournaments vector get_tournaments_in_state(tournament_state state, uint32_t limit) const; + vector get_tournaments(tournament_id_type stop, unsigned limit, tournament_id_type start); + vector get_tournaments_by_state(tournament_id_type stop, unsigned limit, tournament_id_type start, tournament_state state); vector get_registered_tournaments(account_id_type account_filter, uint32_t limit) const; @@ -1788,6 +1790,54 @@ vector database_api_impl::get_tournaments_in_state(tournament return result; } +vector database_api::get_tournaments(tournament_id_type stop, + unsigned limit, + tournament_id_type start) +{ + return my->get_tournaments(stop, limit, start); +} + +vector database_api_impl::get_tournaments(tournament_id_type stop, + unsigned limit, + tournament_id_type start) +{ + vector result; + const auto& tournament_idx = _db.get_index_type().indices().get(); + for (auto elem: tournament_idx) { + if( ( (elem.get_id().instance.value <= start.instance.value) || start == tournament_id_type()) && + ( (elem.get_id().instance.value >= stop.instance.value) || stop == tournament_id_type())) + result.push_back( elem ); + } + + return result; +} + + +vector database_api::get_tournaments_by_state(tournament_id_type stop, + unsigned limit, + tournament_id_type start, + tournament_state state) +{ + return my->get_tournaments_by_state(stop, limit, start, state); +} + +vector database_api_impl::get_tournaments_by_state(tournament_id_type stop, + unsigned limit, + tournament_id_type start, + tournament_state state) +{ + vector result; + const auto& tournament_idx = _db.get_index_type().indices().get(); + for (auto elem: tournament_idx) { + if( ( (elem.get_id().instance.value <= start.instance.value) || start == tournament_id_type()) && + ( (elem.get_id().instance.value >= stop.instance.value) || stop == tournament_id_type()) && + elem.get_state() == state ) + result.push_back( elem ); + } + + return result; +} + vector database_api::get_registered_tournaments(account_id_type account_filter, uint32_t limit) const { return my->get_registered_tournaments(account_filter, limit); diff --git a/libraries/app/include/graphene/app/database_api.hpp b/libraries/app/include/graphene/app/database_api.hpp index 3decd0fe..bb8c15cf 100644 --- a/libraries/app/include/graphene/app/database_api.hpp +++ b/libraries/app/include/graphene/app/database_api.hpp @@ -564,6 +564,15 @@ class database_api */ vector get_tournaments_in_state(tournament_state state, uint32_t limit) const; + vector get_tournaments(tournament_id_type stop = tournament_id_type(), + unsigned limit = 100, + tournament_id_type start = tournament_id_type()); + + vector get_tournaments_by_state(tournament_id_type stop = tournament_id_type(), + unsigned limit = 100, + tournament_id_type start = tournament_id_type(), + tournament_state state = tournament_state::accepting_registrations); + /** * @return the list of tournaments that a given account is registered to play in */ @@ -674,5 +683,7 @@ FC_API(graphene::app::database_api, // Tournaments (get_tournaments_in_state) + (get_tournaments_by_state) + (get_tournaments ) (get_registered_tournaments) ) diff --git a/libraries/chain/include/graphene/chain/config.hpp b/libraries/chain/include/graphene/chain/config.hpp index 0c9f4a88..e7c5689d 100644 --- a/libraries/chain/include/graphene/chain/config.hpp +++ b/libraries/chain/include/graphene/chain/config.hpp @@ -23,7 +23,7 @@ */ #pragma once -#define GRAPHENE_SYMBOL "TEST" +#define GRAPHENE_SYMBOL "TESTPLAYS" #define GRAPHENE_ADDRESS_PREFIX "TEST" #define GRAPHENE_MIN_ACCOUNT_NAME_LENGTH 1 diff --git a/libraries/chain/include/graphene/chain/tournament_object.hpp b/libraries/chain/include/graphene/chain/tournament_object.hpp index 8b38406f..12bfaffc 100644 --- a/libraries/chain/include/graphene/chain/tournament_object.hpp +++ b/libraries/chain/include/graphene/chain/tournament_object.hpp @@ -64,6 +64,7 @@ namespace graphene { namespace chain { ~tournament_object(); tournament_object& operator=(const tournament_object& rhs); + tournament_id_type get_id() const { return id; }; /// the account that created this tournament account_id_type creator; diff --git a/libraries/wallet/include/graphene/wallet/wallet.hpp b/libraries/wallet/include/graphene/wallet/wallet.hpp index 8cc12174..525a593b 100644 --- a/libraries/wallet/include/graphene/wallet/wallet.hpp +++ b/libraries/wallet/include/graphene/wallet/wallet.hpp @@ -1502,6 +1502,15 @@ class wallet_api */ vector get_upcoming_tournaments(uint32_t limit); + vector get_tournaments(tournament_id_type stop, + unsigned limit, + tournament_id_type start); + + vector get_tournaments_by_state(tournament_id_type stop, + unsigned limit, + tournament_id_type start, + tournament_state state); + /** Get specific information about a tournament * @param tournament_id the ID of the tournament */ @@ -1723,6 +1732,8 @@ FC_API( graphene::wallet::wallet_api, (tournament_join) (rps_throw) (get_upcoming_tournaments) + (get_tournaments) + (get_tournaments_by_state) (get_tournament) (get_order_book) ) diff --git a/libraries/wallet/wallet.cpp b/libraries/wallet/wallet.cpp index c0caf4fa..7c681649 100644 --- a/libraries/wallet/wallet.cpp +++ b/libraries/wallet/wallet.cpp @@ -2466,7 +2466,7 @@ public: } return ss.str(); }; - m["get_upcoming_tournaments"] = [this](variant result, const fc::variants& a) + m["get_upcoming_tournaments"] = m["get_tournaments"] = m["get_tournaments_by_state"] = [this](variant result, const fc::variants& a) { const vector tournaments = result.as >(); std::stringstream ss; @@ -4857,6 +4857,18 @@ vector wallet_api::get_upcoming_tournaments(uint32_t limit) { return my->_remote_db->get_tournaments_in_state(tournament_state::accepting_registrations, limit); } +vector wallet_api::get_tournaments(tournament_id_type stop, + unsigned limit, + tournament_id_type start) { + return my->_remote_db->get_tournaments(stop, limit, start); +} + +vector wallet_api::get_tournaments_by_state(tournament_id_type stop, + unsigned limit, + tournament_id_type start, + tournament_state state) { + return my->_remote_db->get_tournaments_by_state(stop, limit, start, state); +} tournament_object wallet_api::get_tournament(tournament_id_type id) {