process.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. old_request_format = {
  2. user=user, -- requesting user
  3. type="add_member", -- action
  4. params={user} -- action params
  5. }
  6. old_process_format = {
  7. type = "consent", -- delete
  8. id = nil,
  9. org_id = nil,
  10. request_id = nil, -- delete
  11. -- consent config
  12. majority_to_pass = 0.51, -- voting threshold
  13. votes_needed = nil,
  14. -- consent data
  15. total_votes = 0,
  16. votes_yes = {},
  17. votes_no = {}
  18. }
  19. new_process_format = {
  20. initiator = "user",
  21. status = "request",
  22. org_id = 12314,
  23. module = "create_child_org", -- policy table lookup
  24. process_id = 8347,
  25. timestamp = 1632850133, -- look into supporting other formats, overrides (turn based, etc.)
  26. data = {
  27. child_org_name = "oligarchy"
  28. },
  29. consent = {
  30. -- voter eligibilty frozen by action table invites
  31. start_time = 384179234,
  32. member_count = 14,
  33. votes_yes = {},
  34. votes_no = {}
  35. }
  36. }
  37. policy_table_format = {
  38. "create_child_org": {
  39. defer_to = nil,
  40. -- duration
  41. duration = nil, -- evaluates end conditions when reached
  42. -- thesholds
  43. no_threshold = nil, -- fails if reached
  44. yes_threshold = nil, -- succeeds if reached
  45. --ratios
  46. consent_ratio = nil, -- % of voters
  47. quorum = nil, -- % of members that vote
  48. }
  49. "create_child_org": {
  50. consent_threshold = 0.51,
  51. max_duration = 89324, -- seconds until vote closes if threshold not reached, or nil for no limit
  52. defer = nil, -- org id to defer to, or nil
  53. }
  54. }