合约地址为:contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e
hashgardcli query contract data contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e
返回:
{
"stakepool": "0", # 投注奖池
"ppool": "10000000000000000000000000", #活动奖池
"contractAccount": "gard13zw723fud6an4rwrdawfpkw4z2gtfzjcl4l3m5",
"contractAddress": "contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e",
"owner": "gard1lptjywa93atglpkwzexn7s59l6wngf705jz0ad", #合约 owner
"issue": "2019093014", #本期投注的期号
"syspool": "10000000000000000000000000" # 系统奖池
}
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_issue_stakepool,[string:2019100817]" --return integer
传入的参数为指定的期数
返回:
{
"address": "contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e",
"code": "string:query_issue_stakepool,[string:2019100817]",
"data": "10000000000000000000000"
}
返回的 data 为当期总共的用户池额度
hashgardcli tx contract call contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:invitation_code_generation" --from $walletname -y
--from
后为自己操作得钱包账户名称
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_user_invitation_code,[string:$walletaddress]"
$walletaddress
填入上述生成邀请码时候使用的钱包地址
返回:
{
"address": "contract9e1d62a209d647131feaa2506f8f830f8eb691e5",
"code": "string:query_user_invitation_code,[string:gard1prylufu5q4q49h8ttzemlptj99czqc980y9vzg]",
"data": "8343" #邀请码
}
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_invitation_code_user,[string:8343]"
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_invitee,[string:gard1prylufu5q4q49h8ttzemlptj99czqc980y9vzg]" --return array
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_my_inviter,[string:gard1lptjywa93atglpkwzexn7s59l6wngf705jz0ad]"
hashgardcli tx contract call contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:stake, [string:$number,int:$amount,string:$code]" --from wind --gas 2000000 -y
填入参数分别为:投注号码(须为三位号码:如 ”012“),投注金额,邀请码
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_users_number,[string:$walletaddress,string:$issue]" --return array
参数依次为:查询的地址,期号
返回:
{
"address": "contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e",
"code": "string:query_users_number,[string:gard1xvn48vn3ljwk2d3vynv8ugkl373d93tfp9zae3,string:2019093021]",
"data": "[888]"
}
返回的 data 中的参数为改期此地址投注的号码
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_users_number_amount,[string:$walletaddress,string:$issue,string:$number]" --return integer
参数依次为:查询的地址,期号,和投注号码
hashgardcli tx contract call contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:draw" --from wind -y
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_draws_lottery_user,[string:2019093021]" --return array
参数为需要查询的指定期数
返回:
{
"address": "contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e",
"code": "string:query_draws_lottery_user,[string:2019093021]",
"data": "[gard1xvn48vn3ljwk2d3vynv8ugkl373d93tfp9zae3,1570521673,1883000000000000000000]"
}
返回的 data 中的列表参数依次为:开奖地址,开奖时间,开奖奖励
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_amount_award,[string:2019093021]" --return array
参数为需要查询的指定期数
返回:
{
"address": "contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e",
"code": "string:query_amount_award,[string:2019093021]",
"data": "[10000000000000000000000000,8117000000000000000000,0,10000000000000000000000,0]"
}
返回的 data 中的列表参数依次为:开奖时的系统奖池额度,开奖时的用户奖池额度,一等奖总共中奖投注额度,二等奖总共中奖投注额度,三等奖总共中奖投注额度
hashgardcli tx contract call contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:withdraw,[string:$issue]" --from wind --gas 2000000 -y
参数为issue,即需要兑奖的期号,注:一天内未兑奖将无法兑奖
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:get_redemption_information,[string:$walletaddress,string:$issue]" --return array
参数依次为:查询的地址,期号
返回:
{
"address": "contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e",
"code": "string:get_redemption_information,[string:gard1xvn48vn3ljwk2d3vynv8ugkl373d93tfp9zae3,string:2019093021]",
"data": "[1570523965,1623400000000000000000]"
}
返回的 data 中的列表参数依次为:兑奖的时间戳,兑奖获得的奖励
包括我的投注,和获奖统计
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:get_stake_account,[string:$walletaddress]" --return array
包括我邀请的奖励统计,和被邀请奖励统计
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:get_promotion_reward,[string:$walletaddress]" --return array
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_prize_number,[string:$issue]"
参数为要查询的期号
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:get_stake_issue,[string:$walletaddress]" --return array
参数为需要查询的钱包地址
hashgardcli query contract method contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e "string:query_issue_account" --return array
返回:
{
"address": "contract5ed8a9b8052ced4e5ba1c70cccbacc4486f9e59e",
"code": "string:query_issue_account",
"data": "[0,0,842000000000000000000]"
}
返回的 data 的参数依次为 一等奖兑奖总额度信息,二等奖兑奖总额度信息,三等奖兑奖总额度信息