prepare testnet genesis

This commit is contained in:
parmarrushabh 2018-10-29 14:53:44 +05:30
parent 10e040ffd2
commit 4dfbf08a6f
2 changed files with 6 additions and 3 deletions

View file

@ -217,7 +217,7 @@ func (w *wizard) makeGenesis() {
} }
// Randomize Smart Contract Code // Randomize Smart Contract Code
randomizeAddress, _, err := randomizeContract.DeployRandomize(transactOpts, contractBackend, big.NewInt(99)) randomizeAddress, _, err := randomizeContract.DeployRandomize(transactOpts, contractBackend, big.NewInt(90))
if err != nil { if err != nil {
fmt.Println("Can't deploy root registry") fmt.Println("Can't deploy root registry")
} }

View file

@ -30,8 +30,11 @@ func NewValidator(transactOpts *bind.TransactOpts, contractAddr common.Address,
func DeployValidator(transactOpts *bind.TransactOpts, contractBackend bind.ContractBackend, validatorAddress []common.Address, caps []*big.Int, ownerAddress common.Address) (common.Address, *Validator, error) { func DeployValidator(transactOpts *bind.TransactOpts, contractBackend bind.ContractBackend, validatorAddress []common.Address, caps []*big.Int, ownerAddress common.Address) (common.Address, *Validator, error) {
minDeposit := new(big.Int) minDeposit := new(big.Int)
minDeposit.SetString("50000000000000000000000", 10) minDeposit.SetString("50000000000000000000000", 10)
validatorAddr, _, _, err := contract.DeployXDCValidator(transactOpts, contractBackend, validatorAddress, caps, ownerAddress, minDeposit, big.NewInt(99), big.NewInt(100), big.NewInt(100)) // Deposit 50K XDC
if err != nil { // 150 masternodes
// Candidate Delay Withdraw 30 days = 1296000 blocks
// Voter Delay Withdraw 2 days = 8640 blocks
validatorAddr, _, _, err := contract.DeployXDCValidator(transactOpts, contractBackend, validatorAddress, caps, ownerAddress, minDeposit, big.NewInt(150), big.NewInt(8640), big.NewInt(1296000)) if err != nil {
return validatorAddr, nil, err return validatorAddr, nil, err
} }