Pure package detail
daokit
gno.land/p/samcrew/daokit
Indexed deployment identity with independently loaded latest RPC source. Functions and Render are realm-only RPC capabilities.
Indexed deployment
Identity
- Package path
- gno.land/p/samcrew/daokit
- Block
- 98954
- Deployed (UTC)
- Transaction
- aMs6lHUd4/ehRovK+QdZ5C3LlBbiF1y6+LCt7oAXaJM=
Latest RPC state
Source
package daokit
// Maps action types to their handlers and conditions.
//
// Example: "transfer" action requires 3 member votes for execution.
import (
"gno.land/p/samcrew/avl"
"gno.land/p/samcrew/daocond"
)
type ResourcesStore struct {
Tree *avl.Tree // string -> daocond.Condition
}
type Resource struct {
Handler ActionHandler // Executes the action when proposal passes
Condition daocond.Condition // Voting rules required for approval
DisplayName string
Description string
}
func NewResourcesStore() *ResourcesStore {
return &ResourcesStore{
Tree: avl.NewTree(),
}
}
// Retrieves a resource by its handler type name.
func (r *ResourcesStore) Get(name string) *Resource {
value, ok := r.Tree.Get(name)
if !ok {
return nil
}
res := value.(*Resource)
return res
}
// Registers a new resource with its handler type as key.
func (r *ResourcesStore) Set(resource *Resource) {
r.Tree.Set(resource.Handler.Type(), resource)
}
The verified vm/qfuncs operation accepts realm paths only.
Pure packages expose source files but do not have Realm Render.