faucet

package
v0.0.0-...-2044903 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	QueryContract = "contract"
	//
	ZeroAddress = "0000000000000000000000000000000000000000"
	//
	TxGasLimit = 100000
)

Query endpoints supported by the core querier

View Source
const (
	//
	FlagEncode = "encode"
	//
	FlagOffline = "offline"
)
View Source
const (
	QuerierRoute = "faucet"
)

Variables

This section is empty.

Functions

func Decode_Hex

func Decode_Hex(str string) ([]byte, error)

func ElectDefaultSystemIssuer

func ElectDefaultSystemIssuer(genstate GenesisState) sdk.AccAddress

junying-todo-20190429 This election algorithm is based on the hyposis that all the genesis accounts are owned by htdf development team. Now it changes every day.

func Encode_Hex

func Encode_Hex(str []byte) string

func FeeCollecting

func FeeCollecting(ctx sdk.Context,
	feeCollectionKeeper auth.FeeCollectionKeeper,
	stateDB *state.CommitStateDB,
	gasused uint64,
	gasprice *big.Int)

func GetSystemIssuerFromFile

func GetSystemIssuerFromFile(genfilepath string) (sdk.AccAddress, error)

junying-todo-20190429 This function finds genesis.json where user indicates, the read genesis accounts return current system issuer account

func GetSystemIssuerFromRoot

func GetSystemIssuerFromRoot() (sdk.AccAddress, error)

junying-todo-20190429 This function finds genesis.json in root directory, the read genesis accounts return current system issuer account

func HandleMsgAdd

func HandleMsgAdd(ctx sdk.Context, keeper bank.Keeper, msg MsgAdd) sdk.Result

Handle a message to add

func HandleUnknownMsg

func HandleUnknownMsg(msg sdk.Msg) sdk.Result

junying-todo, 2019-08-26

func LoadGenesisDoc

func LoadGenesisDoc(cdc *amino.Codec, genFile string) (genDoc types.GenesisDoc, err error)

LoadGenesisDoc reads and unmarshals GenesisDoc from the given file.

func MakeLatestCodec

func MakeLatestCodec() *codec.Codec

func NewHandler

func NewHandler(bankKeeper bank.Keeper) sdk.Handler

New HTDF Message Handler connected to handler.go HandleMsgSend, HandleMsgAdd upgraded to EVM version commented by junying, 2019-08-21

func ReadAccounts

func ReadAccounts(filepath string) (accounts []string, balances []int, err error)

junying-todo, 2020-01-15 this is used to export accounts from accounts.text into genesis.json in: accounts text file path out: accounts, balances

func ReadStdTxFromRawData

func ReadStdTxFromRawData(cdc *amino.Codec, str string) (stdTx auth.StdTx, err error)

Read and decode a StdTx from rawdata

func ReadStdTxFromString

func ReadStdTxFromString(cdc *amino.Codec, str string) (stdTx auth.StdTx, err error)

Read and decode a StdTx from rawdata

func ReadString

func ReadString(filepath string, lineNum int) (line string, lastLine int, err error)

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the Amino codec

func WriteString

func WriteString(filepath string, msg string) error

Types

type GenesisAccount

type GenesisAccount struct {
	Address       sdk.AccAddress `json:"address"`
	Coins         sdk.Coins      `json:"coins"`
	Sequence      uint64         `json:"sequence_number"`
	AccountNumber uint64         `json:"account_number"`

	// vesting account fields
	OriginalVesting  sdk.Coins `json:"original_vesting"`  // total vesting coins upon initialization
	DelegatedFree    sdk.Coins `json:"delegated_free"`    // delegated vested coins at time of delegation
	DelegatedVesting sdk.Coins `json:"delegated_vesting"` // delegated vesting coins at time of delegation
	StartTime        int64     `json:"start_time"`        // vesting start time (UNIX Epoch time)
	EndTime          int64     `json:"end_time"`          // vesting end time (UNIX Epoch time)
}

/////////////////////////////////////////////////////////////// GenesisAccount doesn't need pubkey or sequence

type GenesisState

type GenesisState struct {
	Accounts     []GenesisAccount      `json:"accounts"`
	AuthData     auth.GenesisState     `json:"auth"`
	StakeData    stake.GenesisState    `json:"staking"`
	MintData     mint.GenesisState     `json:"mint"`
	DistrData    distr.GenesisState    `json:"distr"`
	GovData      gov.GenesisState      `json:"gov"`
	UpgradeData  upgrade.GenesisState  `json:"upgrade"`
	CrisisData   crisis.GenesisState   `json:"crisis"`
	SlashingData slashing.GenesisState `json:"slashing"`
	ServiceData  service.GenesisState  `json:"service"`
	GuardianData guardian.GenesisState `json:"guardian"`
	GenTxs       []json.RawMessage     `json:"gentxs"`
}

type MsgAdd

type MsgAdd struct {
	SystemIssuer sdk.AccAddress
	Amount       sdk.Coins
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////// MsgAdd defines a Add message /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////

func NewMsgAdd

func NewMsgAdd(addr sdk.AccAddress, amount sdk.Coins) MsgAdd

NewMsgAdd is a constructor function for Msgadd

func (MsgAdd) GeSystemIssuer

func (msg MsgAdd) GeSystemIssuer() sdk.AccAddress

func (MsgAdd) GetSignBytes

func (msg MsgAdd) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgAdd) GetSigners

func (msg MsgAdd) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgAdd) GetSystemIssuerStr

func (msg MsgAdd) GetSystemIssuerStr() string

GetStringAddr defines whose fromaddr is required

func (MsgAdd) Route

func (msg MsgAdd) Route() string

Route should return the name of the module

func (MsgAdd) Type

func (msg MsgAdd) Type() string

Type should return the action

func (MsgAdd) ValidateBasic

func (msg MsgAdd) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgTest

type MsgTest struct {
	From sdk.AccAddress
}

func NewMsgTest

func NewMsgTest(addr sdk.AccAddress) MsgTest

func (MsgTest) FromAddress

func (msg MsgTest) FromAddress() common.Address

type SendTxResp

type SendTxResp struct {
	ErrCode         sdk.CodeType `json:"code"`
	ErrMsg          string       `json:"message"`
	ContractAddress string       `json:"contract_address"`
	EvmOutput       string       `json:"evm_output"`
}

func (SendTxResp) String

func (rsp SendTxResp) String() string

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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