-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: govdao mvp improvement (#2344)
Continues #1945 --------- Signed-off-by: moul <[email protected]>
- Loading branch information
Showing
10 changed files
with
203 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
module gno.land/r/gov/dao | ||
|
||
require gno.land/p/gov/proposal v0.0.0-latest | ||
require ( | ||
gno.land/p/demo/ufmt v0.0.0-latest | ||
gno.land/p/gov/proposal v0.0.0-latest | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package govdao | ||
|
||
// Status enum. | ||
type Status string | ||
|
||
var ( | ||
Accepted Status = "accepted" | ||
Active Status = "active" | ||
// Timeout, NotAccepted | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Draft | ||
|
||
module integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Package integration tests the govdao ecosystem from an external perspective. | ||
// It aims to confirm that the system can remain static while supporting | ||
// additional DAO use cases over time. | ||
package integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package main | ||
|
||
import ( | ||
govdao "gno.land/r/gov/dao" | ||
_ "gno.land/r/gov/proposals/prop1" | ||
) | ||
|
||
func main() { | ||
println("--") | ||
println(govdao.Render("")) | ||
println("--") | ||
println(govdao.Render("1")) | ||
println("--") | ||
govdao.VoteOnProposal(1, "YES") | ||
println("--") | ||
println(govdao.Render("1")) | ||
println("--") | ||
govdao.ExecuteProposal(1) | ||
println("--") | ||
println(govdao.Render("1")) | ||
} | ||
|
||
// Output: | ||
// -- | ||
// - [/r/gov/dao:0](0) - manual valset changes proposal example (by g1tk0fscr3p5g8hnhxq6v93jxcpm5g3cstlxfxa3) | ||
// -- | ||
// # Prop#0 | ||
// | ||
// manual valset changes proposal example | ||
// Status: active | ||
// Author: g1tk0fscr3p5g8hnhxq6v93jxcpm5g3cstlxfxa3 | ||
// -- | ||
// -- | ||
// # Prop#0 | ||
// | ||
// manual valset changes proposal example | ||
// Status: accepted | ||
// Author: g1tk0fscr3p5g8hnhxq6v93jxcpm5g3cstlxfxa3 | ||
// -- | ||
// -- | ||
// # Prop#0 | ||
// | ||
// manual valset changes proposal example | ||
// Status: success | ||
// Author: g1tk0fscr3p5g8hnhxq6v93jxcpm5g3cstlxfxa3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters