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

Small contract cleanups when reading through the code and configuration #1

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

BigLep
Copy link
Member

@BigLep BigLep commented Jan 29, 2025

Small items found or thought of when reviewing filecoin-project/go-f3#823

@BigLep BigLep self-assigned this Jan 29, 2025
@BigLep
Copy link
Member Author

BigLep commented Jan 29, 2025

Unit tests pass and code coverage is still at 100%:

yarn run v1.22.22
$ /Users/sal/Documents/Code/f3-activation-contract/node_modules/.bin/hardhat coverage

Version

solidity-coverage: v0.8.14

Instrumenting for coverage...

F3Parameters.sol

Compilation:

Nothing to compile
No need to generate any newer typings.

Network Info

HardhatEVM: v2.22.18
network: hardhat

F3Parameters
Deployment
✔ Should set the right expireTime
✔ Should set the right owner
✔ Activation epoch should be max(uint64) and empty params
Parameter updates
✔ Should update activation epoch and manifest data successfully
✔ Should revert if activation epoch is set to a past block
✔ Should revert if activation epoch is less than minActivationHeadroomBlocks ahead of current block
✔ Should revert if update is attempted after activation
✔ Should revert if update is attempted after expiry
✔ Should revert if non-owner attempts to updateActivationInformation

9 passing (63ms)

-------------------|----------|----------|----------|----------|----------------|

File % Stmts % Branch % Funcs % Lines Uncovered Lines
contracts/ 100 100 100 100
F3Parameters.sol 100 100 100 100
------------------- ---------- ---------- ---------- ---------- ----------------
All files 100 100 100 100
------------------- ---------- ---------- ---------- ---------- ----------------

Istanbul reports written to ./coverage/ and ./coverage.json
Done in 1.72s.

@BigLep BigLep requested a review from Kubuxu January 29, 2025 21:13
## Development
1. Install yarn (e.g., `brew install yarn`)
2. Initialize yarn in the repo: `yarn`
3. Set `PRIVATE_KEY` environment variable (e.g., `export PRIVATE_KEY='0000000000000000000000000000000000000000000000000000000000000000'`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The alternative is to set it in the .env file.

Copy link
Collaborator

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

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

LGTM

@Kubuxu Kubuxu merged commit 2f9daf9 into master Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants