Skip to content

Commit

Permalink
https://github.com/neo-project/neo/pull/2141
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje committed Feb 2, 2021
1 parent fe83b4c commit ef26784
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neo3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ class Settings(IndexableNamespace):
}
}
}
}
},
'native_contract_activation': {}
}

@classmethod
Expand Down
4 changes: 4 additions & 0 deletions neo3/contracts/native/nativecontract.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ class NativeContract(convenience._Singleton):

def init(self):
self._methods: Dict[str, _ContractMethodMetadata] = {}

self._neo = NeoToken()
self._gas = GasToken()
self._policy = PolicyContract()

sb = vm.ScriptBuilder()
sb.emit_push(self.service_name)
sb.emit_syscall(1736177434) # "System.Contract.CallNative"
Expand All @@ -76,6 +78,8 @@ def init(self):
self._contracts.update({self.service_name: self})
self._contract_hashes.update({self._hash: self})

self.active_block_index = settings.native_contract_activation.get(self.service_name, 0)

self._register_contract_method(self.on_persist,
0,
"onPersist",
Expand Down

0 comments on commit ef26784

Please sign in to comment.