使用场景
有一些充值场景,需要用到类似于BTC HD地址功能,简单来说就是一个账户需要支持多个子地址,然后对应的子地址收账后,都能汇集到该主账户。
EOS分层地址实现
账户体系扩展表 userresext(可发起转账和收款)
index |
key |
value |
yes |
account_name |
bcskillsurou |
|
address |
5a6595ecc9cee07ae00e76c926a113a4fd6be324be9e4ec854a1a150c3d80c9e |
分层账户地址体系表 hduserres(注意:只用于收款),表数据包含账户体系扩展表数据
index |
key |
value |
yes |
address |
5a6595ecc9cee07ae00e76c926a113a4fd6be324be9e4ec854a1a150c3d80c9e |
|
account_name |
bcskillsurou |
地址A向地址B转账时,transfer扩展 action执行时接收(from_address,to_address,quantity,memo)
根据from_address查询userresext,找到对应得账户名,根据hduserres找到对用得分层地址。