Skip to content

Commit

Permalink
chore: add deployment config for OP Sepolia
Browse files Browse the repository at this point in the history
Also does some minor formatting to make linter happy on CI
  • Loading branch information
0x-r4bbit committed Dec 1, 2023
1 parent b6f50cf commit dd060dc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ This repository contains code to deploy SNT in Ethereum and bridge it to optimis
| **Optimism Goerli** | | |
| OptimismMintableMiniMeToken | [`0xcAD273fA2bb77875333439FDf4417D995159c3E1`](https://goerli-optimism.etherscan.io/address/0xcAD273fA2bb77875333439FDf4417D995159c3E1) | [`dc28b89`](https://github.com/logos-co/optimism-bridge-snt/commit/dc28b89d6af0b8f48397b3efaea5e338496e40eb) |
| SNTOptimismController | [`0x650AF3C15AF43dcB218406d30784416D64Cfb6B2`](https://goerli-optimism.etherscan.io/address/0x650AF3C15AF43dcB218406d30784416D64Cfb6B2) | [`dc28b89`](https://github.com/logos-co/optimism-bridge-snt/commit/dc28b89d6af0b8f48397b3efaea5e338496e40eb) |
| **Optimism Sepolia** | | |
| OptimismMintableMiniMeToken | [`0x650AF3C15AF43dcB218406d30784416D64Cfb6B2`](https://optimistic.etherscan.io/address/0x650AF3C15AF43dcB218406d30784416D64Cfb6B2) | [`1b3159a`](https://github.com/logos-co/optimism-bridge-snt/commit/1b3159ad4113378d95452866c0c43ca19a05aadd) |
| SNTOptimismController | [`0x76352764590378011CAE677b50110Ae02eDE2b62`](https://optimistic.etherscan.io/address/0x76352764590378011CAE677b50110Ae02eDE2b62#readContract) | [`1b3159a`](https://github.com/logos-co/optimism-bridge-snt/commit/1b3159ad4113378d95452866c0c43ca19a05aadd) |
| **Optimism Goerli** | | |
| OptimismMintableMiniMeToken | [`0x0B5DAd18B8791ddb24252B433ec4f21f9e6e5Ed0`](https://optimism-sepolia.blockscout.com/address/0x0B5DAd18B8791ddb24252B433ec4f21f9e6e5Ed0) | [`b6f50cf`](https://github.com/logos-co/optimism-bridge-snt/commit/b6f50cff2daf7552d88dea2c1d9fa41f2b46acf1) |
| SNTOptimismController | [`0x35Cded11D75cC10d38ED4456b8caDC9F36E85E42`](https://optimism-sepolia.blockscout.com/address/0x35Cded11D75cC10d38ED4456b8caDC9F36E85E42) | [`b6f50cf`](https://github.com/logos-co/optimism-bridge-snt/commit/b6f50cff2daf7552d88dea2c1d9fa41f2b46acf1) |

Scripts:

Expand Down
18 changes: 18 additions & 0 deletions script/DeploymentConfig.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ contract DeploymentConfig is Script {
// solhint-disable-next-line var-name-mixedcase
address internal SNT_ADDRESS_GOERLI = 0x3D6AFAA395C31FCd391fE3D562E75fe9E8ec7E6a;
// solhint-disable-next-line var-name-mixedcase
address internal SNT_ADDRESS_SEPOLIA = 0xE452027cdEF746c7Cd3DB31CB700428b16cD8E51;
// solhint-disable-next-line var-name-mixedcase
address internal STANDARD_BRIDGE_ADDRESS = 0x4200000000000000000000000000000000000010;

constructor(address _broadcaster) {
if (_broadcaster == address(0)) revert DeploymentConfig_InvalidDeployerAddress();
deployer = _broadcaster;
if (block.chainid == 31_337) {
activeNetworkConfig = getOrCreateAnvilEthConfig();
} else if (block.chainid == 11_155_420) {
activeNetworkConfig = getOptimismSepoliaConfig();
} else if (block.chainid == 420) {
activeNetworkConfig = getOptimismGoerliConfig();
} else if (block.chainid == 10) {
Expand Down Expand Up @@ -76,6 +80,20 @@ contract DeploymentConfig is Script {
});
}

function getOptimismSepoliaConfig() public view returns (NetworkConfig memory) {
return NetworkConfig({
deployer: deployer,
bridgeAddress: STANDARD_BRIDGE_ADDRESS,
remoteTokenAddress: SNT_ADDRESS_SEPOLIA,
parentTokenAddress: address(0),
parentSnapShotBlock: 0,
tokenName: "Status Test Token",
decimals: 18,
tokenSymbol: "STT",
transferEnabled: true
});
}

function getOptimismConfig() public view returns (NetworkConfig memory) {
return NetworkConfig({
deployer: deployer,
Expand Down
9 changes: 1 addition & 8 deletions test/SNTOptimismController.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,7 @@ contract ClaimTokensTest is SNTOptimismControllerTest {
function test_ClaimERC20() public {
vm.pauseGasMetering();
vm.startPrank(tokenController.owner());
MiniMeToken claimTest = new MiniMeToken(
MiniMeToken(payable(address(0))),
0,
"TestClaim",
18,
"TST",
true
);
MiniMeToken claimTest = new MiniMeToken(MiniMeToken(payable(address(0))), 0, "TestClaim", 18, "TST", true);
claimTest.generateTokens(address(tokenController), 1234);

assertEq(
Expand Down

0 comments on commit dd060dc

Please sign in to comment.