Skip to content

Commit

Permalink
filter delegated calls
Browse files Browse the repository at this point in the history
  • Loading branch information
escottalexander committed Oct 26, 2023
1 parent 78af07d commit 823b858
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 823b858

Please sign in to comment.