Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Advanced factory contract #219

Merged
merged 116 commits into from
Jun 27, 2024
Merged

Commits on Jun 26, 2024

  1. add initial factory

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    c3c1781 View commit details
    Browse the repository at this point in the history
  2. add ownable component

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    77e0f4c View commit details
    Browse the repository at this point in the history
  3. add caller to CounterCreated event

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    4482699 View commit details
    Browse the repository at this point in the history
  4. turn counter into campaign

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    8c4041d View commit details
    Browse the repository at this point in the history
  5. fix Campaign interfaced funcs + implement donate

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a444ead View commit details
    Browse the repository at this point in the history
  6. add _assert_is_ended + update error messages

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a29d077 View commit details
    Browse the repository at this point in the history
  7. _assert_active->_assert_campaign_active

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    d9facfe View commit details
    Browse the repository at this point in the history
  8. _assert_is_ended->_assert_campaign_ended

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    9436c77 View commit details
    Browse the repository at this point in the history
  9. implement withdraw

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    e3ff8de View commit details
    Browse the repository at this point in the history
  10. add missing assert success in donate

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    2ea6f8f View commit details
    Browse the repository at this point in the history
  11. add title & description

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    abd561a View commit details
    Browse the repository at this point in the history
  12. update comment

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    8c255fb View commit details
    Browse the repository at this point in the history
  13. implement upgrade

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    31b84f3 View commit details
    Browse the repository at this point in the history
  14. clean up internal funcs and imports

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    cae84c6 View commit details
    Browse the repository at this point in the history
  15. move hardcoded errors in Errors mod

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    c45855b View commit details
    Browse the repository at this point in the history
  16. donate -> contribute + event rename

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    2008ed3 View commit details
    Browse the repository at this point in the history
  17. withdraw -> claim

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    662a4f3 View commit details
    Browse the repository at this point in the history
  18. add store impl for contract addr. array

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7e13707 View commit details
    Browse the repository at this point in the history
  19. remove store impl

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a0932c8 View commit details
    Browse the repository at this point in the history
  20. add dynamic array impl

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    52aa534 View commit details
    Browse the repository at this point in the history
  21. remove dyn. array

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    843bb2e View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    5c6b5c1 View commit details
    Browse the repository at this point in the history
  23. implement updating class hashes

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    dabb2c1 View commit details
    Browse the repository at this point in the history
  24. Make title ByteArray again + target into u256 + update ctor arg seria…

    …lization
    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7f7c7fc View commit details
    Browse the repository at this point in the history
  25. refactor serialization + add back description

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a39ced9 View commit details
    Browse the repository at this point in the history
  26. remove unused contracts

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    0fcfd17 View commit details
    Browse the repository at this point in the history
  27. add 1 test

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    5f766fd View commit details
    Browse the repository at this point in the history
  28. add get_description

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    74fe0fd View commit details
    Browse the repository at this point in the history
  29. add correct deps

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    b3e1efb View commit details
    Browse the repository at this point in the history
  30. add alexandria to toml

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    b327d80 View commit details
    Browse the repository at this point in the history
  31. format factory.cairo

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    1092946 View commit details
    Browse the repository at this point in the history
  32. add missing snforge workspace

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    3bba851 View commit details
    Browse the repository at this point in the history
  33. add missing getters + tests

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    f1bd81e View commit details
    Browse the repository at this point in the history
  34. add factory deploy tests

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    b5a7a3f View commit details
    Browse the repository at this point in the history
  35. add class hash update test + event assertions

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    36adaa5 View commit details
    Browse the repository at this point in the history
  36. assert old class hash prior to update

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a2902a2 View commit details
    Browse the repository at this point in the history
  37. remove commented out test

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    586a0f0 View commit details
    Browse the repository at this point in the history
  38. use common alex. storage workspace in using_lists

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    2eba71b View commit details
    Browse the repository at this point in the history
  39. add missing newline in toml

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    399c12a View commit details
    Browse the repository at this point in the history
  40. move factory tests to separate file

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    3d71f59 View commit details
    Browse the repository at this point in the history
  41. add scaffold docs for contracts

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    4674726 View commit details
    Browse the repository at this point in the history
  42. add end_time asserts

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    2c1ef6b View commit details
    Browse the repository at this point in the history
  43. refactor private asserts

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    4b62bb6 View commit details
    Browse the repository at this point in the history
  44. check if target reached before claiming

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    07e85ff View commit details
    Browse the repository at this point in the history
  45. add ability to withdraw funds

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    1ddf279 View commit details
    Browse the repository at this point in the history
  46. make contributions into a component (now iterable)

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7de30aa View commit details
    Browse the repository at this point in the history
  47. refactor 'withhold' - contrs map to amt_idx

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7af01aa View commit details
    Browse the repository at this point in the history
  48. add get_contributors func

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    0ed6fdf View commit details
    Browse the repository at this point in the history
  49. get_contributors -> get_contributions

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    b00df42 View commit details
    Browse the repository at this point in the history
  50. total_contributors->contributor_count

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    58517ec View commit details
    Browse the repository at this point in the history
  51. add tests for campaign upgrade and deploy + update all relevant code …

    …in factory
    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    fae8b34 View commit details
    Browse the repository at this point in the history
  52. add status to campaign

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    05ab75f View commit details
    Browse the repository at this point in the history
  53. add close fn

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    2ca2ede View commit details
    Browse the repository at this point in the history
  54. pass desired donation token in ctor

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    cc2705a View commit details
    Browse the repository at this point in the history
  55. merge all getters into get_details

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    9280f9a View commit details
    Browse the repository at this point in the history
  56. return total_contributions in details

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a99aaca View commit details
    Browse the repository at this point in the history
  57. remove rev version from alexandria dep

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    47a9d72 View commit details
    Browse the repository at this point in the history
  58. verbose names

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    8d68d86 View commit details
    Browse the repository at this point in the history
  59. reorg. folder structure

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    cd82c99 View commit details
    Browse the repository at this point in the history
  60. add tag to alexandria dep

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    cf2b916 View commit details
    Browse the repository at this point in the history
  61. campaign_upgrade.cairo->mock_upgrade.cairo

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    22ac28d View commit details
    Browse the repository at this point in the history
  62. add explicit alexandria rev + make crowdfunding contracts standalone …

    …chapters
    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    38068f8 View commit details
    Browse the repository at this point in the history
  63. add status pending

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a451d90 View commit details
    Browse the repository at this point in the history
  64. field rename: factory->creator

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7c23cfd View commit details
    Browse the repository at this point in the history
  65. refund users when upgrading campaign

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    ec6edb6 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    eca7eec View commit details
    Browse the repository at this point in the history
  67. add get_contributor (amount) func

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    3803a6f View commit details
    Browse the repository at this point in the history
  68. Add successful campaign test

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    f9941a3 View commit details
    Browse the repository at this point in the history
  69. update comment for upgrade

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    bb30453 View commit details
    Browse the repository at this point in the history
  70. _refund_all->_withdraw_all

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    92042e5 View commit details
    Browse the repository at this point in the history
  71. update checks for withdraw

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7bcaa07 View commit details
    Browse the repository at this point in the history
  72. rework contribute

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    f660953 View commit details
    Browse the repository at this point in the history
  73. rework all funcs

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    1aa6bc1 View commit details
    Browse the repository at this point in the history
  74. unsuccessful -> failed

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    6156289 View commit details
    Browse the repository at this point in the history
  75. calc end_time in start fn

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    93d2860 View commit details
    Browse the repository at this point in the history
  76. calc end_time in upgrade fn

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    bb61698 View commit details
    Browse the repository at this point in the history
  77. makes upgrades callable only by creators in factory

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    fad077c View commit details
    Browse the repository at this point in the history
  78. fix factory tests

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    50f65b7 View commit details
    Browse the repository at this point in the history
  79. fix crowdfunding tests

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    cae2898 View commit details
    Browse the repository at this point in the history
  80. reduce total contri. when withdraw from act. camp

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    441d5c1 View commit details
    Browse the repository at this point in the history
  81. add refund fn

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    df0d763 View commit details
    Browse the repository at this point in the history
  82. refactor withdraw_all to use _refund

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    71d4ff5 View commit details
    Browse the repository at this point in the history
  83. pending->draft

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    0671b0e View commit details
    Browse the repository at this point in the history
  84. fix mock and tests

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    f6258cb View commit details
    Browse the repository at this point in the history
  85. add test for close

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    f236df1 View commit details
    Browse the repository at this point in the history
  86. add test for withdraw

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    863abaf View commit details
    Browse the repository at this point in the history
  87. upgrade > update end_time only if duration provided

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    d3221c8 View commit details
    Browse the repository at this point in the history
  88. close->cancel

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    af95cb4 View commit details
    Browse the repository at this point in the history
  89. rename to more align with Solidity by example

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    07fbd06 View commit details
    Browse the repository at this point in the history
  90. target->goal

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    411e8f7 View commit details
    Browse the repository at this point in the history
  91. remove comment

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    d8809b7 View commit details
    Browse the repository at this point in the history
  92. err CLOSED->CANCELED + check active in unpledge

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    097e9b6 View commit details
    Browse the repository at this point in the history
  93. contributor->pledger

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    59e5117 View commit details
    Browse the repository at this point in the history
  94. add campaign doc content

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    123229c View commit details
    Browse the repository at this point in the history
  95. remove draft status

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a97f449 View commit details
    Browse the repository at this point in the history
  96. add start_time

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    f3d5a9d View commit details
    Browse the repository at this point in the history
  97. remove Status

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    8f78dc4 View commit details
    Browse the repository at this point in the history
  98. update doc for campaign

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    315169c View commit details
    Browse the repository at this point in the history
  99. move total_pledges to pledgeable

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    adaa0b9 View commit details
    Browse the repository at this point in the history
  100. reorder alphabetically

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    5fcb4e2 View commit details
    Browse the repository at this point in the history
  101. remove Launched event + upgrade mock

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    f0a6586 View commit details
    Browse the repository at this point in the history
  102. TARGET->GOAL

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    377c02d View commit details
    Browse the repository at this point in the history
  103. reorder params in Details

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    e25df4e View commit details
    Browse the repository at this point in the history
  104. add inline to _refund

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    36ff85c View commit details
    Browse the repository at this point in the history
  105. add new pledgeable tests

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    af94299 View commit details
    Browse the repository at this point in the history
  106. add getX tests + add get_pledge_count

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    ccd2362 View commit details
    Browse the repository at this point in the history
  107. refactor pledger_to_amount_index->pledger_to_amount

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    e3c9f55 View commit details
    Browse the repository at this point in the history
  108. Add tests with 1000 pledgers

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    131346d View commit details
    Browse the repository at this point in the history
  109. add test for add + update existing pledger

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    d1477c4 View commit details
    Browse the repository at this point in the history
  110. reenable lib

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    4eba1ed View commit details
    Browse the repository at this point in the history
  111. Add link to adv. factory in crowdfunding point 9

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    f702709 View commit details
    Browse the repository at this point in the history
  112. write the adv. factory chapter

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    ab66865 View commit details
    Browse the repository at this point in the history
  113. Configuration menu
    Copy the full SHA
    cfd7694 View commit details
    Browse the repository at this point in the history
  114. rename get_pledgers_as_arr->array

    Nenad authored and julio4 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    5c39c5a View commit details
    Browse the repository at this point in the history
  115. Use ERC20Upgradeable instead of ERC20 preset

    Nenad committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    9ddcaf6 View commit details
    Browse the repository at this point in the history
  116. Configuration menu
    Copy the full SHA
    48f78fe View commit details
    Browse the repository at this point in the history