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

Struct Contract

core/vm/contract.go:44–65  ·  view source on GitHub ↗

Contract represents an ethereum contract in the state database. It contains the the contract code, calling arguments. Contract implements ContractRef

Source from the content-addressed store, hash-verified

42// Contract represents an ethereum contract in the state database. It contains
43// the the contract code, calling arguments. Contract implements ContractRef
44type Contract struct {
45 // CallerAddress is the result of the caller which initialised this
46 // contract. However when the "call method" is delegated this value
47 // needs to be initialised to that of the caller's caller.
48 CallerAddress common.Address
49 caller ContractRef
50 self ContractRef
51
52 jumpdests destinations // result of JUMPDEST analysis.
53
54 Code []byte
55 CodeHash common.Hash
56 CodeAddr *common.Address
57 Input []byte
58
59 Gas uint64
60 value *big.Int
61
62 Args []byte
63
64 DelegateCall bool
65}
66
67// NewContract returns a new contract environment for the execution of EVM.
68func NewContract(caller ContractRef, object ContractRef, value *big.Int, gas uint64) *Contract {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected