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

Method GetEVM

protocols/cpc/api_backend.go:147–153  ·  view source on GitHub ↗
(ctx context.Context, msg core.Message, state *state.StateDB, header *types.Header, vmCfg vm.Config)

Source from the content-addressed store, hash-verified

145}
146
147func (b *APIBackend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, header *types.Header, vmCfg vm.Config) (*vm.EVM, func() error, error) {
148 state.SetBalance(msg.From(), math.MaxBig256)
149 vmError := func() error { return nil }
150
151 context := core.NewEVMContext(msg, header, b.cpc.BlockChain(), nil)
152 return vm.NewEVM(context, state, b.cpc.chainConfig, vmCfg), vmError, nil
153}
154
155func (b *APIBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription {
156 return b.cpc.BlockChain().SubscribeRemovedLogsEvent(ch)

Callers

nothing calls this directly

Calls 3

FromMethod · 0.65
BlockChainMethod · 0.65
SetBalanceMethod · 0.45

Tested by

no test coverage detected