htdfservice

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

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 = "htdfservice"
)

Variables

This section is empty.

Functions

func Decode_Hex

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

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 HandleCreateContract

func HandleCreateContract(ctx sdk.Context,
	accountKeeper auth.AccountKeeper,
	feeCollectionKeeper auth.FeeCollectionKeeper,
	keyStorage *sdk.KVStoreKey,
	keyCode *sdk.KVStoreKey,
	msg MsgSend) (evmOutput string, gasUsed uint64, err error)

junying-todo, 2019-08-26

func HandleMsgSend

func HandleMsgSend(ctx sdk.Context,
	accountKeeper auth.AccountKeeper,
	feeCollectionKeeper auth.FeeCollectionKeeper,
	keyStorage *sdk.KVStoreKey,
	keyCode *sdk.KVStoreKey,
	msg MsgSend) sdk.Result

junying-todo, 2019-08-26

func HandleOpenContract

func HandleOpenContract(ctx sdk.Context,
	accountKeeper auth.AccountKeeper,
	feeCollectionKeeper auth.FeeCollectionKeeper,
	keyStorage *sdk.KVStoreKey,
	keyCode *sdk.KVStoreKey,
	msg MsgSend) (evmOutput string, gasUsed uint64, err error)

junying-todo, 2019-08-26

func HandleUnknownMsg

func HandleUnknownMsg(msg sdk.Msg) sdk.Result

junying-todo, 2019-08-26

func IntrinsicGas

func IntrinsicGas(data []byte, homestead bool) (uint64, error)

junying-todo, 2019-11-06 from x/core/transition.go IntrinsicGas computes the 'intrinsic gas' for a message with the given data.

func NewHandler

func NewHandler(accountKeeper auth.AccountKeeper,
	feeCollectionKeeper auth.FeeCollectionKeeper,
	keyStorage *sdk.KVStoreKey,
	keyCode *sdk.KVStoreKey) sdk.Handler

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

func NewQuerier added in v1.1.0

func NewQuerier(accountKeeper auth.AccountKeeper, keyStorage *sdk.KVStoreKey, keyCode *sdk.KVStoreKey) sdk.Querier

NewQuerier returns a htdfservice Querier handler.

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 RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the Amino codec

Types

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 MsgSend

type MsgSend struct {
	From      sdk.AccAddress
	To        sdk.AccAddress
	Amount    sdk.Coins
	Data      string
	GasPrice  uint64 //unit,  satoshi/gallon
	GasWanted uint64 //unit,  gallon
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////// MsgSend defines a SendFrom message ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////

func NewMsgSend

func NewMsgSend(fromaddr sdk.AccAddress, toaddr sdk.AccAddress, amount sdk.Coins, gasPrice uint64, gasWanted uint64) MsgSend

Normal Transaction Default GasWanted, Customized GasPrice

func NewMsgSendDefault

func NewMsgSendDefault(fromaddr sdk.AccAddress, toaddr sdk.AccAddress, amount sdk.Coins) MsgSend

NewMsgSend is a constructor function for MsgSend Normal Transaction Default GasWanted, Default GasPrice

func NewMsgSendForData

func NewMsgSendForData(fromaddr sdk.AccAddress, toaddr sdk.AccAddress, amount sdk.Coins, data string, gasPrice uint64, gasWanted uint64) MsgSend

Contract Transaction

func (MsgSend) FromAddress

func (msg MsgSend) FromAddress() common.Address

func (MsgSend) GetData

func (msg MsgSend) GetData() string

junying-todo, 2019-11-06

func (MsgSend) GetSignBytes

func (msg MsgSend) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgSend) GetSigners

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

GetSigners defines whose signature is required

func (MsgSend) Route

func (msg MsgSend) Route() string

Route should return the name of the module

func (MsgSend) Type

func (msg MsgSend) Type() string

Type should return the action

func (MsgSend) ValidateBasic

func (msg MsgSend) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgTest added in v1.1.0

type MsgTest struct {
	From sdk.AccAddress
}

func NewMsgTest added in v1.1.0

func NewMsgTest(addr sdk.AccAddress) MsgTest

func (MsgTest) FromAddress added in v1.1.0

func (msg MsgTest) FromAddress() common.Address

type QueryContractParams added in v1.1.0

type QueryContractParams struct {
	Address sdk.AccAddress
	Code    string
}

defines the params for query: "custom/hs/contract" junying-todo, 2020-03-30

func NewQueryContractParams added in v1.1.0

func NewQueryContractParams(addr sdk.AccAddress, code string) QueryContractParams

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

type StateTransition

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

func NewStateTransition

func NewStateTransition(evm *vm.EVM, msg MsgSend, stateDB *evmstate.CommitStateDB) *StateTransition

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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