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
46768dc1
Commit
46768dc1
authored
Dec 01, 2020
by
jianhua.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增solidity版本功能接口开发,新增合约校验、验证接口开发
parent
9a9d02a5
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1578 additions
and
138 deletions
+1578
-138
ContractController.java
...com/wuban/tron/explore/controller/ContractController.java
+98
-9
TransactionControllerV1.java
...n/tron/explore/controller/v1/TransactionControllerV1.java
+7
-3
SolidityVersionRepository.java
...com/wuban/tron/explore/dao/SolidityVersionRepository.java
+27
-0
DataSourceConfigEx.java
...com/wuban/tron/explore/dao/config/DataSourceConfigEx.java
+9
-9
Contract.java
src/main/java/com/wuban/tron/explore/entity/Contract.java
+81
-35
SolidityVersion.java
...n/java/com/wuban/tron/explore/entity/SolidityVersion.java
+37
-0
ContractExample.java
...om/wuban/tron/explore/entity/example/ContractExample.java
+510
-60
SolidityVersionExample.java
...n/tron/explore/entity/example/SolidityVersionExample.java
+386
-0
Executor.java
src/main/java/com/wuban/tron/explore/fetch/Executor.java
+1
-1
ContractCompilerRequest.java
...n/tron/explore/param/request/ContractCompilerRequest.java
+18
-0
CensusModel.java
...va/com/wuban/tron/explore/param/response/CensusModel.java
+3
-1
ContractModel.java
.../com/wuban/tron/explore/param/response/ContractModel.java
+73
-0
ContractCompilerService.java
...m/wuban/tron/explore/service/ContractCompilerService.java
+3
-3
SolidityVersionService.java
...om/wuban/tron/explore/service/SolidityVersionService.java
+24
-0
ContractCompilerServiceImpl.java
...ron/explore/service/impl/ContractCompilerServiceImpl.java
+4
-4
SolidityVersionServiceImpl.java
...tron/explore/service/impl/SolidityVersionServiceImpl.java
+30
-0
ContractMapper.xml
src/main/resources/mapper/ContractMapper.xml
+50
-5
SolidityVersionMapper.xml
src/main/resources/mapper/SolidityVersionMapper.xml
+209
-0
ContractCompilerServiceImplTest.java
...explore/service/impl/ContractCompilerServiceImplTest.java
+7
-7
tron-explore.sql
tron-explore.sql
+1
-1
No files found.
src/main/java/com/wuban/tron/explore/controller/ContractController.java
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
controller
;
package
com
.
wuban
.
tron
.
explore
.
controller
;
import
com.wuban.tron.explore.entity.Contract
;
import
com.wuban.tron.explore.entity.Contract
;
import
com.wuban.tron.explore.entity.SolidityVersion
;
import
com.wuban.tron.explore.entity.example.ContractExample
;
import
com.wuban.tron.explore.entity.example.ContractExample
;
import
com.wuban.tron.explore.param.request.ContractCompilerRequest
;
import
com.wuban.tron.explore.param.request.ContractRequest
;
import
com.wuban.tron.explore.param.request.ContractRequest
;
import
com.wuban.tron.explore.service.ContractComplierService
;
import
com.wuban.tron.explore.param.response.ContractModel
;
import
com.wuban.tron.explore.service.ContractCompilerService
;
import
com.wuban.tron.explore.service.ContractService
;
import
com.wuban.tron.explore.service.ContractService
;
import
com.wuban.tron.explore.service.SolidityVersionService
;
import
com.wuban.tron.explore.service.TronService
;
import
com.wuban.tron.explore.service.TronService
;
import
com.wuban.tron.explore.util.ApiResponse
;
import
com.wuban.tron.explore.util.ApiResponse
;
import
com.wuban.tron.explore.util.BizExceptionEnum
;
import
com.wuban.tron.explore.util.BizExceptionEnum
;
import
com.wuban.tron.explore.util.ResponseKit
;
import
com.wuban.tron.explore.util.ResponseKit
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
/**
* <core>合约校验API接口</core>
* <core>合约校验API接口</core>
...
@@ -36,10 +39,97 @@ public class ContractController {
...
@@ -36,10 +39,97 @@ public class ContractController {
private
final
TronService
tronService
;
private
final
TronService
tronService
;
private
final
ContractComplierService
contractComplierService
;
private
final
ContractCompilerService
contractCompilerService
;
private
final
SolidityVersionService
solidityVersionService
;
@RequestMapping
(
value
=
"getVersion"
,
method
=
RequestMethod
.
GET
)
public
ApiResponse
getVersion
()
{
List
<
SolidityVersion
>
list
=
this
.
solidityVersionService
.
selectByExample
(
null
);
return
ResponseKit
.
success
(
list
);
}
@RequestMapping
(
value
=
"checkContract/{address}"
,
method
=
RequestMethod
.
GET
)
public
ApiResponse
checkContract
(
@PathVariable
(
"address"
)
String
address
)
{
if
(
StringUtils
.
isEmpty
(
address
))
{
return
ResponseKit
.
fail
(
BizExceptionEnum
.
REQUEST_NULL
.
getCode
(),
BizExceptionEnum
.
REQUEST_NULL
.
getMessage
());
}
/*
按照合约地址查询DB中是否存在此合约
*/
ContractExample
example
=
new
ContractExample
();
example
.
createCriteria
().
andContractAddressEqualTo
(
address
);
Contract
con
=
this
.
contractService
.
selectOneByExample
(
example
);
// 未编译
int
isCompiler
=
0
;
if
(
con
!=
null
)
{
isCompiler
=
1
;
}
return
ResponseKit
.
success
(
isCompiler
);
}
@RequestMapping
(
value
=
"getContractInfoById/{address}"
,
method
=
RequestMethod
.
GET
)
public
ApiResponse
getContractInfoById
(
@PathVariable
(
"address"
)
String
address
)
{
if
(
StringUtils
.
isEmpty
(
address
))
{
return
ResponseKit
.
fail
(
BizExceptionEnum
.
REQUEST_NULL
.
getCode
(),
BizExceptionEnum
.
REQUEST_NULL
.
getMessage
());
}
ContractExample
example
=
new
ContractExample
();
example
.
createCriteria
().
andContractAddressEqualTo
(
address
);
Contract
con
=
this
.
contractService
.
selectOneByExample
(
example
);
ContractModel
model
=
new
ContractModel
();
if
(
con
!=
null
)
{
BeanUtils
.
copyProperties
(
con
,
model
,
"id"
);
model
.
setId
(
con
.
getContractAddress
());
model
.
setCode
(
con
.
getBytecode
());
}
return
ResponseKit
.
success
(
model
);
}
@RequestMapping
(
value
=
"compileSolidityOne"
,
method
=
RequestMethod
.
POST
)
public
ApiResponse
compileSolidityOne
(
@RequestBody
@Valid
ContractModel
reqParam
)
{
boolean
flag
=
false
;
Contract
con
=
this
.
tronService
.
getContract
(
reqParam
.
getId
());
if
(
con
!=
null
)
{
if
(
con
.
getBytecode
().
equals
(
reqParam
.
getCode
()))
{
flag
=
true
;
}
}
return
ResponseKit
.
success
(
flag
);
}
@RequestMapping
(
value
=
"compileSolidity"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"compileSolidity"
,
method
=
RequestMethod
.
POST
)
public
ApiResponse
checkContract
(
@RequestBody
@Valid
ContractRequest
reqParam
)
{
public
ApiResponse
compileSolidity
(
@RequestBody
@Valid
ContractCompilerRequest
reqParam
)
{
String
code
=
this
.
contractCompilerService
.
compiler
(
reqParam
.
getName
(),
reqParam
.
getValue
(),
reqParam
.
getCompiler
());
return
ResponseKit
.
success
(
code
);
}
@Deprecated
@RequestMapping
(
value
=
"compileSolidityAll"
,
method
=
RequestMethod
.
POST
)
public
ApiResponse
compileSolidityAll
(
@RequestBody
@Valid
ContractRequest
reqParam
)
{
String
address
=
reqParam
.
getAddress
();
String
address
=
reqParam
.
getAddress
();
if
(
StringUtils
.
isEmpty
(
address
))
{
if
(
StringUtils
.
isEmpty
(
address
))
{
...
@@ -63,7 +153,7 @@ public class ContractController {
...
@@ -63,7 +153,7 @@ public class ContractController {
}
}
// 编译合约
// 编译合约
String
code
=
this
.
contractComp
lierService
.
compli
er
(
reqParam
.
getName
(),
reqParam
.
getValue
(),
reqParam
.
getCompiler
());
String
code
=
this
.
contractComp
ilerService
.
compil
er
(
reqParam
.
getName
(),
reqParam
.
getValue
(),
reqParam
.
getCompiler
());
// 校验btyecode是否一致,不一致返回,一致持久化
// 校验btyecode是否一致,不一致返回,一致持久化
if
(!
contract
.
getBytecode
().
equals
(
code
))
{
if
(!
contract
.
getBytecode
().
equals
(
code
))
{
...
@@ -75,5 +165,4 @@ public class ContractController {
...
@@ -75,5 +165,4 @@ public class ContractController {
return
ResponseKit
.
success
();
return
ResponseKit
.
success
();
}
}
}
}
src/main/java/com/wuban/tron/explore/controller/v1/TransactionControllerV1.java
View file @
46768dc1
...
@@ -422,9 +422,11 @@ public class TransactionControllerV1 {
...
@@ -422,9 +422,11 @@ public class TransactionControllerV1 {
pageInfo
.
getList
().
forEach
(
o
->
{
pageInfo
.
getList
().
forEach
(
o
->
{
AccountInfoModel
infoModel
=
AccountInfoModel
.
getInstance
();
AccountInfoModel
infoModel
=
AccountInfoModel
.
getInstance
();
infoModel
.
setAddress
(
o
.
getAddress
());
infoModel
.
setAddress
(
o
.
getAddress
());
//BigDecimal balance = BigDecimalUtil.getDevide(new BigDecimal(o.getBalance()), BigDecimalUtil.NUM);
// 账户余额 = 可用余额+冻结余额
/*
BigDecimal balance = BigDecimalUtil.getDevide(new BigDecimal(o.getBalance()), BigDecimalUtil.NUM);
账户余额 = 可用余额+冻结余额
*/
BigDecimal
accountBalance
=
new
BigDecimal
(
0
);
BigDecimal
accountBalance
=
new
BigDecimal
(
0
);
if
(
o
.
getBalance
()
!=
null
)
{
if
(
o
.
getBalance
()
!=
null
)
{
accountBalance
=
BigDecimalUtil
.
getAdd
(
accountBalance
,
new
BigDecimal
(
o
.
getBalance
()));
accountBalance
=
BigDecimalUtil
.
getAdd
(
accountBalance
,
new
BigDecimal
(
o
.
getBalance
()));
...
@@ -592,7 +594,9 @@ public class TransactionControllerV1 {
...
@@ -592,7 +594,9 @@ public class TransactionControllerV1 {
censusModel
.
setTransNumber
(
totalVolume
.
toString
());
censusModel
.
setTransNumber
(
totalVolume
.
toString
());
}
}
//censusModel.setDifficulty("");
/*
censusModel.setDifficulty("");
*/
return
ResponseKit
.
success
(
censusModel
);
return
ResponseKit
.
success
(
censusModel
);
}
}
...
...
src/main/java/com/wuban/tron/explore/dao/SolidityVersionRepository.java
0 → 100644
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
dao
;
import
com.wuban.tron.explore.entity.SolidityVersion
;
import
com.wuban.tron.explore.entity.example.SolidityVersionExample
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <core>solidity版本号DAO</core>
*
* @author sky
* @date 2020/11/02
*/
@Repository
public
interface
SolidityVersionRepository
{
/**
* 获取solidity版本号列表
*
* @param example 检索条件
* @return
*/
List
<
SolidityVersion
>
selectByExample
(
@Param
(
"example"
)
SolidityVersionExample
example
);
}
src/main/java/com/wuban/tron/explore/dao/config/DataSourceConfigE
X
.java
→
src/main/java/com/wuban/tron/explore/dao/config/DataSourceConfigE
x
.java
View file @
46768dc1
...
@@ -22,22 +22,22 @@ import javax.sql.DataSource;
...
@@ -22,22 +22,22 @@ import javax.sql.DataSource;
*/
*/
@Configuration
@Configuration
@MapperScan
(
basePackages
=
"com.wuban.tron.explore.dao"
,
sqlSessionTemplateRef
=
"sqlSessionTemplateE
X
"
)
@MapperScan
(
basePackages
=
"com.wuban.tron.explore.dao"
,
sqlSessionTemplateRef
=
"sqlSessionTemplateE
x
"
)
public
class
DataSourceConfigE
X
{
public
class
DataSourceConfigE
x
{
@Value
(
"${spring.datasource.type}"
)
@Value
(
"${spring.datasource.type}"
)
private
Class
<?
extends
DataSource
>
dataSourceType
;
private
Class
<?
extends
DataSource
>
dataSourceType
;
@Bean
(
name
=
"dataSourceE
X
"
)
@Bean
(
name
=
"dataSourceE
x
"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
@Primary
@Primary
public
DataSource
buildDataSource
()
{
public
DataSource
buildDataSource
()
{
return
DataSourceBuilder
.
create
().
type
(
this
.
dataSourceType
).
build
();
return
DataSourceBuilder
.
create
().
type
(
this
.
dataSourceType
).
build
();
}
}
@Bean
(
name
=
"sqlSessionFactoryE
X
"
)
@Bean
(
name
=
"sqlSessionFactoryE
x
"
)
@Primary
@Primary
public
SqlSessionFactory
buildSqlSessionFactory
(
@Qualifier
(
"dataSourceE
X
"
)
final
DataSource
dataSource
)
public
SqlSessionFactory
buildSqlSessionFactory
(
@Qualifier
(
"dataSourceE
x
"
)
final
DataSource
dataSource
)
throws
Exception
{
throws
Exception
{
final
SqlSessionFactoryBean
bean
=
new
SqlSessionFactoryBean
();
final
SqlSessionFactoryBean
bean
=
new
SqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSource
);
bean
.
setDataSource
(
dataSource
);
...
@@ -48,17 +48,17 @@ public class DataSourceConfigEX {
...
@@ -48,17 +48,17 @@ public class DataSourceConfigEX {
return
bean
.
getObject
();
return
bean
.
getObject
();
}
}
@Bean
(
name
=
"transactionManagerE
X
"
)
@Bean
(
name
=
"transactionManagerE
x
"
)
@Primary
@Primary
public
DataSourceTransactionManager
buildTransactionManager
(
public
DataSourceTransactionManager
buildTransactionManager
(
@Qualifier
(
"dataSourceE
X
"
)
final
DataSource
dataSource
)
{
@Qualifier
(
"dataSourceE
x
"
)
final
DataSource
dataSource
)
{
return
new
DataSourceTransactionManager
(
dataSource
);
return
new
DataSourceTransactionManager
(
dataSource
);
}
}
@Bean
(
name
=
"sqlSessionTemplateE
X
"
)
@Bean
(
name
=
"sqlSessionTemplateE
x
"
)
@Primary
@Primary
public
SqlSessionTemplate
buildSqlSessionTemplate
(
public
SqlSessionTemplate
buildSqlSessionTemplate
(
@Qualifier
(
"sqlSessionFactoryE
X
"
)
final
SqlSessionFactory
sqlSessionFactory
)
{
@Qualifier
(
"sqlSessionFactoryE
x
"
)
final
SqlSessionFactory
sqlSessionFactory
)
{
return
new
SqlSessionTemplate
(
sqlSessionFactory
);
return
new
SqlSessionTemplate
(
sqlSessionFactory
);
}
}
...
...
src/main/java/com/wuban/tron/explore/entity/Contract.java
View file @
46768dc1
...
@@ -19,39 +19,75 @@ import java.util.Date;
...
@@ -19,39 +19,75 @@ import java.util.Date;
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
@AllArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
class
Contract
{
public
class
Contract
{
/**
/**
*
*
*/
*/
private
Long
id
;
private
Long
id
;
/**
/**
*
* 合约code
*/
*/
private
String
bytecode
;
private
String
bytecode
;
/**
/**
* 名称
* 合约名称
*/
*/
private
String
name
;
private
String
name
;
/**
/**
*
*
*/
*/
private
String
originAddress
;
private
String
originAddress
;
/**
/**
*
* 合约ABI
*/
*/
private
String
abi
;
private
String
abi
;
/**
/**
*
*
*/
*/
private
Long
originEnergyLimit
;
private
Long
originEnergyLimit
;
/**
/**
* 合约地址
* 合约地址
*/
*/
private
String
contractAddress
;
private
String
contractAddress
;
/**
/**
*
*
*/
*/
private
String
codeHash
;
private
String
codeHash
;
/**
* solidity版本号
*/
private
String
version
;
/**
* 合约代码
*/
private
String
source
;
/**
*
*/
private
String
enabled
;
/**
*
*/
private
String
other
;
/**
*
*/
private
String
runs
;
/**
*
*/
private
String
evmVersion
;
/**
*
*/
private
String
licenseType
;
/**
*
*/
private
String
parameters
;
/**
*
*/
private
String
optimization
;
public
static
Contract
getInstance
()
{
public
static
Contract
getInstance
()
{
return
Contract
.
builder
()
return
Contract
.
builder
()
.
id
(
0L
)
.
id
(
0L
)
...
@@ -61,7 +97,17 @@ public class Contract {
...
@@ -61,7 +97,17 @@ public class Contract {
.
abi
(
""
)
.
abi
(
""
)
.
originEnergyLimit
(
0L
)
.
originEnergyLimit
(
0L
)
.
contractAddress
(
""
)
.
contractAddress
(
""
)
.
codeHash
(
""
)
.
codeHash
(
""
)
.
build
();
.
version
(
""
)
.
source
(
""
)
.
enabled
(
""
)
.
other
(
""
)
.
runs
(
""
)
.
evmVersion
(
""
)
.
licenseType
(
""
)
.
parameters
(
""
)
.
optimization
(
""
)
.
build
();
}
}
}
}
\ No newline at end of file
src/main/java/com/wuban/tron/explore/entity/SolidityVersion.java
0 → 100644
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
entity
;
import
lombok.AccessLevel
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* solidity版本号
* @author sky
* @date 2020-12-01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
class
SolidityVersion
{
/**
*
*/
private
Long
id
;
/**
*
*/
private
String
version
;
public
static
SolidityVersion
getInstance
()
{
return
SolidityVersion
.
builder
()
.
id
(
0L
)
.
version
(
""
)
.
build
();
}
}
\ No newline at end of file
src/main/java/com/wuban/tron/explore/entity/example/ContractExample.java
View file @
46768dc1
...
@@ -7,7 +7,7 @@ import java.util.List;
...
@@ -7,7 +7,7 @@ import java.util.List;
/**
/**
* 合约表 查询条件example类
* 合约表 查询条件example类
* @author sky
* @author sky
* @date 2020-1
1-30
* @date 2020-1
2-01
*/
*/
public
class
ContractExample
{
public
class
ContractExample
{
protected
String
orderByClause
;
protected
String
orderByClause
;
...
@@ -110,7 +110,7 @@ public class ContractExample {
...
@@ -110,7 +110,7 @@ public class ContractExample {
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
}
public
Criteria
andIdIsNull
()
{
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -149,8 +149,8 @@ public class ContractExample {
...
@@ -149,8 +149,8 @@ public class ContractExample {
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -169,8 +169,8 @@ public class ContractExample {
...
@@ -169,8 +169,8 @@ public class ContractExample {
addCriterion
(
"id <="
,
value
,
"id"
);
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andBytecodeIsNull
()
{
public
Criteria
andBytecodeIsNull
()
{
addCriterion
(
"bytecode is null"
);
addCriterion
(
"bytecode is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -209,9 +209,9 @@ public class ContractExample {
...
@@ -209,9 +209,9 @@ public class ContractExample {
addCriterion
(
"bytecode not between"
,
value1
,
value2
,
"bytecode"
);
addCriterion
(
"bytecode not between"
,
value1
,
value2
,
"bytecode"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andBytecodeLike
(
String
value
)
{
public
Criteria
andBytecodeLike
(
String
value
)
{
addCriterion
(
"bytecode like"
,
value
,
"bytecode"
);
addCriterion
(
"bytecode like"
,
value
,
"bytecode"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -220,7 +220,7 @@ public class ContractExample {
...
@@ -220,7 +220,7 @@ public class ContractExample {
addCriterion
(
"bytecode not like"
,
value
,
"bytecode"
);
addCriterion
(
"bytecode not like"
,
value
,
"bytecode"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andNameIsNull
()
{
public
Criteria
andNameIsNull
()
{
addCriterion
(
"name is null"
);
addCriterion
(
"name is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -259,9 +259,9 @@ public class ContractExample {
...
@@ -259,9 +259,9 @@ public class ContractExample {
addCriterion
(
"name not between"
,
value1
,
value2
,
"name"
);
addCriterion
(
"name not between"
,
value1
,
value2
,
"name"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andNameLike
(
String
value
)
{
public
Criteria
andNameLike
(
String
value
)
{
addCriterion
(
"name like"
,
value
,
"name"
);
addCriterion
(
"name like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -270,7 +270,7 @@ public class ContractExample {
...
@@ -270,7 +270,7 @@ public class ContractExample {
addCriterion
(
"name not like"
,
value
,
"name"
);
addCriterion
(
"name not like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andOriginAddressIsNull
()
{
public
Criteria
andOriginAddressIsNull
()
{
addCriterion
(
"origin_address is null"
);
addCriterion
(
"origin_address is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -309,9 +309,9 @@ public class ContractExample {
...
@@ -309,9 +309,9 @@ public class ContractExample {
addCriterion
(
"origin_address not between"
,
value1
,
value2
,
"originAddress"
);
addCriterion
(
"origin_address not between"
,
value1
,
value2
,
"originAddress"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andOriginAddressLike
(
String
value
)
{
public
Criteria
andOriginAddressLike
(
String
value
)
{
addCriterion
(
"origin_address like"
,
value
,
"originAddress"
);
addCriterion
(
"origin_address like"
,
value
,
"originAddress"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -320,7 +320,7 @@ public class ContractExample {
...
@@ -320,7 +320,7 @@ public class ContractExample {
addCriterion
(
"origin_address not like"
,
value
,
"originAddress"
);
addCriterion
(
"origin_address not like"
,
value
,
"originAddress"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andAbiIsNull
()
{
public
Criteria
andAbiIsNull
()
{
addCriterion
(
"abi is null"
);
addCriterion
(
"abi is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -359,9 +359,9 @@ public class ContractExample {
...
@@ -359,9 +359,9 @@ public class ContractExample {
addCriterion
(
"abi not between"
,
value1
,
value2
,
"abi"
);
addCriterion
(
"abi not between"
,
value1
,
value2
,
"abi"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andAbiLike
(
String
value
)
{
public
Criteria
andAbiLike
(
String
value
)
{
addCriterion
(
"abi like"
,
value
,
"abi"
);
addCriterion
(
"abi like"
,
value
,
"abi"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -370,7 +370,7 @@ public class ContractExample {
...
@@ -370,7 +370,7 @@ public class ContractExample {
addCriterion
(
"abi not like"
,
value
,
"abi"
);
addCriterion
(
"abi not like"
,
value
,
"abi"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andOriginEnergyLimitIsNull
()
{
public
Criteria
andOriginEnergyLimitIsNull
()
{
addCriterion
(
"origin_energy_limit is null"
);
addCriterion
(
"origin_energy_limit is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -409,8 +409,8 @@ public class ContractExample {
...
@@ -409,8 +409,8 @@ public class ContractExample {
addCriterion
(
"origin_energy_limit not between"
,
value1
,
value2
,
"originEnergyLimit"
);
addCriterion
(
"origin_energy_limit not between"
,
value1
,
value2
,
"originEnergyLimit"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andOriginEnergyLimitGreaterThan
(
Long
value
)
{
public
Criteria
andOriginEnergyLimitGreaterThan
(
Long
value
)
{
addCriterion
(
"origin_energy_limit >"
,
value
,
"originEnergyLimit"
);
addCriterion
(
"origin_energy_limit >"
,
value
,
"originEnergyLimit"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -429,8 +429,8 @@ public class ContractExample {
...
@@ -429,8 +429,8 @@ public class ContractExample {
addCriterion
(
"origin_energy_limit <="
,
value
,
"originEnergyLimit"
);
addCriterion
(
"origin_energy_limit <="
,
value
,
"originEnergyLimit"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andContractAddressIsNull
()
{
public
Criteria
andContractAddressIsNull
()
{
addCriterion
(
"contract_address is null"
);
addCriterion
(
"contract_address is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -469,9 +469,9 @@ public class ContractExample {
...
@@ -469,9 +469,9 @@ public class ContractExample {
addCriterion
(
"contract_address not between"
,
value1
,
value2
,
"contractAddress"
);
addCriterion
(
"contract_address not between"
,
value1
,
value2
,
"contractAddress"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andContractAddressLike
(
String
value
)
{
public
Criteria
andContractAddressLike
(
String
value
)
{
addCriterion
(
"contract_address like"
,
value
,
"contractAddress"
);
addCriterion
(
"contract_address like"
,
value
,
"contractAddress"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -480,7 +480,7 @@ public class ContractExample {
...
@@ -480,7 +480,7 @@ public class ContractExample {
addCriterion
(
"contract_address not like"
,
value
,
"contractAddress"
);
addCriterion
(
"contract_address not like"
,
value
,
"contractAddress"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andCodeHashIsNull
()
{
public
Criteria
andCodeHashIsNull
()
{
addCriterion
(
"code_hash is null"
);
addCriterion
(
"code_hash is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -519,9 +519,9 @@ public class ContractExample {
...
@@ -519,9 +519,9 @@ public class ContractExample {
addCriterion
(
"code_hash not between"
,
value1
,
value2
,
"codeHash"
);
addCriterion
(
"code_hash not between"
,
value1
,
value2
,
"codeHash"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andCodeHashLike
(
String
value
)
{
public
Criteria
andCodeHashLike
(
String
value
)
{
addCriterion
(
"code_hash like"
,
value
,
"codeHash"
);
addCriterion
(
"code_hash like"
,
value
,
"codeHash"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -530,72 +530,522 @@ public class ContractExample {
...
@@ -530,72 +530,522 @@ public class ContractExample {
addCriterion
(
"code_hash not like"
,
value
,
"codeHash"
);
addCriterion
(
"code_hash not like"
,
value
,
"codeHash"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldIsNull
(
final
String
fieldName
)
{
public
Criteria
andVersionIsNull
()
{
addCriterion
(
"version is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionIsNotNull
()
{
addCriterion
(
"version is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionEqualTo
(
String
value
)
{
addCriterion
(
"version ="
,
value
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionNotEqualTo
(
String
value
)
{
addCriterion
(
"version <>"
,
value
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionIn
(
List
<
String
>
values
)
{
addCriterion
(
"version in"
,
values
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"version not in"
,
values
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"version between"
,
value1
,
value2
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"version not between"
,
value1
,
value2
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionLike
(
String
value
)
{
addCriterion
(
"version like"
,
value
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionNotLike
(
String
value
)
{
addCriterion
(
"version not like"
,
value
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceIsNull
()
{
addCriterion
(
"source is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceIsNotNull
()
{
addCriterion
(
"source is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceEqualTo
(
String
value
)
{
addCriterion
(
"source ="
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceNotEqualTo
(
String
value
)
{
addCriterion
(
"source <>"
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceIn
(
List
<
String
>
values
)
{
addCriterion
(
"source in"
,
values
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"source not in"
,
values
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"source between"
,
value1
,
value2
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"source not between"
,
value1
,
value2
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceLike
(
String
value
)
{
addCriterion
(
"source like"
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceNotLike
(
String
value
)
{
addCriterion
(
"source not like"
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledIsNull
()
{
addCriterion
(
"enabled is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledIsNotNull
()
{
addCriterion
(
"enabled is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledEqualTo
(
String
value
)
{
addCriterion
(
"enabled ="
,
value
,
"enabled"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNotEqualTo
(
String
value
)
{
addCriterion
(
"enabled <>"
,
value
,
"enabled"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledIn
(
List
<
String
>
values
)
{
addCriterion
(
"enabled in"
,
values
,
"enabled"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"enabled not in"
,
values
,
"enabled"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"enabled between"
,
value1
,
value2
,
"enabled"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"enabled not between"
,
value1
,
value2
,
"enabled"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledLike
(
String
value
)
{
addCriterion
(
"enabled like"
,
value
,
"enabled"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNotLike
(
String
value
)
{
addCriterion
(
"enabled not like"
,
value
,
"enabled"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherIsNull
()
{
addCriterion
(
"other is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherIsNotNull
()
{
addCriterion
(
"other is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherEqualTo
(
String
value
)
{
addCriterion
(
"other ="
,
value
,
"other"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherNotEqualTo
(
String
value
)
{
addCriterion
(
"other <>"
,
value
,
"other"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherIn
(
List
<
String
>
values
)
{
addCriterion
(
"other in"
,
values
,
"other"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"other not in"
,
values
,
"other"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"other between"
,
value1
,
value2
,
"other"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"other not between"
,
value1
,
value2
,
"other"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherLike
(
String
value
)
{
addCriterion
(
"other like"
,
value
,
"other"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOtherNotLike
(
String
value
)
{
addCriterion
(
"other not like"
,
value
,
"other"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsIsNull
()
{
addCriterion
(
"runs is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsIsNotNull
()
{
addCriterion
(
"runs is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsEqualTo
(
String
value
)
{
addCriterion
(
"runs ="
,
value
,
"runs"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsNotEqualTo
(
String
value
)
{
addCriterion
(
"runs <>"
,
value
,
"runs"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsIn
(
List
<
String
>
values
)
{
addCriterion
(
"runs in"
,
values
,
"runs"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"runs not in"
,
values
,
"runs"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"runs between"
,
value1
,
value2
,
"runs"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"runs not between"
,
value1
,
value2
,
"runs"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsLike
(
String
value
)
{
addCriterion
(
"runs like"
,
value
,
"runs"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRunsNotLike
(
String
value
)
{
addCriterion
(
"runs not like"
,
value
,
"runs"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionIsNull
()
{
addCriterion
(
"evm_version is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionIsNotNull
()
{
addCriterion
(
"evm_version is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionEqualTo
(
String
value
)
{
addCriterion
(
"evm_version ="
,
value
,
"evmVersion"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionNotEqualTo
(
String
value
)
{
addCriterion
(
"evm_version <>"
,
value
,
"evmVersion"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionIn
(
List
<
String
>
values
)
{
addCriterion
(
"evm_version in"
,
values
,
"evmVersion"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"evm_version not in"
,
values
,
"evmVersion"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"evm_version between"
,
value1
,
value2
,
"evmVersion"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"evm_version not between"
,
value1
,
value2
,
"evmVersion"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionLike
(
String
value
)
{
addCriterion
(
"evm_version like"
,
value
,
"evmVersion"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEvmVersionNotLike
(
String
value
)
{
addCriterion
(
"evm_version not like"
,
value
,
"evmVersion"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeIsNull
()
{
addCriterion
(
"license_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeIsNotNull
()
{
addCriterion
(
"license_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeEqualTo
(
String
value
)
{
addCriterion
(
"license_type ="
,
value
,
"licenseType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeNotEqualTo
(
String
value
)
{
addCriterion
(
"license_type <>"
,
value
,
"licenseType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeIn
(
List
<
String
>
values
)
{
addCriterion
(
"license_type in"
,
values
,
"licenseType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"license_type not in"
,
values
,
"licenseType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"license_type between"
,
value1
,
value2
,
"licenseType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"license_type not between"
,
value1
,
value2
,
"licenseType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeLike
(
String
value
)
{
addCriterion
(
"license_type like"
,
value
,
"licenseType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLicenseTypeNotLike
(
String
value
)
{
addCriterion
(
"license_type not like"
,
value
,
"licenseType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersIsNull
()
{
addCriterion
(
"parameters is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersIsNotNull
()
{
addCriterion
(
"parameters is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersEqualTo
(
String
value
)
{
addCriterion
(
"parameters ="
,
value
,
"parameters"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersNotEqualTo
(
String
value
)
{
addCriterion
(
"parameters <>"
,
value
,
"parameters"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersIn
(
List
<
String
>
values
)
{
addCriterion
(
"parameters in"
,
values
,
"parameters"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"parameters not in"
,
values
,
"parameters"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"parameters between"
,
value1
,
value2
,
"parameters"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"parameters not between"
,
value1
,
value2
,
"parameters"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersLike
(
String
value
)
{
addCriterion
(
"parameters like"
,
value
,
"parameters"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParametersNotLike
(
String
value
)
{
addCriterion
(
"parameters not like"
,
value
,
"parameters"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationIsNull
()
{
addCriterion
(
"optimization is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationIsNotNull
()
{
addCriterion
(
"optimization is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationEqualTo
(
String
value
)
{
addCriterion
(
"optimization ="
,
value
,
"optimization"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationNotEqualTo
(
String
value
)
{
addCriterion
(
"optimization <>"
,
value
,
"optimization"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationIn
(
List
<
String
>
values
)
{
addCriterion
(
"optimization in"
,
values
,
"optimization"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"optimization not in"
,
values
,
"optimization"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"optimization between"
,
value1
,
value2
,
"optimization"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"optimization not between"
,
value1
,
value2
,
"optimization"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationLike
(
String
value
)
{
addCriterion
(
"optimization like"
,
value
,
"optimization"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOptimizationNotLike
(
String
value
)
{
addCriterion
(
"optimization not like"
,
value
,
"optimization"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldIsNull
(
final
String
fieldName
)
{
addCriterion
(
fieldName
+
" is null"
);
addCriterion
(
fieldName
+
" is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldIsNotNull
(
final
String
fieldName
)
{
public
Criteria
andFieldIsNotNull
(
final
String
fieldName
)
{
addCriterion
(
fieldName
+
" is not null"
);
addCriterion
(
fieldName
+
" is not null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
public
Criteria
andFieldEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" = "
,
fieldValue
,
fieldName
);
addCriterion
(
fieldName
+
" = "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldNotEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
public
Criteria
andFieldNotEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" <> "
,
fieldValue
,
fieldName
);
addCriterion
(
fieldName
+
" <> "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldIn
(
final
String
fieldName
,
final
List
<
Object
>
values
)
{
public
Criteria
andFieldIn
(
final
String
fieldName
,
final
List
<
Object
>
values
)
{
addCriterion
(
fieldName
+
" in "
,
values
,
fieldName
);
addCriterion
(
fieldName
+
" in "
,
values
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldNotIn
(
final
String
fieldName
,
final
List
<
Object
>
values
)
{
public
Criteria
andFieldNotIn
(
final
String
fieldName
,
final
List
<
Object
>
values
)
{
addCriterion
(
fieldName
+
" not in "
,
values
,
fieldName
);
addCriterion
(
fieldName
+
" not in "
,
values
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldBetween
(
final
String
fieldName
,
final
Object
fieldValue1
,
final
Object
fieldValue2
)
{
public
Criteria
andFieldBetween
(
final
String
fieldName
,
final
Object
fieldValue1
,
final
Object
fieldValue2
)
{
addCriterion
(
fieldName
+
" between "
,
fieldValue1
,
fieldValue2
,
fieldName
);
addCriterion
(
fieldName
+
" between "
,
fieldValue1
,
fieldValue2
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldNotBetween
(
final
String
fieldName
,
final
Object
fieldValue1
,
final
Object
fieldValue2
)
{
public
Criteria
andFieldNotBetween
(
final
String
fieldName
,
final
Object
fieldValue1
,
final
Object
fieldValue2
)
{
addCriterion
(
fieldName
+
" not between "
,
fieldValue1
,
fieldValue2
,
fieldName
);
addCriterion
(
fieldName
+
" not between "
,
fieldValue1
,
fieldValue2
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldGreaterThan
(
final
String
fieldName
,
final
Object
fieldValue
)
{
public
Criteria
andFieldGreaterThan
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" > "
,
fieldValue
,
fieldName
);
addCriterion
(
fieldName
+
" > "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldGreaterThanOrEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
public
Criteria
andFieldGreaterThanOrEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" >= "
,
fieldValue
,
fieldName
);
addCriterion
(
fieldName
+
" >= "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldLessThan
(
final
String
fieldName
,
final
Object
fieldValue
)
{
public
Criteria
andFieldLessThan
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" < "
,
fieldValue
,
fieldName
);
addCriterion
(
fieldName
+
" < "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldLessThanOrEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
public
Criteria
andFieldLessThanOrEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" <= "
,
fieldValue
,
fieldName
);
addCriterion
(
fieldName
+
" <= "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldLike
(
final
String
fieldName
,
final
String
fieldValue
)
{
public
Criteria
andFieldLike
(
final
String
fieldName
,
final
String
fieldValue
)
{
addCriterion
(
fieldName
+
" like "
,
fieldValue
,
fieldName
);
addCriterion
(
fieldName
+
" like "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andFieldNotLike
(
final
String
fieldName
,
final
String
fieldValue
)
{
public
Criteria
andFieldNotLike
(
final
String
fieldName
,
final
String
fieldValue
)
{
addCriterion
(
fieldName
+
" not like "
,
fieldValue
,
fieldName
);
addCriterion
(
fieldName
+
" not like "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
...
src/main/java/com/wuban/tron/explore/entity/example/SolidityVersionExample.java
0 → 100644
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
entity
.
example
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* solidity版本号 查询条件example类
* @author sky
* @date 2020-12-01
*/
public
class
SolidityVersionExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
SolidityVersionExample
()
{
oredCriteria
=
new
ArrayList
<>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionIsNull
()
{
addCriterion
(
"version is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionIsNotNull
()
{
addCriterion
(
"version is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionEqualTo
(
String
value
)
{
addCriterion
(
"version ="
,
value
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionNotEqualTo
(
String
value
)
{
addCriterion
(
"version <>"
,
value
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionIn
(
List
<
String
>
values
)
{
addCriterion
(
"version in"
,
values
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"version not in"
,
values
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"version between"
,
value1
,
value2
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"version not between"
,
value1
,
value2
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionLike
(
String
value
)
{
addCriterion
(
"version like"
,
value
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVersionNotLike
(
String
value
)
{
addCriterion
(
"version not like"
,
value
,
"version"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldIsNull
(
final
String
fieldName
)
{
addCriterion
(
fieldName
+
" is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldIsNotNull
(
final
String
fieldName
)
{
addCriterion
(
fieldName
+
" is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" = "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldNotEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" <> "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldIn
(
final
String
fieldName
,
final
List
<
Object
>
values
)
{
addCriterion
(
fieldName
+
" in "
,
values
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldNotIn
(
final
String
fieldName
,
final
List
<
Object
>
values
)
{
addCriterion
(
fieldName
+
" not in "
,
values
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldBetween
(
final
String
fieldName
,
final
Object
fieldValue1
,
final
Object
fieldValue2
)
{
addCriterion
(
fieldName
+
" between "
,
fieldValue1
,
fieldValue2
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldNotBetween
(
final
String
fieldName
,
final
Object
fieldValue1
,
final
Object
fieldValue2
)
{
addCriterion
(
fieldName
+
" not between "
,
fieldValue1
,
fieldValue2
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldGreaterThan
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" > "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldGreaterThanOrEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" >= "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldLessThan
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" < "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldLessThanOrEqualTo
(
final
String
fieldName
,
final
Object
fieldValue
)
{
addCriterion
(
fieldName
+
" <= "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldLike
(
final
String
fieldName
,
final
String
fieldValue
)
{
addCriterion
(
fieldName
+
" like "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
}
public
Criteria
andFieldNotLike
(
final
String
fieldName
,
final
String
fieldValue
)
{
addCriterion
(
fieldName
+
" not like "
,
fieldValue
,
fieldName
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
src/main/java/com/wuban/tron/explore/fetch/Executor.java
View file @
46768dc1
...
@@ -43,7 +43,7 @@ public class Executor {
...
@@ -43,7 +43,7 @@ public class Executor {
}
}
public
void
rebuild
()
{
public
void
rebuild
()
{
this
.
pool
=
new
ThreadPoolExecutor
(
SIZE
,
SIZE
,
0L
,
TimeUnit
.
SECONDS
,
this
.
pool
=
new
ThreadPoolExecutor
(
SIZE
,
SIZE
*
2
,
1
0L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(),
new
ExecutorThreadFactory
());
new
LinkedBlockingQueue
<>(),
new
ExecutorThreadFactory
());
}
}
...
...
src/main/java/com/wuban/tron/explore/param/request/ContractCompilerRequest.java
0 → 100644
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
param
.
request
;
import
lombok.Data
;
/**
* <core>编译合约请求参数</core>
*
* @author sky
* @date 2020/11/02
*/
@Data
public
class
ContractCompilerRequest
{
private
String
name
;
private
String
value
;
private
String
compiler
;
}
src/main/java/com/wuban/tron/explore/param/response/CensusModel.java
View file @
46768dc1
...
@@ -24,7 +24,9 @@ public class CensusModel {
...
@@ -24,7 +24,9 @@ public class CensusModel {
@JsonProperty
(
value
=
"block_number"
)
@JsonProperty
(
value
=
"block_number"
)
private
String
blockNumber
;
private
String
blockNumber
;
private
String
tps
;
private
String
tps
;
//private String difficulty;
/*
private String difficulty;
*/
@JsonProperty
(
value
=
"address_number"
)
@JsonProperty
(
value
=
"address_number"
)
private
String
addressNumber
;
private
String
addressNumber
;
...
...
src/main/java/com/wuban/tron/explore/param/response/ContractModel.java
0 → 100644
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
param
.
response
;
import
lombok.Data
;
/**
* <core>合约详情MODEL</core>
*
* @author sky
* @date 2020/11/02
*/
@Data
public
class
ContractModel
{
/**
* 合约地址
*/
private
String
id
;
/**
* 合约名称
*/
private
String
name
;
/**
* solidity版本号
*/
private
String
version
;
/**
* 合约代码
*/
private
String
source
;
/**
* 合约ABI
*/
private
String
abi
;
/**
* 合约code
*/
private
String
code
;
/**
*
*/
private
String
enabled
;
/**
*
*/
private
String
other
;
/**
*
*/
private
String
runs
;
/**
*
*/
private
String
evmVersion
;
/**
*
*/
private
String
licenseType
;
/**
*
*/
private
String
parameters
;
/**
*
*/
private
String
optimization
;
}
src/main/java/com/wuban/tron/explore/service/ContractComp
li
erService.java
→
src/main/java/com/wuban/tron/explore/service/ContractComp
il
erService.java
View file @
46768dc1
...
@@ -6,16 +6,16 @@ package com.wuban.tron.explore.service;
...
@@ -6,16 +6,16 @@ package com.wuban.tron.explore.service;
* @author sky
* @author sky
* @date 2020/11/30
* @date 2020/11/30
*/
*/
public
interface
ContractComp
li
erService
{
public
interface
ContractComp
il
erService
{
/**
/**
* 编译合约
* 编译合约
*
*
* @param name 名称
* @param name 名称
* @param value 合约内容
* @param value 合约内容
* @param comp
li
er solidity版本号
* @param comp
il
er solidity版本号
* @return
* @return
*/
*/
String
comp
lier
(
String
name
,
String
value
,
String
compli
er
);
String
comp
iler
(
String
name
,
String
value
,
String
compil
er
);
}
}
src/main/java/com/wuban/tron/explore/service/SolidityVersionService.java
0 → 100644
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
service
;
import
com.wuban.tron.explore.entity.SolidityVersion
;
import
com.wuban.tron.explore.entity.example.SolidityVersionExample
;
import
java.util.List
;
/**
* <core>solidity版本号服务接口</core>
*
* @author sky
* @date 2020/12/1
*/
public
interface
SolidityVersionService
{
/**
* 版本号列表
*
* @param example
* @return
*/
List
<
SolidityVersion
>
selectByExample
(
SolidityVersionExample
example
);
}
src/main/java/com/wuban/tron/explore/service/impl/ContractComp
li
erServiceImpl.java
→
src/main/java/com/wuban/tron/explore/service/impl/ContractComp
il
erServiceImpl.java
View file @
46768dc1
...
@@ -2,7 +2,7 @@ package com.wuban.tron.explore.service.impl;
...
@@ -2,7 +2,7 @@ package com.wuban.tron.explore.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.wuban.tron.explore.service.BaseCommonService
;
import
com.wuban.tron.explore.service.BaseCommonService
;
import
com.wuban.tron.explore.service.ContractComp
li
erService
;
import
com.wuban.tron.explore.service.ContractComp
il
erService
;
import
com.wuban.tron.explore.util.ApiResponse
;
import
com.wuban.tron.explore.util.ApiResponse
;
import
okhttp3.Request
;
import
okhttp3.Request
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -18,14 +18,14 @@ import java.util.Map;
...
@@ -18,14 +18,14 @@ import java.util.Map;
* @date 2020/11/30
* @date 2020/11/30
*/
*/
@Service
@Service
public
class
ContractComp
lierServiceImpl
extends
BaseCommonService
implements
ContractCompli
erService
{
public
class
ContractComp
ilerServiceImpl
extends
BaseCommonService
implements
ContractCompil
erService
{
@Override
@Override
public
String
comp
lier
(
String
name
,
String
value
,
String
compli
er
)
{
public
String
comp
iler
(
String
name
,
String
value
,
String
compil
er
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
3
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
3
);
map
.
put
(
"name"
,
name
);
map
.
put
(
"name"
,
name
);
map
.
put
(
"value"
,
value
);
map
.
put
(
"value"
,
value
);
map
.
put
(
"comp
lier"
,
compli
er
);
map
.
put
(
"comp
iler"
,
compil
er
);
Request
request
=
this
.
builderPost
(
map
);
Request
request
=
this
.
builderPost
(
map
);
String
str
=
this
.
execute
(
request
);
String
str
=
this
.
execute
(
request
);
if
(
StringUtils
.
isEmpty
(
str
))
{
if
(
StringUtils
.
isEmpty
(
str
))
{
...
...
src/main/java/com/wuban/tron/explore/service/impl/SolidityVersionServiceImpl.java
0 → 100644
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
service
.
impl
;
import
com.wuban.tron.explore.dao.SolidityVersionRepository
;
import
com.wuban.tron.explore.entity.SolidityVersion
;
import
com.wuban.tron.explore.entity.example.SolidityVersionExample
;
import
com.wuban.tron.explore.service.SolidityVersionService
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <core>solidity版本号服务接口实现类</core>
*
* @author sky
* @date 2020/12/1
*/
@Service
@RequiredArgsConstructor
(
onConstructor_
=
@Autowired
)
public
class
SolidityVersionServiceImpl
implements
SolidityVersionService
{
private
final
SolidityVersionRepository
solidityVersionRepository
;
@Override
public
List
<
SolidityVersion
>
selectByExample
(
SolidityVersionExample
example
)
{
return
this
.
solidityVersionRepository
.
selectByExample
(
example
);
}
}
src/main/resources/mapper/ContractMapper.xml
View file @
46768dc1
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.wuban.tron.explore.dao.ContractRepository"
>
<mapper
namespace=
"com.wuban.tron.explore.dao.ContractRepository"
>
<!-- CodeBuilder Generated-->
<!-- CodeBuilder Generated-->
<resultMap
id=
"ContractMap"
type=
"com.wuban.tron.explore.entity.Contract"
>
<resultMap
id=
"ContractMap"
type=
"com.wuban.tron.explore.entity.Contract"
>
<result
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"bytecode"
property=
"bytecode"
jdbcType=
"VARCHAR"
/>
<result
column=
"bytecode"
property=
"bytecode"
jdbcType=
"VARCHAR"
/>
...
@@ -11,6 +11,15 @@
...
@@ -11,6 +11,15 @@
<result
column=
"origin_energy_limit"
property=
"originEnergyLimit"
jdbcType=
"BIGINT"
/>
<result
column=
"origin_energy_limit"
property=
"originEnergyLimit"
jdbcType=
"BIGINT"
/>
<result
column=
"contract_address"
property=
"contractAddress"
jdbcType=
"VARCHAR"
/>
<result
column=
"contract_address"
property=
"contractAddress"
jdbcType=
"VARCHAR"
/>
<result
column=
"code_hash"
property=
"codeHash"
jdbcType=
"VARCHAR"
/>
<result
column=
"code_hash"
property=
"codeHash"
jdbcType=
"VARCHAR"
/>
<result
column=
"version"
property=
"version"
jdbcType=
"VARCHAR"
/>
<result
column=
"source"
property=
"source"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"enabled"
property=
"enabled"
jdbcType=
"VARCHAR"
/>
<result
column=
"other"
property=
"other"
jdbcType=
"VARCHAR"
/>
<result
column=
"runs"
property=
"runs"
jdbcType=
"VARCHAR"
/>
<result
column=
"evm_version"
property=
"evmVersion"
jdbcType=
"VARCHAR"
/>
<result
column=
"license_type"
property=
"licenseType"
jdbcType=
"VARCHAR"
/>
<result
column=
"parameters"
property=
"parameters"
jdbcType=
"VARCHAR"
/>
<result
column=
"optimization"
property=
"optimization"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<where>
<where>
...
@@ -44,9 +53,9 @@
...
@@ -44,9 +53,9 @@
</sql>
</sql>
<sql
id=
"Table_Name"
>
tron_contract
</sql>
<sql
id=
"Table_Name"
>
tron_contract
</sql>
<sql
id=
"Base_Column_List_Without_Id"
>
<sql
id=
"Base_Column_List_Without_Id"
>
id , bytecode , name , origin_address , abi , origin_energy_limit , contract_address , code_hash
</sql>
id , bytecode , name , origin_address , abi , origin_energy_limit , contract_address , code_hash
, version , source , enabled , other , runs , evm_version , license_type , parameters , optimization
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<include
refid=
"Base_Column_List_Without_Id"
/>
<include
refid=
"Base_Column_List_Without_Id"
/>
</sql>
</sql>
<sql
id=
"Insert_Columns"
>
<sql
id=
"Insert_Columns"
>
<if
test=
"record.id != null"
>
id,
</if>
<if
test=
"record.id != null"
>
id,
</if>
...
@@ -57,6 +66,15 @@
...
@@ -57,6 +66,15 @@
<if
test=
"record.originEnergyLimit != null"
>
origin_energy_limit,
</if>
<if
test=
"record.originEnergyLimit != null"
>
origin_energy_limit,
</if>
<if
test=
"record.contractAddress != null"
>
contract_address,
</if>
<if
test=
"record.contractAddress != null"
>
contract_address,
</if>
<if
test=
"record.codeHash != null"
>
code_hash,
</if>
<if
test=
"record.codeHash != null"
>
code_hash,
</if>
<if
test=
"record.version != null"
>
version,
</if>
<if
test=
"record.source != null"
>
source,
</if>
<if
test=
"record.enabled != null"
>
enabled,
</if>
<if
test=
"record.other != null"
>
other,
</if>
<if
test=
"record.runs != null"
>
runs,
</if>
<if
test=
"record.evmVersion != null"
>
evm_version,
</if>
<if
test=
"record.licenseType != null"
>
license_type,
</if>
<if
test=
"record.parameters != null"
>
parameters,
</if>
<if
test=
"record.optimization != null"
>
optimization,
</if>
</sql>
</sql>
<sql
id=
"Insert_Values"
>
<sql
id=
"Insert_Values"
>
<if
test=
"record.id != null"
>
#{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.id != null"
>
#{record.id,jdbcType=BIGINT},
</if>
...
@@ -67,6 +85,15 @@
...
@@ -67,6 +85,15 @@
<if
test=
"record.originEnergyLimit != null"
>
#{record.originEnergyLimit,jdbcType=BIGINT},
</if>
<if
test=
"record.originEnergyLimit != null"
>
#{record.originEnergyLimit,jdbcType=BIGINT},
</if>
<if
test=
"record.contractAddress != null"
>
#{record.contractAddress,jdbcType=VARCHAR},
</if>
<if
test=
"record.contractAddress != null"
>
#{record.contractAddress,jdbcType=VARCHAR},
</if>
<if
test=
"record.codeHash != null"
>
#{record.codeHash,jdbcType=VARCHAR},
</if>
<if
test=
"record.codeHash != null"
>
#{record.codeHash,jdbcType=VARCHAR},
</if>
<if
test=
"record.version != null"
>
#{record.version,jdbcType=VARCHAR},
</if>
<if
test=
"record.source != null"
>
#{record.source,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.enabled != null"
>
#{record.enabled,jdbcType=VARCHAR},
</if>
<if
test=
"record.other != null"
>
#{record.other,jdbcType=VARCHAR},
</if>
<if
test=
"record.runs != null"
>
#{record.runs,jdbcType=VARCHAR},
</if>
<if
test=
"record.evmVersion != null"
>
#{record.evmVersion,jdbcType=VARCHAR},
</if>
<if
test=
"record.licenseType != null"
>
#{record.licenseType,jdbcType=VARCHAR},
</if>
<if
test=
"record.parameters != null"
>
#{record.parameters,jdbcType=VARCHAR},
</if>
<if
test=
"record.optimization != null"
>
#{record.optimization,jdbcType=VARCHAR},
</if>
</sql>
</sql>
<sql
id=
"Batch_Insert_Values"
>
<sql
id=
"Batch_Insert_Values"
>
#{record.id,jdbcType=BIGINT},
#{record.id,jdbcType=BIGINT},
...
@@ -77,9 +104,18 @@
...
@@ -77,9 +104,18 @@
#{record.originEnergyLimit,jdbcType=BIGINT},
#{record.originEnergyLimit,jdbcType=BIGINT},
#{record.contractAddress,jdbcType=VARCHAR},
#{record.contractAddress,jdbcType=VARCHAR},
#{record.codeHash,jdbcType=VARCHAR},
#{record.codeHash,jdbcType=VARCHAR},
#{record.version,jdbcType=VARCHAR},
#{record.source,jdbcType=LONGVARCHAR},
#{record.enabled,jdbcType=VARCHAR},
#{record.other,jdbcType=VARCHAR},
#{record.runs,jdbcType=VARCHAR},
#{record.evmVersion,jdbcType=VARCHAR},
#{record.licenseType,jdbcType=VARCHAR},
#{record.parameters,jdbcType=VARCHAR},
#{record.optimization,jdbcType=VARCHAR},
</sql>
</sql>
<sql
id=
"Batch_Insert_Values_On_DuplicateKey"
>
<sql
id=
"Batch_Insert_Values_On_DuplicateKey"
>
<include
refid=
"Batch_Insert_Values"
/>
<include
refid=
"Batch_Insert_Values"
/>
</sql>
</sql>
<sql
id=
"Update_Set_From_Bean"
>
<sql
id=
"Update_Set_From_Bean"
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT} ,
</if>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT} ,
</if>
...
@@ -90,6 +126,15 @@
...
@@ -90,6 +126,15 @@
<if
test=
"record.originEnergyLimit != null"
>
origin_energy_limit = #{record.originEnergyLimit,jdbcType=BIGINT} ,
</if>
<if
test=
"record.originEnergyLimit != null"
>
origin_energy_limit = #{record.originEnergyLimit,jdbcType=BIGINT} ,
</if>
<if
test=
"record.contractAddress != null"
>
contract_address = #{record.contractAddress,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.contractAddress != null"
>
contract_address = #{record.contractAddress,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.codeHash != null"
>
code_hash = #{record.codeHash,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.codeHash != null"
>
code_hash = #{record.codeHash,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.version != null"
>
version = #{record.version,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.source != null"
>
source = #{record.source,jdbcType=LONGVARCHAR} ,
</if>
<if
test=
"record.enabled != null"
>
enabled = #{record.enabled,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.other != null"
>
other = #{record.other,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.runs != null"
>
runs = #{record.runs,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.evmVersion != null"
>
evm_version = #{record.evmVersion,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.licenseType != null"
>
license_type = #{record.licenseType,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.parameters != null"
>
parameters = #{record.parameters,jdbcType=VARCHAR} ,
</if>
<if
test=
"record.optimization != null"
>
optimization = #{record.optimization,jdbcType=VARCHAR} ,
</if>
</sql>
</sql>
<!-- insert -->
<!-- insert -->
<insert
id=
"insert"
parameterType=
"java.util.Map"
>
<insert
id=
"insert"
parameterType=
"java.util.Map"
>
...
@@ -125,7 +170,7 @@
...
@@ -125,7 +170,7 @@
</trim>
</trim>
</foreach>
</foreach>
ON DUPLICATE KEY UPDATE
ON DUPLICATE KEY UPDATE
id = VALUES(id) , bytecode = VALUES(bytecode) , name = VALUES(name) , origin_address = VALUES(origin_address) , abi = VALUES(abi) , origin_energy_limit = VALUES(origin_energy_limit) , contract_address = VALUES(contract_address) , code_hash = VALUES(code_hash)
</insert>
id = VALUES(id) , bytecode = VALUES(bytecode) , name = VALUES(name) , origin_address = VALUES(origin_address) , abi = VALUES(abi) , origin_energy_limit = VALUES(origin_energy_limit) , contract_address = VALUES(contract_address) , code_hash = VALUES(code_hash)
, version = VALUES(version) , source = VALUES(source) , enabled = VALUES(enabled) , other = VALUES(other) , runs = VALUES(runs) , evm_version = VALUES(evm_version) , license_type = VALUES(license_type) , parameters = VALUES(parameters) , optimization = VALUES(optimization)
</insert>
<!-- end insert -->
<!-- end insert -->
<!-- delete -->
<!-- delete -->
<delete
id=
"deleteById"
parameterType=
"java.util.Map"
>
<delete
id=
"deleteById"
parameterType=
"java.util.Map"
>
...
...
src/main/resources/mapper/SolidityVersionMapper.xml
0 → 100644
View file @
46768dc1
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.wuban.tron.explore.dao.SolidityVersionRepository"
>
<!-- CodeBuilder Generated-->
<resultMap
id=
"SolidityVersionMap"
type=
"com.wuban.tron.explore.entity.SolidityVersion"
>
<result
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"version"
property=
"version"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
suffix=
")"
prefixOverrides=
"and"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
collection=
"criterion.value"
item=
"listItem"
open=
"("
close=
")"
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Table_Name"
>
tron_solidity_version
</sql>
<sql
id=
"Base_Column_List_Without_Id"
>
id , version
</sql>
<sql
id=
"Base_Column_List"
>
<include
refid=
"Base_Column_List_Without_Id"
/>
</sql>
<sql
id=
"Insert_Columns"
>
<if
test=
"record.id != null"
>
id,
</if>
<if
test=
"record.version != null"
>
version,
</if>
</sql>
<sql
id=
"Insert_Values"
>
<if
test=
"record.id != null"
>
#{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.version != null"
>
#{record.version,jdbcType=VARCHAR},
</if>
</sql>
<sql
id=
"Batch_Insert_Values"
>
#{record.id,jdbcType=BIGINT},
#{record.version,jdbcType=VARCHAR},
</sql>
<sql
id=
"Batch_Insert_Values_On_DuplicateKey"
>
<include
refid=
"Batch_Insert_Values"
/>
</sql>
<sql
id=
"Update_Set_From_Bean"
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT} ,
</if>
<if
test=
"record.version != null"
>
version = #{record.version,jdbcType=VARCHAR} ,
</if>
</sql>
<!-- insert -->
<insert
id=
"insert"
parameterType=
"java.util.Map"
>
insert into
<include
refid=
"Table_Name"
/>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<include
refid=
"Insert_Columns"
/>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<include
refid=
"Insert_Values"
/>
</trim>
</insert>
<insert
id=
"batchInsert"
parameterType=
"java.util.Map"
>
insert into
<include
refid=
"Table_Name"
/>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<include
refid=
"Base_Column_List_Without_Id"
/>
</trim>
values
<foreach
collection=
"records"
item=
"record"
index=
"index"
separator=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<include
refid=
"Batch_Insert_Values"
/>
</trim>
</foreach>
</insert>
<insert
id=
"batchInsertOnDuplicateKey"
parameterType=
"java.util.Map"
>
insert into
<include
refid=
"Table_Name"
/>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<include
refid=
"Base_Column_List"
/>
</trim>
values
<foreach
collection=
"records"
item=
"record"
index=
"index"
separator=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<include
refid=
"Batch_Insert_Values_On_DuplicateKey"
/>
</trim>
</foreach>
ON DUPLICATE KEY UPDATE
id = VALUES(id) , version = VALUES(version)
</insert>
<!-- end insert -->
<!-- delete -->
<delete
id=
"deleteById"
parameterType=
"java.util.Map"
>
delete from
<include
refid=
"Table_Name"
/>
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"java.util.Map"
>
delete from
<include
refid=
"Table_Name"
/>
<if
test=
"example != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<delete
id=
"deleteIn"
parameterType=
"java.util.Map"
>
delete from
<include
refid=
"Table_Name"
/>
where id in
<foreach
collection=
"records"
item=
"record"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{record.id,jdbcType=BIGINT}
</foreach>
</delete>
<!-- end delete -->
<!-- update -->
<update
id=
"updateById"
parameterType=
"java.util.Map"
>
update
<include
refid=
"Table_Name"
/>
<set>
<include
refid=
"Update_Set_From_Bean"
/>
</set>
where id = #{record.id,jdbcType=BIGINT}
</update>
<update
id=
"updateByExample"
parameterType=
"java.util.Map"
>
update
<include
refid=
"Table_Name"
/>
<set>
<include
refid=
"Update_Set_From_Bean"
/>
</set>
<if
test=
"example != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</update>
<update
id=
"batchUpdate"
parameterType=
"java.util.Map"
>
<foreach
collection=
"records"
item=
"record"
index=
"index"
open=
""
close=
""
separator=
";"
>
update
<include
refid=
"Table_Name"
/>
<set>
<include
refid=
"Update_Set_From_Bean"
/>
</set>
where id=#{record.id,jdbcType=BIGINT}
</foreach>
</update>
<!-- end update -->
<!-- select -->
<select
id=
"selectById"
resultMap=
"SolidityVersionMap"
parameterType=
"java.util.Map"
>
select
<include
refid=
"Base_Column_List"
/>
from
<include
refid=
"Table_Name"
/>
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"selectByExample"
resultMap=
"SolidityVersionMap"
parameterType=
"java.util.Map"
>
select
<if
test=
"example != null and example.distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from
<include
refid=
"Table_Name"
/>
<if
test=
"example != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"example != null and example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectOneByExample"
resultMap=
"SolidityVersionMap"
parameterType=
"java.util.Map"
>
select
<include
refid=
"Base_Column_List"
/>
from
<include
refid=
"Table_Name"
/>
<if
test=
"example != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
limit 1
</select>
<select
id=
"selectIn"
resultMap=
"SolidityVersionMap"
parameterType=
"java.util.Map"
>
select
<include
refid=
"Base_Column_List"
/>
from
<include
refid=
"Table_Name"
/>
where id IN
<foreach
collection=
"records"
item=
"record"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{record.id,jdbcType=BIGINT}
</foreach>
</select>
<select
id=
"countByExample"
resultType=
"java.lang.Integer"
parameterType=
"java.util.Map"
>
select count(*) as total from
<include
refid=
"Table_Name"
/>
<if
test=
"example != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<select
id=
"countByPager"
resultType=
"java.lang.Integer"
parameterType=
"java.util.Map"
>
select count(*) as total from
<include
refid=
"Table_Name"
/>
<if
test=
"example != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<select
id=
"selectByPager"
resultMap=
"SolidityVersionMap"
parameterType=
"java.util.Map"
>
select
<include
refid=
"Base_Column_List"
/>
from
<include
refid=
"Table_Name"
/>
<if
test=
"example != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"pager.sortItem != null and pager.sortItem != '' "
>
order by ${pager.sortItem} ${pager.sortType}
</if>
limit #{pager.startIndex} , #{pager.pageSize}
</select>
<!-- end select -->
<!-- My Custom Interfaces -->
</mapper>
src/test/java/com/wuban/tron/explore/service/impl/ContractComp
li
erServiceImplTest.java
→
src/test/java/com/wuban/tron/explore/service/impl/ContractComp
il
erServiceImplTest.java
View file @
46768dc1
package
com
.
wuban
.
tron
.
explore
.
service
.
impl
;
package
com
.
wuban
.
tron
.
explore
.
service
.
impl
;
import
com.wuban.tron.explore.BaseTest
;
import
com.wuban.tron.explore.BaseTest
;
import
com.wuban.tron.explore.service.ContractComp
li
erService
;
import
com.wuban.tron.explore.service.ContractComp
il
erService
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
class
ContractComp
li
erServiceImplTest
extends
BaseTest
{
class
ContractComp
il
erServiceImplTest
extends
BaseTest
{
@Autowired
@Autowired
private
ContractComp
li
erService
contractComplierService
;
private
ContractComp
il
erService
contractComplierService
;
@BeforeEach
@BeforeEach
void
setUp
()
{
void
setUp
()
{
}
}
@Test
@Test
void
comp
li
er
()
{
void
comp
il
er
()
{
String
name
=
"Storage2"
;
String
name
=
"Storage2"
;
String
comp
li
er
=
"solidity0.4.25+commit"
;
String
comp
il
er
=
"solidity0.4.25+commit"
;
String
value
=
"pragma solidity ^0.4.25;\n"
+
String
value
=
"pragma solidity ^0.4.25;\n"
+
"\n"
+
"\n"
+
"contract Storage2 {\n"
+
"contract Storage2 {\n"
+
...
@@ -42,8 +42,8 @@ class ContractComplierServiceImplTest extends BaseTest {
...
@@ -42,8 +42,8 @@ class ContractComplierServiceImplTest extends BaseTest {
" pos0 = val;\n"
+
" pos0 = val;\n"
+
" }\n"
+
" }\n"
+
"}"
;
"}"
;
String
str
=
this
.
contractComplierService
.
comp
lier
(
name
,
value
,
compli
er
);
String
str
=
this
.
contractComplierService
.
comp
iler
(
name
,
value
,
compil
er
);
System
.
out
.
println
(
"*************"
+
str
);
System
.
out
.
println
(
str
);
}
}
}
}
\ No newline at end of file
tron-explore.sql
View file @
46768dc1
...
@@ -4,7 +4,7 @@ Navicat MySQL Data Transfer
...
@@ -4,7 +4,7 @@ Navicat MySQL Data Transfer
Source Server : 123.56.5.114.master
Source Server : 123.56.5.114.master
Source Server Version : 50731
Source Server Version : 50731
Source Host : 123.56.5.114:13306
Source Host : 123.56.5.114:13306
Source Database : t
est_tron
Source Database : t
ron-explore
Target Server Type : MYSQL
Target Server Type : MYSQL
Target Server Version : 50731
Target Server Version : 50731
...
...
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