Implemented first few methods via public api
This commit is contained in:
@@ -87,7 +87,7 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, in
|
||||
tx = ethchain.NewContractCreationTx(value, gas, gasPrice, mainScript, initScript)
|
||||
} else {
|
||||
// Just in case it was submitted as a 0x prefixed string
|
||||
if initStr[0:2] == "0x" {
|
||||
if len(initStr) > 0 && initStr[0:2] == "0x" {
|
||||
initStr = initStr[2:len(initStr)]
|
||||
}
|
||||
tx = ethchain.NewTransactionMessage(hash, value, gas, gasPrice, ethutil.FromHex(initStr))
|
||||
|
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
// Block interface exposed to QML
|
||||
type PBlock struct {
|
||||
Number int
|
||||
Hash string
|
||||
Number int `json:"number"`
|
||||
Hash string `json:"hash"`
|
||||
}
|
||||
|
||||
// Creates a new QML Block from a chain block
|
||||
@@ -44,10 +44,10 @@ func NewPKey(key *ethchain.KeyPair) *PKey {
|
||||
}
|
||||
|
||||
type PReceipt struct {
|
||||
CreatedContract bool
|
||||
Address string
|
||||
Hash string
|
||||
Sender string
|
||||
CreatedContract bool `json:"createdContract"`
|
||||
Address string `json:"address"`
|
||||
Hash string `json:"hash"`
|
||||
Sender string `json:"sender"`
|
||||
}
|
||||
|
||||
func NewPReciept(contractCreation bool, creationAddress, hash, address []byte) *PReceipt {
|
||||
|
Reference in New Issue
Block a user