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 handlePUNCH handle
-> punches the ticket, fails if the ticket is already punchedREAD handle : (address, 'a, nat)
-> gives you back the content of the ticketSPLIT ('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 matchesWith 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.