(num uint16)
| 48 | } |
| 49 | |
| 50 | func (self *ProgramBuilder) PushNum(num uint16) *ProgramBuilder { |
| 51 | if num == 0 { |
| 52 | return self.PushOpCode(neovm.PUSH0) |
| 53 | } else if num <= 16 { |
| 54 | return self.PushOpCode(neovm.OpCode(uint8(num) - 1 + uint8(neovm.PUSH1))) |
| 55 | } |
| 56 | |
| 57 | bint := big.NewInt(int64(num)) |
| 58 | return self.PushBytes(common.BigIntToNeoBytes(bint)) |
| 59 | } |
| 60 | |
| 61 | func (self *ProgramBuilder) PushBytes(data []byte) *ProgramBuilder { |
| 62 | if len(data) == 0 { |