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
1469fae6
Commit
1469fae6
authored
May 18, 2023
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change acc start index and send tran after sleep time
parent
a16e1e29
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
2 deletions
+10
-2
app.json
config/app.json
+2
-0
main.go
main.go
+1
-1
operator.go
operator/operator.go
+1
-1
Config.go
tool/Config.go
+6
-0
No files found.
config/app.json
View file @
1469fae6
...
...
@@ -18,6 +18,8 @@
"isInitErc721"
:
false
,
"startTokenId"
:
1
,
"endTokenId"
:
100
,
"accStartIndex"
:
0
,
"sendTranAfterSleep"
:
60
,
"transferType"
:
[]
}
...
...
main.go
View file @
1469fae6
...
...
@@ -25,7 +25,7 @@ func main() {
// 转账交易case
if
len
(
tool
.
Cfg
.
TransferType
)
!=
0
{
accIndex
:=
0
accIndex
:=
tool
.
Cfg
.
AccStartIndex
nonceMap
:=
util
.
GetAccountNonce
(
tool
.
Cfg
.
RpcNode
)
arrFormat
:=
tool
.
ParseAccountConfig
(
"./config/account.json"
)
parseContractConfig
:=
tool
.
ParseContractConfig
(
"./config/contractConfig.json"
)
...
...
operator/operator.go
View file @
1469fae6
...
...
@@ -519,6 +519,6 @@ func SendTransaction(trans []*types.Transaction) {
}
log
.
Info
(
"Input count:"
,
i
)
}
time
.
Sleep
(
time
.
Second
*
60
)
time
.
Sleep
(
time
.
Second
*
time
.
Duration
(
tool
.
Cfg
.
SendTranAfterSleep
)
)
log
.
Info
(
"Send tran successful"
)
}
tool/Config.go
View file @
1469fae6
...
...
@@ -27,6 +27,8 @@ type ConfigJson struct {
IsInitErc20
bool
`json:"isInitErc20"`
IsInitErc721Mint
bool
`json:"isInitErc721Mint"`
IsInitErc721
bool
`json:"isInitErc721"`
AccStartIndex
int
`json:"accStartIndex"`
SendTranAfterSleep
int
`json:"sendTranAfterSleep"`
}
type
Config
struct
{
...
...
@@ -44,6 +46,8 @@ type Config struct {
IsInitErc721Mint
bool
IsInitErc721
bool
ContractMap
[]
map
[
string
]
common
.
Address
AccStartIndex
int
SendTranAfterSleep
int
}
type
AccArr
struct
{
...
...
@@ -108,6 +112,8 @@ func ParseConfig(path string) {
IsInitErc721Mint
:
cfgJson
.
IsInitErc721Mint
,
IsInitErc721
:
cfgJson
.
IsInitErc721
,
ContractMap
:
ParseContractConfig
(
"./config/contractConfig.json"
),
AccStartIndex
:
cfgJson
.
AccStartIndex
,
SendTranAfterSleep
:
cfgJson
.
SendTranAfterSleep
,
}
}
...
...
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