Skip to content

Commit

Permalink
feat(protocol): deploy ProverSet in DeployOnL1 script (taikoxyz#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored May 20, 2024
1 parent e7111e0 commit 6e56475
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions packages/protocol/script/DeployOnL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "../contracts/automata-attestation/AutomataDcapV3Attestation.sol";
import "../contracts/automata-attestation/utils/SigVerifyLib.sol";
import "../contracts/automata-attestation/lib/PEMCertChainLib.sol";
import "../contracts/verifiers/SgxVerifier.sol";
import "../contracts/team/proving/ProverSet.sol";
import "../test/common/erc20/FreeMintERC20.sol";
import "../test/common/erc20/MayFailFreeMintERC20.sol";
import "../test/L1/TestTierProvider.sol";
Expand Down Expand Up @@ -273,7 +274,8 @@ contract DeployOnL1 is DeployCapability {
deployProxy({
name: "assignment_hook",
impl: address(new AssignmentHook()),
data: abi.encodeCall(AssignmentHook.init, (owner, rollupAddressManager))
data: abi.encodeCall(AssignmentHook.init, (owner, rollupAddressManager)),
registerTo: rollupAddressManager
});

deployProxy({
Expand Down Expand Up @@ -301,7 +303,11 @@ contract DeployOnL1 is DeployCapability {

register(rollupAddressManager, "tier_guardian_minority", guardianProverMinority);
register(rollupAddressManager, "tier_guardian", guardianProver);
register(rollupAddressManager, "tier_provider", address(new TestTierProvider()));
register(
rollupAddressManager,
"tier_provider",
address(deployTierProvider(vm.envString("TIER_PROVIDER")))
);

address[] memory guardians = vm.envAddress("GUARDIAN_PROVERS", ",");

Expand Down Expand Up @@ -333,6 +339,14 @@ contract DeployOnL1 is DeployCapability {
console2.log("SigVerifyLib", address(sigVerifyLib));
console2.log("PemCertChainLib", address(pemCertChainLib));
console2.log("AutomataDcapVaAttestation", automataProxy);

deployProxy({
name: "prover_set",
impl: address(new ProverSet()),
data: abi.encodeCall(
ProverSet.init, (owner, vm.envAddress("PROVER_SET_ADMIN"), rollupAddressManager)
)
});
}

function deployTierProvider(string memory tierProviderName) private returns (address) {
Expand Down
1 change: 1 addition & 0 deletions packages/protocol/script/test_deploy_on_l1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GUARDIAN_PROVERS="0x1000777700000000000000000000000000000001,0x10007777000000000
TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \
L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \
CONTRACT_OWNER=0x60997970C51812dc3A010C7d01b50e0d17dc79C8 \
PROVER_SET_ADMIN=0x60997970C51812dc3A010C7d01b50e0d17dc79C8 \
TAIKO_TOKEN_PREMINT_RECIPIENT=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
TAIKO_TOKEN_NAME="Taiko Token Katla" \
TAIKO_TOKEN_SYMBOL=TTKOk \
Expand Down

0 comments on commit 6e56475

Please sign in to comment.