buyad

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuyAd

func BuyAd(cdc *wire.Codec, chainId, articleHash, coins, privatekey string, qosnonce, qscnonce int64) string

BuyAd 投资广告

func BuyAdBackground

func BuyAdBackground(cdc *wire.Codec, txb string, timeout time.Duration) string

BuyAdBackground 提交到链上

func BuyadCmd

func BuyadCmd(cdc *wire.Codec) *cobra.Command

BuyadCmd will create a send tx and sign it with the given key.

func RetrieveBuyer

func RetrieveBuyer(cdc *wire.Codec, articleHash string) string

RetrieveBuyer 查询购买者

Types

type BuyTx

type BuyTx struct {
	Std         *txs.TxStd
	ArticleHash []byte `json:"articleHash"` // 文章hash
}

func (BuyTx) CalcGas

func (it BuyTx) CalcGas() qbasetypes.BigInt

func (BuyTx) Exec

func (it BuyTx) Exec(ctx context.Context) (result qbasetypes.Result, crossTxQcps *txs.TxQcp)

func (BuyTx) GetGasPayer

func (it BuyTx) GetGasPayer() qbasetypes.Address

func (BuyTx) GetSignData

func (it BuyTx) GetSignData() []byte

func (BuyTx) GetSigner

func (it BuyTx) GetSigner() []qbasetypes.Address

func (BuyTx) Name

func (it BuyTx) Name() string

func (BuyTx) ValidateData

func (it BuyTx) ValidateData(ctx context.Context) error

type BuyadStub

type BuyadStub struct {
}

func NewStub

func NewStub() BuyadStub

func (BuyadStub) CustomerQuery

func (kv BuyadStub) CustomerQuery(ctx ctx.Context, route []string, req abci.RequestQuery) (res []byte, err qbasetypes.Error)

func (BuyadStub) EndBlockNotify

func (bs BuyadStub) EndBlockNotify(ctx context.Context)

func (BuyadStub) Name

func (kv BuyadStub) Name() string

func (BuyadStub) RegisterCdc

func (bs BuyadStub) RegisterCdc(cdc *go_amino.Codec)

func (BuyadStub) ResultNotify

func (bs BuyadStub) ResultNotify(ctx context.Context, txQcpResult interface{}) *qbasetypes.Result

func (BuyadStub) StartX

func (bs BuyadStub) StartX(base *baseapp.QstarsBaseApp) error

type ResultBuy

type ResultBuy struct {
	Code   string          `json:"code"`
	Reason string          `json:"reason,omitempty"`
	Result json.RawMessage `json:"result,omitempty"`
}

func InternalError

func InternalError(reason string) ResultBuy

func NewResultBuy

func NewResultBuy(cdc *wire.Codec, code, reason string, res interface{}) ResultBuy

func (ResultBuy) Marshal

func (ri ResultBuy) Marshal() string

Jump to

Keyboard shortcuts

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