Files
sdk/validatormanager/validator_manager_poa.go
zeekayandHanzo Dev da299df77d the corporate name is Lux Industries Inc
Lux Partners Limited is not the entity behind this work. Every place the
old name stood — copyright lines, site footers, brand config, legal and
compliance text — now names the company that actually holds it.

lux.fund is the exception and is not renamed to match: that site belongs
to Lux Assets Management LLC, a different company, and it says so.

Two kinds of line were left for a person rather than rewritten. A dated
news item recording that Lux Partners Limited was established in the Isle
of Man is a historical fact, and renaming it would falsify the record. And
a sentence asserting that the company is domiciled in the Isle of Man is a
claim about a jurisdiction, not a name — an Inc or an LLC is not an Isle
of Man company, so swapping the name there would assert something untrue.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-28 13:05:15 -07:00

66 lines
1.6 KiB
Go

// Copyright (C) 2025, Lux Industries Inc All rights reserved.
// See the file LICENSE for licensing terms.
package validatormanager
import (
"github.com/luxfi/crypto"
"github.com/luxfi/geth/core/types"
"github.com/luxfi/sdk/contract"
"github.com/luxfi/ids"
)
// PoAValidatorManagerInitialize initializes contract [managerAddress] at [rpcURL], to
// manage validators on [chainID], with
// owner given by [ownerAddress]
func PoAValidatorManagerInitialize(
rpcURL string,
managerAddress crypto.Address,
privateKey string,
chainID ids.ID,
ownerAddress crypto.Address,
useACP99 bool,
) (*types.Transaction, *types.Receipt, error) {
const (
defaultChurnPeriodSeconds = uint64(0)
defaultMaximumChurnPercentage = uint8(20)
)
if useACP99 {
return contract.TxToMethod(
rpcURL,
false,
crypto.Address{},
privateKey,
managerAddress,
nil,
"initialize PoA manager",
ErrorSignatureToError,
"initialize((address, bytes32,uint64,uint8))",
ACP99ValidatorManagerSettings{
Admin: ownerAddress,
ChainID: chainID,
ChurnPeriodSeconds: defaultChurnPeriodSeconds,
MaximumChurnPercentage: defaultMaximumChurnPercentage,
},
)
}
return contract.TxToMethod(
rpcURL,
false,
crypto.Address{},
privateKey,
managerAddress,
nil,
"initialize PoA manager",
ErrorSignatureToError,
"initialize((bytes32,uint64,uint8),address)",
ValidatorManagerSettings{
ChainID: chainID,
ChurnPeriodSeconds: defaultChurnPeriodSeconds,
MaximumChurnPercentage: defaultMaximumChurnPercentage,
},
ownerAddress,
)
}