YOYOW YOYOW 测试网抢先测试的具体操作

dposclub001 · 2019年05月06日 · 61 次阅读

目前,YOYOW的测试网已经发布,大家比较关心的是这次大的更新带来的内容激励相关问题。用户如何通过发文章和评分来实现获得YOYO奖励呢?

下面给大家详细介绍一下如何在命令行钱包里进行具体操作:

准备工作

下载最新版的YOYOW 命令行客户端

wget https://test-1255746684.cos.ap
shanghai.myqcloud.com/yoyow_programs.tar.gz

解压:

tar zxvf yoyow_programs.tar.gz

启动:

cd yoyow_programs/
./yoyow_client -s ws://47.52.155.181:10011 --chain-id=70f798eec64e1aea86efa8be3466480a1db1f97215a0de0c1a7ab0e1f3fd09fb

设置钱包密码

set_password 123

解锁钱包

unlock 123

在网页钱包注册测试网的账户,网页钱包地址:http://demo.yoyow.org:8000,可以查看注册教程,注册登录。(注:旧的测试网已被重置,之前的测试网账号已失效,需要重新注册新的账户)

导入 Active Key,可以在网页钱包:“设置”-->“账号”中,查看Active Key的私钥,如果想了解更多可以查看YOYOW的私钥教程

import_key 
test9 5JKsA3Lnc7YmyRQ53DgFKBVwKmyd3mtUKbgYxQzk8Dd5p7Nfuh9

注意将 “test9”替换为你的账号如: "235145448"

Please use the set_password method to initialize a new wallet before continuing
2133174ms th_a       main.cpp:239                  main                 ] Listening for incoming HTTP RPC requests on 0.0.0.0:8099
new >>> set_password 123
set_password 123
null
locked >>> unlock 123
unlock 123
null
unlocked >>>
 import_key

test9 5JKsA3Lnc7YmyRQ53DgFKBVwKmyd3mtUKbgYxQzk8Dd5p7Nfuh9
import_key 
test9 5JKsA3Lnc7YmyRQ53DgFKBVwKmyd3mtUKbgYxQzk8Dd5p7Nfuh9
2578831ms th_a       
wallet.cpp:797                
save_wallet_file     ] saving wallet to file wallet.json
trueunlocked >>>

以上不清楚的小伙伴可以参考链接

创建平台

新版YOYOW设定中,只有平台才有发文权限(用户可以授权给平台发文),简单起见,我们注册个平台开始测试发文吧。

create_platform test9 "myPlatform" 10000 YOYO "www.example.com" "{}" true true

create_platform test9 "myPlatform" 10000 YOYO "www.example.com" "{}" true true
{
  "ref_block_num": 13758,
  "ref_block_prefix": 27039386,
  "expiration": "2019-04-11T10:48:30",
  "operations": [[
      20,{
        "fee": {
          "total": {
            "amount": 100002928,
            "asset_id": 0
          }
        },
        "account": 32945,
        "pledge": {
          "amount": 1000000000,
          "asset_id": 0
        },
        "name": "myPlatform",
        "url": "www.example.com",
        "extra_data": "{}"
      }
    ]
  ],
  "signatures": [
"1f7869933c9d53cec80db3535e7d7603cfc1c71853c17817ab57468f0fc5d14e1c0be2ed638e0aec28b376c865420465c270771bde1f7c22a0fef8d22ff0a486a6"
  ]
}

unlocked >>> get_platform test9
get_platform test9
{
  "id": "1.6.7",
  "owner": 32945,
  "name": "myPlatform",
  "sequence": 1,
  "is_valid": true,
  "total_votes": 0,
  "url": "www.example.com",
  "pledge": 1000000000,
  "pledge_last_update": "2019-04-11T10:46:33",
  "average_pledge": 0,
  "average_pledge_last_update": "2019-04-11T10:46:33",
  "average_pledge_next_update_block": 16267887,
  "last_advertising_sequence": 0,
  "last_license_sequence": 0,
  "vote_profits": [],
  "period_profits": [],
  "extra_data": "{}",
  "create_time": "2019-04-11T10:46:33",
  "last_update_time": "1970-01-01T00:00:00"
}

如上所示,我们平台已经创建成功且可以查阅其信息。

新版YOYOW设定,平台需要指定一个License 作为在平台发文的版权声明

unlocked >>> create_license test9 1 "this is license_hash" "this_is_license_title" "this_is_license_contents" "this_is_extra_infos" true true
create_license test9 1 "this is license_hash" "this_is_license_title" "this_is_license_contents" "this_is_extra_infos" true true
{
  "ref_block_num": 13906,
  "ref_block_prefix": 1862096867,
  "expiration": "2019-04-11T10:55:54",
  "operations": [[
      41,{
        "fee": {
          "total": {
            "amount": 165429,
            "asset_id": 0
          },
          "options": {
            "from_csaf": {
              "amount": 165429,
              "asset_id": 0
            }
          }
        },
        "license_lid": 1,
        "platform": 32945,
        "type": 1,
        "hash_value": "this is license_hash",
        "extra_data": "this_is_extra_infos",
        "title": "this_is_license_title",
        "body": "this_is_license_contents"
      }
    ]
  ],
  "signatures": [
    "204833b35e4310b627e2425b51c716429f8847fa18d00dc01ef09b00d2a89407d11ede0d19961e196f500423892bc02fb357f7e45454c81b678627f8e830a310ba"
  ]
}

注意: 返回值里有一个 license_lid ,需要记录备用。

发布文章

按照下述命令创建一篇文章

create_post test9 test9 "this_is_post_hash" "post_title" "post_body" "post_extra_datas" "" "" "" {post_type :0, forward_price :null, receiptors :null, license_lid :1, permission_flags :255} true true
unlocked >>> create_post test9 test9 "this_is_post_hash" "post_title" "post_body" "post_extra_datas" "" "" "" {post_type :0, forward_price :null, receiptors :null, license_lid :1, permission_flags :255} true true
create_post test9 test9 "this_is_post_hash" "post_title" "post_body" "post_extra_datas" "" "" "" {post_type :0, forward_price :null, receiptors :null, license_lid :1, permission_flags :255} true true
{
  "ref_block_num": 13982,
  "ref_block_prefix": 3776234094,
  "expiration": "2019-04-11T10:59:42",
  "operations": [[
      18,{
        "fee": {
          "total": {
            "amount": 15467,
            "asset_id": 0
          },
          "options": {
            "from_csaf": {
              "amount": 15467,
              "asset_id": 0
            }
          }
        },
        "post_pid": 1,
        "platform": 32945,
        "poster": 32945,
        "hash_value": "this_is_post_hash",
        "extra_data": "post_extra_datas",
        "title": "post_title",
        "body": "post_body",
        "extensions": {
          "post_type": 0,
          "license_lid": 1,
          "permission_flags": 255
        }
      }
    ]
  ],
  "signatures": [

"1f045d545abcb6f98908cdd68c818dc112c22e7803de1607e887b1d4f55b8564b92347fcf0c4b84888f99a4b54d737ae0a11cad5d1f7249723f0c7ca6151e0368a"
  ]
}

可以看到返回的post_pid为1 ,说明是该用户的第一篇文章,据此可以查询相关信息。

unlocked >>> get_post test9 test9 1
get_post test9 test9 1
{
  "id": "1.7.24",
  "platform": 32945,
  "poster": 32945,
  "post_pid": 1,
  "hash_value": "this_is_post_hash",
  "extra_data": "post_extra_datas",
  "title": "post_title",
  "body": "post_body",
  "create_time": "2019-04-11T10:57:45",
  "last_update_time": "2019-04-11T10:57:45",
  "receiptors": [[
      32945,{
        "cur_ratio": 10000,
        "to_buyout": false,
        "buyout_ratio": 0,
        "buyout_price": 0,
        "buyout_expiration": "1969-12-31T23:59:59"
      }
    ]
  ],
  "license_lid": 1,
  "permission_flags": 255,
  "score_settlement": false
}

文章评分

Article Rating

给这篇文章评分,评分为5(取值在-5~5),消耗10个积分(可以任意指定)。

unlocked >>> score_a_post test9 test9 test9 1 5 20 true true

### 参数含义依次为: 评分人,平台名称,作者,pid 1,分数5,消耗20积分,使用积分抵扣手续费,是否广播
score_a_post test9 test9 test9 1 5 20 true true
{
  "ref_block_num": 14061,
  "ref_block_prefix": 2943091905,
  "expiration": "2019-04-11T11:03:39",
  "operations": [[
      37,{
        "fee": {
          "total": {
            "amount": 100000,
            "asset_id": 0
          },
          "options": {
            "from_csaf": {
              "amount": 100000,
              "asset_id": 0
            }
          }
        },
        "from_account_uid": 32945,
        "platform": 32945,
        "poster": 32945,
        "post_pid": 1,
        "score": 5,
        "csaf": 2000000
      }
    ]
  ],
  "signatures": [
    "2034f44f0aeb1db819894d00941123507c2d0afd9cc0210425fdf2afd2ced9a652083624272186fff3f6d266b41d8c6864388add52d0e476a7fb8e97bd39702d2b"
  ]
}

每篇文章只能打分一次,不可以再次打分哦。

奖励查询

YOYOW希望将大型社交媒体公司目前持有的流量红利更加公平地分配给内容生产者、内容支持者、网站所有者、内容集成者和生态建设者。

在评奖周期结束后,我们可以分别查看文章,作者以及平台获得的总收益。 评奖周期的相关信息可以通过 get_dynamic_global_properties 命令获取。 比如:

unlocked >>> get_dynamic_global_properties
get_dynamic_global_properties
{
  "id": "2.1.0",
  "head_block_number": 16463287,
  "head_block_id":
"00fb35b74072ab87ca66abca5695785cd462ff56",
  "time": "2019-04-18T09:22:51",
  "current_witness": 28182,
  "budget_pool": "14314756248437",
  "total_budget_per_block": 856705,
  "next_budget_adjust_block": 21024000,
  "next_committee_update_block": 17280000,
  "next_committee_proposal_number": 16,
  "recently_missed_count": 0,
  "current_aslot": 16962257,
  "recent_slots_filled": "340282366920938463463374607431768211455",
  "last_irreversible_block_num": 16463285,
  "next_content_award_time": "2019-04-18T09:27:39",
  "last_content_award_time": "2019-04-18T09:22:39",
  "next_platform_voted_award_time": "2019-04-18T09:27:39",
  "last_platform_voted_award_time": "2019-04-18T09:22:39",
  "current_active_post_sequence": 4880,
  "content_award_enable": true,
  "total_witness_pledge": "4757728207382",
  "reduce_witness_csaf": true,
  "by_pledge_active_witness_count": 0
}

当前轮次即为“current_active_post_sequence”的值 4880,我们需要记下这个值,作为收益的查询条件。

下一次评奖的时间即为”next_platform_voted_award_time“的值 "2019-04-18T09:27:39"。

查询文章的收益

get_post_profits_detail <查询起始轮次> <查询结束轮次> <平台账户> <作者账户> <文章id>

unlocked >>> get_post_profits_detail 4780 4880 test9 test9 2
get_post_profits_detail 4780 4880 test9 test9 2
[{
    "id": "1.11.13",
    "platform": 32945,
    "poster": 32945,
    "post_pid": 2,
    "total_csaf": 2000000,
    "total_rewards": [],
    "period_sequence": 4880,
    "positive_win": true,
    "post_award": 95129375,
    "forward_award": 0,
    "receiptor_details": [[
        32945,{
          "forward": 0,
          "post_award": 71347032,
          "rewards": []
        }
      ]
    ]
  }
]

该文章收到的内容奖励总共为951.29375个YOYO。

查询作者获得的收益

get_poster_profits_detail <查询起始轮次> <查询结束轮次> <作者账户> <起始记录的序号> <返回记录条数>

unlocked >>> get_poster_profits_detail 4780 4880 test9 0 100
get_poster_profits_detail 4780 4880 test9 0 100
[{
    "cur_period": 4880,
    "poster_account": 32945,
    "total_forward": 0,
    "total_rewards": [],
    "total_post_award": 71347032,
    "active_objects": [{
        "id": "1.11.13",
        "platform": 32945,
        "poster": 32945,
        "post_pid": 2,
        "total_csaf": 2000000,
        "total_rewards": [],
        "period_sequence": 4880,
        "positive_win": true,
        "post_award": 95129375,
        "forward_award": 0,
        "receiptor_details": [[
            32945,{
              "forward": 0,
              "post_award": 71347032,
              "rewards": []
            }
          ]
        ]
      }
    ]
  }
]

作者收到的内容奖励为713.47032,奖励全部来自于我们前面发的那一篇文章。由于我们的发文账号和平台账号是同一个账号,这里记录的是该账号总收益。

查询平台获得的收益

get_platform_profits_detail <查询起始轮次> <查询结束轮次> <作者账户> <起始记录的序号> <返回记录条数>

unlocked >>> get_platform_profits_detail 4870 4880 test9 0 100
get_platform_profits_detail 4870 4880 test9 0 100
[{
    "cur_period": 4880,
    "platform_account": 32945,
    "platform_name": "myPlatform",
    "rewards_profits": [],
    "foward_profits": 0,
    "post_profits": 71347032,
    "post_profits_by_platform": 17836758,
    "platform_profits": 95129375,
    "active_objects": [{
        "id": "1.11.13",
        "platform": 32945,
        "poster": 32945,
        "post_pid": 2,
        "total_csaf": 2000000,
        "total_rewards": [],
        "period_sequence": 4880,
        "positive_win": true,
        "post_award": 95129375,
        "forward_award": 0,
        "receiptor_details": [[
            32945,{
              "forward": 0,
              "post_award": 71347032,
              "rewards": []
            }
          ]
        ]
      }
    ]
  }
]

该账户获得的内容收益为713.47032个YOYO,其中178.36758个YOYO是做为平台身份的收益。

查询某个评分获得的收益

get_score <平台账户> <作者账户> <文章id> <打分人>

unlocked >>> get_score test9 test9 1 test9
## 参数依次为 平台名, 作者名,pid, 评分人
get_score test9 test9 1 test9
{
  "id": "2.16.6",
  "from_account_uid": 32945,
  "platform": 32945,
  "poster": 32945,
  "post_pid": 1,
  "score": 5,
  "csaf": 2000000,
  "period_sequence": 2915,
  "profits": 23782343,
  "create_time": "2019-04-11T11:01:42"
}

可以看到,test9 的打分行为,给自己带来了 237.82343 YOYO 的收入。

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册