-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(BIDS-2535) cleanup method names replacement #2623
Conversation
handlers/eth1Block.go
Outdated
txs = append(txs, types.Eth1BlockPageTransaction{ | ||
Hash: fmt.Sprintf("%#x", tx.Hash), | ||
HashFormatted: utils.FormatAddressWithLimits(tx.Hash, "", false, "tx", 15, 18, true), | ||
From: fmt.Sprintf("%#x", tx.From), | ||
FromFormatted: utils.FormatAddressWithLimits(tx.From, names[string(tx.From)], false, "address", 15, 20, true), | ||
To: fmt.Sprintf("%#x", tx.To), | ||
ToFormatted: utils.FormatAddressWithLimits(tx.To, names[string(tx.To)], names[string(tx.To)] == "Contract Creation" || len(method) > 0, "address", 15, 20, true), | ||
ToFormatted: utils.FormatAddressWithLimits(tx.To, names[string(tx.To)], tx.GetInvokesContract(), "address", 15, 20, true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes the contract symbol to disappear for "Contract Creation".
Is this intended? Personally I don't think it is as the contract symbol is shown in the same case here:
eth2-beaconchain-explorer/db/bigtable_eth1.go
Line 2150 in 929fbe8
to := utils.FormatAddress(t.To, nil, toName, false, t.IsContractCreation || t.InvokesContract, !bytes.Equal(t.To, address)) |
The same applies to
utils.FormatAddressWithLimits(v.GetTo(), names[string(v.GetTo())], v.GetInvokesContract(), "address", 15, 20, true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, this was not intended. A lot has changed with the new approach, I think it should be correct now
0d5b7d6
to
4642450
Compare
4642450
to
27e9233
Compare
This PR is based on #2618
🤖 Generated by Copilot at 929fbe8
This pull request enhances the support for contract creation and invocation transactions in the eth2-beaconchain-explorer. It improves the data handling, display, and formatting of these transactions in the
bigtable_eth1
,handlers
, andrpc
packages, and adds a new fieldinvokes_contract
to theTransaction
message in theeth1.proto
file.