Skip to content

Deploy script review #8

@nikitastupin-matterlabs

Description

@nikitastupin-matterlabs

Hi! Thank you for writing the deploy script. I've reviewed it and sharing my comments and questions below. Let me know if you have any doubts!

const mintRewardNotifier = await deployer.deploy(mintRewardNotifierContractArtifact, [zkStakerContractAddress, REWARD_AMOUNT, REWARD_INTERVAL, ZK_TOKEN_TIMELOCK_ADDRESS, ZK_TOKEN_TIMELOCK_ADDRESS], "create", undefined);

The 5th parameter is minter which is set to the timelock address. However, the proposal says that it should be a CappedMinter.

contract ZkStaker is Staker, StakerPermitAndStake, StakerOnBehalf, StakerDelegateSurrogateVotes {

The ZkStaker contract doesn't inherit from StakerCapDeposits which is contrary to the proposal.

const ZK_TOKEN_TIMELOCK_ADDRESS = "0x3E21c654B545Bf6236DC08236169DcF13dA4dDd6"; // TDDO: Verify this address

The timelock address is 0xC3e970cB015B5FC36edDf293D2370ef5D00F7a19 according to the proposal. The same address returned by the ZkGovOpsGovernor contract.

Would it also make sense to rename ZK_TOKEN_TIMELOCK_ADDRESS to ZK_GOV_OPS_TIMELOCK_ADDRESS?

// TODO: Uncomment this line referencing the environment variable when secret can be set on CI
const deployerPrivateKey = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"

Would it make sense to resolve the TODO?

zkstaker/README.md

Lines 1 to 2 in 692d3e7

# ScopeLift Foundry Template

It'd be great to add how to use the deploy script. What variables should be configured? What files should be configured (e.g. .env)? What are the commands to perform the deployment?

const MAX_BUMP_TIP = "1000000000000000000"; // 1e18 string instead of bigNumber

Should it be 0 in the ZkStaker case? We've discussed it with Rafael.

console.log(`ZKSTAKER_ADDRESS=${zkStakerContractAddress}\nEARNING_POWER_CALCULATOR_ADDRESS=${earningPowerCalculaterContractAddress}\nMINT_REWARD_NOTIFIER_ADDRESS=${mintRewardNotifierContractAddress}\n`);

I'm not sure how it's usually done but is it possible to verify the contracts in the same deployment script?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions