-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make value
argument of /voucher
entry-point optional
#21
Comments
I support the change. openapi-interfaces/rollup.yaml Line 429 in 9b9d608
|
Strong agree, but I would like to point that we also have to change the description of destination openapi-interfaces/rollup.yaml Line 406 in 9b9d608
Currently it specifiec it is the address of a contract and for ether withdrawals it can be the user who will be receiving the assets. |
Yes, |
Yes, and we should make it clear that zero is the default value. |
Hi guys. Any reason why this didn't go forward? |
Rationale
On SDK v1, vouchers had only two fields:
destination
andpayload
.On-chain, this triggers a
CALL
instruction.This instruction also takes a
value
as stack input, but we didn't specify it,so Solidity would pass zero as the default value to message calls.
On SDK v2, we introduced the
value
field to parameterize this stack input.In most cases, however, this field will still be zero.
It will only be non-zero when there is some movement of Ether.
The classic example is Ether withdrawals.
If this field were made obligatory in the HTTP API,
application back-ends would have to adapt every call to the
/voucher
entry-point,just to pass the same value, zero.
To make this change backwards-compatible,
we believe that we can make this field optional,
with zero being a sensible default.
Proposal
Make the
value
argument of the/voucher
entry-point optional.The default value should be zero, just like before.
If this change is agreed upon, an equivalent issue should be opened on
machine-emulator-tools
.The text was updated successfully, but these errors were encountered: