aboutsummaryrefslogtreecommitdiff
path: root/core/vm
diff options
context:
space:
mode:
authorAaron Buchwald <[email protected]>2020-12-18 14:11:31 -0500
committerAaron Buchwald <[email protected]>2020-12-18 14:11:31 -0500
commit6280035239dd6b1c47cc9eca7acfbcec53397ff0 (patch)
tree3fe2cd6b7dea8d42674c7d34e94891e84a1e0a5d /core/vm
parent1a3af21dedc790ca0958eb2c93b7e98f5b7f2b77 (diff)
Add clarifying comment and enforce no yolov1 fork with apricotv0.4.0-rc.2
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/contracts_stateful.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/vm/contracts_stateful.go b/core/vm/contracts_stateful.go
index b91acfb..a7caf14 100644
--- a/core/vm/contracts_stateful.go
+++ b/core/vm/contracts_stateful.go
@@ -53,6 +53,9 @@ func newWrappedPrecompiledContract(p PrecompiledContract) StatefulPrecompiledCon
// Run ...
func (w *wrappedPrecompiledContract) Run(evm *EVM, caller ContractRef, addr common.Address, value *big.Int, input []byte, suppliedGas uint64, readOnly bool) (ret []byte, remainingGas uint64, err error) {
+ // [caller.Address()] has already been verified
+ // as having a sufficient balance before the
+ // precompiled contract runs.
evm.Transfer(evm.StateDB, caller.Address(), addr, value)
return RunPrecompiledContract(w.p, input, suppliedGas)
}