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: Incorporate upgrade deployment changes from PR #11 Coauthored by @doublo54 #15

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

DeFiFoFum
Copy link
Owner

  • I was frustrated by the lack of flexibility wth hardhat upgrades
    I provided additional functions in DeployManager to deploy the separate pieces as needed. We also have finer grain control over the contracts.
  • proxyAdmin: This is optional now in case we want to reuse a contract
  • transparentProxy: This can be deployed standalone if you want to reuse an implementation
  • deployUpgradeableContract which composes them all together

- I was frustrated by the lack of flexibility wth hardhat upgrades
I provided additional functions in DeployManager to deploy the separate pieces as needed. We also have finer grain control over the contracts.
- proxyAdmin: This is optional now in case we want to reuse a contract
- transparentProxy: This can be deployed standalone if you want to reuse an implementation
- deployUpgradeableContract which composes them all together
@DeFiFoFum DeFiFoFum changed the title feat: Incorporate changes from PR #11 Coauthored by @doublo54 feat: Incorporate upgrade deployment changes from PR #11 Coauthored by @doublo54 Nov 15, 2023
/// -----------------------------------------------------------------------

function initialize(uint256 _unlockTime, address payable _owner) public initializer {
require(block.timestamp < _unlockTime, "Unlock time should be in the future");

Check notice

Code scanning / Semgrep

Semgrep Finding: rules.solidity.performance.use-short-revert-string

Shortening revert strings to fit in 32 bytes will decrease gas costs for deployment and gas costs when the revert condition has been met.
/// -----------------------------------------------------------------------

function initialize(uint256 _unlockTime, address payable _owner) public initializer {
require(block.timestamp < _unlockTime, "Unlock time should be in the future");

Check notice

Code scanning / Semgrep

Semgrep Finding: rules.solidity.performance.use-custom-error-not-require

Consider using custom errors as they are more gas efficient while allowing developers to describe the error in detail using NatSpec.
// Uncomment this line to print a log in your terminal
// console.log("Unlock time is %o and block timestamp is %o", unlockTime, block.timestamp);

require(block.timestamp >= unlockTime, "You can't withdraw yet");

Check notice

Code scanning / Semgrep

Semgrep Finding: rules.solidity.performance.use-custom-error-not-require

Consider using custom errors as they are more gas efficient while allowing developers to describe the error in detail using NatSpec.
// console.log("Unlock time is %o and block timestamp is %o", unlockTime, block.timestamp);

require(block.timestamp >= unlockTime, "You can't withdraw yet");
require(msg.sender == owner, "You aren't the owner");

Check notice

Code scanning / Semgrep

Semgrep Finding: rules.solidity.performance.use-custom-error-not-require

Consider using custom errors as they are more gas efficient while allowing developers to describe the error in detail using NatSpec.
@DeFiFoFum DeFiFoFum merged commit a62318f into main Nov 15, 2023
@DeFiFoFum DeFiFoFum deleted the feat/upgradeable-deployments branch November 15, 2023 22:54
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.

1 participant