Norrent’s web3 footprint
Home
Archive
Categories
Norrent Yu
Article
7
Category
5
Tags
9
Home
Archive
Categories
Data
Crypto Data Analysis (1): Txs, Traces, Logs
Post on: Oct 23, 2024
Last edited: Oct 24, 2024
Views
Notes
Data analysis
type
status
date
slug
summary
tags
category
icon
password

Txs, Traces, Logs

 

本文为作者的学习笔记,参考资料⬇ https://read.cryptodatabytes.com/p/how-to-understand-transactions-traces

Transactions:Etherscan(dune中为ethereum.transactions)

  1. Transaction Hash:是以下所有变量放在一起的哈希值,是该tx唯一的标识
  1. Status:包括<Failed>, <Cancelled>, <Dropped>, <Replaced>
  1. Block:包含该tx的区块号码
  1. Timestamp:略
  1. From:签署tx的账户地址
  1. To:目标合约的地址(可以是合约地址或EOA地址,如果该合约是contract depolyer就为空)
  1. Value:从“From”地址转出的ETH数量,该ETH的接收者只能通过Internal txs(traces)来查询
  1. Transaction Fee:=(gas used * gas price) / 1e18 执行该交易所交的gas费(如果是L2,这个字段会有所不同,比如Arb上叫Effective Price
  1. Gas Price:每单位gas的价格
  1. Gas Limit:这笔tx最多能消耗的gas unit数量,如果tx消耗的gas unit超出Gas Limit,那么交易将失败(且这笔失败的交易的gas费将不能返还
  1. Usage by Tx:实际消耗的gas unit数量(不超出gas limit)
  1. Gas Fees:
    1. Base fee,所在的区块内的交易所需的base fee(被销毁)
      Max fee,这笔交易用户所能提供的最大费用
      Max Priority,用户能提供的最大小费,不包含base fee(给矿工)
      即用户最终提交的是 Base + Priority,Base被销毁,Priority给矿工
  1. Tx Type:1是在EIP-1559前的交易,2是1559后的交易
  1. Nonce:钱包的每一笔交易必须要有不同的Nonce
  1. Position In Block:在区块内该交易的执行排序
  1. Input data
    1. 如果是EOA和EOA之间的交易,Input data就像一个message。如果”to“地址是合约地址,那Input data就代表被调用的合约中的某个被调用的函数。此时Input Data的前8个字符是函数签名
      notion image

Event Logs:Etherscan(Dune中为ethereum.logs)

Topics:
topic 0:32bytes,类似于函数签名
topic1 & topic2:更快的导出参数名和参数值(参数值用hex表示)
Data: 其它没有在合约中被标为indexed的参数名和参数值
左上角的28是事件在整个块中的index
左上角的28是事件在整个块中的index

Traces (Dune中为ethereum.traces)

Trace的类型:
  • CREATE:this is a trace emitted when a new contract is deployed.
    • Check out the ethereum.creation_traces table for a simpler view of these.
  • DELEGATECALL:委托调用,一般在分析trace时会被忽略
  • CALL:this is the most common trace.可以是调用函数,也可以是transfer ETH
  • STATICCALL:这是一个不修改任何状态的函数调用。像预言机价格反馈、AMM 价格计算、清算比率检查、余额检查等都发生在静态调用中。通常为view和pure函数
Trace可以在phalcon blocksec中查看:https://app.blocksec.com/explorer
notion image
 
  • Author:Norrent Yu
  • URL:http://blog.transnature.top/post/transactions-traces-logs
  • Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts
MEV
读书笔记:创新者的窘境
meme KOL合订本:@Michael_Liu93DEX概览(2):AMM机制上的优化
Loading...
Catalog
0%
Txs, Traces, LogsTransactions:Etherscan(dune中为ethereum.transactions)Event Logs:Etherscan(Dune中为ethereum.logs)Traces (Dune中为ethereum.traces)
Norrent Yu
Norrent Yu
Norrent’s web3 footprint
Article
7
Category
5
Tags
9
Latest posts
meme KOL合订本:@Michael_Liu93
meme KOL合订本:@Michael_Liu93
Nov 17, 2024
Crypto Data Analysis (1): Txs, Traces, Logs
Crypto Data Analysis (1): Txs, Traces, Logs
Oct 24, 2024
无处不在的洗米
无处不在的洗米
Oct 21, 2024
读书笔记:创新者的窘境
读书笔记:创新者的窘境
Oct 21, 2024
MEV
MEV
Oct 21, 2024
DEX概览(1):AMM原理
DEX概览(1):AMM原理
Oct 21, 2024
Catalog
0%
Txs, Traces, LogsTransactions:Etherscan(dune中为ethereum.transactions)Event Logs:Etherscan(Dune中为ethereum.logs)Traces (Dune中为ethereum.traces)
2024-2025 Norrent Yu.

Norrent’s web3 footprint | Norrent’s web3 footprint

Powered by NotionNext 4.7.3.