Guidelines For Correctly Coding a Proposal

A Proposal can contain any kind of code and any kind of function to execute. At the time of code execution, the Proposal code is executed as an active Component, so that it can write on the Organization and/or Components of the Organization.

Things to consider when writing a Proposal are:

  • If the smart contract(s) of the Proposal require initialization data, it must be deployed and initialized before its eventual execution. In the case the bytecode is passed in the ProposalCode struct, the Proposal smart contract is deployed by the Proposal Manager in the same transaction that the Proposal is created. Once created, you can initialize it before its eventual execution.

  • The smart contract of a Proposal must contain the execute method, called by the Proposal Manager if the Proposal passes to execute it. The execute method must contain the code of the Proposal that you wish to execute.

Here, you can find a Collection of useful Proposals.

Last updated