mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-22 22:54:33 +00:00
## Why this should be merged The `vm.PrecompileEnvironment.Call()` method requires careful usage because of reentrancy vulnerabilities (this is common to all outgoing `CALL`s in the EVM, not just stateful precompiles). This package provides a common method of protection, a reentrancy guard. ## How this works Provides a function that returns `vm.ErrExecutionReverted` if called twice, by the same contract, in the same transaction, with the same identifier. ## How this was tested Unit and integration tests. |
||
|---|---|---|
| .. | ||
| guard.go | ||
| guard_test.go | ||