(vm *VM)
| 27 | ) |
| 28 | |
| 29 | func opIssue(vm *VM) { |
| 30 | tag := vm.popBytes() |
| 31 | amount := vm.popInt() |
| 32 | if amount < 0 { |
| 33 | panic(errors.Wrap(errors.WithData(ErrNegAmount, "amount", amount), "issue")) |
| 34 | } |
| 35 | anchor := vm.popZeroValue().anchor |
| 36 | |
| 37 | assetID := AssetID(vm.contract.seed, tag) |
| 38 | |
| 39 | val := vm.createValue(int64(amount), assetID[:], anchor) |
| 40 | vm.push(val) |
| 41 | |
| 42 | vm.logIssuance(int64(amount), assetID[:], anchor) |
| 43 | } |
| 44 | |
| 45 | // AssetID produces the ID for the asset whose issuing contract has |
| 46 | // the given ID, and that has the given optional asset tag. |
nothing calls this directly
no test coverage detected