diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-18 22:33:22 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-18 22:33:22 +0800 |
commit | 5ad473d7581b92811c3a3e035274a82fc5568f57 (patch) | |
tree | 9d34ffc04b208a1923fa181938e7366bca2573d7 /xeth | |
parent | db494170dc819b1eb0d267b6e1ab36c6cfb63569 (diff) | |
download | dexon-5ad473d7581b92811c3a3e035274a82fc5568f57.tar.gz dexon-5ad473d7581b92811c3a3e035274a82fc5568f57.tar.zst dexon-5ad473d7581b92811c3a3e035274a82fc5568f57.zip |
Moved methods to messages
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 { |