Commit ea6f0a80 authored by 33's avatar 33

更新chain33 sdk

parent 8aab6395
......@@ -151,7 +151,7 @@ public class CopyrightTask {
String newTokenInfo = appendTokenInfo(tokenInfo, detail.getCopyright());
log.info("追加tokenInfo, 新生成后的tokenInfo为: {}", newTokenInfo);
String hash = paraChainClient.evmSetTokenInfo(abi, contractAddr, 0,
nft.getTokenId(), newTokenInfo, nft.getPublishAddress(), null, true, false);
nft.getTokenId(), newTokenInfo, nft.getPublishAddress(), null, true);
if (StringUtils.isBlank(hash)) {
log.error("nft追加tokenInfo失败,当前流水号为: 【{}】,交易哈希:【{}】", serial_code, hash);
continue;
......
......@@ -68,7 +68,7 @@
<dependency>
<groupId>cn.fzm.chain</groupId>
<artifactId>simple-sdk</artifactId>
<version>3.1.0</version>
<version>2.9.6</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
......
......@@ -137,11 +137,11 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
String tokenInfo = this.formatTokenInfo(map);
log.info("tokenInfo:{}", tokenInfo);
// 发行nft
String hash = paraChainClient.evmPublishToken(abi, contractAddr, EvmTokenEnum.ERC1155, 0L, wallet, wallet, privkey, tokenId, 1, str, true, false);
String hash = paraChainClient.evmPublishToken(abi, contractAddr, EvmTokenEnum.ERC1155, 0L, wallet, wallet, privkey, tokenId, 1, str, true);
if (StringUtils.isBlank(hash)) {
throw GlobalException.newException(ResultCode.FAILED, "nft发行失败");
}
String tradeHash = paraChainClient.evmSetTokenInfo(abi, contractAddr, 0L, tokenId, tokenInfo, wallet, privkey, true, false);
String tradeHash = paraChainClient.evmSetTokenInfo(abi, contractAddr, 0L, tokenId, tokenInfo, wallet, privkey, true);
if (StringUtils.isBlank(tradeHash)) {
throw GlobalException.newException(ResultCode.PUBLISH_ERROR, "nft发行失败");
......@@ -176,7 +176,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
log.info("tokenInfo:{}", tokenInfo);
// 转让nft
String hash = paraChainClient.evmTransfer(abi, contractAddr, EvmTokenEnum.ERC1155, 1000000L,
param.getReceiveWallet(), nft.getTokenId(), param.getCount(), tokenInfo, user.getWallet(), null, true, false);
param.getReceiveWallet(), nft.getTokenId(), param.getCount(), tokenInfo, user.getWallet(), null, true);
if (StringUtils.isBlank(hash)) {
throw GlobalException.newException(ResultCode.TRANSFER_ERROR, "nft转让失败");
}
......@@ -314,7 +314,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
log.info("tokenInfo:{}", tokenInfo);
// 转让nft
String hash = paraChainClient.evmTransfer(abi, contractAddr, EvmTokenEnum.ERC1155, 1000000L,
receiveAddress, nft.getTokenId(), 1, tokenInfo, user.getWallet(), null, true, false);
receiveAddress, nft.getTokenId(), 1, tokenInfo, user.getWallet(), null, true);
if (StringUtils.isBlank(hash)) {
throw GlobalException.newException(ResultCode.TRANSFER_ERROR, "nft转让失败");
}
......@@ -348,11 +348,11 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
String tokenInfo = this.formatTokenInfo(map);
log.info("tokenInfo:{}", tokenInfo);
// 发行nft
String hash = paraChainClient.evmPublishToken(abi, contractAddr, EvmTokenEnum.ERC1155, 0L, wallet, wallet, privkey, tokenId, 1, str, true, false);
String hash = paraChainClient.evmPublishToken(abi, contractAddr, EvmTokenEnum.ERC1155, 0L, wallet, wallet, privkey, tokenId, 1, str, true);
if (StringUtils.isBlank(hash)) {
throw GlobalException.newException(ResultCode.FAILED, "nft发行失败");
}
String tradeHash = paraChainClient.evmSetTokenInfo(abi, contractAddr, 0L, tokenId, tokenInfo, wallet, privkey, true, false);
String tradeHash = paraChainClient.evmSetTokenInfo(abi, contractAddr, 0L, tokenId, tokenInfo, wallet, privkey, true);
if (StringUtils.isBlank(tradeHash)) {
throw GlobalException.newException(ResultCode.PUBLISH_ERROR, "nft发行失败");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment