交易数据结构
交易數(shù)據(jù)詳情
傳統(tǒng)交易
交易詳情:
blockHash: 當(dāng)前交易的區(qū)塊hash blockNumber: 區(qū)塊高度 from:交易發(fā)起方
gas: 當(dāng)前交易花費的gas gasPrice:gas價格(gwei) hash: 交易hash
input: 附加信息 nonce: from賬戶發(fā)起交易的總數(shù)
to:交易接收方 value: 交易金額(wei)
transactionIndex:當(dāng)前交易在這個區(qū)塊的的打包順序,從0開始計數(shù)
type:交易類型(0x0:傳統(tǒng)交易 ,0x2:eip1559交易)
v,r,s: 交易簽名,可以用于恢復(fù)publicKey
{"blockHash": "0xc2e778181cd74cd5a9911dc5dca03f31ce9b3c3dd38066d3f70d8ee5366c3a8c","blockNumber": 100755,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gas": 21000,"gasPrice": 50000000,"hash": "0xddf1a50a883d52f91d52a860c818f5c1ba853c21e4d464ed38f3aad6a7b98bc9","input": "0x","nonce": 281,"to": "0x565eDb916c178419A413977dcC18CE82A3A2d4C9","transactionIndex": 0,"value": 1000000000000000000,"type": "0x0","v": 98255,"r": "0xb525771066a95932cab86f9454586477c0b65dc2d59432f99f6c139e14854b6b","s": "0x4b4bac96068231d7a1d27b527a0b01ee2a88db671eb215e2718d6b7e434945db"}交易憑據(jù):
blockHash:交易hash blockNumber:區(qū)塊高度
cumulativeGasUsed: 總共花費的gas(wei) effectiveGasPrice: 實際的gas價格(gwei)
from: 交易發(fā)起方 gasUsed:花費的gas
to:交易接收方 status:交易狀態(tài);1:交易成功,0:交易失敗
transactionHash: 交易hash type:交易類型(0x0:傳統(tǒng)交易 ,0x2:eip1559交易)
transactionIndex:當(dāng)前交易在這個區(qū)塊的的打包順序,從0開始計數(shù)
contractAddress:合約地址;如果為null,表明當(dāng)前交易為普通交易或是合約交易;如果有合約地址,表明當(dāng)前交易時一個部署合約的交易
logsBloom:布隆過濾器;本身是一個區(qū)塊頭字段,用于快速查詢?nèi)罩拘畔?/p>
logs:當(dāng)前交易記錄的合約日志(event)信息;
logs.address:合約地址;記錄這個合約地址的日志(event)信息 logs.blockHash: 區(qū)塊hash
logs.blockNumber:區(qū)塊高度
logs.data/logs.topics: 合約事件(event)中的數(shù)據(jù);舉例:事件MyEvent(address indexed from,uint256 amount)中,amount數(shù)據(jù)會存儲在logs.data中,可以反編譯出詳細(xì)信息;from數(shù)據(jù)存儲在logs.topics中;logs.topics:存儲的是一個數(shù)組,其中l(wèi)ogs.topics[0]存儲的永遠(yuǎn)是事件名稱的hash值;logs.topics[1]~logs.topics[3]存儲的是事件中定義了indexed(索引參數(shù))的數(shù)據(jù);索引參數(shù)最多只能有3個;
比如下面logs.topics中的0x8cdd8faf489944941fc651bffdc4a404b57bddc1c35eccf8531de89a4422d777是事件MyEvent(address indexed from,uint256 amount)的hash值;0x1sd5f45sd4s4sd54fsd5dfsdhdifgskjgiksdhfiew9879sd7fsd4f9we4f5d6s4是事件中from的hash值.
log.logIndex:日志(event)索引;一個合約方法可能會觸發(fā)多個事件,logIndex記錄事件的觸發(fā)順序
log.removed:日志是否被移除;false表示日志有效,true表示日志無效,日志無效的原因有可能是交易在叔塊上,并且叔塊沒有被包含;還有一個原因是交易還在處于pending狀態(tài),還沒有被打包.
id:
{"blockHash": "0xc2e778181cd74cd5a9911dc5dca03f31ce9b3c3dd38066d3f70d8ee5366c3a8c","blockNumber": 100755,"contractAddress": "null","cumulativeGasUsed": 21000,"effectiveGasPrice": 50000000,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gasUsed": 21000,"logs": [{"address": "0x75508672C8C155b06a0Bc82e8CA9aB967c9a17d8","blockHash": "0x2de8d9ff07b91523359c08a0004131d5839a7d4ff5aa1bd00843777a5e096ca1","blockNumber": 100755,"data": "0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000c496c2056696e6369746f7265000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047177716500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000477657771000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003717765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047177657100000000000000000000000000000000000000000000000000000000","logIndex": 0,"removed": false,"topics": ["0x8cdd8faf489944941fc651bffdc4a404b57bddc1c35eccf8531de89a4422d777","0x1sd5f45sd4s4sd54fsd5dfsdhdifgskjgiksdhfiew9879sd7fsd4f9we4f5d6s4"],"transactionHash": "0xf29b396e697713937dcf56e3f0c0dd2577beeac48c67a8168ebc084f75daf7b2","transactionIndex": 12,"id": "log_a7c1ba91"}],"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status": 1,"to": "0x565eDb916c178419A413977dcC18CE82A3A2d4C9","transactionHash": "0xddf1a50a883d52f91d52a860c818f5c1ba853c21e4d464ed38f3aad6a7b98bc9","transactionIndex": 0,"type": "0x0"}eip1559 交易
交易詳情
blockHash: 當(dāng)前交易的區(qū)塊hash blockNumber: 區(qū)塊高度 from:交易發(fā)起方
gas: 當(dāng)前交易花費的gas gasPrice:gas價格(gwei) hash: 交易hash
input: 附加信息 nonce: from賬戶發(fā)起交易的總數(shù)
to:交易接收方 value: 交易金額(wei)
transactionIndex:當(dāng)前交易在這個區(qū)塊的的打包順序,從0開始計數(shù)
type:交易類型(0x0:傳統(tǒng)交易 ,0x2:eip1559交易) chainId:鏈id
accessList:權(quán)限列表 v,r,s: 交易簽名,可以用于恢復(fù)publicKey
maxFeeperGas:當(dāng)前交易允許花費的最大gas maxPriorityFeePerGas:當(dāng)前交易允許支付的最大手續(xù)費
{"blockHash": "0x0d44ba046c8ee7c9c8be8060f5da05967a721725e4b384ddff1cfe570954bb38","blockNumber": 100828,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gas": 21000,"gasPrice": 1000000007,"maxFeePerGas": 2000000000,"maxPriorityFeePerGas": 1000000000,"hash": "0x6c52c975b1359c524fa02ef841596d2a0557349dc677a114c7b71adcead83081","input": "0x","nonce": 282,"to": "0x565eDb916c178419A413977dcC18CE82A3A2d4C9","transactionIndex": 0,"value": 1000000000000000000,"type": "0x2","accessList": [],"chainId": "0xbfd6","v": 1,"r": "0x3474d1aac9ce6d4cbd78162f8f34575986cff6f1c18c5676fc3b648413f0873c","s": "0x3ac3364d02897438ad2c328011e3af385a67d6ff613e7a4c88db108d75f833d4"}交易憑據(jù)
blockHash:交易hash blockNumber:區(qū)塊高度
cumulativeGasUsed: 總共花費的gas(wei) effectiveGasPrice: 實際的gas價格(gwei)
from: 交易發(fā)起方 gasUsed:花費的gas
to:交易接收方 status:交易狀態(tài);1:交易成功,0:交易失敗
transactionHash: 交易hash type:交易類型(0x0:傳統(tǒng)交易 ,0x2:eip1559交易)
transactionIndex:當(dāng)前交易在這個區(qū)塊的的打包順序,從0開始計數(shù)
contractAddress:合約地址;如果為null,表明當(dāng)前交易為普通交易或是合約交易;如果有合約地址,表明當(dāng)前交易時一個部署合約的交易
logsBloom:布隆過濾器;本身是一個區(qū)塊頭字段,用于快速查詢?nèi)罩拘畔?/p>
logs:當(dāng)前交易記錄的合約日志(event)信息;
logs.address:合約地址;記錄這個合約地址的日志(event)信息 logs.blockHash: 區(qū)塊hash
logs.blockNumber:區(qū)塊高度
logs.data/logs.topics: 合約事件(event)中的數(shù)據(jù);舉例:事件MyEvent(address indexed from,uint256 amount)中,amount數(shù)據(jù)會存儲在logs.data中,可以反編譯出詳細(xì)信息;from數(shù)據(jù)存儲在logs.topics中;logs.topics:存儲的是一個數(shù)組,其中l(wèi)ogs.topics[0]存儲的永遠(yuǎn)是事件名稱的hash值;logs.topics[1]~logs.topics[3]存儲的是事件中定義了indexed(索引參數(shù))的數(shù)據(jù);索引參數(shù)最多只能有3個;
比如下面logs.topics中的0x8cdd8faf489944941fc651bffdc4a404b57bddc1c35eccf8531de89a4422d777是事件MyEvent(address indexed from,uint256 amount)的hash值;0x1sd5f45sd4s4sd54fsd5dfsdhdifgskjgiksdhfiew9879sd7fsd4f9we4f5d6s4是事件中from的hash值.
log.logIndex:日志(event)索引;一個合約方法可能會觸發(fā)多個事件,logIndex記錄事件的觸發(fā)順序
log.removed:日志是否被移除;false表示日志有效,true表示日志無效,日志無效的原因有可能是交易在叔塊上,并且叔塊沒有被包含;還有一個原因是交易還在處于pending狀態(tài),還沒有被打包.
id:
{"blockHash": "0x0d44ba046c8ee7c9c8be8060f5da05967a721725e4b384ddff1cfe570954bb38","blockNumber": 100828,"contractAddress": "None","cumulativeGasUsed": 21000,"effectiveGasPrice": 1000000007,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gasUsed": 21000,"logs": [{"address": "0x75508672C8C155b06a0Bc82e8CA9aB967c9a17d8","blockHash": "0x2de8d9ff07b91523359c08a0004131d5839a7d4ff5aa1bd00843777a5e096ca1","blockNumber": 100828,"data": "0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000c496c2056696e6369746f7265000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047177716500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000477657771000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003717765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047177657100000000000000000000000000000000000000000000000000000000","logIndex": 0,"removed": false,"topics": ["0x8cdd8faf489944941fc651bffdc4a404b57bddc1c35eccf8531de89a4422d777","0x1sd5f45sd4s4sd54fsd5dfsdhdifgskjgiksdhfiew9879sd7fsd4f9we4f5d6s4"],"transactionHash": "0xf29b396e697713937dcf56e3f0c0dd2577beeac48c67a8168ebc084f75daf7b2","transactionIndex": 12,"id": "log_a7c1ba91"}],"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status": 1,"to": "0x565eDb916c178419A413977dcC18CE82A3A2d4C9","transactionHash": "0x6c52c975b1359c524fa02ef841596d2a0557349dc677a114c7b71adcead83081","transactionIndex": 0,"type": "0x2"}合約交易
交易詳情
blockHash: 當(dāng)前交易的區(qū)塊hash blockNumber: 區(qū)塊高度 from:交易發(fā)起方
gas: 當(dāng)前交易花費的gas gasPrice:gas價格(gwei) hash: 交易hash
input: 附加信息 nonce: from賬戶發(fā)起交易的總數(shù)
to:智能合約地址 value: 交易金額(wei)
transactionIndex:當(dāng)前交易在這個區(qū)塊的的打包順序,從0開始計數(shù)
type:交易類型(0x0:傳統(tǒng)交易 ,0x2:eip1559交易) chainId:鏈id
accessList:權(quán)限列表 v,r,s: 交易簽名,可以用于恢復(fù)publicKey
maxFeeperGas:當(dāng)前交易允許花費的最大gas maxPriorityFeePerGas:當(dāng)前交易允許支付的最大手續(xù)費
{"blockHash": "0x5a295a3a3588c6f530674365c36258e4ddbb8e4064918bc62885c9a4459e417b","blockNumber": 100667,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gas": 2000000,"gasPrice": 1000000007,"maxFeePerGas": 2000000000,"maxPriorityFeePerGas": 1000000000,"hash": "0xef561f4683dfe85fd70263372a069092e6eb084d412b51416619eff8b87e634d","input": "0x23b872dd0000000000000000000000002dde47c55200162ca4512ba168ab9b36ad7aa4fb00000000000000000000000086488473fe68bd5bd600c0163e86b60f6aa6c0190000000000000000000000000000000000000000000000000000000000000001","nonce": 278,"to": "0x28e53ce1B352d7ac4876a4B96c7331EC6a34dbc5","transactionIndex": 0,"value": 0,"type": "0x2","accessList": [],"chainId": "0xbfd6","v": 1,"r": "0x9c1ed658720c595fb53e381399652ee671dac9ecc09cb63521f41aa77bda2e1e","s": "0x79cc2d1b7c778196fcba3162f9447e8a522a83538e1972157d36bc4ed9e699"}交易憑據(jù)
blockHash:交易hash blockNumber:區(qū)塊高度
cumulativeGasUsed: 總共花費的gas(wei) effectiveGasPrice: 實際的gas價格(gwei)
from: 交易發(fā)起方 gasUsed:花費的gas
to:交易接收方 status:交易狀態(tài);1:交易成功,0:交易失敗
transactionHash: 交易hash type:交易類型(0x0:傳統(tǒng)交易 ,0x2:eip1559交易)
transactionIndex:當(dāng)前交易在這個區(qū)塊的的打包順序,從0開始計數(shù)
contractAddress:合約地址;如果為null,表明當(dāng)前交易為普通交易或是合約交易;如果有合約地址,表明當(dāng)前交易時一個部署合約的交易
logsBloom:布隆過濾器;本身是一個區(qū)塊頭字段,用于快速查詢?nèi)罩拘畔?/p>
logs:當(dāng)前交易記錄的合約日志(event)信息;
logs.address:合約地址;記錄這個合約地址的日志(event)信息 logs.blockHash: 區(qū)塊hash
logs.blockNumber:區(qū)塊高度
logs.data/logs.topics: 合約事件(event)中的數(shù)據(jù);舉例:事件MyEvent(address indexed from,address indexed to,uint256 amount)中,amount數(shù)據(jù)會存儲在logs.data中,可以反編譯出詳細(xì)信息;from數(shù)據(jù)存儲在logs.topics中;logs.topics:存儲的是一個數(shù)組,其中l(wèi)ogs.topics[0]存儲的永遠(yuǎn)是事件名稱的hash值;logs.topics[1]~logs.topics[3]存儲的是事件中定義了indexed(索引參數(shù))的數(shù)據(jù);索引參數(shù)最多只能有3個;
比如下面logs.topics中的0x9ed053bb818ff08b8353cd46f78db1f0799f31c9e4458fdb425c10eccd2efc44是事件MyEvent(address indexed from,uint256 amount)的hash值;0x0000000000000000000000002dde47c55200162ca4512ba168ab9b36ad7aa4fb是事件中from的hash值,0x00000000000000000000000086488473fe68bd5bd600c0163e86b60f6aa6c019是事件中 to 的hash值
log.logIndex:日志(event)索引;一個合約方法可能會觸發(fā)多個事件,logIndex記錄事件的觸發(fā)順序
log.removed:日志是否被移除;false表示日志有效,true表示日志無效,日志無效的原因有可能是交易在叔塊上,并且叔塊沒有被包含;還有一個原因是交易還在處于pending狀態(tài),還沒有被打包.
id:
{"blockHash": "0x5a295a3a3588c6f530674365c36258e4ddbb8e4064918bc62885c9a4459e417b","blockNumber": 100667,"contractAddress": "None","cumulativeGasUsed": 53289,"effectiveGasPrice": 1000000007,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gasUsed": 53289,"logs": [{"address": "0x28e53ce1B352d7ac4876a4B96c7331EC6a34dbc5","topics": ["0x9ed053bb818ff08b8353cd46f78db1f0799f31c9e4458fdb425c10eccd2efc44","0x0000000000000000000000002dde47c55200162ca4512ba168ab9b36ad7aa4fb","0x00000000000000000000000086488473fe68bd5bd600c0163e86b60f6aa6c019"],"data": "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000617b5ade","blockNumber": 100667,"transactionHash": "0xef561f4683dfe85fd70263372a069092e6eb084d412b51416619eff8b87e634d","transactionIndex": 0,"blockHash": "0x5a295a3a3588c6f530674365c36258e4ddbb8e4064918bc62885c9a4459e417b","logIndex": 0,"removed": "False"}],"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004040000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000040000000001000000000000000100000000000004000000","status": 1,"to": "0x28e53ce1B352d7ac4876a4B96c7331EC6a34dbc5","transactionHash": "0xef561f4683dfe85fd70263372a069092e6eb084d412b51416619eff8b87e634d","transactionIndex": 0,"type": "0x2"}部署合約詳情
blockHash: 當(dāng)前交易的區(qū)塊hash blockNumber: 區(qū)塊高度 from:交易發(fā)起方
gas: 當(dāng)前交易花費的gas gasPrice:gas價格(gwei) hash: 交易hash
input: 附加信息 nonce: from賬戶發(fā)起交易的總數(shù)
to:當(dāng)交易時用于部署合約時,to 一直為null
value: 交易金額(wei)
transactionIndex:當(dāng)前交易在這個區(qū)塊的的打包順序,從0開始計數(shù)
type:交易類型(0x0:傳統(tǒng)交易 ,0x2:eip1559交易)
v,r,s: 交易簽名,可以用于恢復(fù)publicKey
{"blockHash": "0x684ca9bbe785ccee1c26a499696141d48c07a7271801e100c01d4b2d6a1c1281","blockNumber": 100727,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gas": 961753,"gasPrice": 1000000007,"hash": "0x0ccb894d7ceb2d834bc92f204160867c2132394eb29cb0db68f6deb7c1004fee","input": "0x60806040526004600260006101000a81548160ff021916908360ff16021790555034801561002c57600080fd5b50604051610f71380380610f71833981018060405281019080805190602001909291908051820192919060200180518201929190505050600260009054906101000a900460ff1660ff16600a0a83026003819055508160009080519060200190610097929190610146565b5080600190805190602001906100ae929190610146565b50600354600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160048190555033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506101eb565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061018757805160ff19168380011785556101b5565b828001600101855582156101b5579182015b828111156101b4578251825591602001919060010190610199565b5b5090506101c291906101c6565b5090565b6101e891905b808211156101e45760008160009055506001016101cc565b5090565b90565b610d77806101fa6000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b457806318160ddd1461014457806323b872dd1461016f57806329e99f07146101f4578063313ce5671461023557806342966c681461026657806370a08231146102ab57806379cc67901461030257806395d89b4114610367578063a9059cbb146103f7578063e468688e1461045c575b600080fd5b3480156100c057600080fd5b506100c9610489565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101095780820151818401526020810190506100ee565b50505050905090810190601f1680156101365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015057600080fd5b50610159610527565b6040518082815260200191505060405180910390f35b34801561017b57600080fd5b506101da600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061052d565b604051808215151515815260200191505060405180910390f35b34801561020057600080fd5b5061021f60048036038101908080359060200190929190505050610545565b6040518082815260200191505060405180910390f35b34801561024157600080fd5b5061024a61055c565b604051808260ff1660ff16815260200191505060405180910390f35b34801561027257600080fd5b506102916004803603810190808035906020019092919050505061056f565b604051808215151515815260200191505060405180910390f35b3480156102b757600080fd5b506102ec600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106d7565b6040518082815260200191505060405180910390f35b34801561030e57600080fd5b5061034d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106ef565b604051808215151515815260200191505060405180910390f35b34801561037357600080fd5b5061037c610858565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103bc5780820151818401526020810190506103a1565b50505050905090810190601f1680156103e95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561040357600080fd5b50610442600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108f6565b604051808215151515815260200191505060405180910390f35b34801561046857600080fd5b506104876004803603810190808035906020019092919050505061090d565b005b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561051f5780601f106104f45761010080835404028352916020019161051f565b820191906000526020600020905b81548152906001019060200180831161050257829003601f168201915b505050505081565b60035481565b600061053a848484610a2c565b600190509392505050565b600060035482026003819055506003549050919050565b600260009054906101000a900460ff1681565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105cd57600080fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561061b57600080fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816003600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167f49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a8342604051808381526020018281526020019250505060405180910390a260019050919050565b60066020528060005260406000206000915090505481565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561074d57600080fd5b81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561079b57600080fd5b81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816003600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167f49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a8342604051808381526020018281526020019250505060405180910390a26001905092915050565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108ee5780601f106108c3576101008083540402835291602001916108ee565b820191906000526020600020905b8154815290600101906020018083116108d157829003601f168201915b505050505081565b6000610903338484610a2c565b6001905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561096957600080fd5b80600360008282540192505081905550600354600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001600460008282540192505081905550803373ffffffffffffffffffffffffffffffffffffffff167fbb4f36b82dc52ceafef238d5e33e56eae30824e4881ffee81e4f1047cc948c7160045442604051808381526020018281526020019250505060405180910390a350565b6000808373ffffffffffffffffffffffffffffffffffffffff1614151515610a5357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610aa157600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110151515610b3057600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401905081600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f9ed053bb818ff08b8353cd46f78db1f0799f31c9e4458fdb425c10eccd2efc448442604051808381526020018281526020019250505060405180910390a380600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401141515610d4557fe5b505050505600a165627a7a723058206dfa198ac0f750bd022bdfabe777b5e78baa3eefba384c7cef088e25282f8b9e00290000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000026b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027070000000000000000000000000000000000000000000000000000000000000","nonce": 280,"to": "None","transactionIndex": 0,"value": 0,"type": "0x0","v": 98256,"r": "0xb4dc254120645d6b18fc621f0e371dfbce84cb748ffaf6b1a1d9d43df828b556","s": "0x44449b3755e701c2897f7372cbc7ffbb7d4664661f9ba1b516705c3057a8645f"}部署合約憑據(jù)
blockHash:交易hash blockNumber:區(qū)塊高度
cumulativeGasUsed: 總共花費的gas(wei) effectiveGasPrice: 實際的gas價格(gwei)
from: 交易發(fā)起方 gasUsed:花費的gas
to:交易接收方 status:交易狀態(tài);1:交易成功,0:交易失敗
transactionHash: 交易hash type:交易類型(0x0:傳統(tǒng)交易 ,0x2:eip1559交易)
transactionIndex:當(dāng)前交易在這個區(qū)塊的的打包順序,從0開始計數(shù)
contractAddress:合約地址;如果為null,表明當(dāng)前交易為普通交易或是合約交易;如果有合約地址,表明當(dāng)前交易時一個部署合約的交易
logsBloom:布隆過濾器;本身是一個區(qū)塊頭字段,用于快速查詢?nèi)罩拘畔?/p>
logs:當(dāng)前交易記錄的合約日志(event)信息;
logs.address:合約地址;記錄這個合約地址的日志(event)信息 logs.blockHash: 區(qū)塊hash
logs.blockNumber:區(qū)塊高度
logs.data/logs.topics: 合約事件(event)中的數(shù)據(jù);舉例:事件MyEvent(address indexed from,address indexed to,uint256 amount)中,amount數(shù)據(jù)會存儲在logs.data中,可以反編譯出詳細(xì)信息;from數(shù)據(jù)存儲在logs.topics中;logs.topics:存儲的是一個數(shù)組,其中l(wèi)ogs.topics[0]存儲的永遠(yuǎn)是事件名稱的hash值;logs.topics[1]~logs.topics[3]存儲的是事件中定義了indexed(索引參數(shù))的數(shù)據(jù);索引參數(shù)最多只能有3個;
比如下面logs.topics中的0x9ed053bb818ff08b8353cd46f78db1f0799f31c9e4458fdb425c10eccd2efc44是事件MyEvent(address indexed from,uint256 amount)的hash值;0x0000000000000000000000002dde47c55200162ca4512ba168ab9b36ad7aa4fb是事件中from的hash值,0x00000000000000000000000086488473fe68bd5bd600c0163e86b60f6aa6c019是事件中 to 的hash值
log.logIndex:日志(event)索引;一個合約方法可能會觸發(fā)多個事件,logIndex記錄事件的觸發(fā)順序
log.removed:日志是否被移除;false表示日志有效,true表示日志無效,日志無效的原因有可能是交易在叔塊上,并且叔塊沒有被包含;還有一個原因是交易還在處于pending狀態(tài),還沒有被打包.
id:
{"blockHash": "0x684ca9bbe785ccee1c26a499696141d48c07a7271801e100c01d4b2d6a1c1281","blockNumber": 100727,"contractAddress": "0xc8C3262BEd7FA0FefAaB5288A81cE007f84E1203","cumulativeGasUsed": 961753,"effectiveGasPrice": 1000000007,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gasUsed": 961753,"logs": [],"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status": 1,"to": "None","transactionHash": "0x0ccb894d7ceb2d834bc92f204160867c2132394eb29cb0db68f6deb7c1004fee","transactionIndex": 0,"type": "0x0"}區(qū)塊信息
baseFeePerGas: 每個gas的基礎(chǔ)費用(wei)
difficulty:當(dāng)前區(qū)塊難度
extraData:附加數(shù)據(jù)(默認(rèn)是打包當(dāng)前區(qū)塊的geth版本信息,可以使用geth客戶端的--miner.extradata 設(shè)置為其他信息)
gasLimit:gas限定;當(dāng)前區(qū)塊打包的所有交易花費的gas不能超過這個值,默認(rèn)8000000gwei;可以使用geth客戶端的 --miner.gaslimit 修改
gasUsed:當(dāng)前區(qū)塊實際花費的gas數(shù)量
hash:區(qū)塊hash
logsBloom:布隆過濾器,用于快速查詢?nèi)罩拘畔?/p>
miner:礦工賬戶,打包了當(dāng)前區(qū)塊的賬戶地址
mixHash:混合hash;證明礦工了打包這個區(qū)塊付出了足夠的計算
nonce: 隨機(jī)數(shù);礦工計算出的符合條件的隨機(jī)數(shù)
parentHash:前一個區(qū)塊的hash值;如果當(dāng)前區(qū)塊為創(chuàng)世塊,則parentHash 為0x0
receiptsRoot: 交易收據(jù)的Merkle樹的根節(jié)點的哈希
sha3Uncles: 叔塊的hash值,無論有沒有叔塊,都會有這個值
size:區(qū)塊大小(bytes)
stateRoot:整個系統(tǒng)的Merkle樹的根節(jié)點的哈希
timestamp:區(qū)塊打包時間
transactions:交易數(shù)據(jù)
transactionsRoot:交易的Merkle樹的根節(jié)點的哈希
uncles:叔塊;包含的叔塊hash,最多只能包含兩個叔塊
{"baseFeePerGas": 7,"difficulty": 9082340,"extraData": "0xd883010a08846765746888676f312e31362e34856c696e7578","gasLimit": 8000000,"gasUsed": 961753,"hash": "0x705b8f8e7b89bf67a288dc94b593576364433052d19bb1c91ee0e521da53bcdb","logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner": "0x8055bBd63512109010464B3366845888894A5b3e","mixHash": "0xb85b09f0e7a8cdc1823319654643eb0eb403855aaacd9e815ecd71fafe19da92","nonce": "0x63e2fd89fc7017d6","number": 95626,"parentHash": "0xfb6cb8e8c09ed5d0243d2a27da1e05356b92aa4127621fb8bc7fd9cfccec1552","receiptsRoot": "0xc241eed63a35fefa9df7c9a5cf874ff053032508b98c42fa11f2a103b7e676da","sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size": 4812,"stateRoot": "0xeeffa884142e459e54209dca1512af9bd25cfc0edbed6a6a9e56b8372e30c10c","timestamp": 1635410337,"totalDifficulty": 808008629862,"transactions": [{"blockHash": "0x705b8f8e7b89bf67a288dc94b593576364433052d19bb1c91ee0e521da53bcdb","blockNumber": 95626,"from": "0x2dde47c55200162ca4512BA168AB9B36AD7aa4Fb","gas": 961753,"gasPrice": 1000000007,"hash": "0xa372115f7beeff2e47c42af9f768bab3ab6ad55f2e36220a6f752cb45e7f2cef","input": "0x","nonce": 277,"to": "0x28e53ce1B352d7ac4876a4B96c7331EC6a34dbc5","transactionIndex": 0,"value": 100000000000,"type": "0x0","v": 98256,"r": "0x4dd36ac6d97738742ff84b2079089068de4ec92426e07573c18e18a08367cfce","s": "0x039162c6793c50357260edcac60f9a0c0554f2e5d83f68d246d7f6af32adf033"}],"transactionsRoot": "0xe27219ae116dfd5d9786ac561b8275d661649f0fd5dfc9a868872774f3f73f14","uncles": []}總結(jié)
- 上一篇: 单目slam LoopClosing之S
- 下一篇: 谢孟媛老师 初级文法学习笔记