Zilliqa / zq2

Zilliqa 2.0 code base
Apache License 2.0
9 stars 0 forks source link

Make the `Deposit` contract's `withdrawalPeriod` configurable #1772

Closed DrZoltanFazekas closed 3 days ago

DrZoltanFazekas commented 1 week ago

The hardcoded return value of withdrawalPeriod() in https://github.com/Zilliqa/zq2/blob/main/zilliqa/src/contracts/deposit.sol#L588 shall be replaced with an immutable variable set in the constructor based on a consensus setting in the toml file like the minimum_stake, rewards_per_hour etc.

This will enable us to test withdrawals on devnet due to a shorter unbonding period than 2 weeks.

DrZoltanFazekas commented 3 days ago

For now, we agreed on returning a shorter period in the withdrawalPeriod() function if the block.chainid is the devnet