|
|
@ -187,7 +187,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas |
|
|
|
evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) |
|
|
|
evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) |
|
|
|
evm.Config.Tracer.CaptureEnd(ret, 0, 0, nil) |
|
|
|
evm.Config.Tracer.CaptureEnd(ret, 0, 0, nil) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) |
|
|
|
evm.Config.Tracer.CaptureEnter(evm, CALL, caller.Address(), addr, input, gas, value) |
|
|
|
evm.Config.Tracer.CaptureExit(ret, 0, nil) |
|
|
|
evm.Config.Tracer.CaptureExit(ret, 0, nil) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -206,7 +206,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas |
|
|
|
}(gas, time.Now()) |
|
|
|
}(gas, time.Now()) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// Handle tracer events for entering and exiting a call frame
|
|
|
|
// Handle tracer events for entering and exiting a call frame
|
|
|
|
evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) |
|
|
|
evm.Config.Tracer.CaptureEnter(evm, CALL, caller.Address(), addr, input, gas, value) |
|
|
|
defer func(startGas uint64) { |
|
|
|
defer func(startGas uint64) { |
|
|
|
evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) |
|
|
|
evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) |
|
|
|
}(gas) |
|
|
|
}(gas) |
|
|
@ -272,7 +272,7 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, |
|
|
|
|
|
|
|
|
|
|
|
// Invoke tracer hooks that signal entering/exiting a call frame
|
|
|
|
// Invoke tracer hooks that signal entering/exiting a call frame
|
|
|
|
if evm.Config.Debug { |
|
|
|
if evm.Config.Debug { |
|
|
|
evm.Config.Tracer.CaptureEnter(CALLCODE, caller.Address(), addr, input, gas, value) |
|
|
|
evm.Config.Tracer.CaptureEnter(evm, CALLCODE, caller.Address(), addr, input, gas, value) |
|
|
|
defer func(startGas uint64) { |
|
|
|
defer func(startGas uint64) { |
|
|
|
evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) |
|
|
|
evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) |
|
|
|
}(gas) |
|
|
|
}(gas) |
|
|
@ -316,7 +316,7 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by |
|
|
|
|
|
|
|
|
|
|
|
// Invoke tracer hooks that signal entering/exiting a call frame
|
|
|
|
// Invoke tracer hooks that signal entering/exiting a call frame
|
|
|
|
if evm.Config.Debug { |
|
|
|
if evm.Config.Debug { |
|
|
|
evm.Config.Tracer.CaptureEnter(DELEGATECALL, caller.Address(), addr, input, gas, nil) |
|
|
|
evm.Config.Tracer.CaptureEnter(evm, DELEGATECALL, caller.Address(), addr, input, gas, nil) |
|
|
|
defer func(startGas uint64) { |
|
|
|
defer func(startGas uint64) { |
|
|
|
evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) |
|
|
|
evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) |
|
|
|
}(gas) |
|
|
|
}(gas) |
|
|
@ -369,7 +369,7 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte |
|
|
|
|
|
|
|
|
|
|
|
// Invoke tracer hooks that signal entering/exiting a call frame
|
|
|
|
// Invoke tracer hooks that signal entering/exiting a call frame
|
|
|
|
if evm.Config.Debug { |
|
|
|
if evm.Config.Debug { |
|
|
|
evm.Config.Tracer.CaptureEnter(STATICCALL, caller.Address(), addr, input, gas, nil) |
|
|
|
evm.Config.Tracer.CaptureEnter(evm, STATICCALL, caller.Address(), addr, input, gas, nil) |
|
|
|
defer func(startGas uint64) { |
|
|
|
defer func(startGas uint64) { |
|
|
|
evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) |
|
|
|
evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) |
|
|
|
}(gas) |
|
|
|
}(gas) |
|
|
@ -456,7 +456,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, |
|
|
|
if evm.depth == 0 { |
|
|
|
if evm.depth == 0 { |
|
|
|
evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) |
|
|
|
evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) |
|
|
|
evm.Config.Tracer.CaptureEnter(evm, typ, caller.Address(), address, codeAndHash.code, gas, value) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|