@@ -295,9 +295,10 @@ func (host *hostContext) EmitLog(addr evmc.Address, evmcTopics []evmc.Hash, data
295
295
// Call(kind evmc.CallKind, evmcDestination evmc.Address, evmcSender evmc.Address, valueBytes evmc.Hash, input []byte, gas int64, depth int, static bool, saltBytes evmc.Hash) (output []byte, gasLeft int64, createAddrEvmc evmc.Address, err error)
296
296
func (host * hostContext ) Call (kind evmc.CallKind ,
297
297
evmcDestination evmc.Address , evmcSender evmc.Address , valueBytes evmc.Hash , input []byte , gas int64 , depth int ,
298
- static bool , saltBytes evmc.Hash ) (output []byte , gasLeft int64 , gasRefund int64 , createAddrEvmc evmc.Address , err error ) {
298
+ static bool , saltBytes evmc.Hash , evmcCodeAddress evmc. Address ) (output []byte , gasLeft int64 , gasRefund int64 , createAddrEvmc evmc.Address , err error ) {
299
299
300
300
destination := common .Address (evmcDestination )
301
+ codeTarget := common .Address (evmcCodeAddress )
301
302
302
303
var createAddr common.Address
303
304
@@ -318,9 +319,9 @@ func (host *hostContext) Call(kind evmc.CallKind,
318
319
output , gasLeftU , err = host .env .Call (host .contract , destination , input , gasU , value .ToBig ())
319
320
}
320
321
case evmc .DelegateCall :
321
- output , gasLeftU , err = host .env .DelegateCall (host .contract , destination , input , gasU )
322
+ output , gasLeftU , err = host .env .DelegateCall (host .contract , codeTarget , input , gasU )
322
323
case evmc .CallCode :
323
- output , gasLeftU , err = host .env .CallCode (host .contract , destination , input , gasU , value .ToBig ())
324
+ output , gasLeftU , err = host .env .CallCode (host .contract , codeTarget , input , gasU , value .ToBig ())
324
325
case evmc .Create :
325
326
var createOutput []byte
326
327
createOutput , createAddr , gasLeftU , err = host .env .Create (host .contract , input , gasU , value .ToBig ())
0 commit comments