mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 14:03:46 +00:00
Send correct sender to precompile in delegatecall
This commit is contained in:
parent
6ff4c5e1d8
commit
b19992f4b3
1 changed files with 4 additions and 1 deletions
|
|
@ -340,7 +340,10 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by
|
||||||
|
|
||||||
// It is allowed to call precompiles, even via delegatecall
|
// It is allowed to call precompiles, even via delegatecall
|
||||||
if p, isPrecompile := evm.precompile(addr); isPrecompile {
|
if p, isPrecompile := evm.precompile(addr); isPrecompile {
|
||||||
ret, gas, err = RunPrecompiledContract(p, evm, caller.Address(), input, gas)
|
// NOTE: caller must, at all times be a contract. It should never happen
|
||||||
|
// that caller is something other than a Contract.
|
||||||
|
parent := caller.(*Contract)
|
||||||
|
ret, gas, err = RunPrecompiledContract(p, evm, parent.CallerAddress, input, gas)
|
||||||
} else {
|
} else {
|
||||||
addrCopy := addr
|
addrCopy := addr
|
||||||
// Initialise a new contract and make initialise the delegate values
|
// Initialise a new contract and make initialise the delegate values
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue