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

fix: forge build now specifies correct script directory #174

Merged
merged 2 commits into from
Jun 26, 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
1 change: 1 addition & 0 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[profile.default]
src = 'contracts'
solc-version = '0.8.20'
script = 'scripts'
out = 'out'
libs = ['node_modules', 'lib']
test = 'test'
Expand Down
1 change: 0 additions & 1 deletion contracts/scripts/DeployScripts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import "../contracts/ProviderRegistry.sol";
import "../contracts/PreConfCommitmentStore.sol";
import "../contracts/Oracle.sol";
import "../contracts/Whitelist.sol";
import "../contracts/validator-registry/ValidatorRegistryV1.sol";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this dep is unneeded for core deployment

import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";
import "../contracts/BlockTracker.sol";

Expand Down
13 changes: 8 additions & 5 deletions contracts/scripts/DeployStandardBridge.s.sol
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
// SPDX-License-Identifier: BSL 1.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes necessary to make this script build and pass ci

pragma solidity ^0.8.20;
import "forge-std/Script.sol";
import {Create2Deployer} from "../scripts/DeployScripts.s.sol";
import {SettlementGateway} from "../contracts/standard-bridge/SettlementGateway.sol";
import {L1Gateway} from "../contracts/standard-bridge/L1Gateway.sol";
import {Whitelist} from "../contracts/Whitelist.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";

contract DeploySettlementGateway is Script {
function run() external {

vm.startBroadcast();

address relayerAddr = vm.envAddress("RELAYER_ADDR");
require(relayerAddr != address(0), "RELAYER_ADDR is not set");
address whitelistAddr = vm.envAddress("WHITELIST_ADDR");
require(whitelistAddr != address(0), "WHITELIST_ADDR is not set");

address sgProxy = Upgrades.deployUUPSProxy(
"SettlementGateway.sol",
abi.encodeCall(SettlementGateway.initialize,
(msg.sender, // Owner
(whitelistAddr,
msg.sender, // Owner
relayerAddr,
1, 1)) // Fees set to 1 wei for now
);
SettlementGateway gateway = SettlementGateway(sgProxy);
console.log("Standard bridge gateway for settlement chain deployed to:",
address(gateway));

address whitelistProxy = Upgrades.deployUUPSProxy(
"Whitelist.sol",
abi.encodeCall(Whitelist.initialize, (msg.sender))
);
Whitelist whitelist = Whitelist(whitelistProxy);
Whitelist whitelist = Whitelist(payable(whitelistProxy));
console.log("Whitelist deployed to:", address(whitelist));

whitelist.addToWhitelist(address(gateway));
Expand Down Expand Up @@ -62,7 +65,7 @@ contract DeployL1Gateway is Script {
relayerAddr,
1, 1)) // Fees set to 1 wei for now
);
L1Gateway gateway = L1Gateway(l1gProxy);
L1Gateway gateway = L1Gateway(payable(l1gProxy));
console.log("Standard bridge gateway for l1 deployed to:",
address(gateway));

Expand Down
Loading