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

Added transfer of RAD tokens to ScopeLift upon successful upgrade to governor Bravo #19

Merged
merged 4 commits into from
Dec 15, 2023

Conversation

jferas
Copy link
Contributor

@jferas jferas commented Dec 4, 2023

This PR implements a transfer of RAD tokens to ScopeLift as part of the transaction that upgrades to Governor Bravo.

Resolves #17

uint256 _timelockTokenBalance = _token.balanceOf(TIMELOCK);

// bound by the number of tokens the timelock currently controls
_amount = bound(_amount, 0, _timelockTokenBalance);
uint256 _initialTokenBalance = _token.balanceOf(_receiver);

_upgradeToBravoGovernor();

Choose a reason for hiding this comment

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

It may better to keep this test as is and assume the token does not equal the rad token, and create a new test specifically for the RAD token which subtracts the expected ScopeLift amount from the _timelockTokenBalance. In this setup a test will fail if an unexpected amount of tokens is transferred during the upgrade where as I think this will not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: 1bdb4f1

@jferas jferas changed the base branch from separate-alpha-tests to main December 7, 2023 18:23
Copy link

@alexkeating alexkeating left a comment

Choose a reason for hiding this comment

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

LGTM, as long as the build is passing

Copy link
Contributor

@wildmolasses wildmolasses left a comment

Choose a reason for hiding this comment

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

a bunch of nits, otherwise lgtm, thanks @jferas

test/RadworksGovernor.t.sol Outdated Show resolved Hide resolved
test/RadworksGovernor.t.sol Outdated Show resolved Hide resolved
test/RadworksGovernor.t.sol Outdated Show resolved Hide resolved
script/DeployInput.sol Outdated Show resolved Hide resolved
test/RadworksGovernor.t.sol Show resolved Hide resolved
test/RadworksGovernor.t.sol Outdated Show resolved Hide resolved
test/RadworksGovernor.t.sol Outdated Show resolved Hide resolved
Copy link

Coverage after merging scopelift-tokens into main will be

76.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   RadworksGovernor.sol73.91%75%69.23%76%101, 126–127, 135, 138, 152, 203, 84

@jferas jferas merged commit 7335349 into main Dec 15, 2023
11 checks passed
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.

Transfer RAD token as part of the upgrade proposal
3 participants