Add Tickets (improved stamps)
This MR adds 4 instructions and one type to Michelson:
-
TICKET 'a nat
-> creates a ticket attached to the address SELF and with an amount in nat, returns a handle -
PUNCH handle
-> punches the ticket, fails if the ticket is already punched -
READ handle : (address, 'a, nat)
-> gives you back the content of the ticket -
SPLIT ('a handle) nat nat : pair handle 'a handle 'a
-> splits a handle into two, punches the old one and verify that the sum of amount matches
With this, it is possible to easily emulate transferable permissions (create a Ticket, send it to someone), do multi-sig with multiple contracts (check Tickets) or embed UTXOs in Tezos.
I am mostly looking for feedback on the design at this stage.
This MR makes !84 (closed) obsolete.
Edited by Adrian Brink