Currently there are two protocol limitations that introduce friction when using tickets:
Relevant docs:
Implicit accounts are able to send tickets to smart contracts using Transfer_ticket
operation. The result of such operation is an internal transaction with restricted entrypoint type.
The entrypoint must have ticket a
type, meaning that one cannot pass additional data alongside. However there are cases when it is necessary to do so.
What we can do is splitting the invocation in two parts:
Invoked contract has to support this two-step workflow i.e. save temporary context. Ideally these two call should be done in a batch to ensure atomicity.
A better option would be Transaction
operation with arbitrary parameter type allowing tickets. That would:
From the wallet/indexer perspective it should not introduce any additional work as long as ticket updates are included in the operation receipt.
Implicit accounts are not allowed to call smart rollups (i.e. send internal inbox messages), they can only submit blobs (aka external inbox messages). Only smart contracts can send transactions (that can also contain tickets) to rollups.
Currently if one wants to send internal inbox message he needs to use additional smart contract as a proxy.
A proxy should not necessarily be a standalone contract, it can also be an extra feature in the contract containing business logic (yet standalone implementation provides a more clear separation of concerns).
A better approach would be allowing implicit account to invoke smart rollups the same way they invoke smart contracts (including the forementioned ticket UX fix). It would:
Generally this proposal is about aligning different types of accounts in terms of what they can do with tickets — and thus facilitate adoption.
Currently smart rollups can only initiate smart contract calls on L1. On the kernel side you can specify destination address (originated contract), entrypoint, and parameters (either typed or untyped):
{ /* Atomic_transaction_batch */
"transactions":
[ { "parameters": $micheline.017-PtNairob.michelson_v1.expression,
"destination": $017-PtNairob.contract_id.originated,
"entrypoint"?: $unistring } ... ],
"kind": "untyped" }
|| { /* Atomic_transaction_batch_typed */
"transactions":
[ { "parameters": $micheline.017-PtNairob.michelson_v1.expression,
"parameters_ty": $micheline.017-PtNairob.michelson_v1.expression,
"destination": $017-PtNairob.contract_id.originated,
"entrypoint"?: $unistring } ... ],
"kind": "typed" }
This restriction means that users cannot withdraw their assets (tickets) without an intermediary, which causes:
A clean solution that would not break backward compatibility is introducing another outbox transaction type, e.g.:
{ /* Atomic_transfer_ticket_batch */
"operations":
[ { "ticket_contents": $micheline.017-PtNairob.michelson_v1.expression,
"ticket_ty": $micheline.017-PtNairob.michelson_v1.expression,
"ticket_ticketer": $017-PtNairob.contract_id.originated,
"ticket_amount": $nat,
"destination": $017-PtNairob.contract,
"entrypoint"?: $unistring } ... ],
"kind": "transfer_ticket" }
Overall, removing the current limitations on the interaction between implicit and smart rollup accounts would accelerate the ticket adoption.