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: add r/sys/params + params genesis support #3003

Merged
merged 90 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
b930513
feat(tm2/sdk/params): initial version
moul Oct 7, 2024
602245d
feat: inject ParamsKeeper in VMKeeper
moul Oct 9, 2024
783a044
feat: configure params in gno.land
moul Oct 10, 2024
072aa12
Merge branch 'master' into dev/moul/mod-params
moul Oct 20, 2024
89e046c
chore: remove unused param
moul Oct 21, 2024
5d1e36a
chore: disable --flag-config-path
moul Oct 21, 2024
e5a869d
Merge branch 'master' into dev/moul/mod-params
moul Oct 21, 2024
581ef26
chore: fixup
moul Oct 21, 2024
a39d172
chore: fixup
moul Oct 21, 2024
0342b61
chore: fixup
moul Oct 21, 2024
dd8ca08
chore: remove vmkeeper.maxcycles
moul Oct 21, 2024
e573b6a
chore: fixup
moul Oct 21, 2024
993d213
chore: fixup
moul Oct 21, 2024
ee8c778
Merge branch 'dev/moul/remove-max-cycles' into dev/moul/mod-params
moul Oct 21, 2024
95384ae
chore: fixup
moul Oct 22, 2024
a4608eb
chore: fixup
moul Oct 22, 2024
9f18bad
chore: rename config -> param
moul Oct 22, 2024
5ba066e
chore: fixup
moul Oct 22, 2024
4e097fc
Merge remote-tracking branch 'origin/master' into dev/moul/mod-params
moul Oct 22, 2024
5260059
chore: ignore generated files from codecov
moul Oct 22, 2024
309806f
chore: fixup
moul Oct 22, 2024
911c27f
Merge branch 'master' into dev/moul/mod-params
moul Oct 22, 2024
94cf1a4
Merge remote-tracking branch 'origin/master' into dev/moul/mod-params
moul Oct 22, 2024
604466c
chore: fixup
moul Oct 22, 2024
8c5b00a
chore: fixup
moul Oct 22, 2024
4a1c0bb
chore: fixup
moul Oct 22, 2024
86b4fbd
chore: fixup
moul Oct 22, 2024
61839a8
feat: add r/sys/params + params genesis support
moul Oct 22, 2024
be58b92
Merge branch 'dev/moul/mod-params' into dev/moul/r/sys/params
moul Oct 22, 2024
bf94222
chore: fixup
moul Oct 22, 2024
902eb9c
chore: fixup
moul Oct 23, 2024
f4eb4c5
Merge branch 'dev/moul/mod-params' into dev/moul/r/sys/params
moul Oct 23, 2024
cb57a8f
chore: fixup
moul Oct 23, 2024
74025b5
chore: fixup
moul Oct 23, 2024
8f52428
chore: fixup
moul Oct 23, 2024
d38c6b8
chore: fixup
moul Oct 23, 2024
dc37fe0
chore: fixup
moul Oct 23, 2024
4f7c4eb
Merge branch 'dev/moul/mod-params' into dev/moul/r/sys/params
moul Oct 23, 2024
a166760
chore: fixup
moul Oct 23, 2024
e7840ff
chore: fixup
moul Oct 23, 2024
aaa88b6
Merge remote-tracking branch 'origin/master' into dev/moul/r/sys/params
moul Oct 23, 2024
f382771
chore: fixup
moul Oct 23, 2024
d92a959
chore: fixup
moul Oct 23, 2024
2c4c979
chore: fixup
moul Oct 23, 2024
abf1704
chore: fixup
moul Oct 23, 2024
83eae8d
chore: fixup
moul Oct 23, 2024
672fb97
chore: fixup
moul Oct 23, 2024
95c975d
chore: fixup
moul Oct 23, 2024
529c91f
Merge remote-tracking branch 'origin/master' into dev/moul/r/sys/params
moul Oct 23, 2024
9bc2f6e
chore: fixup
moul Oct 23, 2024
af5b313
chore: fixup
moul Oct 23, 2024
9b23068
chore: fixup
moul Oct 24, 2024
f6fc9ae
chore: fixup
moul Oct 24, 2024
18944a2
chore: fixup
moul Oct 24, 2024
9b8958a
chore: fixup
moul Oct 24, 2024
888dfa9
chore: fixup
moul Oct 24, 2024
fcafaed
chore: fixup
moul Oct 24, 2024
e24c553
Merge remote-tracking branch 'origin/master' into dev/moul/r/sys/params
moul Oct 24, 2024
21a3983
chore: fixup
moul Oct 24, 2024
6ab560e
chore: fixup
moul Oct 24, 2024
1dc779b
chore: fixup
moul Oct 25, 2024
5ddb4cb
chore: fixup
moul Oct 25, 2024
4ebb76c
chore: fixup
moul Oct 25, 2024
065842b
chore: fixup
moul Oct 25, 2024
fc3d149
chore: fixup
moul Oct 26, 2024
3ad7ffa
chore: fixup
moul Oct 26, 2024
2eea867
chore: fixup
moul Oct 26, 2024
ae0bd03
chore: fixup
moul Oct 26, 2024
cef75f6
chore: fixup
moul Oct 26, 2024
3d128b4
Merge remote-tracking branch 'origin/master' into dev/moul/r/sys/params
moul Oct 26, 2024
b00abbe
Merge remote-tracking branch 'origin/master' into dev/moul/r/sys/params
moul Oct 31, 2024
12f0140
chore: fixup
moul Oct 31, 2024
ac774bd
chore: fixup
moul Oct 31, 2024
f70a2e0
chore(gno): intended json on filetests's Events: directives
moul Oct 31, 2024
3cce575
Merge branch 'dev/moul/filetest-events-indent' into dev/moul/r/sys/pa…
moul Oct 31, 2024
f9c6d0c
chore: fixup
moul Oct 31, 2024
d31d255
chore: fixup
moul Oct 31, 2024
734157f
Merge branch 'master' into dev/moul/r/sys/params
moul Oct 31, 2024
a9b4429
Merge branch 'master' into dev/moul/r/sys/params
moul Nov 5, 2024
cf701d7
Merge branch 'master' into dev/moul/r/sys/params
thehowl Nov 8, 2024
9ce3bd4
chore: fixup
moul Nov 8, 2024
187d1e5
chore: fixup
moul Nov 9, 2024
0a3ea0e
chore: fixup
moul Nov 9, 2024
23f8ce2
chore: fixup
moul Nov 9, 2024
81a3f56
chore: fixup
moul Nov 9, 2024
6c47366
chore: fixup
moul Nov 9, 2024
fbf4fdb
chore: fixup
moul Nov 9, 2024
6d99f19
chore: fixup
moul Nov 9, 2024
15bacef
Merge branch 'master' into dev/moul/r/sys/params
moul Nov 12, 2024
1ce1a27
Merge branch 'master' into dev/moul/r/sys/params
moul Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions examples/gno.land/r/gov/dao/v2/dao.gno
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ var (
)

func init() {
var (
// Example initial member set (just test addresses)
set = []membstore.Member{
{
Address: std.Address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"),
VotingPower: 10,
},
}
)
// Example initial member set (just test addresses)
set := []membstore.Member{
{
Address: std.Address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"),
VotingPower: 10,
},
}

// Set the member store
members = membstore.NewMembStore(membstore.WithInitialMembers(set))
Expand Down
82 changes: 82 additions & 0 deletions examples/gno.land/r/gov/dao/v2/prop1_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,85 @@ func main() {
// - #123: g12345678 (10)
// - #123: g000000000 (10)
// - #123: g000000000 (0)

// Events:
// [
// {
// "type": "ProposalAdded",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "proposal-author",
// "value": "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitProposalAdded"
// },
// {
// "type": "VoteAdded",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "author",
// "value": "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"
// },
// {
// "key": "option",
// "value": "YES"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitVoteAdded"
// },
// {
// "type": "ProposalAccepted",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitProposalAccepted"
// },
// {
// "type": "ValidatorAdded",
// "attrs": [],
// "pkg_path": "gno.land/r/sys/validators/v2",
// "func": "addValidator"
// },
// {
// "type": "ValidatorAdded",
// "attrs": [],
// "pkg_path": "gno.land/r/sys/validators/v2",
// "func": "addValidator"
// },
// {
// "type": "ValidatorRemoved",
// "attrs": [],
// "pkg_path": "gno.land/r/sys/validators/v2",
// "func": "removeValidator"
// },
// {
// "type": "ProposalExecuted",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "exec-status",
// "value": "accepted"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "ExecuteProposal"
// }
// ]
64 changes: 64 additions & 0 deletions examples/gno.land/r/gov/dao/v2/prop2_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,67 @@ func main() {
// ### [Hello from GovDAO!](/r/gnoland/blog:p/hello-from-govdao)
// 13 Feb 2009
// </div></div>

// Events:
// [
// {
// "type": "ProposalAdded",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "proposal-author",
// "value": "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitProposalAdded"
// },
// {
// "type": "VoteAdded",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "author",
// "value": "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"
// },
// {
// "key": "option",
// "value": "YES"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitVoteAdded"
// },
// {
// "type": "ProposalAccepted",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitProposalAccepted"
// },
// {
// "type": "ProposalExecuted",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "exec-status",
// "value": "accepted"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "ExecuteProposal"
// }
// ]
67 changes: 66 additions & 1 deletion examples/gno.land/r/gov/dao/v2/prop3_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"gno.land/p/demo/dao"
"gno.land/p/demo/membstore"
"gno.land/r/gov/dao/bridge"
govdao "gno.land/r/gov/dao/v2"
)

Expand Down Expand Up @@ -34,7 +35,7 @@ func init() {
Executor: govdao.NewMemberPropExecutor(memberFn),
}

govdao.Propose(prop)
bridge.GovDAO().Propose(prop)
}

func main() {
Expand Down Expand Up @@ -118,3 +119,67 @@ func main() {
//
// --
// 4

// Events:
// [
// {
// "type": "ProposalAdded",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "proposal-author",
// "value": "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitProposalAdded"
// },
// {
// "type": "VoteAdded",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "author",
// "value": "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"
// },
// {
// "key": "option",
// "value": "YES"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitVoteAdded"
// },
// {
// "type": "ProposalAccepted",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "EmitProposalAccepted"
// },
// {
// "type": "ProposalExecuted",
// "attrs": [
// {
// "key": "proposal-id",
// "value": "0"
// },
// {
// "key": "exec-status",
// "value": "accepted"
// }
// ],
// "pkg_path": "gno.land/r/gov/dao/v2",
// "func": "ExecuteProposal"
// }
// ]
Loading
Loading