decentdao / decent-contracts

Govern at startup speed
https://app.decentdao.org
MIT License
3 stars 3 forks source link

Emit Usul metadata #14

Closed mudrila closed 1 year ago

mudrila commented 1 year ago

This PR implements following:

  1. Implements custom FractalUsul contract, which extends from original Usul. This contract contains submitProposalWithMetaData which will be used instead of original submitProposal.
  2. It emits ProposalMetadataCreated with proposalId, title, description and documentationUrl
  3. It stores transactions under Proposal struct during proposal creation, but also it converts transactions to txHashes and stores them as well for backwards compatibility with the rest of Usul code.

Closes #7

mudrila commented 1 year ago

This PR should include some (basic) tests as well to confirm that proposals created through this new function can be successfully executed. Let me know if you want / need any help on those!

Yessir - definitely will come with tests. Just wanted to align on implementation first

mudrila commented 1 year ago

Comparisons of gas fee for different cases:

  1. Comparison of finalized implementation for submitProposal and submitProposalWIthMetaData

    Знімок екрана 2022-12-02 о 13 41 41
  2. Comparison of submitProposalWithMetaData without emitting ProposalMetaDataCreated

    Знімок екрана 2022-12-02 о 13 43 28
  3. Comparison of submitProposal with submitProposalWithMetaData with 10 transactions

    Знімок екрана 2022-12-02 о 13 46 30

cc @herbig