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

feat(examples): add disperse #1414

Closed
wants to merge 21 commits into from
Closed

Conversation

leohhhn
Copy link
Contributor

@leohhhn leohhhn commented Dec 5, 2023

Description

This PR adds a port of the Disperse.app smart contract on EVM. It helps showcase how sending GNOT to and from a realm works.

This PR is part of the Dogfooding initiative. Here is the linking comment.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Dec 5, 2023
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (05dccce) 56.26% compared to head (9079f54) 56.26%.
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1414   +/-   ##
=======================================
  Coverage   56.26%   56.26%           
=======================================
  Files         425      425           
  Lines       64408    64408           
=======================================
  Hits        36237    36237           
  Misses      25349    25349           
  Partials     2822     2822           
Flag Coverage Δ
go-1.21.x ∅ <ø> (∅)
misc ∅ <ø> (∅)
misc-_test.genstd ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Dec 14, 2023
@leohhhn leohhhn changed the title feat: add disperse feat(examples): add disperse Dec 14, 2023
@leohhhn
Copy link
Contributor Author

leohhhn commented Jan 9, 2024

This PR is currently blocked by the inability to write tests:

  • gno test does not work correctly with the banker API (a larger issue)
  • txtar tests do not currently provide enough configuration - for testing the Disperse app, there needs to be multiple accessible addresses within the testing context, and currently the only accessible one is test1.

@moul @thehowl @deelawn @zivkovicmilos - how can we progress on making the testing experience better?

@zivkovicmilos
Copy link
Member

This PR is currently blocked by the inability to write tests:

  • gno test does not work correctly with the banker API (a larger issue)
  • txtar tests do not currently provide enough configuration - for testing the Disperse app, there needs to be multiple accessible addresses within the testing context, and currently the only accessible one is test1.

@moul @thehowl @deelawn @zivkovicmilos - how can we progress on making the testing experience better?

I'm not sure what the exact problem is with using txtar for an e2e test. What kind of data do you need in the test?

@thehowl
Copy link
Member

thehowl commented Jan 18, 2024

  • txtar tests do not currently provide enough configuration - for testing the Disperse app, there needs to be multiple accessible addresses within the testing context, and currently the only accessible one is test1.

Two proposals:

  1. Adding proper support for adding a key to the keystore, ie. being able to call gnokey add and pass in the mnemonic in txtar. (Reqires changing txtar up a bit)
  2. Using gnokey import/export (I think this can be done now already)

@thehowl
Copy link
Member

thehowl commented Jan 18, 2024

One more thing: it seems to me that you don't actually need to create the accounts you claim you need to create (from the current state of the code).

That is, unless they need to be able to move coins on their own, the accounts don't need to have a matching private key.

You can just use disperse to send off tokens to some account strings you made up, and then check the txtar result of doing gnokey query auth/accounts/%s.

@github-actions github-actions bot added 📦 🤖 gnovm Issues or PRs gnovm related 📦 🌐 tendermint v2 Issues or PRs tm2 related and removed 📦 🤖 gnovm Issues or PRs gnovm related 📦 🌐 tendermint v2 Issues or PRs tm2 related labels Jan 31, 2024
@leohhhn
Copy link
Contributor Author

leohhhn commented May 15, 2024

Update on this: this has been sitting for a ton of time. Will get back to it soon hopefully, it's not a priority right now.

@leohhhn leohhhn closed this Jul 21, 2024
@agherasie agherasie mentioned this pull request Jul 22, 2024
7 tasks
leohhhn added a commit that referenced this pull request Aug 21, 2024
This PR adds a gno version of the [disperse ethereum
app](https://disperse.app/) to gno.land !
Another attempt was made in #1414 but
we have decided to pick up from @leohhhn 's work with @lennyvong and
made this PR, tested using txtar tests to avoid the situation described
in #2595
There is also an older (but functional for the most part) version
[deployed in
test4](https://test4.gno.land/r/g1w62226g8hykfmtuasvz80rdf0jl6phgxsphh5v/testing/disperse2?help)
with a linked [webapp](https://gno-disperse.netlify.app/)

<img width="649" alt="image"
src="https://github.com/user-attachments/assets/ad26a1a9-0447-4333-858a-253441c457ba">

<details><summary>Contributors' checklist...</summary>

- [X] Added new tests, or not needed, or not feasible
- [X] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [X] Updated the official documentation or not needed
- [X] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [X] Added references to related issues and PRs
- [X] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>

---------

Co-authored-by: leohhhn <[email protected]>
Co-authored-by: Leon Hudak <[email protected]>
Co-authored-by: lennyvongphouthone <[email protected]>
Co-authored-by: Guilhem Fanton <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants