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

Function opSload

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

Source from the content-addressed store, hash-verified

572}
573
574func opSload(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
575 loc := stack.peek()
576 val := evm.StateDB.GetState(contract.Address(), common.BigToHash(loc))
577 loc.SetBytes(val.Bytes())
578 return nil, nil
579}
580
581func opSstore(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
582 loc := common.BigToHash(stack.pop())

Callers

nothing calls this directly

Calls 5

SetBytesMethod · 0.80
GetStateMethod · 0.65
AddressMethod · 0.65
BytesMethod · 0.65
peekMethod · 0.45

Tested by

no test coverage detected