Skip to content

Commit

Permalink
add base sepolia deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabnock01 committed Feb 25, 2024
1 parent 1ccf76d commit 5e57de6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 25 deletions.
10 changes: 6 additions & 4 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ quote_style = "double"
number_underscore = "thousands"

[rpc_endpoints]
goerli = "${RPC_URL_GOERLI}"
mainnet = "${RPC_URL_MAINNET}"
base_goreli = "${RPC_URL_BASE_GOERLI"
base_mainnet = "${RPC_URL_BASE_MAINNET}"
goerli = "${GOERLI_RPC_URL}"
mainnet = "${MAINNET_RPC_URL}"
base_goerli = "${BASE_GOERLI_RPC_URL}"
base_sepolia = "${BASE_SEPOLIA_RPC_URL}"
base_mainnet = "${BASE_MAINNET_RPC_URL}"

[etherscan]
goerli = {key = "${ETHERSCAN_KEY}", url = "https://api-goerli.etherscan.io/api"}
mainnet = {key = "${ETHERSCAN_KEY}"}
base_sepolia = {key ="${BASESCAN_KEY}", url ="https://api-sepolia.basescan.org/api"}
base_mainnet = {key = "${BASESCAN_KEY}", url = "https://basescan.org"}
21 changes: 0 additions & 21 deletions script/deploy/v0.0.2/DeployBase.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ contract DeployBase is Script {
}
}

// Compute and print initcode hashes for each contract
// _printInitcodeHashes(initialAuthors);

vm.startBroadcast();

// Deploy FlagRenderer
Expand Down Expand Up @@ -135,7 +132,6 @@ contract DeployBase is Script {
);

// Deploy TeamRegistry

create2Factory.call(abi.encodeWithSignature(
"safeCreate2(bytes32,bytes)",
0x5f3146d3d700245e998660dbcae97dcd7a554c05a867800e5eeb00000072a13f,
Expand All @@ -147,21 +143,4 @@ contract DeployBase is Script {
flagRenderer = FlagRenderer(flagRendererAddress);
authorshipToken = AuthorshipToken(authorshipTokenAddress);
}

function _printInitcodeHashes(address[] memory initialAuthors) internal view {
console.logBytes32(keccak256(abi.encodePacked(type(FlagRenderer).creationCode)));
console.logBytes32(
keccak256(
abi.encodePacked(
type(AuthorshipToken).creationCode,
abi.encode(
curtaAddress,
issueLength,
initialAuthors
)
)
)
);
console.logBytes32(keccak256(abi.encodePacked(type(TeamRegistry).creationCode)));
}
}
48 changes: 48 additions & 0 deletions script/deploy/v0.0.2/DeployBaseSepolia.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import { DeployBase } from "./DeployBase.s.sol";

contract DeployBaseSepolia is DeployBase {
/// @notice The address to transfer the ownership of the Authorship Token
/// to.
address constant AUTHORSHIP_TOKEN_OWNER = 0xA85572Cd96f1643458f17340b6f0D6549Af482F5;

/// @notice The address to transfer the ownership of Curta to.
address constant CURTA_OWNER = 0xA85572Cd96f1643458f17340b6f0D6549Af482F5;

/// @notice The number of seconds until an additional token is made
/// available for minting by the author.
uint256 constant ISSUE_LENGTH = 3 days;

/// @notice Address of the create2 factory used for deploying
/// the `FlagRenderer` and `AuthorshipToken` contracts.
address constant CREATE2FACTORY = 0x0000000000FFe8B47B3e2130213B802212439497;

/// @notice The list of authors in the initial batch.
address[] internal AUTHORS = [
// chainlight.io
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
0xB49bf876BE26435b6fae1Ef42C3c82c5867Fa149,
// fiveoutofnine.eth
0xA85572Cd96f1643458f17340b6f0D6549Af482F5,
0xA85572Cd96f1643458f17340b6f0D6549Af482F5,
0xA85572Cd96f1643458f17340b6f0D6549Af482F5,
0xA85572Cd96f1643458f17340b6f0D6549Af482F5,
0xA85572Cd96f1643458f17340b6f0D6549Af482F5,
// sabnock.eth
0xDbAacdcadD7c51a325B771ff75B261a1e7baE11c,
0xDbAacdcadD7c51a325B771ff75B261a1e7baE11c,
0xDbAacdcadD7c51a325B771ff75B261a1e7baE11c
];

constructor() DeployBase(CREATE2FACTORY, AUTHORSHIP_TOKEN_OWNER, CURTA_OWNER, ISSUE_LENGTH, AUTHORS) { }
}

0 comments on commit 5e57de6

Please sign in to comment.