MCPcopy Create free account
hub / github.com/chain/txvm / createContract

Method createContract

protocol/txvm/entries.go:153–157  ·  view source on GitHub ↗
(prog []byte)

Source from the content-addressed store, hash-verified

151}
152
153func (vm *VM) createContract(prog []byte) *contract {
154 vm.charge(128)
155 seed := ContractSeed(prog)
156 return &contract{typecode: ContractCode, seed: seed[:], program: prog}
157}
158
159func extractTypeCode(t Tuple) byte {
160 code, ok := t[0].(Bytes)

Callers 1

opContractFunction · 0.80

Calls 2

chargeMethod · 0.95
ContractSeedFunction · 0.85

Tested by

no test coverage detected