mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-27 22:08:13 +00:00
Comply to Callee structure
This commit is contained in:
parent
c135b389fe
commit
82d0f65dab
@ -43,12 +43,17 @@ func (c *Contract) State() *State {
|
|||||||
return c.state
|
return c.state
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Contract) GetMem(num int) *ethutil.Value {
|
func (c *Contract) GetMem(num int64) *ethutil.Value {
|
||||||
nb := ethutil.BigToBytes(big.NewInt(int64(num)), 256)
|
nb := ethutil.BigToBytes(big.NewInt(num), 256)
|
||||||
|
|
||||||
return c.Addr(nb)
|
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 {
|
func MakeContract(tx *Transaction, state *State) *Contract {
|
||||||
// Create contract if there's no recipient
|
// Create contract if there's no recipient
|
||||||
if tx.IsContract() {
|
if tx.IsContract() {
|
||||||
|
Loading…
Reference in New Issue
Block a user