Skip to content
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

exp: add std.ExecAsPkg #335

Closed
wants to merge 2 commits into from
Closed

Conversation

moul
Copy link
Member

@moul moul commented Sep 13, 2022

Signed-off-by: Manfred Touron 94029+moul@users.noreply.github.com

Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
@moul moul self-assigned this Sep 13, 2022
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
@moul moul changed the title chore: add std.ExecAsPkg exp: add std.ExecAsPkg Oct 28, 2022
@loicttn
Copy link
Contributor

loicttn commented Nov 5, 2022

This feature would be super useful to create an on-chain multisig where we could have functions like:

// Create a proposal for the quorum and add it to the proposals array
// if sender is not in the current quorum, revert
// if expirationTimestamp is already reached, revert
func CreateProposal(rawTx tx, expirationTimestamp string)

to create a Proposal and store the rawTx in the contract state, and then:

// Execute an approved tx
// if sender is not in the current quorum, revert
func Execute(proposalId string)

where Execute would use a function like std.Exec(rawTx) where rawTx type is

type RawTx struct {
    destination  std.Address
    value            uint64
    data             bytes
}

In Solidity we can do calls like that with destination.call.value(txValue)(txData); it would be nice to have a similar pattern here

@moul
Copy link
Member Author

moul commented Nov 29, 2022

Btw, recent discussions on #393 and #402 make me think that other people may be interested to find a way to ExecAsPkg.

@moul
Copy link
Member Author

moul commented Mar 31, 2023

Please share your thoughts on PR #683.

@jaekwon
Copy link
Contributor

jaekwon commented Apr 19, 2023

There must be a pattern that uses only pure Go/Gno to achieve what we ultimately want.
Please see #566 (comment).
Also see #715 (review).

@jaekwon jaekwon closed this Apr 19, 2023
@zivkovicmilos zivkovicmilos removed this from the 4️⃣ test4.gno.land milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: ✅ Done
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants