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
ae8abf9c
Commit
ae8abf9c
authored
Jun 02, 2023
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add print log
parent
97334fd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
partlyRelatedCase.go
operator/partlyRelatedCase.go
+4
-4
No files found.
operator/partlyRelatedCase.go
View file @
ae8abf9c
...
...
@@ -1068,7 +1068,7 @@ func PrReOneErc20TranCase(txCount int, testAccArr *tool.AccArrFormat, contractMa
log
.
Error
(
"Get erc20 balanceOf error:"
,
err
.
Error
())
return
nil
,
nil
}
log
.
Infof
(
"ERC20 Before to addr:%s,toBal:"
,
testAccArr
.
ToAddr
[
i
]
.
Hex
(),
toBal
.
String
())
log
.
Infof
(
"ERC20 Before to addr:%s,toBal:
%s
"
,
testAccArr
.
ToAddr
[
i
]
.
Hex
(),
toBal
.
String
())
beforeAddrErc20Bal
[
testAccArr
.
ToAddr
[
i
]]
=
toBal
fromBal
,
err
:=
erc20Contract
.
BalanceOf
(
&
bind
.
CallOpts
{},
testAccArr
.
FromAddr
[
i
])
...
...
@@ -1076,7 +1076,7 @@ func PrReOneErc20TranCase(txCount int, testAccArr *tool.AccArrFormat, contractMa
log
.
Error
(
"Get erc20 balanceOf error:"
,
err
.
Error
())
return
nil
,
nil
}
log
.
Infof
(
"ERC20 Before from addr:%s,fromBal:"
,
testAccArr
.
FromAddr
[
i
]
.
Hex
(),
fromBal
.
String
())
log
.
Infof
(
"ERC20 Before from addr:%s,fromBal:
%s
"
,
testAccArr
.
FromAddr
[
i
]
.
Hex
(),
fromBal
.
String
())
beforeAddrErc20Bal
[
testAccArr
.
FromAddr
[
i
]]
=
fromBal
oneErc20Trade
.
ToAddr
=
[]
common
.
Address
{
testAccArr
.
ToAddr
[
i
]}
...
...
@@ -1104,13 +1104,13 @@ func PrReOneErc20TranCase(txCount int, testAccArr *tool.AccArrFormat, contractMa
log
.
Error
(
"Get erc20 balanceOf error:"
,
err
.
Error
())
res
=
false
}
log
.
Infof
(
"ERC20 After to addr:%s,toBal:"
,
testAccArr
.
ToAddr
[
i
]
.
Hex
(),
to
.
String
())
log
.
Infof
(
"ERC20 After to addr:%s,toBal:
%s
"
,
testAccArr
.
ToAddr
[
i
]
.
Hex
(),
to
.
String
())
if
to
.
Sub
(
to
,
beforeAddrErc20Bal
[
testAccArr
.
ToAddr
[
i
]])
.
Cmp
(
amount
)
!=
0
{
res
=
false
}
from
,
err
:=
erc20Contract
.
BalanceOf
(
&
bind
.
CallOpts
{},
testAccArr
.
FromAddr
[
i
])
log
.
Infof
(
"ERC20 After to addr:%s,fromBal:"
,
testAccArr
.
FromAddr
[
i
]
.
Hex
(),
from
.
String
())
log
.
Infof
(
"ERC20 After to addr:%s,fromBal:
%s
"
,
testAccArr
.
FromAddr
[
i
]
.
Hex
(),
from
.
String
())
if
err
!=
nil
{
log
.
Error
(
"Get erc20 balanceOf error:"
,
err
.
Error
())
res
=
false
...
...
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