Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
dong77 committed Oct 17, 2023
1 parent aaddeea commit fe5493c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pragma solidity ^0.8.20;

import { ITierProvider, LibTiers } from "./ITierProvider.sol";

/// @title TaikoConfigProvider
contract TaikoConfigProvider is ITierProvider {
/// @title TaikoA6TierProvider
contract TaikoA6TierProvider is ITierProvider {
uint96 private constant UNIT = 10_000e18; // 10000 Taiko token
uint24 private constant COOLDOWN_BASE = 24 hours;

Expand Down
14 changes: 7 additions & 7 deletions packages/protocol/script/DeployOnL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import "../contracts/L1/verifiers/PseZkVerifier.sol";
import "../contracts/L1/verifiers/SgxVerifier.sol";
import "../contracts/L1/verifiers/GuardianVerifier.sol";
import "../contracts/L1/tiers/ITierProvider.sol";
import "../contracts/L1/tiers/TaikoConfigProvider.sol";
import "../contracts/L1/tiers/TaikoA6TierProvider.sol";
import "../contracts/bridge/Bridge.sol";
import "../contracts/tokenvault/ERC20Vault.sol";
import "../contracts/tokenvault/ERC1155Vault.sol";
Expand Down Expand Up @@ -58,7 +58,7 @@ contract DeployOnL1 is Script {
TaikoL1 taikoL1;
address public addressManagerProxy;

enum TierConfigProviders { TAIKO_ALPHA6 }
enum TierTierProviders { TAIKO_ALPHA6 }

error FAILED_TO_DEPLOY_PLONK_VERIFIER(string contractPath);

Expand Down Expand Up @@ -174,8 +174,8 @@ contract DeployOnL1 is Script {

// Config provider
deployProxy(
"config_provider",
deployConfigProvider(uint256(TierConfigProviders.TAIKO_ALPHA6)),
"tier_provider",
deployTierProvider(uint256(TierTierProviders.TAIKO_ALPHA6)),
""
);

Expand Down Expand Up @@ -272,12 +272,12 @@ contract DeployOnL1 is Script {
return deployedAddress;
}

function deployConfigProvider(uint256 tier)
function deployTierProvider(uint256 tier)
private
returns (address providerAddress)
{
if (tier == uint256(TierConfigProviders.TAIKO_ALPHA6)) {
return address(new TaikoConfigProvider());
if (tier == uint256(TierTierProviders.TAIKO_ALPHA6)) {
return address(new TaikoA6TierProvider());
}

revert("invalid provider");
Expand Down
8 changes: 4 additions & 4 deletions packages/protocol/test/L1/TaikoL1TestBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { TaikoL1 } from "../../contracts/L1/TaikoL1.sol";
import { TaikoToken } from "../../contracts/L1/TaikoToken.sol";
import { GuardianVerifier } from
"../../contracts/L1/verifiers/GuardianVerifier.sol";
import { TaikoConfigProvider } from
"../../contracts/L1/tiers/TaikoConfigProvider.sol";
import { TaikoA6TierProvider } from
"../../contracts/L1/tiers/TaikoA6TierProvider.sol";
import { PseZkVerifier } from "../../contracts/L1/verifiers/PseZkVerifier.sol";
import { SgxVerifier } from "../../contracts/L1/verifiers/SgxVerifier.sol";
import { SgxAndZkVerifier } from
Expand Down Expand Up @@ -45,7 +45,7 @@ abstract contract TaikoL1TestBase is TestBase {
SgxAndZkVerifier public sgxZkVerifier;
GuardianVerifier public gv;
GuardianProver public gp;
TaikoConfigProvider public cp;
TaikoA6TierProvider public cp;

bytes32 public constant GENESIS_BLOCK_HASH = keccak256("GENESIS_BLOCK_HASH");
uint64 l2GasExcess = 1e18;
Expand Down Expand Up @@ -95,7 +95,7 @@ abstract contract TaikoL1TestBase is TestBase {
initMultiSig[4] = Henry;
gp.setGuardians(initMultiSig);

cp = new TaikoConfigProvider();
cp = new TaikoA6TierProvider();

registerAddress("tier_pse_zkevm", address(pv));
registerAddress("tier_sgx", address(sv));
Expand Down

0 comments on commit fe5493c

Please sign in to comment.