forked from cerc-io/plugeth
Merge branch 'develop' of github.com-obscure:ethereum/eth-go into develop
This commit is contained in:
@@ -223,6 +223,12 @@ func (self *JSPipe) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr
|
||||
return NewJSReciept(contractCreation, tx.CreationAddress(), tx.Hash(), keyPair.Address()), nil
|
||||
}
|
||||
|
||||
func (self *JSPipe) PushTx(txStr string) (*JSReceipt, error) {
|
||||
tx := ethchain.NewTransactionFromBytes(ethutil.Hex2Bytes(txStr))
|
||||
self.obj.TxPool().QueueTransaction(tx)
|
||||
return NewJSReciept(tx.CreatesContract(), tx.CreationAddress(), tx.Hash(), tx.Sender()), nil
|
||||
}
|
||||
|
||||
func (self *JSPipe) CompileMutan(code string) string {
|
||||
data, err := self.Pipe.CompileMutan(code)
|
||||
if err != nil {
|
||||
|
||||
@@ -149,6 +149,15 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price
|
||||
return tx.Hash(), nil
|
||||
}
|
||||
|
||||
func (self *Pipe) PushTx(tx *ethchain.Transaction) ([]byte, error) {
|
||||
self.obj.TxPool().QueueTransaction(tx)
|
||||
if tx.Recipient == nil {
|
||||
logger.Infof("Contract addr %x", tx.CreationAddress())
|
||||
return tx.CreationAddress(), nil
|
||||
}
|
||||
return tx.Hash(), nil
|
||||
}
|
||||
|
||||
func (self *Pipe) CompileMutan(code string) ([]byte, error) {
|
||||
data, err := ethutil.Compile(code, false)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user