logger.info("Balances for accounts after initial transfer") test_utils.print_balance(node_client, accounts) # transfer assets to treasury test_utils.transfer_assets_to_treasury(node_client, args.creator, args.treasury, "1000000.000", "TBD", wif) test_utils.print_balance(node_client, [{'name': args.treasury}]) # create post for valid permlinks test_utils.create_posts(node_client, accounts, wif) now = node_client.get_dynamic_global_properties(False).get( 'time', None) if now is None: raise ValueError("Head time is None") now = test_utils.date_from_iso(now) proposal_data = [ ['tester001', 1 + 0, 3, 24.000], # starts 1 day from now and lasts 3 days ['tester002', 1 + 0, 3, 24.000], # starts 1 days from now and lasts 3 day ['tester003', 1 + 0, 3, 24.000], # starts 1 days from now and lasts 3 day ['tester004', 1 + 0, 3, 240000.000], # starts 1 day from now and lasts 3 days ] proposals_daily_pay = dict([(prop[0], prop[3]) for prop in proposal_data]) proposals = [
test_utils.transfer_assets_to_treasury(node_client, args.creator, args.treasury, "1000000.000", "TESTS") test_utils.transfer_assets_to_treasury(node_client, args.creator, args.treasury, "1000000.000", "TBD") test_utils.print_balance(node_client, [{'name': args.treasury}]) # create post for valid permlinks test_utils.create_posts(node_client, accounts) now = node_client.get_dynamic_global_properties().get('time', None) if now is None: raise ValueError("Head time is None") now = test_utils.date_from_iso(now) proposal_data = [ ['tester001', 1 + 0, 3, '240000.000 TBD'], # starts 1 day from now and lasts 3 days ['tester002', 1 + 0, 3, '24.000 TBD'], # starts 1 day from now and lasts 3 days ['tester003', 1 + 0, 3, '24.000 TBD'], # starts 1 days from now and lasts 3 day ['tester004', 1 + 0, 3, '24.000 TBD'] # starts 1 days from now and lasts 3 day ] proposals = [ # pace proposals here in the format: {'creator' : creator, 'receiver' : receiver, 'start_date' : start-date, 'end_date' : end_date} ]
test_utils.transfer_assets_to_treasury(node_client, args.creator, args.treasury, "1000000.000", "TESTS" ) test_utils.transfer_assets_to_treasury(node_client, args.creator, args.treasury, "1000000.000", "TBD" ) test_utils.print_balance(node_client, [{'name' : args.treasury}]) # create post for valid permlinks test_utils.create_posts(node_client, accounts) now = node_client.get_dynamic_global_properties().get('time', None) if now is None: raise ValueError("Head time is None") now = test_utils.date_from_iso(now) proposal_data = [ ['tester001', 1 + 0, 5, '24.000 TBD'], # starts one day from now and lasts five days ['tester002', 1 + 0, 2, '24.000 TBD'], # starts one day from now and lasts two days ['tester003', 1 + 2, 1, '24.000 TBD'], # starts three days from now and lasts one day ['tester004', 1 + 4, 1, '24.000 TBD'] # starts four days from now and lasts one day ] proposals = [ # pace proposals here in the format: {'creator' : creator, 'receiver' : receiver, 'start_date' : start-date, 'end_date' : end_date} ] for pd in proposal_data: start_date, end_date = test_utils.get_start_and_end_date(now, pd[1], pd[2])