-
Notifications
You must be signed in to change notification settings - Fork 25
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
provide uint256 param to GenericScheme GenericCall #620
Comments
The param would be automatically supportable by dApp GUIs such as Alchemy, without requiring any custom code. |
if the |
The idea is that GenericScheme would pass the value of the additional |
For what ? If the invoked contract needs some additional param it should
define it in its function abi params
…On Sat, 6 Apr 2019 at 17:16 Doug Kent ***@***.***> wrote:
if the invoked contract would like to get some additional param it should
define that on its function params. what we are missing here ?
The idea is that GenericScheme would pass the *value* of the addition
uint256 param to the invoked contract function.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#620 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFt3nq88Zop13CHVYB-LcrTQrEU-pXjfks5veKxLgaJpZM4ce_Pv>
.
|
How do you propose that the contract receive the param value? I am not aware that an ABI can specify parameter values. Am I wrong? |
genericScheme (and eventually genericCall) can invoke any function with any
number and types of parameters .
…On Sat, 6 Apr 2019 at 22:43 Doug Kent ***@***.***> wrote:
If the invoked contract needs some additional param it should
define it in its function abi params
How do you propose that the contract receive the param *value*? I am not
aware that an ABI can specify parameter *values*. Am I wrong?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#620 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFt3nvOEGezDc-rwcjTvr5NcmqRbHrsHks5vePjGgaJpZM4ce_Pv>
.
|
Asking the user to supply an ABI is very unfriendly. Asking the dApp, such as Alchemy, to hardcode arbitrary ABIs requires writing custom code for every GenericScheme. I am asking to support just one additional parameter. I know it doesn't cover all cases, but it covers a lot of cases (I described three above). It is a lot better than the alternatives. |
It sounds to me like the beginning of generic scheme templates, with this being the first template - single Parma function... @dkent600 - is that close enough, or am I missing anything? :) |
Feature request: GenericScheme allows us to create proposals that result, upon execute, in calling a function on another contract. The function is defined by the contract address and the ABI-encoded definition of the function.
A given instance of GenericScheme is configured, when deployed, with a single contract address on which to invoke functions. From that contract, each GenericScheme proposal may specify a function (ABI) that will be invoked upon GenericScheme.execute. Each proposal may also specify an ETH amount to transfer to the contract when the funciton is invoked.
However, when creating proposals, it is not possible to specify parameters that may be passed to the contract function. Just a single uint256 parameter could provide the contract with context that informs the contract function about what to do when it is invoked.
Without such contextual information, a given contract function knows not why it is being invoked, beyond the single dimension of having been invoked.
A use-case I have in mind is a contract function to which we may pass a proposalId that is provided to the GenericScheme proposal upon creation of the GenericScheme proposal. This proposalId param would identify proposals on other schemes in the DAO, for example, ContributionReward. Perhaps the invoked contract would use that proposalId to implement multi-target rewards, reward escrows, or deal with proposals that have been voted to be malicious.
Or course, the uint256 param needn't identify a proposalId, but could be an address or anything else that would fit within that size.
The text was updated successfully, but these errors were encountered: