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 possibility to pause Claim and Staking processes #166

Merged
merged 19 commits into from
Jun 25, 2024

Conversation

matjazv
Copy link
Contributor

@matjazv matjazv commented Jun 12, 2024

What was the problem?

This PR resolves #152.

How was it solved?

  • Added contracts L2ClaimPaused, L2LockingPositionPaused and L2RewardPaused
  • Added deployment scripts for the contracts (Claim process and Staking process)

How was it tested?

  • Old and new unit tests passed.
  • Deployed all new contracts using shell deployment scripts.

Copy link
Member

@Phanco Phanco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Others looks good to me :D

script/paused/deployPausedStaking.sh Show resolved Hide resolved
@Phanco Phanco self-requested a review June 19, 2024 14:51
src/L2/paused/L2LockingPositionPaused.sol Show resolved Hide resolved
test/L2/L2Staking.t.sol Show resolved Hide resolved
test/L2/paused/L2RewardPaused.t.sol Outdated Show resolved Hide resolved
Phanco and others added 11 commits June 24, 2024 13:25
…es (#165)

* Added L2VotingPowerPaused and L2GovernorPaused contract with test cases

* Add deployment script

* Update git submodules

* Add foundry.toml

* Change version function to be independent

* Update comments

* Update gitsubmodule, added Custom Errors

* Rearrange functions according to requirements

* pump forge-std to 1.8.2

* Add onReceive ERC721 and ERC1155 check

* Test adjustVotingPower is unpaused

* Add deployPausedDAO.sh

* Add forge clean to deploy script

* Clean before every forge script runs

* Used `../../` to navigate paused script

* rename assertInitParamsEq
src/L2/paused/L2RewardPaused.sol Show resolved Hide resolved
src/L2/paused/L2ClaimPaused.sol Show resolved Hide resolved
test/L2/paused/L2RewardPaused.t.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@gkoumout gkoumout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@matjazv matjazv merged commit 356feed into development Jun 25, 2024
4 checks passed
@matjazv matjazv deleted the 152-pause-claim-staking branch June 25, 2024 13:22
matjazv added a commit that referenced this pull request Jun 26, 2024
* Added L2VotingPowerPaused and L2GovernorPaused contract with test cases (#165)

* Added L2VotingPowerPaused and L2GovernorPaused contract with test cases

* Add deployment script

* Update git submodules

* Add foundry.toml

* Change version function to be independent

* Update comments

* Update gitsubmodule, added Custom Errors

* Rearrange functions according to requirements

* pump forge-std to 1.8.2

* Add onReceive ERC721 and ERC1155 check

* Test adjustVotingPower is unpaused

* Add deployPausedDAO.sh

* Add forge clean to deploy script

* Clean before every forge script runs

* Used `../../` to navigate paused script

* rename assertInitParamsEq

* Implement L2ClaimPaused version of L2Claim contract

* Ignore unreachable warning from ERC721Upgradeable.sol because of having L2LockingPositionPaused contract

* Implement paused version of Staking process

* Remove unneeded L2StakingPaused contract

* Add deploy shell script for paused Staking process

* Add deploy shell script for paused Claim process

* Add unit tests for paused version of contracts

* Fix deployment shell scripts

* Remove unneeded L2StakingPaused address

* Remove warnings because of forge-std upgrade

* Remove fixed version of Foundry from pr.yaml

* Add additional paused functions for Reward contract

* Modify deployment script to pause DAO and Staking functionalities at the same time

* Remove unneeded imports from pausable versions of contracts

* Remove deploying DAO when deploying Staking process

* Fix two unit tests

* Remove unneeded blank spaces

* Fix unit test for L2RewardPaused

---------

Co-authored-by: Franco NG <franco.ng@lightcurve.io>
shuse2 pushed a commit that referenced this pull request Jun 26, 2024
* Added L2VotingPowerPaused and L2GovernorPaused contract with test cases (#165)

* Added L2VotingPowerPaused and L2GovernorPaused contract with test cases

* Add deployment script

* Update git submodules

* Add foundry.toml

* Change version function to be independent

* Update comments

* Update gitsubmodule, added Custom Errors

* Rearrange functions according to requirements

* pump forge-std to 1.8.2

* Add onReceive ERC721 and ERC1155 check

* Test adjustVotingPower is unpaused

* Add deployPausedDAO.sh

* Add forge clean to deploy script

* Clean before every forge script runs

* Used `../../` to navigate paused script

* rename assertInitParamsEq

* Implement L2ClaimPaused version of L2Claim contract

* Ignore unreachable warning from ERC721Upgradeable.sol because of having L2LockingPositionPaused contract

* Implement paused version of Staking process

* Remove unneeded L2StakingPaused contract

* Add deploy shell script for paused Staking process

* Add deploy shell script for paused Claim process

* Add unit tests for paused version of contracts

* Fix deployment shell scripts

* Remove unneeded L2StakingPaused address

* Remove warnings because of forge-std upgrade

* Remove fixed version of Foundry from pr.yaml

* Add additional paused functions for Reward contract

* Modify deployment script to pause DAO and Staking functionalities at the same time

* Remove unneeded imports from pausable versions of contracts

* Remove deploying DAO when deploying Staking process

* Fix two unit tests

* Remove unneeded blank spaces

* Fix unit test for L2RewardPaused

---------

Co-authored-by: Franco NG <franco.ng@lightcurve.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add possibility to pause Claim and Staking smart contracts
4 participants