Documentation ¶
Index ¶
- Variables
- func GetPassword(msg string) []byte
- type Account
- func (a *Account) BLSG1PublicKey() (bls.SerializedG1PublicKey, error)
- func (a *Account) BLSProofOfPossession() ([]byte, error)
- func (a *Account) BLSPublicKey() (bls.SerializedPublicKey, error)
- func (a *Account) MustBLSProofOfPossession() []byte
- func (a *Account) PrivateKeyHex() string
- func (a *Account) PublicKey() []byte
- func (a *Account) String() string
- type AccountsParameters
- type Config
- type ElectionParameters
- type EpochRewardsParameters
- type GoldTokenParameters
- type LockedGoldParameters
- type TestPoc2
- type ValidatorInfo
- type ValidatorParameters
- type Voter2validatorInfo
- type VoterInfo
- type VoterStruct
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GetIndexError = errors.New("get Index nil(no Address)") NoTargetValidatorError = errors.New("not find target validator") BigSubValue = errors.New("not enough map") )
View Source
var ( KeyStoreFlag = cli.StringFlag{ Name: "keystore", Usage: "Keystore file path", } NameFlag = cli.StringFlag{ Name: "name", Usage: "Name of account", } URLFlag = cli.StringFlag{ Name: "url", Usage: "Metadata url of account", } CommissionFlag = cli.Uint64Flag{ Name: "commission", Usage: "Register validator param", } RelayerFlag = cli.StringFlag{ Name: "relayerf", Usage: "Register validator param", } VoteNumFlag = cli.Int64Flag{ Name: "voteNum", Usage: "The amount of gold to use to vote", } TopNumFlag = cli.Int64Flag{ Name: "topNum", Usage: "TopNum of validator", } LockedNumFlag = cli.Int64Flag{ Name: "lockedNum", Usage: "The amount of map to lock 、unlock、relock、withdraw ", } WithdrawIndexFlag = cli.Int64Flag{ Name: "withdrawIndex", Usage: "Use for withdraw", } ReLockIndexFlag = cli.Int64Flag{ Name: "relockIndex", Usage: "Use for relock", } VerbosityFlag = cli.Int64Flag{ Name: "Verbosity", Usage: "Verbosity of log level", } RPCAddrFlag = cli.StringFlag{ Name: "rpcaddr", Usage: "HTTP-RPC server listening interface", Value: "localhost", } ValueFlag = cli.Uint64Flag{ Name: "value", Usage: "Value units one eth", Value: 0, } AmountFlag = cli.StringFlag{ Name: "amount", Usage: "Transfer amount, unit (wei)", Value: "0", } DurationFlag = cli.Int64Flag{ Name: "duration", Usage: "Duration The time (in seconds) that these requirements persist for.", Value: 0, } TargetAddressFlag = cli.StringFlag{ Name: "target", Usage: "Target query address", Value: "", } ValidatorAddressFlag = cli.StringFlag{ Name: "validator", Usage: "Validator address", Value: "", } SignerPriFlag = cli.StringFlag{ Name: "signerPriv", Usage: "Signer private", Value: "", } SignerFlag = cli.StringFlag{ Name: "signer", Usage: "Signer address", Value: "", } SignatureFlag = cli.StringFlag{ Name: "signature", Usage: "ECDSA Signature", Value: "", } ProofFlag = cli.StringFlag{ Name: "proof", Usage: "Signer proof", Value: "", } AccountAddressFlag = cli.StringFlag{ Name: "accountAddress", Usage: "Account address", Value: "", } ContractAddressFlag = cli.StringFlag{ Name: "contractAddress", Usage: "Set contract Address", Value: "", } ImplementationAddressFlag = cli.StringFlag{ Name: "implementationAddress", Usage: "Set implementation Address", Value: "", } GasLimitFlag = cli.Int64Flag{ Name: "gasLimit", Usage: "Use for sendContractTransaction gasLimit", Value: 0, } KeystoreAddressFlag = cli.StringFlag{ Name: "keystoreAddress", Usage: "The address corresponding to the keystore", Value: "", } BuildpathFlag = cli.StringFlag{ Name: "buildpath", Usage: "Directory where smartcontract truffle build file live", } NewEnvFlag = cli.StringFlag{ Name: "newenv", Usage: "Creates a new env in desired folder", } MarkerCfgFlag = cli.StringFlag{ Name: "markercfg", Usage: "Marker config path", } )
View Source
var ( Voter2validator []Voter2validatorInfo VoterList []VoterStruct )
View Source
var BaseFlagCombination = []cli.Flag{ RPCAddrFlag, KeyStoreFlag, GasLimitFlag, TargetAddressFlag, KeystoreAddressFlag, }
View Source
var MustFlagCombination = []cli.Flag{ RPCAddrFlag, KeyStoreFlag, GasLimitFlag, }
View Source
var TemplateFlags = []cli.Flag{
cli.StringFlag{
Name: "template",
Usage: "Optional template to use (default: local)",
},
cli.IntFlag{
Name: "validators",
Usage: "Number of Validators",
},
cli.IntFlag{
Name: "dev.accounts",
Usage: "Number of developer accounts",
},
cli.Uint64Flag{
Name: "blockperiod",
Usage: "Seconds between each block",
},
cli.Uint64Flag{
Name: "epoch",
Usage: "Epoch size",
},
cli.Int64Flag{
Name: "blockgaslimit",
Usage: "Block gas limit",
},
cli.StringFlag{
Name: "mnemonic",
Usage: "Mnemonic to generate accounts",
},
}
Functions ¶
func GetPassword ¶
Types ¶
type Account ¶
type Account struct { Address common.Address PrivateKey *ecdsa.PrivateKey }
Account represents a atlas Account
func (*Account) BLSG1PublicKey ¶
func (a *Account) BLSG1PublicKey() (bls.SerializedG1PublicKey, error)
BLSG1PublicKey returns the bls G1 public key
func (*Account) BLSProofOfPossession ¶
BLSProofOfPossession generates bls proof of possession
func (*Account) BLSPublicKey ¶
func (a *Account) BLSPublicKey() (bls.SerializedPublicKey, error)
BLSPublicKey returns the bls public key
func (*Account) MustBLSProofOfPossession ¶
MustBLSProofOfPossession variant of BLSProofOfPossession that panics on error
func (*Account) PrivateKeyHex ¶
PrivateKeyHex hex representation of the private key
type AccountsParameters ¶
type Config ¶
type Config struct { From common.Address PublicKey []byte PrivateKey *ecdsa.PrivateKey BlsPub blscrypto.SerializedPublicKey BlsG1Pub blscrypto.SerializedG1PublicKey BLSProof []byte Value uint64 Amount string Duration int64 Commission uint64 Fixed string VoteNum *big.Int TopNum *big.Int LockedNum *big.Int WithdrawIndex *big.Int RelockIndex *big.Int TargetAddress common.Address ContractAddress common.Address SignerPriv string AccountAddress common.Address // validator SignerAddress common.Address Signature string Proof string ImplementationAddress common.Address RPCAddr string GasLimit int64 Verbosity string Name string MetadataURL string LockedGoldParameters LockedGoldParameters ValidatorParameters ValidatorParameters EpochRewardParameters EpochRewardsParameters TestPoc2Parameters TestPoc2 ElectionParameters ElectionParameters GoldTokenParameters GoldTokenParameters }
func AssemblyConfig ¶
type ElectionParameters ¶
type EpochRewardsParameters ¶
type GoldTokenParameters ¶
type LockedGoldParameters ¶
type ValidatorInfo ¶
type ValidatorParameters ¶
type Voter2validatorInfo ¶
Click to show internal directories.
Click to hide internal directories.