Comply to Callee structure

This commit is contained in:
obscuren 2014-03-20 17:25:11 +01:00
parent c135b389fe
commit 82d0f65dab

View File

@ -43,12 +43,17 @@ func (c *Contract) State() *State {
return c.state
}
func (c *Contract) GetMem(num int) *ethutil.Value {
nb := ethutil.BigToBytes(big.NewInt(int64(num)), 256)
func (c *Contract) GetMem(num int64) *ethutil.Value {
nb := ethutil.BigToBytes(big.NewInt(num), 256)
return c.Addr(nb)
}
// Return the gas back to the origin. Used by the Virtual machine or Closures
func (c *Contract) ReturnGas(val *big.Int, state *State) {
c.Amount.Add(c.Amount, val)
}
func MakeContract(tx *Transaction, state *State) *Contract {
// Create contract if there's no recipient
if tx.IsContract() {