mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
commit
7ee85872ec
1 changed files with 3 additions and 3 deletions
|
|
@ -44,15 +44,15 @@ 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("10000000000000000000000000", 10)
|
||||||
minVoterCap := new(big.Int)
|
minVoterCap := new(big.Int)
|
||||||
minVoterCap.SetString("10000000000000000000", 10)
|
minVoterCap.SetString("25000000000000000000000", 10)
|
||||||
// Deposit 50K XDC
|
// Deposit 50K XDC
|
||||||
// Min Voter Cap 10 XDC
|
// Min Voter Cap 10 XDC
|
||||||
// 150 masternodes
|
// 150 masternodes
|
||||||
// Candidate Delay Withdraw 30 days = 1296000 blocks
|
// Candidate Delay Withdraw 30 days = 1296000 blocks
|
||||||
// Voter Delay Withdraw 2 days = 86400 blocks
|
// Voter Delay Withdraw 2 days = 86400 blocks
|
||||||
validatorAddr, _, _, err := contract.DeployXDCValidator(transactOpts, contractBackend, validatorAddress, caps, ownerAddress, minDeposit, minVoterCap, big.NewInt(150), big.NewInt(1296000), big.NewInt(86400))
|
validatorAddr, _, _, err := contract.DeployXDCValidator(transactOpts, contractBackend, validatorAddress, caps, ownerAddress, minDeposit, minVoterCap, big.NewInt(18), big.NewInt(129600), big.NewInt(43200))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return validatorAddr, nil, err
|
return validatorAddr, nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue