This commit is contained in:
aozhiwei 2023-08-24 15:26:24 +08:00
parent d82285e905
commit 35fddc8b68
2 changed files with 27 additions and 10 deletions

View File

@ -33,12 +33,10 @@ class Staking(object):
['type', '', '1: planet 2: badge 3:cec'],
],
'response': [
['type', '', '1: planet 2: badge 3:cec'],
['stacked_quant', '', '当前该类型质押总数'],
_common.RspHead(),
['!items', [Union([
[NftHeroDetail(), '英雄'],
[NftGunDetail(), '枪支'],
[NftChipDetail(), '芯片'],
])], '星球质押'],
['!items', [_common.StakingDetail()], '质押列表'],
]
},
{
@ -48,14 +46,12 @@ class Staking(object):
'url': 'webapp/index.php?c=Staking&a=history',
'params': [
_common.ReqHead(),
['from_time', '', '开始时间(utc时间)'],
['to_time', '', '结束时间(utc时间)'],
],
'response': [
_common.RspHead(),
['!items', [Union([
[NftHeroDetail(), '英雄'],
[NftGunDetail(), '枪支'],
[NftChipDetail(), '芯片'],
])], '星球质押'],
['!items', [_common.StakingDetail()], '领取历史'],
]
},
]

View File

@ -1412,3 +1412,24 @@ class Staking(object):
['staking_value', 0, '在质押状态的价值总和'],
['maturity_quant', 0, '已到期资产的数量'],
]
class StakingDetail(object):
def __init__(self):
self.fields = [
['token_id', '', 'token id'],
['token_type', '', 'token type'],
['contract_address', '', 'contract address'],
['net_id', '', 'net_id'],
['start_time', '', '质押开始时间'],
['stake_time', '', '质押时间'],
['txhash', '', 'txhash'],
['item_id', 0, '道具id'],
['total_rewards', 0, '该nft已产生的利息'],
['daily_rewards', 0, '该nft每天可以产生多少利息'],
['cec_value', 0, '该nft的价值'],
['cec_rewards', 0, '该nft结算得到的ceg数量'],
['stacked_days', 0, '该nft质押的总天数'],
['remain_days', 0, '该nft剩余质押天数'],
]