Exemplo n.º 1
0
func (self *Env) CanTransfer(from vm.Account, balance *big.Int) bool {
	if self.skipTransfer {
		if self.initial {
			self.initial = false
			return true
		}
	}

	return from.Balance().Cmp(balance) >= 0
}
Exemplo n.º 2
0
// generic transfer method
func Transfer(from, to vm.Account, amount *big.Int) {
	from.SubBalance(amount)
	to.AddBalance(amount)
}
Exemplo n.º 3
0
func (self *VMEnv) CanTransfer(from vm.Account, balance *big.Int) bool {
	return from.Balance().Cmp(balance) >= 0
}