From 5ad473d7581b92811c3a3e035274a82fc5568f57 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 18 Dec 2014 15:33:22 +0100 Subject: Moved methods to messages --- xeth/hexface.go | 2 +- xeth/js_types.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'xeth') diff --git a/xeth/hexface.go b/xeth/hexface.go index 8fb42b4db..bfd2dddd9 100644 --- a/xeth/hexface.go +++ b/xeth/hexface.go @@ -229,7 +229,7 @@ func (self *JSXEth) PushTx(txStr string) (*JSReceipt, error) { return nil, err } - return NewJSReciept(tx.CreatesContract(), core.AddressFromMessage(tx), tx.Hash(), tx.From()), nil + return NewJSReciept(core.MessageCreatesContract(tx), core.AddressFromMessage(tx), tx.Hash(), tx.From()), nil } func (self *JSXEth) CompileMutan(code string) string { diff --git a/xeth/js_types.go b/xeth/js_types.go index 2d6ee91bc..62867d6a9 100644 --- a/xeth/js_types.go +++ b/xeth/js_types.go @@ -102,16 +102,16 @@ func NewJSTx(tx *types.Transaction, state *state.StateDB) *JSTransaction { receiver = ethutil.Bytes2Hex(core.AddressFromMessage(tx)) } sender := ethutil.Bytes2Hex(tx.Sender()) - createsContract := tx.CreatesContract() + createsContract := core.MessageCreatesContract(tx) var data string - if tx.CreatesContract() { + if createsContract { data = strings.Join(core.Disassemble(tx.Data()), "\n") } else { data = ethutil.Bytes2Hex(tx.Data()) } - return &JSTransaction{ref: tx, Hash: hash, Value: ethutil.CurrencyToString(tx.Value()), Address: receiver, Contract: tx.CreatesContract(), Gas: tx.Gas().String(), GasPrice: tx.GasPrice().String(), Data: data, Sender: sender, CreatesContract: createsContract, RawData: ethutil.Bytes2Hex(tx.Data())} + return &JSTransaction{ref: tx, Hash: hash, Value: ethutil.CurrencyToString(tx.Value()), Address: receiver, Contract: createsContract, Gas: tx.Gas().String(), GasPrice: tx.GasPrice().String(), Data: data, Sender: sender, CreatesContract: createsContract, RawData: ethutil.Bytes2Hex(tx.Data())} } func (self *JSTransaction) ToString() string { -- cgit