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
a16e1e29
Commit
a16e1e29
authored
May 18, 2023
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add print log
parent
0f3a364c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
contract_util.go
util/contract_util.go
+6
-3
No files found.
util/contract_util.go
View file @
a16e1e29
...
...
@@ -50,9 +50,12 @@ func GetTxReceipt(client *ethclient.Client, txArr []*types.Transaction) {
log
.
Error
(
"Get tran receipt err:"
,
err
)
return
}
if
receipt
.
Status
==
0
||
receipt
.
GasUsed
==
0
{
log
.
Error
(
"tx value:"
,
tx
.
Value
())
log
.
Error
(
"Receipt Tx Hash:"
,
receipt
.
TxHash
)
if
receipt
.
Status
==
0
{
log
.
Error
(
"Tx failed tx value:"
,
tx
.
Value
())
log
.
Error
(
"Tx failed Receipt Tx Hash:"
,
receipt
.
TxHash
)
}
else
if
receipt
.
GasUsed
==
0
{
log
.
Error
(
"GasUsed zero tx value:"
,
tx
.
Value
())
log
.
Error
(
"GasUsed zero Receipt Tx Hash:"
,
receipt
.
TxHash
)
}
else
{
log
.
Infof
(
"Receipt: status: %d,gasUsed: %d"
,
receipt
.
Status
,
receipt
.
GasUsed
)
}
...
...
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