aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/contracts.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/contracts.go')
-rw-r--r--core/vm/contracts.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/vm/contracts.go b/core/vm/contracts.go
index b965fa095..22cb9eab2 100644
--- a/core/vm/contracts.go
+++ b/core/vm/contracts.go
@@ -26,22 +26,22 @@ import (
"github.com/ethereum/go-ethereum/params"
)
-type Address interface {
- Call(in []byte) []byte
-}
-
+// PrecompiledAccount represents a native ethereum contract
type PrecompiledAccount struct {
Gas func(l int) *big.Int
fn func(in []byte) []byte
}
+// Call calls the native function
func (self PrecompiledAccount) Call(in []byte) []byte {
return self.fn(in)
}
+// Precompiled contains the default set of ethereum contracts
var Precompiled = PrecompiledContracts()
-// XXX Could set directly. Testing requires resetting and setting of pre compiled contracts.
+// PrecompiledContracts returns the default set of precompiled ethereum
+// contracts defined by the ethereum yellow paper.
func PrecompiledContracts() map[string]*PrecompiledAccount {
return map[string]*PrecompiledAccount{
// ECRECOVER