Refactored to reflect the new VM and State

This commit is contained in:
obscuren
2014-07-24 12:30:41 +02:00
parent e7a80ec681
commit a06a84d19b
10 changed files with 77 additions and 31 deletions

View File

@ -78,8 +78,8 @@ func (ui *UiLib) AssetPath(p string) string {
func (self *UiLib) StartDbWithContractAndData(contractHash, data string) {
dbWindow := NewDebuggerWindow(self)
object := self.eth.StateManager().CurrentState().GetStateObject(ethutil.Hex2Bytes(contractHash))
if len(object.Script()) > 0 {
dbWindow.SetCode("0x" + ethutil.Bytes2Hex(object.Script()))
if len(object.Code) > 0 {
dbWindow.SetCode("0x" + ethutil.Bytes2Hex(object.Code))
}
dbWindow.SetData("0x" + data)