diff options
author | Felix Lange <fjl@twurst.com> | 2015-03-10 06:03:20 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-03-10 06:08:47 +0800 |
commit | 697f6748b8df6b50157f81eb7959d856d3eb688e (patch) | |
tree | 1ddcff1433ce9f6fdb0024abeba70da162949821 /cmd/mist/debugger.go | |
parent | c2e5dacf555d93cb96b8fbffa700a2a6fece8bf0 (diff) | |
download | dexon-697f6748b8df6b50157f81eb7959d856d3eb688e.tar dexon-697f6748b8df6b50157f81eb7959d856d3eb688e.tar.gz dexon-697f6748b8df6b50157f81eb7959d856d3eb688e.tar.bz2 dexon-697f6748b8df6b50157f81eb7959d856d3eb688e.tar.lz dexon-697f6748b8df6b50157f81eb7959d856d3eb688e.tar.xz dexon-697f6748b8df6b50157f81eb7959d856d3eb688e.tar.zst dexon-697f6748b8df6b50157f81eb7959d856d3eb688e.zip |
cmd/mist: use cli library and package accounts
Diffstat (limited to 'cmd/mist/debugger.go')
-rw-r--r-- | cmd/mist/debugger.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go index c1ab2f3f1..bd8ddde37 100644 --- a/cmd/mist/debugger.go +++ b/cmd/mist/debugger.go @@ -137,16 +137,18 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data return } + // TODO: improve this + allAccounts, _ := self.lib.eth.AccountManager().Accounts() + var ( gas = ethutil.Big(gasStr) gasPrice = ethutil.Big(gasPriceStr) value = ethutil.Big(valueStr) - // Contract addr as test address - keyPair = self.lib.eth.KeyManager().KeyPair() + acc = allAccounts[0] ) statedb := self.lib.eth.ChainManager().TransState() - account := self.lib.eth.ChainManager().TransState().GetAccount(keyPair.Address()) + account := self.lib.eth.ChainManager().TransState().GetAccount(acc.Address) contract := statedb.NewStateObject([]byte{0}) contract.SetCode(script) contract.SetBalance(value) |