contractclient

package
v0.0.0-...-3d4a0dd Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveNodes

type ActiveNodes struct {
	NodeCount      int `json:"nodeCount,omitempty"`
	TotalNodeCount int `json:"totalNodeCount,omitempty"`
}

type DeployContractHandler

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

func (DeployContractHandler) Encode

func (d DeployContractHandler) Encode() string

type GetNodeDetailsParam

type GetNodeDetailsParam int

type NetworkMapContractClient

type NetworkMapContractClient struct {
	client.EthClient
	Auth *bind.TransactOpts
	Ic   *internalContract.ScClient
}

func (*NetworkMapContractClient) ActiveNodesHandler

func (nms *NetworkMapContractClient) ActiveNodesHandler(w http.ResponseWriter, r *http.Request)

func (*NetworkMapContractClient) GetNodeCount

func (nmc *NetworkMapContractClient) GetNodeCount() int

func (*NetworkMapContractClient) GetNodeDetails

func (nmc *NetworkMapContractClient) GetNodeDetails(i int) NodeDetails

func (*NetworkMapContractClient) GetNodeDetailsList

func (nmc *NetworkMapContractClient) GetNodeDetailsList() []NodeDetails

func (*NetworkMapContractClient) GetNodeDetailsResponseHandler

func (nms *NetworkMapContractClient) GetNodeDetailsResponseHandler(w http.ResponseWriter, r *http.Request)

func (*NetworkMapContractClient) GetNodeListResponseHandler

func (nms *NetworkMapContractClient) GetNodeListResponseHandler(w http.ResponseWriter, r *http.Request)

func (*NetworkMapContractClient) GetNodeListSelfResponseHandler

func (nms *NetworkMapContractClient) GetNodeListSelfResponseHandler(w http.ResponseWriter, r *http.Request)

func (*NetworkMapContractClient) GetSignatureHashFromNotary

func (nmc *NetworkMapContractClient) GetSignatureHashFromNotary(notary_block int64, miners []common.Address, blocks_mined []uint32, users []common.Address, user_gas []uint64, largest_tx uint64) ([32]byte, error)

func (*NetworkMapContractClient) GetSignatures

func (nmc *NetworkMapContractClient) GetSignatures(notary_block int64, index int) (Signature, error)

func (*NetworkMapContractClient) GetSignaturesCount

func (nmc *NetworkMapContractClient) GetSignaturesCount(notary_block int64) (*big.Int, error)

func (*NetworkMapContractClient) OptionsHandler

func (nms *NetworkMapContractClient) OptionsHandler(w http.ResponseWriter, r *http.Request)

func (*NetworkMapContractClient) RegisterNode

func (nmc *NetworkMapContractClient) RegisterNode(name string, role string, publicKey string, enode string, ip string, enodeUrl string) string

func (*NetworkMapContractClient) StoreSignature

func (nmc *NetworkMapContractClient) StoreSignature(notary_block int64, sig Signature) (*types.Transaction, error)

func (*NetworkMapContractClient) UpdateNode

func (nmc *NetworkMapContractClient) UpdateNode(name string, role string, publicKey string, enode string, ip string, enodeUrl string) string

func (*NetworkMapContractClient) UpdateNodeRequestsHandler

func (nms *NetworkMapContractClient) UpdateNodeRequestsHandler(w http.ResponseWriter, r *http.Request)

type NodeDetails

type NodeDetails struct {
	Name      string `json:"nodeName,omitempty"`
	Role      string `json:"role,omitempty"`
	PublicKey string `json:"publicKey,omitempty"`
	Enode     string `json:"enode,omitempty"`
	IP        string `json:"ip,omitempty"`
	EnodeUrl  string `json:"enode_url,omitempty"`
}

type NodeDetailsSelf

type NodeDetailsSelf struct {
	Name      string `json:"nodeName,omitempty"`
	Role      string `json:"role,omitempty"`
	PublicKey string `json:"publicKey,omitempty"`
	Enode     string `json:"enode,omitempty"`
	IP        string `json:"ip,omitempty"`
	Self      string `json:"self,omitempty"`
	Active    string `json:"active,omitempty"`
}

type ParamTableRow

type ParamTableRow struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func ABIParser

func ABIParser(contractAdd string, abiContent string, payload string) ([]ParamTableRow, string)

func Decode

func Decode(r string, contractAdd string) ([]ParamTableRow, string)

type Signature

type Signature struct {
	V uint8
	R [32]byte
	S [32]byte
}

type UpdateNode

type UpdateNode struct {
	NodeName string `json:"nodeName,omitempty"`
	Role     string `json:"role,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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