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
58fdecea
Commit
58fdecea
authored
Apr 24, 2023
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
six commit
parent
ccaf3350
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
app.json
config/app.json
+1
-1
operator.go
operator/operator.go
+12
-12
No files found.
config/app.json
View file @
58fdecea
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
"goRoutine"
:
1
,
"goRoutine"
:
1
,
"generateAccCount"
:
500
,
"generateAccCount"
:
500
,
"isDeployContract"
:
false
,
"isDeployContract"
:
false
,
"isInitAccountBalance"
:
fals
e
,
"isInitAccountBalance"
:
tru
e
,
"startTokenId"
:
1
,
"startTokenId"
:
1
,
"endTokenId"
:
100
,
"endTokenId"
:
100
,
"transferType"
:
[]
"transferType"
:
[]
...
...
operator/operator.go
View file @
58fdecea
...
@@ -285,22 +285,22 @@ func InitCaseAccount(client *ethclient.Client, txArr []*types.Transaction) []*ty
...
@@ -285,22 +285,22 @@ func InitCaseAccount(client *ethclient.Client, txArr []*types.Transaction) []*ty
auth
.
NoSend
=
true
auth
.
NoSend
=
true
amount
:=
big
.
NewInt
(
0
)
amount
:=
big
.
NewInt
(
0
)
amount
.
SetString
(
"10000000000000000000"
,
10
)
amount
.
SetString
(
"10000000000000000000"
,
10
)
trade
:=
&
coin
.
Trade
{
//
trade := &coin.Trade{
FromPrv
:
tool
.
Cfg
.
DeployPrv
,
//
FromPrv: tool.Cfg.DeployPrv,
FromNonce
:
big
.
NewInt
(
int64
(
nonce
)),
//
FromNonce: big.NewInt(int64(nonce)),
Amount
:
amount
,
//
Amount: amount,
Gas
:
big
.
NewInt
(
50000
),
//
Gas: big.NewInt(50000),
GasPrice
:
big
.
NewInt
(
1000000000
),
//
GasPrice: big.NewInt(1000000000),
ChainId
:
tool
.
Cfg
.
ChainId
,
//
ChainId: tool.Cfg.ChainId,
}
//
}
contractMap
:=
tool
.
ParseContractConfig
(
"./config/contractConfig.json"
)
contractMap
:=
tool
.
ParseContractConfig
(
"./config/contractConfig.json"
)
contractLen
:=
len
(
contractMap
)
contractLen
:=
len
(
contractMap
)
//初始化From账户-500tx
//初始化From账户-500tx
coinTxArr
,
nonce
:=
InitAccountCoin
(
txArr
,
nonce
,
amount
,
accArr
)
//
coinTxArr, nonce := InitAccountCoin(txArr, nonce, amount, accArr)
txArr
=
append
(
txArr
,
coinTxArr
...
)
//
txArr = append(txArr, coinTxArr...)
//初始化转账合约账户余额-10tx
//初始化转账合约账户余额-10tx
contractCoinTxArr
,
nonce
:=
InitContractCoin
(
txArr
,
nonce
,
contractLen
,
contractMap
,
trade
)
//
contractCoinTxArr, nonce := InitContractCoin(txArr, nonce, contractLen, contractMap, trade)
txArr
=
append
(
txArr
,
contractCoinTxArr
...
)
//
txArr = append(txArr, contractCoinTxArr...)
//// 初始化erc20 并且mint
//// 初始化erc20 并且mint
erc20TxArr
,
nonce
:=
InitErc20Acc
(
txArr
,
nonce
,
contractLen
,
contractMap
,
accArr
,
client
,
auth
)
erc20TxArr
,
nonce
:=
InitErc20Acc
(
txArr
,
nonce
,
contractLen
,
contractMap
,
accArr
,
client
,
auth
)
txArr
=
append
(
txArr
,
erc20TxArr
...
)
txArr
=
append
(
txArr
,
erc20TxArr
...
)
...
...
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