-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
368 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TESTNET_RPC_URL=http://localhost:8545/ | ||
TESTNET_PRIVATE_KEY_DEPLOY=0x0000000000000000000000000000000000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; | ||
|
||
// npx hardhat ignition deploy ./ignition/modules/ConstantsManager.ts --network testnet --parameters ignition/params.json | ||
|
||
export default buildModule("ConstantsManager", (m) => { | ||
const deployAccount = m.getAccount(0); | ||
|
||
const minSelfStake = m.getParameter('minSelfStake'); | ||
const maxDelegatedRatio = m.getParameter('maxDelegatedRatio'); | ||
const validatorCommissions = m.getParameter('validatorCommissions'); | ||
const burntFeeShare = m.getParameter('burntFeeShare'); | ||
const treasuryFeeShare = m.getParameter('treasuryFeeShare'); | ||
const withdrawalPeriodEpochs = m.getParameter('withdrawalPeriodEpochs'); | ||
const withdrawalPeriodTime = m.getParameter('withdrawalPeriodTime'); | ||
const baseRewardPerSecond = m.getParameter('baseRewardPerSecond'); | ||
const offlinePenaltyThresholdTime = m.getParameter('offlinePenaltyThresholdTime'); | ||
const offlinePenaltyThresholdBlocksNumber = m.getParameter('offlinePenaltyThresholdBlocksNumber'); | ||
const targetGasPowerPerSecond = m.getParameter('targetGasPowerPerSecond'); | ||
const gasPriceBalancingCounterweights = m.getParameter('gasPriceBalancingCounterweights'); | ||
const averageUptimeEpochWindow = m.getParameter('averageUptimeEpochWindow'); | ||
const updateMinAverageUptime = m.getParameter('updateMinAverageUptime'); | ||
|
||
const constantsManager = m.contract("ConstantsManager", [deployAccount]); | ||
|
||
m.call(constantsManager, "updateMinSelfStake", [minSelfStake], {from: deployAccount}); | ||
m.call(constantsManager, "updateMaxDelegatedRatio", [maxDelegatedRatio], {from: deployAccount}); | ||
m.call(constantsManager, "updateValidatorCommission", [validatorCommissions], {from: deployAccount}); | ||
m.call(constantsManager, "updateBurntFeeShare", [burntFeeShare], {from: deployAccount}); | ||
m.call(constantsManager, "updateTreasuryFeeShare", [treasuryFeeShare], {from: deployAccount}); | ||
m.call(constantsManager, "updateWithdrawalPeriodEpochs", [withdrawalPeriodEpochs], {from: deployAccount}); | ||
m.call(constantsManager, "updateWithdrawalPeriodTime", [withdrawalPeriodTime], {from: deployAccount}); | ||
m.call(constantsManager, "updateBaseRewardPerSecond", [baseRewardPerSecond], {from: deployAccount}); | ||
m.call(constantsManager, "updateOfflinePenaltyThresholdTime", [offlinePenaltyThresholdTime], {from: deployAccount}); | ||
m.call(constantsManager, "updateOfflinePenaltyThresholdBlocksNum", [offlinePenaltyThresholdBlocksNumber], {from: deployAccount}); | ||
m.call(constantsManager, "updateTargetGasPowerPerSecond", [targetGasPowerPerSecond], {from: deployAccount}); | ||
m.call(constantsManager, "updateGasPriceBalancingCounterweight", [gasPriceBalancingCounterweights], {from: deployAccount}); | ||
m.call(constantsManager, "updateAverageUptimeEpochWindow", [averageUptimeEpochWindow], {from: deployAccount}); | ||
m.call(constantsManager, "updateMinAverageUptime", [updateMinAverageUptime], {from: deployAccount}); | ||
|
||
return { constantsManager }; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; | ||
|
||
// npx hardhat ignition deploy ./ignition/modules/NodeDriver.ts --network testnet --parameters ignition/params.json | ||
|
||
export default buildModule("NodeDriver", (m) => { | ||
const nodeDriver = m.contract("NodeDriver"); | ||
return { nodeDriver }; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; | ||
|
||
// npx hardhat ignition deploy ./ignition/modules/NodeDriverAuth.ts --network testnet --parameters ignition/params.json | ||
|
||
export default buildModule("NodeDriverAuth", (m) => { | ||
const NodeDriverAuth = m.contract("NodeDriverAuth"); | ||
return { NodeDriverAuth }; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; | ||
|
||
// npx hardhat ignition deploy ./ignition/modules/SFC.ts --network testnet --parameters ignition/params.json | ||
|
||
export default buildModule("SFC", (m) => { | ||
const sfc = m.contract("SFC"); | ||
return { sfc }; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"ConstantsManager": { | ||
"minSelfStake": "500000000000000000000000n", | ||
"maxDelegatedRatio": "16000000000000000000n", | ||
"validatorCommissions" : "150000000000000000n", | ||
"burntFeeShare": "200000000000000000n", | ||
"treasuryFeeShare": "100000000000000000n", | ||
"withdrawalPeriodEpochs": 3, | ||
"withdrawalPeriodTime": 604800, | ||
"baseRewardPerSecond": "2668658453701531600n", | ||
"offlinePenaltyThresholdTime": 432000, | ||
"offlinePenaltyThresholdBlocksNumber": 1000, | ||
"targetGasPowerPerSecond": 2000000, | ||
"gasPriceBalancingCounterweights": 3600, | ||
"averageUptimeEpochWindow": 100, | ||
"updateMinAverageUptime": 0 | ||
} | ||
} |
Oops, something went wrong.