Skip to content
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

Improve displaying events #651

Merged
merged 6 commits into from
Jul 5, 2023
Merged

Improve displaying events #651

merged 6 commits into from
Jul 5, 2023

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Jul 3, 2023

@lukaw3d lukaw3d requested review from buberdds, csillag and donouwens July 3, 2023 22:38
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Deployed to Cloudflare Pages

Latest commit: 1b1c63c2ca6158833bd7739757145ee3d9c2bea6
Status:✅ Deploy successful!
Preview URL: https://9a75f87e.oasis-explorer.pages.dev

@lukaw3d lukaw3d force-pushed the lw/improve-events branch from aa96308 to 30885f5 Compare July 3, 2023 22:40
src/app/pages/TransactionDetailPage/index.tsx Outdated Show resolved Hide resolved
Comment on lines 523 to 667
evm_log_name: '',
round: 4172573,
tx_hash: '8fd925514dd66f7cb70211b09f887883849bdadb54be079370d391dfc4b045b6',
tx_index: 1,
type: 'evm.log',
},
{
body: {
address: 'MiPxeVe6UCy+cUAdVaDbJuX3xo8=',
data: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABTpIK9GPCA=',
topics: [
'3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=',
'AAAAAAAAAAAAAAAAfZOVwJqysax0FxWNV7RHIuLm8Sw=',
'AAAAAAAAAAAAAAAAKMnT5om102Ka/C1p72onmVeFdOA=',
],
},
eth_tx_hash: '16931dc7ee192ce76ba4cf8c92bc08cfd384b3b96b0db8fa77c573a9a31db9fc',
evm_log_name: 'Transfer',
evm_log_params: [
{
evm_type: 'address',
name: 'from',
value: '0x7d9395c09ab2b1ac7417158d57b44722e2e6f12c',
},
{
evm_type: 'address',
name: 'to',
value: '0x28c9d3e689b5d3629afc2d69ef6a2799578574e0',
},
{
evm_type: 'uint256',
name: 'value',
value: '5885826123054112',
},
],
round: 4172585,
tx_hash: '3d16c34f45ea746a28f677dfeb5763cf930f003e513d2b6f91f87e6355a63c52',
tx_index: 0,
type: 'evm.log',
},
{
body: {
amount: { Amount: '100000000000000000', Denomination: '' },
from: 'oasis1qqn5lhdlq7t730qyrsxj4ph4a8xnhwjtcs87fmrd',
to: 'oasis1qr677rv0dcnh7ys4yanlynysvnjtk9gnsyhvm6ln',
},
evm_log_name: '',
round: 4172571,
tx_hash: '800651c7af2f5f14539c57d745fe9775ba889154eb1f9c775bff0c47c9ff9c3d',
tx_index: 0,
type: 'accounts.transfer',
},
{
body: {
amount: { Amount: '100000000000000000', Denomination: '' },
owner: 'oasis1qqn5lhdlq7t730qyrsxj4ph4a8xnhwjtcs87fmrd',
},
evm_log_name: '',
round: 4172585,
tx_hash: null,
type: 'accounts.mint',
},
{
body: {
amount: { Amount: '100000000000000000', Denomination: '' },
owner: 'oasis1qr677rv0dcnh7ys4yanlynysvnjtk9gnsyhvm6ln',
},
evm_log_name: '',
round: 4172572,
tx_hash: null,
type: 'accounts.burn',
},
{
body: {
amount: { Amount: '100000000000000000', Denomination: '' },
from: 'oasis1qzypxmt5xg8039329zvre7hxe7kn0vxfugsknqtw',
nonce: 14178,
to: 'oasis1qqn5lhdlq7t730qyrsxj4ph4a8xnhwjtcs87fmrd',
},
evm_log_name: '',
round: 4172585,
tx_hash: null,
type: 'consensus_accounts.deposit',
},
{
body: {
amount: { Amount: '100000000000000000', Denomination: '' },
from: 'oasis1qqn5lhdlq7t730qyrsxj4ph4a8xnhwjtcs87fmrd',
nonce: 12796,
to: 'oasis1qzypxmt5xg8039329zvre7hxe7kn0vxfugsknqtw',
},
evm_log_name: '',
round: 4172572,
tx_hash: null,
type: 'consensus_accounts.withdraw',
},
],
is_total_count_clipped: false,
total_count: 7,
} as any
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(temporary data to demo all event types)

@lukaw3d
Copy link
Member Author

lukaw3d commented Jul 4, 2023

For reference, from Don:

  1. We don’t want to show any raw code? If we, I’d probably place it in an accordion.
  2. Do you think it would be possible to add iconography to the event type?
  3. Mobile layout

  1. raw bytes next to parsed events probably aren't useful at all, and might be confusing
  2. TODO: will try to reuse TokenTransferIcon
  3. TODO

@csillag
Copy link
Contributor

csillag commented Jul 5, 2023

For reference, from Don:

  1. We don’t want to show any raw code? If we, I’d probably place it in an accordion.

  2. Do you think it would be possible to add iconography to the event type?

  3. Mobile layout

  4. raw bytes next to parsed events probably aren't useful at all, and might be confusing

  5. TODO: will try to reuse TokenTransferIcon

  6. TODO

Is the plan to cover the TODO items in this same PR, or in a subsequent one?

Copy link
Contributor

@csillag csillag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, LGTM, except the linting errors.

(And I'm not sure if we want to leave in the debug data)

@lukaw3d lukaw3d force-pushed the lw/improve-events branch from 30885f5 to 1b1c63c Compare July 5, 2023 10:27
@lukaw3d
Copy link
Member Author

lukaw3d commented Jul 5, 2023

I'll rather merge this and make a separate PR

@lukaw3d lukaw3d enabled auto-merge July 5, 2023 10:28
@lukaw3d
Copy link
Member Author

lukaw3d commented Jul 5, 2023

(without debug data)

@lukaw3d lukaw3d merged commit c468fe9 into master Jul 5, 2023
@lukaw3d lukaw3d deleted the lw/improve-events branch July 5, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants