Skip to content

Commit

Permalink
docs(protocol): add taiko deployment docs and remove bll (#14834)
Browse files Browse the repository at this point in the history
  • Loading branch information
d1onys1us authored and KorbinianK committed Oct 2, 2023
1 parent df2e8b9 commit 5942326
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
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

0 comments on commit 5942326

Please sign in to comment.