Skip to content

Create Generic Deploy Scripts #124

@apbendi

Description

@apbendi

We want to create generic deploy scripts that can be easily extended and implemented by downstream consumers of the package. These would include things like:

Virtual methods that return configuration structs that must be implemented by the consumer. For example:

struct StakerConfiguration {
    address payoutToken;
    address stakeToken;
    address governorTimelock;
    uint256 maxClaimFee;
    uint256 maxBumpTip;
    string stakerName;
  }

function getStakerConfiguration() public virtual returns (StakerConfiguration memory);

Virtual methods that handle the deployment of modular components of the system, which must also be implemented by the consumer. For example:

// Deploys notifiers
function _deployRewardNotifiers() internal virtual returns (address[] memory) {
    return new address[](0);
  }

// Later, in the `run` method, uses the virtual method to deploy notifiers and whitelist them as part of deployment
address[] memory _notifiers = _deployRewardNotifiers();
    for (uint256 _i = 0; _i < _notifiers.length; _i++) {
      arbStaker.setRewardNotifier(_notifiers[_i], true);
      console2.log("Deployed and Configured Notifier", _notifiers[_i]);
    }

// Similar pattern for calculator

In general the hope is that an implementer can be guided through the configuration by what is required of them by the compiler.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions