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

Base Sepolia deployment #35

Merged
merged 2 commits into from
Feb 25, 2024
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
14 changes: 5 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Deploy script config
DEPLOYER_PRIVATE_KEY="0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
AUTHORSHIP_TOKEN_PRIVATE_KEY="0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
CURTA_PRIVATE_KEY="0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"

# RPC endpoints
RPC_URL_GOERLI=""
RPC_URL_MAINNET=""
RPC_URL_BASE_GOERLI=""
RPC_URL_BASE_MAINNET=""
GOERLI_RPC_URL=""
MAINNET_RPC_URL=""
BASE_GOERLI_RPC_URL=""
BASE_SEPOLIA_RPC_URL=""
BASE_MAINNET_RPC_URL=""

# API keys
ETHERSCAN_KEY=""
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,29 @@ Since puzzles are on-chain, everyone can view everyone else's submissions. The g
<td>N/A</td>
<td><code><a href="https://goerli.basescan.org/address/0xFacaDE0BCAeBb9B48bd1f613d2fd9B9865A3E61d">0xFacaDE0BCAeBb9B48bd1f613d2fd9B9865A3E61d</code></td>
</tr>
<tr>
<td rowspan="4">Base Sepolia</td>
<td rowspan="4">84532</td>
<td><code><a href="https://github.com/waterfall-mkt/curta/blob/main/src/Curta.sol">Curta</a></code></td>
<td>N/A</td>
<td><code><a href="https://sepolia.basescan.org/address/0x00000000D1329c5cd5386091066d49112e590969">0x00000000D1329c5cd5386091066d49112e590969</code></td>
</tr>
<tr>
<td><code><a href="https://github.com/waterfall-mkt/curta/blob/main/src/AuthorshipToken.sol">AuthorshipToken</a></code></td>
<td>N/A</td>
<td><code><a href="https://sepolia.basescan.org/address/0xC0FFEE8b8e502403e51f37030E32c52bA4b37f7d">0xC0FFEE8b8e502403e51f37030E32c52bA4b37f7d</code></td>
</tr>
<tr>
<td><code><a href="https://github.com/waterfall-mkt/curta/blob/main/src/FlagRenderer.sol">FlagRenderer</a></code></td>
<td>N/A</td>
<td><code><a href="https://sepolia.basescan.org/address/0xF1a900007c8b1d6266c186Aa2Ef0eE2e95ffCa80">0xF1a900007c8b1d6266c186Aa2Ef0eE2e95ffCa80</code></td>
</tr>
</tr>
<tr>
<td><code><a href="https://github.com/waterfall-mkt/curta/blob/main/src/TeamRegistry.sol">TeamRegistry</a></code></td>
<td>N/A</td>
<td><code><a href="https://sepolia.basescan.org/address/0xFacaDE0BCAeBb9B48bd1f613d2fd9B9865A3E61d">0xFacaDE0BCAeBb9B48bd1f613d2fd9B9865A3E61d</code></td>
</tr>
</tbody>
<table>

Expand Down
12 changes: 7 additions & 5 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ remappings = [
"@/contracts/=src/",
"@/test/=test/"
]
no-match-path = "test/deploy/deprecated/*"
no-match-path = "test/deploy/*"

[fmt]
line_length = 100
Expand All @@ -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) { }
}
Loading