Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tron-explore
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
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
张建华@五瓣科技
tron-explore
Commits
c1057f76
Commit
c1057f76
authored
Dec 02, 2020
by
jianhua.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合约验证接口调整
parent
7c2ae58c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
ContractController.java
...com/wuban/tron/explore/controller/ContractController.java
+4
-1
No files found.
src/main/java/com/wuban/tron/explore/controller/ContractController.java
View file @
c1057f76
...
...
@@ -19,6 +19,8 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.tron.common.utils.ByteArray
;
import
org.tron.walletserver.WalletApi
;
import
javax.validation.Valid
;
import
java.util.List
;
...
...
@@ -101,7 +103,8 @@ public class ContractController {
String
code
=
this
.
contractCompilerService
.
compiler
(
reqParam
.
getName
(),
reqParam
.
getValue
(),
reqParam
.
getCompiler
());
// 根据合约地址获取合约内容
Contract
con
=
this
.
tronService
.
getContract
(
reqParam
.
getAddress
());
String
hexString
=
ByteArray
.
toHexString
(
WalletApi
.
decodeFromBase58Check
(
reqParam
.
getAddress
()));
Contract
con
=
this
.
tronService
.
getContract
(
hexString
);
// 验证合约code,如果一致,持久化到数据库中
if
(
con
!=
null
&&
!
StringUtils
.
isEmpty
(
con
.
getBytecode
()))
{
...
...
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