遵义链
  1. 常见问题
遵义链
  • 遵义链
    • 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. 常见问题

铸造交易HASH获取

问题描述:#

铸造只能获取ddcId,拿不到铸造HASH

解决方案:#

使用mintTransaction接口,自己解析交易HASH
/**
铸造
(返回交易报文)
@throws Exception
*/
@Test
public void mintTransaction() throws Exception {
//拥有者账户地址
String account = "consumer1A_O=OPB-BeijingNode3,L=Beijing,C=CN";
//图片地址
String ddcURI = "http://zunyilian.s-labs.cn";
SignedTransaction signedTransaction = ddc721Service.mintTransaction(account, ddcURI, ddc721Addr, null);
System.out.println("ddc721 " + signedTransaction);
//解析交易hash
String txHash = ddc721Service.getTxHash(signedTransaction);
//获取交易数据对象,得到indexId(ddcId)
Erc721Token erc721Token = ddc721Service.getOutRefsOfType(signedTransaction, Erc721Token.class);
System.out.println("交易hash:" + txHash);
System.out.println("交易数据对象:" + erc721Token);
System.out.println("ddcId:" + erc721Token.getIndexId());
System.out.println("合约地址:" + erc721Token.getTokenTypeId().getId());
}
修改于 将近 3 年前
上一页
转增这个返回值怎么理解
下一页
添加账户
Built with
本篇目录
问题描述:
解决方案: