()
| 143 | } |
| 144 | |
| 145 | func (x *contract) String() string { |
| 146 | prefix := "contract{" |
| 147 | if x.typecode == WrappedContractCode { |
| 148 | prefix = "wrappedcontract{" |
| 149 | } |
| 150 | return prefix + fmt.Sprintf("%x", x.seed) + ", " + fmt.Sprintf("%x", x.program) + ", " + x.stack.String() + "}" |
| 151 | } |
| 152 | |
| 153 | func (vm *VM) createContract(prog []byte) *contract { |
| 154 | vm.charge(128) |