abi

package
v0.0.0-...-5d85a61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CreateSideChain       = FunctionType{0, true, true, false}
	JoinSideChain         = FunctionType{1, true, true, false}
	DepositInMainChain    = FunctionType{2, true, true, false}
	DepositInSideChain    = FunctionType{3, true, false, true}
	WithdrawFromSideChain = FunctionType{4, true, false, true}
	WithdrawFromMainChain = FunctionType{5, true, true, false}
	SaveDataToMainChain   = FunctionType{6, true, true, false}
	SetBlockReward        = FunctionType{7, true, false, true}

	VoteNextEpoch  = FunctionType{10, false, true, true}
	RevealVote     = FunctionType{11, false, true, true}
	Delegate       = FunctionType{12, false, true, true}
	UnDelegate     = FunctionType{13, false, true, true}
	Register       = FunctionType{14, false, true, true}
	UnRegister     = FunctionType{15, false, true, true}
	EditValidator  = FunctionType{16, false, true, true}
	WithdrawReward = FunctionType{17, false, true, true}
	UnBanned       = FunctionType{18, false, true, true}
	SetCommission  = FunctionType{19, false, true, true}

	Unknown = FunctionType{-1, false, false, false}
)
View Source
var ChainABI abi.ABI
View Source
var ChainContractMagicAddr = common.StringToAddress("LigoAIMiningSmartContractAddress")
View Source
var SideChainTokenIncentiveAddr = common.StringToAddress("LigoAISideChainsTokenDepositAddy")

Functions

func IsLigoChainContractAddr

func IsLigoChainContractAddr(addr *common.Address) bool

Types

type CreateSideChainArgs

type CreateSideChainArgs struct {
	ChainId          string
	MinValidators    uint16
	MinDepositAmount *big.Int
	StartBlock       *big.Int
	EndBlock         *big.Int
}

type DelegateArgs

type DelegateArgs struct {
	Candidate common.Address
}

type DepositInMainChainArgs

type DepositInMainChainArgs struct {
	ChainId string
}

type DepositInSideChainArgs

type DepositInSideChainArgs struct {
	ChainId string
	TxHash  common.Hash
}

type EditValidatorArgs

type EditValidatorArgs struct {
	Moniker  string
	Website  string
	Identity string
	Details  string
}

type FunctionType

type FunctionType struct {
	// contains filtered or unexported fields
}

func FunctionTypeFromId

func FunctionTypeFromId(sigdata []byte) (FunctionType, error)

func StringToFunctionType

func StringToFunctionType(s string) FunctionType

func (FunctionType) AllowInMainChain

func (t FunctionType) AllowInMainChain() bool

func (FunctionType) AllowInSideChain

func (t FunctionType) AllowInSideChain() bool

func (FunctionType) IsCrossChainType

func (t FunctionType) IsCrossChainType() bool

func (FunctionType) RequiredGas

func (t FunctionType) RequiredGas() uint64

func (FunctionType) String

func (t FunctionType) String() string

type JoinSideChainArgs

type JoinSideChainArgs struct {
	PubKey    []byte
	ChainId   string
	Signature []byte
}

type RegisterArgs

type RegisterArgs struct {
	Pubkey     []byte
	Signature  []byte
	Commission uint8
}

type RevealVoteArgs

type RevealVoteArgs struct {
	PubKey    []byte
	Amount    *big.Int
	Salt      string
	Signature []byte
}

type SetBlockRewardArgs

type SetBlockRewardArgs struct {
	ChainId string
	Reward  *big.Int
}

type SetCommissionArgs

type SetCommissionArgs struct {
	Commission uint8
}

type UnBannedArgs

type UnBannedArgs struct {
}

type UnDelegateArgs

type UnDelegateArgs struct {
	Candidate common.Address
	Amount    *big.Int
}

type VoteNextEpochArgs

type VoteNextEpochArgs struct {
	VoteHash common.Hash
}

type WithdrawFromMainChainArgs

type WithdrawFromMainChainArgs struct {
	ChainId string
	Amount  *big.Int
	TxHash  common.Hash
}

type WithdrawFromSideChainArgs

type WithdrawFromSideChainArgs struct {
	ChainId string
}

type WithdrawRewardArgs

type WithdrawRewardArgs struct {
	DelegateAddress common.Address
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL