man

package
Version: v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Man

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

Man - The Man Module

func NewMan

func NewMan(provider providers.ProviderInterface) *Man

NewMan - Man Module constructor to set the default provider

func (*Man) GetBalance

func (man *Man) GetBalance(address string, defaultBlockParameter string) ([]common.RPCBalanceType, error)

func (*Man) GetBlockByNumber

func (man *Man) GetBlockByNumber(number *big.Int, transactionDetails bool) (*common.Block, error)

GetBlockByNumber - Returns the information about a block requested by number. Parameters:

- number, QUANTITY - number of block
- transactionDetails, bool - indicate if we should have or not the details of the transactions of the block

Returns:

1. Object - A block object, or null when no transaction was found
2. error

func (*Man) GetBlockNumber

func (man *Man) GetBlockNumber() (*big.Int, error)

GetBlockNumber - Returns the number of most recent block. Parameters:

- none

Returns:

- QUANTITY - integer of the current block number the client is on.

func (*Man) GetGasPrice

func (man *Man) GetGasPrice() (*big.Int, error)

func (*Man) GetTopologyStatusByNumber

func (man *Man) GetTopologyStatusByNumber(number *big.Int) (*common.TopologyStatus, error)

func (*Man) GetTransactionCount

func (man *Man) GetTransactionCount(address string, defaultBlockParameter string) (*big.Int, error)

GetTransactionCount - Returns the number of transactions sent from an address. Parameters:

- DATA, 20 Bytes - address to check for balance.

Returns:

- QUANTITY - integer of the number of transactions sent from this address

func (*Man) GetTransactionReceipt

func (man *Man) GetTransactionReceipt(hash string) (*dto.TransactionReceipt, error)

GetTransactionReceipt - Returns compiled solidity code. Parameters:

1. DATA, 32 Bytes - hash of a transaction.

Returns:

	  1. Object - A transaction receipt object, or null when no receipt was found:
   - transactionHash: 		DATA, 32 Bytes - hash of the transaction.
   - transactionIndex: 		QUANTITY - integer of the transactions index position in the block.
   - blockHash: 				DATA, 32 Bytes - hash of the block where this transaction was in.
   - blockNumber:			QUANTITY - block number where this transaction was in.
   - cumulativeGasUsed: 		QUANTITY - The total amount of gas used when this transaction was executed in the block.
   - gasUsed: 				QUANTITY - The amount of gas used by this specific transaction alone.
   - contractAddress: 		DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
   - logs: 					Array - Array of log objects, which this transaction generated.

func (*Man) SendRawTransaction

func (man *Man) SendRawTransaction(rawTx interface{}) (string, error)

func (*Man) SendStringRawTransaction added in v1.0.4

func (man *Man) SendStringRawTransaction(rawTx string) (string, error)

func (*Man) SignTxByPrivate

func (man *Man) SignTxByPrivate(sendTX *common.SendTxArgs1, from string, Privatekey *ecdsa.PrivateKey, ChainId *big.Int) (*common.SendTxArgs1, error)

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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