diff options
author | obscuren <geffobscura@gmail.com> | 2014-06-26 18:10:11 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-06-26 18:10:11 +0800 |
commit | b89076faa2748a41031c4bc33bbdeba3e2effd01 (patch) | |
tree | c4fd86c0f45fb9b1cbbcf4fa0c894af8b3ecf1c9 /ethereal/ui | |
parent | b3367ec0e3e69694481cccd9335a63d2c559a543 (diff) | |
download | go-tangerine-b89076faa2748a41031c4bc33bbdeba3e2effd01.tar go-tangerine-b89076faa2748a41031c4bc33bbdeba3e2effd01.tar.gz go-tangerine-b89076faa2748a41031c4bc33bbdeba3e2effd01.tar.bz2 go-tangerine-b89076faa2748a41031c4bc33bbdeba3e2effd01.tar.lz go-tangerine-b89076faa2748a41031c4bc33bbdeba3e2effd01.tar.xz go-tangerine-b89076faa2748a41031c4bc33bbdeba3e2effd01.tar.zst go-tangerine-b89076faa2748a41031c4bc33bbdeba3e2effd01.zip |
Added amount to contract during debugging
Diffstat (limited to 'ethereal/ui')
-rw-r--r-- | ethereal/ui/debugger.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ethereal/ui/debugger.go b/ethereal/ui/debugger.go index f49741e09..85dd45563 100644 --- a/ethereal/ui/debugger.go +++ b/ethereal/ui/debugger.go @@ -96,16 +96,20 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data self.win.Root().Call("setAsm", str) } - gas := ethutil.Big(gasStr) - gasPrice := ethutil.Big(gasPriceStr) - // Contract addr as test address - keyPair := ethutil.GetKeyRing().Get(0) - callerTx := ethchain.NewContractCreationTx(ethutil.Big(valueStr), gas, gasPrice, script) + var ( + gas = ethutil.Big(gasStr) + gasPrice = ethutil.Big(gasPriceStr) + value = ethutil.Big(valueStr) + // Contract addr as test address + keyPair = ethutil.GetKeyRing().Get(0) + callerTx = ethchain.NewContractCreationTx(ethutil.Big(valueStr), gas, gasPrice, script) + ) callerTx.Sign(keyPair.PrivateKey) state := self.lib.eth.BlockChain().CurrentBlock.State() account := self.lib.eth.StateManager().TransState().GetAccount(keyPair.Address()) contract := ethchain.MakeContract(callerTx, state) + contract.Amount = value callerClosure := ethchain.NewClosure(account, contract, script, state, gas, gasPrice) block := self.lib.eth.BlockChain().CurrentBlock |