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

🚚 Add a Migrator contract #25

Merged
merged 16 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 101 additions & 88 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -2,104 +2,109 @@ ContentPoolTest:test_addReward_InvalidReward_ko() (gas: 28972)
ContentPoolTest:test_addReward_InvalidRole_ko() (gas: 17640)
ContentPoolTest:test_addReward_ok() (gas: 66202)
ContentPoolTest:test_canBeDeployedAndInit_ok() (gas: 2820972)
ContentPoolTest:test_getRewardStates_ok() (gas: 223640)
ContentPoolTest:test_getRewardStates_ok() (gas: 223662)
ContentPoolTest:test_initialize_InitTwice_ko() (gas: 17982)
ContentPoolTest:test_participantStates_ok() (gas: 220730)
ContentPoolTest:test_updateUserAndPool_WithRewardBeforeState_ok() (gas: 428687)
ContentPoolTest:test_participantStates_ok() (gas: 220752)
ContentPoolTest:test_updateUserAndPool_WithRewardBeforeState_ok() (gas: 428709)
ContentPoolTest:test_updateUserAndPool_ok() (gas: 325512)
ContentPoolTest:test_updateUser_MultiTokenTransfer_ok() (gas: 539456)
ContentPoolTest:test_updateUser_WithRewardBeforeStateChange_ok() (gas: 713219)
ContentPoolTest:test_updateUser_ok() (gas: 400248)
ContentPoolTest:test_updateUser_MultiTokenTransfer_ok() (gas: 539500)
ContentPoolTest:test_updateUser_WithRewardBeforeStateChange_ok() (gas: 713307)
ContentPoolTest:test_updateUser_ok() (gas: 400284)
FrakTeasuryWalletTest:test_canBeDeployedAndInit_ok() (gas: 1773426)
FrakTeasuryWalletTest:test_initialize_InitTwice_ko() (gas: 17937)
FrakTeasuryWalletTest:test_transferBatch_InvalidArray_ko() (gas: 28753)
FrakTeasuryWalletTest:test_transferBatch_NoReward_ko() (gas: 34416)
FrakTeasuryWalletTest:test_transferBatch_NotEnoughTreasury_ko() (gas: 11305534)
FrakTeasuryWalletTest:test_transferBatch_NotEnoughTreasury_ko() (gas: 11322694)
FrakTeasuryWalletTest:test_transferBatch_NotMinter_ko() (gas: 18928)
FrakTeasuryWalletTest:test_transferBatch_RewardTooLarge_ko() (gas: 34431)
FrakTeasuryWalletTest:test_transferBatch_ok() (gas: 137823)
FrakTeasuryWalletTest:test_transferBatch_ok() (gas: 137888)
FrakTeasuryWalletTest:test_transfer_InvalidAddress_ko() (gas: 18375)
FrakTeasuryWalletTest:test_transfer_NoReward_ko() (gas: 20508)
FrakTeasuryWalletTest:test_transfer_NotEnoughTreasury_ko() (gas: 11304244)
FrakTeasuryWalletTest:test_transfer_NotEnoughTreasury_ko() (gas: 11321404)
FrakTeasuryWalletTest:test_transfer_NotMinter_ko() (gas: 17684)
FrakTeasuryWalletTest:test_transfer_RewardTooLarge_ko() (gas: 20534)
FrakTeasuryWalletTest:test_transfer_ok() (gas: 136061)
FrakTokenTest:invariant_cap_lt_supply() (runs: 256, calls: 3840, reverts: 3621)
FrakTokenTest:test_burn_ok() (gas: 53287)
FrakTokenTest:test_canBeDeployedAndInit_ok() (gas: 2502575)
FrakTeasuryWalletTest:test_transfer_ok() (gas: 136126)
FrakTokenTest:invariant_cap_lt_supply() (runs: 256, calls: 3840, reverts: 3470)
FrakTokenTest:test_burn_ok() (gas: 53321)
FrakTokenTest:test_canBeDeployedAndInit_ok() (gas: 4949212)
FrakTokenTest:test_cap_ok() (gas: 10366)
FrakTokenTest:test_decimals_ok() (gas: 10426)
FrakTokenTest:test_initialize_InitTwice_ko() (gas: 15759)
FrakTokenTest:test_mint_CapExceed_ko() (gas: 88106)
FrakTokenTest:test_mint_InvalidRole_ko() (gas: 17639)
FrakTokenTest:test_mint_ok() (gas: 68154)
FrakTokenTest:test_mint_CapExceed_ko() (gas: 88431)
FrakTokenTest:test_mint_InvalidRole_ko() (gas: 17704)
FrakTokenTest:test_mint_ok() (gas: 68219)
FrakTokenTest:test_name_ok() (gas: 14776)
FrakTokenTest:test_permit_DelayExpired_ko() (gas: 28091)
FrakTokenTest:test_permit_InvalidNonce_ko() (gas: 50226)
FrakTokenTest:test_permit_InvalidSigner_ko() (gas: 53835)
FrakTokenTest:test_permit_ok() (gas: 77672)
FrakTokenTest:test_permit_InvalidNonce_ko() (gas: 50335)
FrakTokenTest:test_permit_InvalidSigner_ko() (gas: 53944)
FrakTokenTest:test_permit_ok() (gas: 77781)
FrakTokenTest:test_symbol_ok() (gas: 14797)
FraktionCostBadgesTest:test_defaultPrice_InvalidFraktionType_ko() (gas: 43272)
FraktionCostBadgesTest:test_defaultPrice_InvalidFraktionType_ko() (gas: 46597)
FraktionCostBadgesTest:test_defaultPrice_ok() (gas: 26214)
FraktionCostBadgesTest:test_updatePrice_InvalidFraktionType_ko() (gas: 46266)
FraktionCostBadgesTest:test_updatePrice_InvalidRole_ko() (gas: 17661)
FraktionCostBadgesTest:test_updatePrice_ok() (gas: 126566)
FraktionTokensTest:test_addContent_InvalidRole_ko() (gas: 18772)
FraktionTokensTest:test_addContent_SupplyUpdateNotAllowed_ko() (gas: 69957)
FraktionTokensTest:test_addContent_ok() (gas: 329982)
FraktionTokensTest:test_batchBalance_ok() (gas: 59813)
FraktionTokensTest:test_burn_ok() (gas: 49562)
FraktionTokensTest:test_canBeDeployedAndInit_ok() (gas: 3382823)
FraktionTokensTest:test_initialize_InitTwice_ko() (gas: 16008)
FraktionTokensTest:test_ownerOf_ok() (gas: 16844)
FraktionTokensTest:test_setUpTransferCallback_ok() (gas: 367201)
FraktionTokensTest:test_supply_InvalidRole_ko() (gas: 53345)
FraktionTokensTest:test_supply_SupplyUpdateNotAllowed_ko() (gas: 45822)
FraktionTokensTest:test_supply_ok() (gas: 87692)
FraktionTokensTest:test_addContent_InvalidRole_ko() (gas: 18870)
FraktionTokensTest:test_addContent_SupplyUpdateNotAllowed_ko() (gas: 75241)
FraktionTokensTest:test_addContent_ok() (gas: 330174)
FraktionTokensTest:test_batchBalance_ok() (gas: 59879)
FraktionTokensTest:test_burn_ok() (gas: 49614)
FraktionTokensTest:test_canBeDeployedAndInit_ok() (gas: 7339660)
FraktionTokensTest:test_initialize_InitTwice_ko() (gas: 16030)
FraktionTokensTest:test_ownerOf_ok() (gas: 16910)
FraktionTokensTest:test_permitTransferAll_DelayExpired_ko() (gas: 27984)
FraktionTokensTest:test_permitTransferAll_InvalidNonce_ko() (gas: 50430)
FraktionTokensTest:test_permitTransferAll_InvalidSigner_ko() (gas: 53829)
FraktionTokensTest:test_permitTransferAll_ok() (gas: 77652)
FraktionTokensTest:test_setUpTransferCallback_ok() (gas: 367202)
FraktionTokensTest:test_supply_InvalidRole_ko() (gas: 53455)
FraktionTokensTest:test_supply_SupplyUpdateNotAllowed_ko() (gas: 45998)
FraktionTokensTest:test_supply_ok() (gas: 87798)
FraktionTokensTest:test_transferAllFrom_ok() (gas: 189678)
MinterTest:test_addContent_InvalidRole_ko() (gas: 17808)
MinterTest:test_addContent_InvalidSupply_ko() (gas: 55648)
MinterTest:test_addContent_ok() (gas: 194493)
MinterTest:test_benchmarkAddContent_ok() (gas: 695249)
MinterTest:test_addContent_InvalidSupply_ko() (gas: 62459)
MinterTest:test_addContent_ok() (gas: 194533)
MinterTest:test_benchmarkAddContent_ok() (gas: 695513)
MinterTest:test_canBeDeployedAndInit_ok() (gas: 2267698)
MinterTest:test_increaseSupply_InvalidRole_ko() (gas: 62383)
MinterTest:test_increaseSupply_ok() (gas: 75939)
MinterTest:test_increaseSupply_InvalidRole_ko() (gas: 62404)
MinterTest:test_increaseSupply_ok() (gas: 76003)
MinterTest:test_initialize_InitTwice_ko() (gas: 22408)
MinterTest:test_mintFraktionForUser_ok() (gas: 212716)
MinterTest:test_mintFraktion_TooManyFraktion_ko() (gas: 216239)
MinterTest:test_mintFraktion_ok() (gas: 210175)
MinterTest:test_mintFreeFraktionForUser_ok() (gas: 60193)
MinterTest:test_mintFraktionForUser_ok() (gas: 212912)
MinterTest:test_mintFraktion_TooManyFraktion_ko() (gas: 216435)
MinterTest:test_mintFraktion_ok() (gas: 210371)
MinterTest:test_mintFreeFraktionForUser_ok() (gas: 60215)
MinterTest:test_mintFreeFraktion_ExpectingOnlyFreeFraktion_ko() (gas: 40161)
MinterTest:test_mintFreeFraktion_TooManyFraktion_ko() (gas: 66087)
MinterTest:test_mintFreeFraktion_ok() (gas: 62897)
MultiVestingWalletsTest:test_canBeDeployedAndInit_ok() (gas: 2667336)
MultiVestingWalletsTest:test_createVestBatch() (gas: 210722)
MultiVestingWalletsTest:test_createVestBatch_ArrayInvalidLength_ko() (gas: 79027)
MultiVestingWalletsTest:test_createVestBatch_EmptyArray_ko() (gas: 78827)
MultiVestingWalletsTest:test_createVestBatch_NotEnoughReserve_ko() (gas: 85446)
MultiVestingWalletsTest:test_createVestBatch_NotManager_ko() (gas: 80864)
MultiVestingWalletsTest:test_createVest_InvalidAddress_ko() (gas: 81908)
MultiVestingWalletsTest:test_createVest_InvalidDuration_ko() (gas: 80450)
MultiVestingWalletsTest:test_createVest_InvalidReward_ko() (gas: 81932)
MultiVestingWalletsTest:test_createVest_InvalidStartDateTooFar_ko() (gas: 80459)
MultiVestingWalletsTest:test_createVest_InvalidStartDate_ko() (gas: 80499)
MultiVestingWalletsTest:test_createVest_NotEnoughReserve_ko() (gas: 84011)
MultiVestingWalletsTest:test_createVest_NotManager_ko() (gas: 79610)
MultiVestingWalletsTest:test_createVest_TooLargeReward_ko() (gas: 82001)
MultiVestingWalletsTest:test_createVest_ok() (gas: 209042)
MinterTest:test_mintFreeFraktion_TooManyFraktion_ko() (gas: 66109)
MinterTest:test_mintFreeFraktion_ok() (gas: 62919)
MultiVestingWalletsTest:test_canBeDeployedAndInit_ok() (gas: 2732546)
MultiVestingWalletsTest:test_createVestBatch() (gas: 210765)
MultiVestingWalletsTest:test_createVestBatch_ArrayInvalidLength_ko() (gas: 79092)
MultiVestingWalletsTest:test_createVestBatch_EmptyArray_ko() (gas: 78892)
MultiVestingWalletsTest:test_createVestBatch_NotEnoughReserve_ko() (gas: 85511)
MultiVestingWalletsTest:test_createVestBatch_NotManager_ko() (gas: 80929)
MultiVestingWalletsTest:test_createVest_InvalidAddress_ko() (gas: 81973)
MultiVestingWalletsTest:test_createVest_InvalidDuration_ko() (gas: 80515)
MultiVestingWalletsTest:test_createVest_InvalidReward_ko() (gas: 81997)
MultiVestingWalletsTest:test_createVest_InvalidStartDateTooFar_ko() (gas: 80524)
MultiVestingWalletsTest:test_createVest_InvalidStartDate_ko() (gas: 80564)
MultiVestingWalletsTest:test_createVest_NotEnoughReserve_ko() (gas: 84076)
MultiVestingWalletsTest:test_createVest_NotManager_ko() (gas: 79675)
MultiVestingWalletsTest:test_createVest_TooLargeReward_ko() (gas: 82066)
MultiVestingWalletsTest:test_createVest_ok() (gas: 209085)
MultiVestingWalletsTest:test_decimals_ok() (gas: 10391)
MultiVestingWalletsTest:test_initialize_InitTwice_ko() (gas: 17982)
MultiVestingWalletsTest:test_initialize_InitTwice_ko() (gas: 18027)
MultiVestingWalletsTest:test_name_ok() (gas: 12085)
MultiVestingWalletsTest:test_releaseAllForUser_ok() (gas: 232525)
MultiVestingWalletsTest:test_releaseAll_ok() (gas: 228343)
MultiVestingWalletsTest:test_release_ok() (gas: 237783)
MultiVestingWalletsTest:test_symbol_ok() (gas: 12073)
MultiVestingWalletsTest:test_transferReserve_ok() (gas: 103722)
MultiVestingWalletsTest:test_transfer_InvalidAddress_ko() (gas: 211179)
MultiVestingWalletsTest:test_transfer_InvalidUser_ko() (gas: 209436)
MultiVestingWalletsTest:test_transfer_ok() (gas: 226494)
ReferralPoolTest:test_canBeDeployedAndInit_ok() (gas: 1692225)
MultiVestingWalletsTest:test_releaseAllForUser_ok() (gas: 233626)
MultiVestingWalletsTest:test_releaseAll_ok() (gas: 228563)
MultiVestingWalletsTest:test_release_ok() (gas: 238029)
MultiVestingWalletsTest:test_symbol_ok() (gas: 12117)
MultiVestingWalletsTest:test_transferReserve_ok() (gas: 103721)
MultiVestingWalletsTest:test_transfer_InvalidAddress_ko() (gas: 208297)
MultiVestingWalletsTest:test_transfer_InvalidUser_ko() (gas: 209500)
MultiVestingWalletsTest:test_transfer_ok() (gas: 226492)
ReferralPoolTest:test_canBeDeployedAndInit_ok() (gas: 1690025)
ReferralPoolTest:test_initialize_InitTwice_ko() (gas: 17881)
RewarderConfigTest:test_canBeDeployedAndInit_ok() (gas: 2600249)
RewarderConfigTest:test_canBeDeployedAndInit_ok() (gas: 2597849)
RewarderConfigTest:test_initialize_InitTwice_ko() (gas: 26774)
RewarderConfigTest:test_updateContentBadge_BadgeTooLarge_ko() (gas: 20191)
RewarderConfigTest:test_updateContentBadge_InvalidRole_ko() (gas: 17630)
Expand All @@ -109,26 +114,34 @@ RewarderConfigTest:test_updateListenerBadge_InvalidRole_ko() (gas: 17711)
RewarderConfigTest:test_updateListenerBadge_ok() (gas: 46543)
RewarderConfigTest:test_updateTpu_InvalidRole_ko() (gas: 15412)
RewarderConfigTest:test_updateTpu_ok() (gas: 23775)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch() (gas: 139334)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_EmptyAmount_ko() (gas: 81286)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_InvalidArray_ko() (gas: 79510)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_InvalidRole_ko() (gas: 80397)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_TooLargeAmount_ko() (gas: 81344)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_TooLargeArray_ko() (gas: 82833)
RewarderDirectPaymentTest:test_payUserDirectly() (gas: 111195)
RewarderDirectPaymentTest:test_payUserDirectly_InvalidAddress_ko() (gas: 77885)
RewarderDirectPaymentTest:test_payUserDirectly_InvalidReward_ko() (gas: 88533)
RewarderDirectPaymentTest:test_payUserDirectly_InvalidRole_ko() (gas: 79215)
RewarderDirectPaymentTest:test_payUserDirectly_NotEnoughBalance_ko() (gas: 105700)
RewarderTest:test_pay_ContentTypeImpact_ok() (gas: 212408)
RewarderTest:test_pay_FreeFraktion_ok() (gas: 191901)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch() (gas: 139443)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_EmptyAmount_ko() (gas: 81351)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_InvalidArray_ko() (gas: 79575)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_InvalidRole_ko() (gas: 80462)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_TooLargeAmount_ko() (gas: 81409)
RewarderDirectPaymentTest:test_payCreatorDirectlyBatch_TooLargeArray_ko() (gas: 82898)
RewarderDirectPaymentTest:test_payUserDirectly() (gas: 111260)
RewarderDirectPaymentTest:test_payUserDirectly_InvalidAddress_ko() (gas: 77950)
RewarderDirectPaymentTest:test_payUserDirectly_InvalidReward_ko() (gas: 88598)
RewarderDirectPaymentTest:test_payUserDirectly_InvalidRole_ko() (gas: 79280)
RewarderDirectPaymentTest:test_payUserDirectly_NotEnoughBalance_ko() (gas: 105765)
RewarderTest:test_pay_ContentTypeImpact_ok() (gas: 212716)
RewarderTest:test_pay_FreeFraktion_ok() (gas: 191970)
RewarderTest:test_pay_InvalidAddress_ko() (gas: 21620)
RewarderTest:test_pay_InvalidArray_ko() (gas: 38041)
RewarderTest:test_pay_InvalidContent_ko() (gas: 56805)
RewarderTest:test_pay_InvalidContent_ko() (gas: 56871)
RewarderTest:test_pay_InvalidRoles_ko() (gas: 21259)
RewarderTest:test_pay_PayedFraktions_LargeListenCounts_ok() (gas: 367403)
RewarderTest:test_pay_PayedFraktions_TooMuchListenCounts_ko() (gas: 167339)
RewarderTest:test_pay_PayedFraktions_ok() (gas: 405269)
RewarderTest:test_pay_TooLargeReward_ko() (gas: 230900)
RewarderTest:test_pay_PayedFraktions_LargeListenCounts_ok() (gas: 367557)
RewarderTest:test_pay_PayedFraktions_TooMuchListenCounts_ko() (gas: 167427)
RewarderTest:test_pay_PayedFraktions_ok() (gas: 405426)
RewarderTest:test_pay_TooLargeReward_ko() (gas: 231010)
VestingWalletFactoryTest:test_canBeDeployedAndInit_ok() (gas: 2093328)
VestingWalletFactoryTest:test_initialize_InitTwice_ko() (gas: 17926)
VestingWalletFactoryTest:test_initialize_InitTwice_ko() (gas: 17926)
WalletMigratorTest:test_claimAllFoundsForUser_ok() (gas: 359098)
WalletMigratorTest:test_claimAllFounds_ok() (gas: 359246)
WalletMigratorTest:test_fullMigrationForUser_ok() (gas: 634767)
WalletMigratorTest:test_fullMigration_ok() (gas: 634068)
WalletMigratorTest:test_migrateFrationsForUser_ok() (gas: 269269)
WalletMigratorTest:test_migrateFrations_ok() (gas: 269384)
WalletMigratorTest:test_migrateFrkForUser_ok() (gas: 144705)
WalletMigratorTest:test_migrateFrk_ok() (gas: 144902)
12 changes: 6 additions & 6 deletions .github/workflows/storage-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,47 +58,47 @@ jobs:
key: foundry-${{ github.repository_id }}-${{ hashFiles('foundry.toml') }}

- name: '🧪 Check FRK Token storage'
uses: Rubilmax/foundry-storage-check@v3.5
uses: Rubilmax/foundry-storage-check@v3.6
with:
contract: contracts/tokens/FrakToken.sol:FrakToken
rpcUrl: ${{ env.POLYGON_RPC_URL }}
address: "0x6261E4a478C98419EaFa6289509C49058D21Df8c"
failOnRemoval: true

- name: '🧪 Check Fraktion Token storage'
uses: Rubilmax/foundry-storage-check@v3.5
uses: Rubilmax/foundry-storage-check@v3.6
with:
contract: contracts/fraktions/FraktionTokens.sol:FraktionTokens
rpcUrl: ${{ env.POLYGON_RPC_URL }}
address: "0x4B1611803687Ab821E1b670fE94CB93303D94F8a"
failOnRemoval: true

- name: '🧪 Check content pool storage'
uses: Rubilmax/foundry-storage-check@v3.5
uses: Rubilmax/foundry-storage-check@v3.6
with:
contract: contracts/reward/contentPool/ContentPool.sol:ContentPool
rpcUrl: ${{ env.POLYGON_RPC_URL }}
address: "0xDCB34659B83C4F8708fd7AcAA3755547BF8BBcA0"
failOnRemoval: true

- name: '🧪 Check referral pool storage'
uses: Rubilmax/foundry-storage-check@v3.5
uses: Rubilmax/foundry-storage-check@v3.6
with:
contract: contracts/reward/referralPool/ReferralPool.sol:ReferralPool
rpcUrl: ${{ env.POLYGON_RPC_URL }}
address: "0x166d8CFEe1919bC2e8c7AdBB34F1613194e9C599"
failOnRemoval: true

- name: '🧪 Check rewarder storage'
uses: Rubilmax/foundry-storage-check@v3.5
uses: Rubilmax/foundry-storage-check@v3.6
with:
contract: contracts/reward/Rewarder.sol:Rewarder
rpcUrl: ${{ env.POLYGON_RPC_URL }}
address: "0x8D9fa601DA1416b087E9db6B6EaD63D4920A4528"
failOnRemoval: true

- name: '🧪 Check minter storage'
uses: Rubilmax/foundry-storage-check@v3.5
uses: Rubilmax/foundry-storage-check@v3.6
with:
contract: contracts/minter/Minter.sol:Minter
rpcUrl: ${{ env.POLYGON_RPC_URL }}
Expand Down
Loading