Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
URL string
}
Proxy is a testnet proxy
func (*Proxy) QuerySC ¶
func (proxy *Proxy) QuerySC(request SCQueryRequest) (*vmcommon.VMOutput, error)
QuerySC queries SC values
func (*Proxy) SendTransaction ¶
func (proxy *Proxy) SendTransaction(txBuff []byte) (*SendTransactionResponse, error)
SendTransaction sends a transaction
type SCQueryRequest ¶
type SCQueryRequest struct { ScAddress string `form:"scAddress" json:"scAddress"` FuncName string `form:"funcName" json:"funcName"` Args []string `form:"args" json:"args"` }
SCQueryRequest is a REST request object
type SCQueryResponse ¶
SCQueryResponse is a REST response object
type SendTransactionResponse ¶
type SendTransactionResponse struct { Message string `json:"message"` Error string `json:"error"` TxHash string `json:"txHash,omitempty"` TxResp *SendTransactionResponsePayload `json:"transaction,omitempty"` }
SendTransactionResponse is a REST response object
type SendTransactionResponsePayload ¶
type SendTransactionResponsePayload struct { Sender string `form:"sender" json:"sender"` Receiver string `form:"receiver" json:"receiver"` Value *big.Int `form:"value" json:"value"` Data string `form:"data" json:"data"` Nonce uint64 `form:"nonce" json:"nonce"` GasPrice uint64 `form:"gasPrice" json:"gasPrice"` GasLimit uint64 `form:"gasLimit" json:"gasLimit"` Signature string `form:"signature" json:"signature"` Challenge string `form:"challenge" json:"challenge"` ShardID uint32 `json:"shardId"` Hash string `json:"hash"` BlockNumber uint64 `json:"blockNumber"` BlockHash string `json:"blockHash"` Timestamp uint64 `json:"timestamp"` }
SendTransactionResponsePayload is a REST response object (substructure)
Click to show internal directories.
Click to hide internal directories.