遵义链
  1. DDC-721
遵义链
  • 遵义链
    • JAVA-SDK
      • BSN-遵义链
        • 快速入门
          • 概述
          • DDC合约协议标准
          • 开发准备
        • 常见问题
          • Failed to initialize a channel
          • PKIX path building failed
          • Invalid keystore format
          • to account is not a standard address format
          • the ddc account does not exist
          • Amount is less than 0, Please recharge.
          • 接口合约地址只能传参可以自己读配置文件吗
          • 刚铸造的 然后去查询就提示不存在
          • net.corda.core.internal.TransactionDeserialisationException
          • 转增这个返回值怎么理解
          • 铸造交易HASH获取
        • DDC-权限管理
          • 添加账户
          • 查询账户
          • 更新账户状态
        • DDC-721
          • 铸造
          • 转移
          • 销毁
          • 授权
          • 账户授权
          • 查询数量
          • 查询拥有者
          • 获取名称
          • 获取符号
          • 获取DDCURI
          • 交易记录
          • ddc列表
          • ddc查询
        • DDC-1155
          • 铸造
          • 批量铸造
          • 转移
          • 批量转移
          • 销毁
          • 批量销毁
          • 账户授权
          • 查询数量
          • 批量查询数量
          • 交易记录
          • ddc列表
          • ddc查询
        • DDC-交易查询
          • 交易事件
        • DDC-4907
          • 设置用户
          • 查询用户
          • 用户过期时间查询
        • DDC-Soulbound Token
          • 铸造
          • 销毁
          • 设置属性
          • 查询数量
          • 查询拥有者
          • 获取名称
          • 获取符号
          • 获取DDCURI
          • 获取属性
  1. DDC-721

转移

功能介绍#

DDC拥有者或授权者可以通过调用该方法进行DDC的转移。

方法定义:#

String transferFrom(String from,String to,String indexId);

调用者:#

DDC拥有者、DDC授权者;

核心逻辑:#

1.
检查拥有者账户地址信息是否为空;
2.
检查拥有者账户地址格式是否正确;
3.
检查接收者账户地址信息是否为空;
4.
检查接收者账户地址格式是否正确;
5.
检查IndexId的数值是否大于0;

输入参数:#

字段名字段类型必传备注
拥有者账户fromString是
接收者账户toString是
DDC唯一标识indexIdString是

输出参数:#

字段名字段类型必传备注
String是交易哈希

测试用例:#

/**
转移
*/
@Test
public void transferFrom() throws Exception {
String from = "FFF1-consumerA_O=OPB-BeijingNode3,L=Beijing,C=CN";
String to = "UUU1-consumerA_O=OPB-BeijingNode3,L=Beijing,C=CN";
String ddcId = "4060830154272440320";
String transactionHash = ddc721Service.transferFrom(from, to, ddcId);
System.out.println("转移:" + transactionHash);
}
修改于 2022-09-26 08:08:33
上一页
铸造
下一页
销毁
Built with