Documentation ¶
Index ¶
- Constants
- func Decode_Hex(str string) ([]byte, error)
- func Encode_Hex(str []byte) string
- func FeeCollecting(ctx sdk.Context, feeCollectionKeeper auth.FeeCollectionKeeper, ...)
- func HandleCreateContract(ctx sdk.Context, accountKeeper auth.AccountKeeper, ...) (evmOutput string, gasUsed uint64, err error)
- func HandleMsgSend(ctx sdk.Context, accountKeeper auth.AccountKeeper, ...) sdk.Result
- func HandleOpenContract(ctx sdk.Context, accountKeeper auth.AccountKeeper, ...) (evmOutput string, gasUsed uint64, err error)
- func HandleUnknownMsg(msg sdk.Msg) sdk.Result
- func IntrinsicGas(data []byte, homestead bool) (uint64, error)
- func NewHandler(accountKeeper auth.AccountKeeper, feeCollectionKeeper auth.FeeCollectionKeeper, ...) sdk.Handler
- func NewQuerier(accountKeeper auth.AccountKeeper, keyStorage *sdk.KVStoreKey, ...) sdk.Querier
- func ReadStdTxFromRawData(cdc *amino.Codec, str string) (stdTx auth.StdTx, err error)
- func ReadStdTxFromString(cdc *amino.Codec, str string) (stdTx auth.StdTx, err error)
- func RegisterCodec(cdc *codec.Codec)
- type MsgAdd
- type MsgSend
- func NewMsgSend(fromaddr sdk.AccAddress, toaddr sdk.AccAddress, amount sdk.Coins, ...) MsgSend
- func NewMsgSendDefault(fromaddr sdk.AccAddress, toaddr sdk.AccAddress, amount sdk.Coins) MsgSend
- func NewMsgSendForData(fromaddr sdk.AccAddress, toaddr sdk.AccAddress, amount sdk.Coins, data string, ...) MsgSend
- type MsgTest
- type QueryContractParams
- type SendTxResp
- type StateTransition
Constants ¶
const ( QueryContract = "contract" // ZeroAddress = "0000000000000000000000000000000000000000" // TxGasLimit = 100000 )
Query endpoints supported by the core querier
const ( // FlagEncode = "encode" // FlagOffline = "offline" )
const (
QuerierRoute = "htdfservice"
)
Variables ¶
This section is empty.
Functions ¶
func Decode_Hex ¶
func Encode_Hex ¶
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 IntrinsicGas ¶
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 ¶
Read and decode a StdTx from rawdata
func ReadStdTxFromString ¶
Read and decode a StdTx from rawdata
func RegisterCodec ¶
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 ¶
GetSignBytes encodes the message for signing
func (MsgAdd) GetSigners ¶
func (msg MsgAdd) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgAdd) GetSystemIssuerStr ¶
GetStringAddr defines whose fromaddr is required
func (MsgAdd) ValidateBasic ¶
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 (MsgSend) GetSignBytes ¶
GetSignBytes encodes the message for signing
func (MsgSend) GetSigners ¶
func (msg MsgSend) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgSend) ValidateBasic ¶
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
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