Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
contract-case
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
duanjinfei
contract-case
Commits
8026f4a8
Commit
8026f4a8
authored
May 22, 2023
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add get acc balance key
parent
6b67abbf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
3 deletions
+10
-3
app.json
config/app.json
+2
-1
main.go
main.go
+3
-1
noRelatedCase.go
operator/noRelatedCase.go
+1
-0
operator.go
operator/operator.go
+1
-1
Config.go
tool/Config.go
+3
-0
No files found.
config/app.json
View file @
8026f4a8
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
"startTokenId"
:
1
,
"startTokenId"
:
1
,
"endTokenId"
:
100
,
"endTokenId"
:
100
,
"accStartIndex"
:
0
,
"accStartIndex"
:
0
,
"sendTranAfterSleep"
:
60
,
"sendTranAfterSleep"
:
120
,
"isGetAccBalance"
:
false
,
"transferType"
:
[]
"transferType"
:
[]
}
}
...
...
main.go
View file @
8026f4a8
...
@@ -48,5 +48,7 @@ func main() {
...
@@ -48,5 +48,7 @@ func main() {
}
}
}
}
util
.
GetAccountBalance
(
tool
.
Cfg
.
RpcNode
)
if
tool
.
Cfg
.
IsGetAccBalance
{
util
.
GetAccountBalance
(
tool
.
Cfg
.
RpcNode
)
}
}
}
operator/noRelatedCase.go
View file @
8026f4a8
...
@@ -650,6 +650,7 @@ func NrOneErc721TranCase(startIndex int, txCount int, testAccArr *tool.AccArrFor
...
@@ -650,6 +650,7 @@ func NrOneErc721TranCase(startIndex int, txCount int, testAccArr *tool.AccArrFor
return
nil
,
nil
return
nil
,
nil
}
}
log
.
Info
(
"Erc721OneTransferFromSignTx tx:"
,
tx
.
Hash
()
.
Hex
())
log
.
Info
(
"Erc721OneTransferFromSignTx tx:"
,
tx
.
Hash
()
.
Hex
())
startIndex
++
resTxArr
=
append
(
resTxArr
,
tx
)
resTxArr
=
append
(
resTxArr
,
tx
)
}
}
verify
:=
func
()
bool
{
verify
:=
func
()
bool
{
...
...
operator/operator.go
View file @
8026f4a8
...
@@ -410,7 +410,7 @@ func GetTranFunc(caseType int, startIndex int, txCount int, nonceMap *sync.Map,
...
@@ -410,7 +410,7 @@ func GetTranFunc(caseType int, startIndex int, txCount int, nonceMap *sync.Map,
// 部分相关-合约转账-发送者相关-不同账户调用同一个合约给不同的账户进行转账
// 部分相关-合约转账-发送者相关-不同账户调用同一个合约给不同的账户进行转账
case
15
:
case
15
:
{
{
return
PrSpContractCoinTranCase
(
txCount
,
arr
,
contractArr
[
0
],
nonceMap
,
txArr
,
client
)
return
PrSpContractCoinTranCase
(
txCount
,
arr
,
contractArr
[
3
],
nonceMap
,
txArr
,
client
)
}
}
// 部分相关-合约转账-发送者接受者相关
// 部分相关-合约转账-发送者接受者相关
case
16
:
case
16
:
...
...
tool/Config.go
View file @
8026f4a8
...
@@ -29,6 +29,7 @@ type ConfigJson struct {
...
@@ -29,6 +29,7 @@ type ConfigJson struct {
IsInitErc721
bool
`json:"isInitErc721"`
IsInitErc721
bool
`json:"isInitErc721"`
AccStartIndex
int
`json:"accStartIndex"`
AccStartIndex
int
`json:"accStartIndex"`
SendTranAfterSleep
int
`json:"sendTranAfterSleep"`
SendTranAfterSleep
int
`json:"sendTranAfterSleep"`
IsGetAccBalance
bool
`json:"isGetAccBalance"`
}
}
type
Config
struct
{
type
Config
struct
{
...
@@ -48,6 +49,7 @@ type Config struct {
...
@@ -48,6 +49,7 @@ type Config struct {
ContractMap
[]
map
[
string
]
common
.
Address
ContractMap
[]
map
[
string
]
common
.
Address
AccStartIndex
int
AccStartIndex
int
SendTranAfterSleep
int
SendTranAfterSleep
int
IsGetAccBalance
bool
}
}
type
AccArr
struct
{
type
AccArr
struct
{
...
@@ -114,6 +116,7 @@ func ParseConfig(path string) {
...
@@ -114,6 +116,7 @@ func ParseConfig(path string) {
ContractMap
:
ParseContractConfig
(
"./config/contractConfig.json"
),
ContractMap
:
ParseContractConfig
(
"./config/contractConfig.json"
),
AccStartIndex
:
cfgJson
.
AccStartIndex
,
AccStartIndex
:
cfgJson
.
AccStartIndex
,
SendTranAfterSleep
:
cfgJson
.
SendTranAfterSleep
,
SendTranAfterSleep
:
cfgJson
.
SendTranAfterSleep
,
IsGetAccBalance
:
cfgJson
.
IsGetAccBalance
,
}
}
}
}
...
...
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