aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/evm
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/evm')
-rw-r--r--cmd/evm/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/evm/main.go b/cmd/evm/main.go
index 7dd375b14..be6546c95 100644
--- a/cmd/evm/main.go
+++ b/cmd/evm/main.go
@@ -206,6 +206,9 @@ func (self *VMEnv) StructLogs() []vm.StructLog {
func (self *VMEnv) AddLog(log *state.Log) {
self.state.AddLog(log)
}
+func (self *VMEnv) CanTransfer(from vm.Account, balance *big.Int) bool {
+ return from.Balance().Cmp(balance) >= 0
+}
func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error {
return vm.Transfer(from, to, amount)
}