-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FEATURE]: provide call_args
in call_data
#819
Comments
args
in call_data
call_args
in call_data
This issue is stale because it has been open for 30 days with no activity. |
not stale |
This issue is stale because it has been open for 30 days with no activity. |
This issue is stale because it has been open for 30 days with no activity. |
This issue is stale because it has been open for 30 days with no activity. |
I suppose this issue comes down to the following question. Should the call data be a requirement or a standard? Let's consider the following scenarios. What if the calling contract lies or doesn't follow the standard, what should authorize return? Well, it could just refuse to authorize if the data is not expected. And if the data is incorrect, what is the worst that could happen? You would authorize a call to a contract that was unintended. But what harm could that do? That contract cannot use that authorization to take tokens from you because the token contracts will also check for authority. The worst that can happen is that a dumb contract gets your authorization to do dumb contract things limited to the dumb contract's space. I understand the motivation for the proposal, I do not think it adds any significant value. I am happy to continue the discussion. |
I feel like if we can provide the information in a trustless way then we should do it. Also, it would probably save Mana doing so since you would not be passing the arguments around from the contracts. |
This issue is stale because it has been open for 30 days with no activity. |
Making this change would require a hardfork as it changes how the framework behaves. So we need to decide if it is worth the pain of a hardfork to add this or if making it a part of an application standard makes more sense given the ease of implementation. Note: We cannot simply add the behavior in a contract implemented system call because the contract does not have access to the full call stack that would be required for the implementation. |
I guess the application standard should be good enough for now, maybe we can revisit this item if/whenever a hardfork is planned one day. Should I close this issue for now? Is there a place we should use to "save" items that could be part of a hardfork later? |
This issue is stale because it has been open for 30 days with no activity. |
Is there an existing issue for this?
New feature
As a smart contract developer I would like to be able to retrieve, from the
authorize
entry point, the arguments that were provded in a contract call.Currently,
authorize_arguments.call
only providescontract_id
andentry_point
and relies on thedata
field to let smart contracts provide additional data. This means that if a smart contract callcheck_authority
and does not provide the contract call args indata
thenauthorize
is not able to verify the contract call arguments.The idea is to add a new field to
call_data
and provide the contract call args in this new field:Anything else?
authorize_arguments message definition
call_data message definition
The text was updated successfully, but these errors were encountered: