-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add transaction state changes feature #5944
Conversation
import Ecto.Changeset | ||
import Ecto.Query, only: [from: 2] | ||
|
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.
These are imported by use Explorer.Schema
blockscout/apps/explorer/lib/explorer/schema.ex
Lines 4 to 12 in e23653f
defmacro __using__(_opts) do | |
quote do | |
use Ecto.Schema | |
import Ecto.{Changeset, Query} | |
@timestamps_opts [type: :utc_datetime_usec] | |
end | |
end |
a4c2142
to
3555c30
Compare
e89eb6c
to
b7fc5ee
Compare
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.
@sl1depengwyn when I click to any tx's tab except State changes
scroll jumps to tab's content. It would be awesome to keep the same behaviour for State changes
tab as well.
@sl1depengwyn also, what is the order of state changes? |
@sl1depengwyn tx failed, but state change asserting transfer of the coin value, what is incorrect: |
first 3 entries are coin from, to and miner and then all token transfers changes, token transfers changes unordered since stored in Map, but grouped by address |
5284458
to
8950feb
Compare
fixed |
fixed |
8950feb
to
28c9562
Compare
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.
@sl1depengwyn 1 test failed:
1) test GET index/3 returns fetched state changes for the transaction with token transfer (BlockScoutWeb.TransactionStateControllerTest)
Error: test/block_scout_web/controllers/transaction_state_controller_test.exs:33
Expected truthy, got false
code: assert String.contains?(full_text, format_wei_value(%Wei{value: Decimal.new(1, 2, 18)}, :ether))
arguments:
55c5e20
to
0fdcb9f
Compare
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
308aa86
to
2805de6
Compare
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
2805de6
to
d306fb9
Compare
d306fb9
to
5be00aa
Compare
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Outdated
Show resolved
Hide resolved
apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex
Show resolved
Hide resolved
5be00aa
to
197c744
Compare
c9a42dc
to
9614c38
Compare
6323f0a
to
60f97d0
Compare
50dab80
to
1938e28
Compare
1938e28
to
94aa545
Compare
94aa545
to
476ad76
Compare
Refactor Add scrolling Fix displaying txs with errors Fix nikitosings review Update gettext Fix tests after accounts merge Fix after accounts merge
- Fix displaying same entries (i.e. when sender or receiver of tx is a miner of this tx itself) - Sort entries to group it by address
476ad76
to
ab13f77
Compare
* Show balance changes in transaction page Refactor Add scrolling Fix displaying txs with errors Fix nikitosings review Update gettext Fix tests after accounts merge Fix after accounts merge * Fix review issues - Fix displaying same entries (i.e. when sender or receiver of tx is a miner of this tx itself) - Sort entries to group it by address Co-authored-by: Viktor Baranov <baranov.viktor.27@gmail.com> (cherry picked from commit ecf3c98)
#5583
#6288
Changelog
Add tab with state changes to transaction page that show how balances changed. Some examlpes below:
In case of multiple transfers of unique tokens of the same contranct all of them diaplayed in one change
Here balance of contract(0x09C131) is unknown, so it isn't displayed
Checklist for your Pull Request (PR)
CHANGELOG.md
with this PRmaster
in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.