diff options
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/hexface.go | 2 | ||||
-rw-r--r-- | xeth/js_types.go | 6 |
2 files changed, 4 insertions, 4 deletions
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 { |