aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/evm.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-02 13:25:24 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:49 +0800
commit333af73098bcf40bc1f509ef2327ef6abd1042a1 (patch)
treec03dc63a077de5399ab54fc50d3bf94b5591ce3b /core/vm/evm.go
parent3e7dcb52f74c9ab4944d92a35a519631a2ec8298 (diff)
downloaddexon-333af73098bcf40bc1f509ef2327ef6abd1042a1.tar.gz
dexon-333af73098bcf40bc1f509ef2327ef6abd1042a1.tar.zst
dexon-333af73098bcf40bc1f509ef2327ef6abd1042a1.zip
core: vm: add governance contract skeleton
Diffstat (limited to 'core/vm/evm.go')
-rw-r--r--core/vm/evm.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/vm/evm.go b/core/vm/evm.go
index 31902621b..fcab628e1 100644
--- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -43,6 +43,9 @@ type (
// run runs the given contract and takes care of running precompiles with a fallback to the byte code interpreter.
func run(evm *EVM, contract *Contract, input []byte, readOnly bool) ([]byte, error) {
if contract.CodeAddr != nil {
+ if *contract.CodeAddr == GovernanceContractAddress {
+ return RunGovernanceContract(evm, input, contract)
+ }
precompiles := PrecompiledContractsHomestead
if evm.ChainConfig().IsByzantium(evm.BlockNumber) {
precompiles = PrecompiledContractsByzantium