MCPcopy Create free account
hub / github.com/CPChain/chain / opExtCodeCopy

Function opExtCodeCopy

core/vm/instructions.go:486–498  ·  view source on GitHub ↗
(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack)

Source from the content-addressed store, hash-verified

484}
485
486func opExtCodeCopy(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
487 var (
488 addr = common.BigToAddress(stack.pop())
489 memOffset = stack.pop()
490 codeOffset = stack.pop()
491 length = stack.pop()
492 )
493 codeCopy := getDataBig(evm.StateDB.GetCode(addr), codeOffset, length)
494 memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy)
495
496 evm.interpreter.intPool.put(memOffset, codeOffset, length)
497 return nil, nil
498}
499
500func opGasprice(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
501 stack.push(evm.interpreter.intPool.get().Set(evm.GasPrice))

Callers

nothing calls this directly

Calls 6

getDataBigFunction · 0.85
popMethod · 0.80
Uint64Method · 0.80
GetCodeMethod · 0.65
SetMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected