General contracts architecture scaffolding
Contracts
-
organization.ral
: Will have a similar architecture as ENFT certificator contract. Includes ACL (token-based) configuration in its fields, and allowed proposal types. -
proposal.ral
: Subcontract template, highly customizable pre-build trough pragma's that will be processed by a dedicated pre-build script.
Concept
The Organization contract allows addresses that fulfill the ACL requirements to create proposals.
Those proposals are first created in a pre-approval state (with an optional parameter for a mandatory minimal time required to remain in that state). The organization contract allows addresses that fulfill the ACL requirements to approve proposals to set it in approved state.
Once in approved state, the proposal can be voted once entered in the defined vote period.
Vote results are based on voting power calculated accordingly to defined rules (based on token held).
Before the vote period begins, voters need to register, and this registration process in the proposal subcontract will act as a snapshot for the number of token held.
The pre-approval state could be configured to already accept voting registrations and a certain threshold (quorum) of registered participants will automatically make the proposal approved.
During the pre-approval period, proposer can edit it's proposal. All edits will cancel all voters registrations and/or restart the pre-approval mandatory period if one configured.
TODOs
-
Init dev environment ( npm
, etc.) -
Contract folders with interface files for the contracts above -
Frontend folders with scaffolding for NextJS project -
Tests folder -
npm
workspaces -
Implement contract interfaces -
Implement TDD unit tests -
Implement contract and variants