Commit ae1ac05d authored by Maurelian's avatar Maurelian

fix(contracts): restrict visibilities to external

parent 47e40a2d
...@@ -161,7 +161,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -161,7 +161,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
address _ovmStateManager address _ovmStateManager
) )
override override
public external
{ {
// Make sure that run() is not re-enterable. This condition should always be satisfied // Make sure that run() is not re-enterable. This condition should always be satisfied
// Once run has been called once, due to the behavior of _isValidInput(). // Once run has been called once, due to the behavior of _isValidInput().
...@@ -228,7 +228,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -228,7 +228,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmCALLER() function ovmCALLER()
override override
public external
view view
returns ( returns (
address _CALLER address _CALLER
...@@ -258,7 +258,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -258,7 +258,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmTIMESTAMP() function ovmTIMESTAMP()
override override
public external
view view
returns ( returns (
uint256 _TIMESTAMP uint256 _TIMESTAMP
...@@ -273,7 +273,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -273,7 +273,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmNUMBER() function ovmNUMBER()
override override
public external
view view
returns ( returns (
uint256 _NUMBER uint256 _NUMBER
...@@ -288,7 +288,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -288,7 +288,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmGASLIMIT() function ovmGASLIMIT()
override override
public external
view view
returns ( returns (
uint256 _GASLIMIT uint256 _GASLIMIT
...@@ -303,7 +303,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -303,7 +303,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmCHAINID() function ovmCHAINID()
override override
public external
view view
returns ( returns (
uint256 _CHAINID uint256 _CHAINID
...@@ -322,7 +322,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -322,7 +322,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmL1QUEUEORIGIN() function ovmL1QUEUEORIGIN()
override override
public external
view view
returns ( returns (
Lib_OVMCodec.QueueOrigin _queueOrigin Lib_OVMCodec.QueueOrigin _queueOrigin
...@@ -337,7 +337,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -337,7 +337,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmL1TXORIGIN() function ovmL1TXORIGIN()
override override
public external
view view
returns ( returns (
address _l1TxOrigin address _l1TxOrigin
...@@ -417,7 +417,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -417,7 +417,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
bytes32 _salt bytes32 _salt
) )
override override
public external
notStatic notStatic
fixedGasDiscount(40000) fixedGasDiscount(40000)
returns ( returns (
...@@ -456,7 +456,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -456,7 +456,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmGETNONCE() function ovmGETNONCE()
override override
public external
returns ( returns (
uint256 _nonce uint256 _nonce
) )
...@@ -469,7 +469,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -469,7 +469,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
*/ */
function ovmINCREMENTNONCE() function ovmINCREMENTNONCE()
override override
public external
notStatic notStatic
{ {
address account = ovmADDRESS(); address account = ovmADDRESS();
...@@ -618,7 +618,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -618,7 +618,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
bytes memory _calldata bytes memory _calldata
) )
override override
public external
fixedGasDiscount(80000) fixedGasDiscount(80000)
returns ( returns (
bool _success, bool _success,
...@@ -653,7 +653,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -653,7 +653,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
bytes memory _calldata bytes memory _calldata
) )
override override
public external
fixedGasDiscount(40000) fixedGasDiscount(40000)
returns ( returns (
bool _success, bool _success,
...@@ -685,7 +685,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -685,7 +685,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
bytes32 _key bytes32 _key
) )
override override
public external
netGasCost(40000) netGasCost(40000)
returns ( returns (
bytes32 _value bytes32 _value
...@@ -710,7 +710,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -710,7 +710,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
bytes32 _value bytes32 _value
) )
override override
public external
notStatic notStatic
netGasCost(60000) netGasCost(60000)
{ {
...@@ -782,7 +782,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver { ...@@ -782,7 +782,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
address _contract address _contract
) )
override override
public external
returns ( returns (
bytes32 _EXTCODEHASH bytes32 _EXTCODEHASH
) )
......
...@@ -56,7 +56,7 @@ contract OVM_DeployerWhitelist is iOVM_DeployerWhitelist { ...@@ -56,7 +56,7 @@ contract OVM_DeployerWhitelist is iOVM_DeployerWhitelist {
bool _allowArbitraryDeployment bool _allowArbitraryDeployment
) )
override override
public external
{ {
if (initialized == true) { if (initialized == true) {
return; return;
...@@ -77,7 +77,7 @@ contract OVM_DeployerWhitelist is iOVM_DeployerWhitelist { ...@@ -77,7 +77,7 @@ contract OVM_DeployerWhitelist is iOVM_DeployerWhitelist {
bool _isWhitelisted bool _isWhitelisted
) )
override override
public external
onlyOwner onlyOwner
{ {
whitelist[_deployer] = _isWhitelisted; whitelist[_deployer] = _isWhitelisted;
...@@ -116,7 +116,7 @@ contract OVM_DeployerWhitelist is iOVM_DeployerWhitelist { ...@@ -116,7 +116,7 @@ contract OVM_DeployerWhitelist is iOVM_DeployerWhitelist {
*/ */
function enableArbitraryContractDeployment() function enableArbitraryContractDeployment()
override override
public external
onlyOwner onlyOwner
{ {
setAllowArbitraryDeployment(true); setAllowArbitraryDeployment(true);
...@@ -132,7 +132,7 @@ contract OVM_DeployerWhitelist is iOVM_DeployerWhitelist { ...@@ -132,7 +132,7 @@ contract OVM_DeployerWhitelist is iOVM_DeployerWhitelist {
address _deployer address _deployer
) )
override override
public external
returns ( returns (
bool bool
) )
......
...@@ -132,7 +132,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -132,7 +132,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
*/ */
function getPreStateRoot() function getPreStateRoot()
override override
public external
view view
returns ( returns (
bytes32 _preStateRoot bytes32 _preStateRoot
...@@ -147,7 +147,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -147,7 +147,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
*/ */
function getPostStateRoot() function getPostStateRoot()
override override
public external
view view
returns ( returns (
bytes32 _postStateRoot bytes32 _postStateRoot
...@@ -162,7 +162,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -162,7 +162,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
*/ */
function isComplete() function isComplete()
override override
public external
view view
returns ( returns (
bool _complete bool _complete
...@@ -188,7 +188,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -188,7 +188,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
bytes memory _stateTrieWitness bytes memory _stateTrieWitness
) )
override override
public external
onlyDuringPhase(TransitionPhase.PRE_EXECUTION) onlyDuringPhase(TransitionPhase.PRE_EXECUTION)
contributesToFraudProof(preStateRoot, transactionHash) contributesToFraudProof(preStateRoot, transactionHash)
{ {
...@@ -260,7 +260,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -260,7 +260,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
bytes memory _storageTrieWitness bytes memory _storageTrieWitness
) )
override override
public external
onlyDuringPhase(TransitionPhase.PRE_EXECUTION) onlyDuringPhase(TransitionPhase.PRE_EXECUTION)
contributesToFraudProof(preStateRoot, transactionHash) contributesToFraudProof(preStateRoot, transactionHash)
{ {
...@@ -324,7 +324,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -324,7 +324,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
Lib_OVMCodec.Transaction memory _transaction Lib_OVMCodec.Transaction memory _transaction
) )
override override
public external
onlyDuringPhase(TransitionPhase.PRE_EXECUTION) onlyDuringPhase(TransitionPhase.PRE_EXECUTION)
contributesToFraudProof(preStateRoot, transactionHash) contributesToFraudProof(preStateRoot, transactionHash)
{ {
...@@ -374,7 +374,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -374,7 +374,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
bytes memory _stateTrieWitness bytes memory _stateTrieWitness
) )
override override
public external
onlyDuringPhase(TransitionPhase.POST_EXECUTION) onlyDuringPhase(TransitionPhase.POST_EXECUTION)
contributesToFraudProof(preStateRoot, transactionHash) contributesToFraudProof(preStateRoot, transactionHash)
{ {
...@@ -417,7 +417,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -417,7 +417,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
bytes memory _storageTrieWitness bytes memory _storageTrieWitness
) )
override override
public external
onlyDuringPhase(TransitionPhase.POST_EXECUTION) onlyDuringPhase(TransitionPhase.POST_EXECUTION)
contributesToFraudProof(preStateRoot, transactionHash) contributesToFraudProof(preStateRoot, transactionHash)
{ {
...@@ -457,7 +457,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV ...@@ -457,7 +457,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, Abs_FraudContributor, iOV
*/ */
function completeTransition() function completeTransition()
override override
public external
onlyDuringPhase(TransitionPhase.POST_EXECUTION) onlyDuringPhase(TransitionPhase.POST_EXECUTION)
{ {
require( require(
......
...@@ -39,7 +39,7 @@ contract Lib_AddressManager is Ownable { ...@@ -39,7 +39,7 @@ contract Lib_AddressManager is Ownable {
string memory _name, string memory _name,
address _address address _address
) )
public external
onlyOwner onlyOwner
{ {
addresses[_getNameHash(_name)] = _address; addresses[_getNameHash(_name)] = _address;
...@@ -58,7 +58,7 @@ contract Lib_AddressManager is Ownable { ...@@ -58,7 +58,7 @@ contract Lib_AddressManager is Ownable {
function getAddress( function getAddress(
string memory _name string memory _name
) )
public external
view view
returns ( returns (
address address
......
...@@ -314,8 +314,8 @@ library Lib_MerkleTrie { ...@@ -314,8 +314,8 @@ library Lib_MerkleTrie {
currentNodeID = bytes32(RLP_NULL); currentNodeID = bytes32(RLP_NULL);
break; break;
} else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) { } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {
if (sharedNibbleLength == 0) { if (sharedNibbleLength != pathRemainder.length) {
// Our extension node doesn't share any part of our key. // Our extension node is not identical to the remainder.
// We've hit the end of this path, updates will need to modify this extension. // We've hit the end of this path, updates will need to modify this extension.
currentNodeID = bytes32(RLP_NULL); currentNodeID = bytes32(RLP_NULL);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment