Skip to content

Commit

Permalink
Rename interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-CZ committed Oct 27, 2024
1 parent 883717f commit 5815adb
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

interface IEvmWriter {
interface IEVMWriter {
function setBalance(address acc, uint256 value) external;

function copyCode(address acc, address from) external;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

interface ISfc {
interface ISFC {
event CreatedValidator(
uint256 indexed validatorID,
address indexed auth,
Expand Down
4 changes: 2 additions & 2 deletions contracts/sfc/NetworkInitializer.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import {ISfc} from "../interfaces/ISfc.sol";
import {ISFC} from "../interfaces/ISFC.sol";
import {NodeDriver, NodeDriverAuth} from "./NodeDriver.sol";
import {ConstantsManager} from "./ConstantsManager.sol";
import {Decimal} from "../common/Decimal.sol";
Expand Down Expand Up @@ -40,6 +40,6 @@ contract NetworkInitializer {
consts.updateGasPriceBalancingCounterweight(3600);
consts.transferOwnership(_owner);

ISfc(_sfc).initialize(sealedEpoch, totalSupply, _auth, _lib, address(consts), _owner);
ISFC(_sfc).initialize(sealedEpoch, totalSupply, _auth, _lib, address(consts), _owner);
}
}
6 changes: 3 additions & 3 deletions contracts/sfc/NodeDriver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ pragma solidity ^0.8.9;

import {Initializable} from "../common/Initializable.sol";
import {NodeDriverAuth} from "./NodeDriverAuth.sol";
import {IEvmWriter} from "../interfaces/IEvmWriter.sol";
import {IEVMWriter} from "../interfaces/IEVMWriter.sol";

contract NodeDriver is Initializable {
NodeDriverAuth internal backend;
IEvmWriter internal evmWriter;
IEVMWriter internal evmWriter;

error NotNode();
error NotBackend();
Expand Down Expand Up @@ -36,7 +36,7 @@ contract NodeDriver is Initializable {
function initialize(address _backend, address _evmWriterAddress) external initializer {
backend = NodeDriverAuth(_backend);
emit UpdatedBackend(_backend);
evmWriter = IEvmWriter(_evmWriterAddress);
evmWriter = IEVMWriter(_evmWriterAddress);
}

function setBalance(address acc, uint256 value) external onlyBackend {
Expand Down
6 changes: 3 additions & 3 deletions contracts/sfc/NodeDriverAuth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ pragma solidity ^0.8.9;

import {Initializable} from "../common/Initializable.sol";
import {Ownable} from "../ownership/Ownable.sol";
import {ISfc} from "../interfaces/ISfc.sol";
import {ISFC} from "../interfaces/ISFC.sol";
import {NodeDriver} from "./NodeDriver.sol";
import {INodeDriverExecutable} from "../interfaces/INodeDriverExecutable.sol";

contract NodeDriverAuth is Initializable, Ownable {
ISfc internal sfc;
ISFC internal sfc;
NodeDriver internal driver;

error NotSFC();
Expand All @@ -22,7 +22,7 @@ contract NodeDriverAuth is Initializable, Ownable {
function initialize(address payable _sfc, address _driver, address _owner) external initializer {
Ownable.initialize(_owner);
driver = NodeDriver(_driver);
sfc = ISfc(_sfc);
sfc = ISFC(_sfc);
}

modifier onlySFC() {
Expand Down
6 changes: 3 additions & 3 deletions contracts/sfc/Updater.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Decimal} from "../common/Decimal.sol";
import {NodeDriverAuth} from "./NodeDriverAuth.sol";
import {ConstantsManager} from "./ConstantsManager.sol";
import {SFC} from "./SFC.sol";
import {ISfc} from "../interfaces/ISfc.sol";
import {ISFC} from "../interfaces/ISFC.sol";
import {Version} from "../version/Version.sol";

interface GovI {
Expand Down Expand Up @@ -104,8 +104,8 @@ contract Updater {

NodeDriverAuth nodeAuth = NodeDriverAuth(0xD100ae0000000000000000000000000000000000);
nodeAuth.upgradeCode(sfcTo, sfcFrom);
ISfc(sfcTo).updateConstsAddress(sfcConsts);
ISfc(sfcTo).updateVoteBookAddress(voteBook);
ISFC(sfcTo).updateConstsAddress(sfcConsts);
ISFC(sfcTo).updateVoteBookAddress(voteBook);
SFC(sfcTo).updateLibAddress(sfcLib);

nodeAuth.upgradeCode(govTo, govFrom);
Expand Down
4 changes: 2 additions & 2 deletions contracts/test/StubEvmWriter.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import {IEvmWriter} from "../interfaces/IEvmWriter.sol";
import {IEVMWriter} from "../interfaces/IEVMWriter.sol";

contract StubEvmWriter is IEvmWriter {
contract StubEvmWriter is IEVMWriter {
function setBalance(address acc, uint256 value) external {}

function copyCode(address acc, address from) external {}
Expand Down

0 comments on commit 5815adb

Please sign in to comment.