Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions crates/query/fixtures/ethereum/queries/trace_call_type/query.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "evm",
"fromBlock": 17881390,
"toBlock": 17881870,
"fields": {
"trace": {
"callFrom": true,
"callType": true,
"transactionIndex": true,
Comment on lines +7 to +9
"traceAddress": true,
"type": true
},
"block": {
"number": true,
"hash": true,
"parentHash": true
}
},
"traces": [
{
"callFrom": ["0x58df81babdf15276e761808e872a3838cbecbcf9"],
"callType": ["staticcall"]
}
]
}
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"type": "evm",
"fromBlock": 17881390,
"toBlock": 17881870,
"fields": {
"trace": {
"callType": true,
"callSighash": true,
"callValue": true,
Comment on lines +6 to +9
"createResultAddress": true,
"createValue": true,
"suicideRefundAddress": true,
"suicideBalance": true,
"rewardValue": true,
"transactionIndex": true,
"traceAddress": true,
"type": true
},
"block": {
"number": true,
"hash": true,
"parentHash": true
}
},
"traces": [
{
"createValueNonZero": true
},
{
"callType": ["call"],
"callSighash": ["0x3598d8ab"],
"callValueNonZero": true
},
{
"suicideBalanceNonZero": true
}
]
}
Git LFS file not shown
18 changes: 18 additions & 0 deletions crates/query/src/query/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,12 +571,17 @@ request! {
pub r#type: Option<Vec<String>>,
pub create_from: Option<Vec<Bytes>>,
pub create_result_address: Option<Vec<Bytes>>,
pub create_value_non_zero: bool,
pub call_from: Option<Vec<Bytes>>,
pub call_to: Option<Vec<Bytes>>,
pub call_sighash: Option<Vec<Bytes>>,
pub call_type: Option<Vec<String>>,
pub call_value_non_zero: bool,
pub suicide_address: Option<Vec<Bytes>>,
pub suicide_refund_address: Option<Vec<Bytes>>,
pub suicide_balance_non_zero: bool,
pub reward_author: Option<Vec<Bytes>>,
pub reward_value_non_zero: bool,
pub transaction: bool,
pub transaction_logs: bool,
pub subtraces: bool,
Expand All @@ -592,12 +597,25 @@ impl TraceRequest {
p.col_in_list("call_from", to_lowercase_list(&self.call_from));
p.col_in_list("call_to", to_lowercase_list(&self.call_to));
p.col_in_list("call_sighash", to_lowercase_list(&self.call_sighash));
p.col_in_list("call_type", self.call_type.as_deref());
Comment on lines 598 to +600
p.col_in_list("suicide_address", to_lowercase_list(&self.suicide_address));
p.col_in_list(
"suicide_refund_address",
to_lowercase_list(&self.suicide_refund_address)
);
p.col_in_list("reward_author", to_lowercase_list(&self.reward_author));
if self.call_value_non_zero {
p.col_gt_eq("call_value", Some("0x1"));
}
if self.create_value_non_zero {
p.col_gt_eq("create_value", Some("0x1"));
}
if self.suicide_balance_non_zero {
p.col_gt_eq("suicide_balance", Some("0x1"));
}
if self.reward_value_non_zero {
p.col_gt_eq("reward_value", Some("0x1"));
}
}

fn relations(&self, scan: &mut ScanBuilder) {
Expand Down
Loading