Documentation ¶
Index ¶
- Variables
- func BinToSol(contracts []string) []string
- func Bindings() error
- func Compile() ([]string, error)
- func Contract(contract string) (*abi.ABI, error)
- func ContractAddress(contract string, network string) (common.Address, error)
- func ContractFromPath(pathStr string) (*abi.ABI, error)
- func ContractNameFromPath(path string) string
- func Deploy(client *ethclient.Client, network Network, contracts []string, ...) error
- func DeployTestRPC(network Network, contracts []string) error
- func Dial(url string) (*ethclient.Client, error)
- func Exists(path string) (bool, error)
- func GetAccounts(url string) ([]string, error)
- func GetBlockNumber(url string) (*big.Int, error)
- func GetContractBIN(contract string) string
- func GetContractCleanName(fullFilename string) string
- func GetContractName(contract string) string
- func GetContractNames(contracts []string) []string
- func Migrate(network string, contract string) error
- func NewConnection(network string) (*ethclient.Client, error)
- func NewKeyStore(path string) *keystore.KeyStore
- func PrintAccounts(accounts []string)
- func PrintKeystoreAccounts(accounts []accounts.Account)
- func ReadConfig() ([]byte, error)
- func SearchDirectory(dir string) ([]string, error)
- func SearchDirectoryForAbi(dir string) ([]string, error)
- func SendTransaction(txData string, url string) (string, error)
- func WatchAllEvents(conn *ethclient.Client, contract common.Address, fromBlock *big.Int, ...) error
- type AccountResponse
- type Config
- type Network
- type Receipt
- type ReceiptResponse
- type Response
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Networks: map[string]Network{"default": DefaultNetwork}, }
View Source
var DefaultNetwork = Network{
Name: "default",
Url: "http://localhost:8545",
From: "0xADDRESS",
Keystore: "./keystore",
Password: "",
Gas: 100000000,
GasPrice: 4700000,
Id: "",
}
Functions ¶
func ContractAddress ¶
func ContractNameFromPath ¶
func DeployTestRPC ¶
func GetAccounts ¶
this function gets the accounts in the client by calling "eth_accounts"
func GetBlockNumber ¶
this function gets the current block number by calling "eth_blockNumber"
func GetContractBIN ¶
func GetContractCleanName ¶
func GetContractName ¶
func GetContractNames ¶
func NewKeyStore ¶
func PrintAccounts ¶
func PrintAccounts(accounts []string)
func PrintKeystoreAccounts ¶
func ReadConfig ¶
func SearchDirectory ¶
func SearchDirectoryForAbi ¶
func SendTransaction ¶
params: [{ "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", //not needed for new contract "gas": "0x76c0", // 30400 "gasPrice": "0x9184e72a000", // 10000000000000 "value": "0x9184e72a", // 2441406250 "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675" }]
Types ¶
type AccountResponse ¶
type AccountResponse struct {
Result []string `json:"result"`
}
type Config ¶
func UnmarshalConfig ¶
type Network ¶
type Network struct { Name string `json:"name,omitempty"` Url string `json:"url,omitempty"` From string `json:"from,omitempty"` Keystore string `json:"keystore,1omitempty"` Password string `json:"password,omitempty"` Gas int64 `json:"gas,omitempty"` GasPrice int64 `json:"gasPrice,omitempty"` Id string `json:"id,omitempty"` }
func PrepNetwork ¶
type Receipt ¶
type Receipt struct { TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` BlockNumber string `json:"blockNumber"` BlockHash string `json:"blockHash"` CumulativeGasUsed string `json:"cumulativeGasUsed"` GasUsed string `json:"gasUsed"` ContractAddress string `json:"contractAddress"` Logs []string `json:"logs"` LogsBloom string `json:"logsBloom"` Status string `json:"status"` }
type ReceiptResponse ¶
type ReceiptResponse struct {
Result Receipt `json:"result"`
}
Click to show internal directories.
Click to hide internal directories.