Skip to content

Commit

Permalink
Merge branch 'filter-delegated-calls' of https://github.com/escottale…
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed Oct 27, 2023
2 parents 98fb780 + 823b858 commit 0140bb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ export class EVMTransactionModel extends BaseTransaction<IEVMTransaction> {
const effect = this._getEffectForNativeTransfer(BigInt(internalTx.action.value).toString(), internalTx.action.to, internalTx.action.from || tx.from, internalTx.traceAddress.join('_'));
effects.push(effect);
}
if (internalTx.abiType) {
// Ignoring delegated calls because they are redundant
if (internalTx.abiType && internalTx.type != 'delegatecall') {
// Handle Abi related effects
const effect = this._getEffectForAbiType(internalTx.abiType, internalTx.action.to, internalTx.action.from || tx.from, internalTx.traceAddress.join('_'));
if (effect) {
Expand All @@ -430,7 +431,8 @@ export class EVMTransactionModel extends BaseTransaction<IEVMTransaction> {
const effect = this._getEffectForNativeTransfer(BigInt(internalTx.value).toString(), internalTx.to, internalTx.from, internalTx.depth);
effects.push(effect);
}
if (internalTx.abiType) {
// Ignoring delegated calls because they are redundant
if (internalTx.abiType && internalTx.type != 'DELEGATECALL') {
// Handle Abi related effects
const effect = this._getEffectForAbiType(internalTx.abiType, internalTx.to, internalTx.from, internalTx.depth);
if (effect) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface IGethTxTraceBase {
input: string;
output: string;
to: string;
type: 'CREATE';
type: 'CALL' | 'STATICCALL' | 'DELEGATECALL' | 'CREATE' | 'CREATE2';
value: string;
abiType?: IAbiDecodedData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export interface GethTraceCall {
input: string;
output: string;
to: string;
type: 'CALL' | 'STATICALL' | 'DELEGATECALL' | 'CREATE' | 'CREATE2' | 'SELFDESTRUCT';
type: 'CALL' | 'STATICCALL' | 'DELEGATECALL' | 'CREATE' | 'CREATE2';
value?: string;
}

Expand Down

0 comments on commit 0140bb9

Please sign in to comment.