Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(protocol): add taiko deployment docs and remove bll #14834

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/protocol/docs/how_taiko_is_deployed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# How Taiko is deployed

The Taiko protocol smart contracts are deployed on L1 and L2. The L2 contracts are pre-deployed first by creating a genesis block, and then the L1 contracts are deployed using a script. The general flow is like this:

1. A `genesis.json` is generated, which includes the L2 contracts (see: [generate genesis](../utils/generate_genesis/main.ts)).
2. The `genesis.json` is used as input to generate the genesis block (see: https://geth.ethereum.org/docs/fundamentals/private-network#creating-genesis-block).
3. The L1 smart contracts are deployed by executing the L1 deployment script, [DeployOnL1.s.sol](../script/DeployOnL1.s.sol). The L1 deployment script takes in artifacts from the L2 deployment such as the deployed contract addresses, and genesis block hash.
9 changes: 4 additions & 5 deletions packages/protocol/script/DeployOnL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import "../contracts/common/AddressManager.sol";
import "../contracts/test/erc20/FreeMintERC20.sol";
import "../contracts/test/erc20/MayFailFreeMintERC20.sol";

/// @title DeployOnL1
/// @notice This script deploys the core Taiko protocol smart contract on L1,
/// initializing the rollup.
contract DeployOnL1 is Script {
bytes32 public genesisHash = vm.envBytes32("L2_GENESIS_HASH");

Expand Down Expand Up @@ -100,14 +103,10 @@ contract DeployOnL1 is Script {
)
);

// HorseToken && BullToken
// HorseToken
address horseToken = address(new FreeMintERC20("Horse Token", "HORSE"));
console2.log("HorseToken", horseToken);

address bullToken =
address(new MayFailFreeMintERC20("Bull Token", "BLL"));
console2.log("BullToken", bullToken);

uint64 feePerGas = 10;
uint64 proofWindow = 60 minutes;

Expand Down