Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fzm-joying
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lei
fzm-joying
Commits
ea6f0a80
Commit
ea6f0a80
authored
Mar 09, 2022
by
33
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新chain33 sdk
parent
8aab6395
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
CopyrightTask.java
...n/src/main/java/com/fzm/admin/schedule/CopyrightTask.java
+1
-1
pom.xml
joying-common/pom.xml
+1
-1
CommemorateNftServiceImpl.java
...om/fzm/common/service/impl/CommemorateNftServiceImpl.java
+0
-0
NftServiceImpl.java
...main/java/com/fzm/common/service/impl/NftServiceImpl.java
+6
-6
No files found.
joying-admin/src/main/java/com/fzm/admin/schedule/CopyrightTask.java
View file @
ea6f0a80
...
@@ -151,7 +151,7 @@ public class CopyrightTask {
...
@@ -151,7 +151,7 @@ public class CopyrightTask {
String
newTokenInfo
=
appendTokenInfo
(
tokenInfo
,
detail
.
getCopyright
());
String
newTokenInfo
=
appendTokenInfo
(
tokenInfo
,
detail
.
getCopyright
());
log
.
info
(
"追加tokenInfo, 新生成后的tokenInfo为: {}"
,
newTokenInfo
);
log
.
info
(
"追加tokenInfo, 新生成后的tokenInfo为: {}"
,
newTokenInfo
);
String
hash
=
paraChainClient
.
evmSetTokenInfo
(
abi
,
contractAddr
,
0
,
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
))
{
if
(
StringUtils
.
isBlank
(
hash
))
{
log
.
error
(
"nft追加tokenInfo失败,当前流水号为: 【{}】,交易哈希:【{}】"
,
serial_code
,
hash
);
log
.
error
(
"nft追加tokenInfo失败,当前流水号为: 【{}】,交易哈希:【{}】"
,
serial_code
,
hash
);
continue
;
continue
;
...
...
joying-common/pom.xml
View file @
ea6f0a80
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
<dependency>
<dependency>
<groupId>
cn.fzm.chain
</groupId>
<groupId>
cn.fzm.chain
</groupId>
<artifactId>
simple-sdk
</artifactId>
<artifactId>
simple-sdk
</artifactId>
<version>
3.1.0
</version>
<version>
2.9.6
</version>
<exclusions>
<exclusions>
<exclusion>
<exclusion>
<groupId>
com.google.guava
</groupId>
<groupId>
com.google.guava
</groupId>
...
...
joying-common/src/main/java/com/fzm/common/service/impl/CommemorateNftServiceImpl.java
View file @
ea6f0a80
This diff is collapsed.
Click to expand it.
joying-common/src/main/java/com/fzm/common/service/impl/NftServiceImpl.java
View file @
ea6f0a80
...
@@ -137,11 +137,11 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
...
@@ -137,11 +137,11 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
String
tokenInfo
=
this
.
formatTokenInfo
(
map
);
String
tokenInfo
=
this
.
formatTokenInfo
(
map
);
log
.
info
(
"tokenInfo:{}"
,
tokenInfo
);
log
.
info
(
"tokenInfo:{}"
,
tokenInfo
);
// 发行nft
// 发行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
))
{
if
(
StringUtils
.
isBlank
(
hash
))
{
throw
GlobalException
.
newException
(
ResultCode
.
FAILED
,
"nft发行失败"
);
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
))
{
if
(
StringUtils
.
isBlank
(
tradeHash
))
{
throw
GlobalException
.
newException
(
ResultCode
.
PUBLISH_ERROR
,
"nft发行失败"
);
throw
GlobalException
.
newException
(
ResultCode
.
PUBLISH_ERROR
,
"nft发行失败"
);
...
@@ -176,7 +176,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
...
@@ -176,7 +176,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
log
.
info
(
"tokenInfo:{}"
,
tokenInfo
);
log
.
info
(
"tokenInfo:{}"
,
tokenInfo
);
// 转让nft
// 转让nft
String
hash
=
paraChainClient
.
evmTransfer
(
abi
,
contractAddr
,
EvmTokenEnum
.
ERC1155
,
1000000L
,
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
))
{
if
(
StringUtils
.
isBlank
(
hash
))
{
throw
GlobalException
.
newException
(
ResultCode
.
TRANSFER_ERROR
,
"nft转让失败"
);
throw
GlobalException
.
newException
(
ResultCode
.
TRANSFER_ERROR
,
"nft转让失败"
);
}
}
...
@@ -314,7 +314,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
...
@@ -314,7 +314,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
log
.
info
(
"tokenInfo:{}"
,
tokenInfo
);
log
.
info
(
"tokenInfo:{}"
,
tokenInfo
);
// 转让nft
// 转让nft
String
hash
=
paraChainClient
.
evmTransfer
(
abi
,
contractAddr
,
EvmTokenEnum
.
ERC1155
,
1000000L
,
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
))
{
if
(
StringUtils
.
isBlank
(
hash
))
{
throw
GlobalException
.
newException
(
ResultCode
.
TRANSFER_ERROR
,
"nft转让失败"
);
throw
GlobalException
.
newException
(
ResultCode
.
TRANSFER_ERROR
,
"nft转让失败"
);
}
}
...
@@ -348,11 +348,11 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
...
@@ -348,11 +348,11 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
String
tokenInfo
=
this
.
formatTokenInfo
(
map
);
String
tokenInfo
=
this
.
formatTokenInfo
(
map
);
log
.
info
(
"tokenInfo:{}"
,
tokenInfo
);
log
.
info
(
"tokenInfo:{}"
,
tokenInfo
);
// 发行nft
// 发行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
))
{
if
(
StringUtils
.
isBlank
(
hash
))
{
throw
GlobalException
.
newException
(
ResultCode
.
FAILED
,
"nft发行失败"
);
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
))
{
if
(
StringUtils
.
isBlank
(
tradeHash
))
{
throw
GlobalException
.
newException
(
ResultCode
.
PUBLISH_ERROR
,
"nft发行失败"
);
throw
GlobalException
.
newException
(
ResultCode
.
PUBLISH_ERROR
,
"nft发行失败"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment