Added amount to contract during debugging
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user