Skip to content

Commit

Permalink
Merge branch 'base-sepolia-deployment' into fix/withdraw-to
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielstoica committed Nov 28, 2024
2 parents 849a55c + bd3a1a3 commit 0d7b5a9
Show file tree
Hide file tree
Showing 6 changed files with 717 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MAINNET_RPC_URL=""
SEPOLIA_RPC_URL="https://rpc.sepolia.org"
BASE_SEPOLIA_RPC_URL="https://sepolia.base.org"
BASESCAN_API_KEY=""
ETHERSCAN_API_KEY=""
CREATE2SALT="""
DEPLOYER=""
PRIVATE_KEY="0x{YOUR_PRIVATE_KEY}"
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ tests-coverage :; ./script/coverage.sh
# - {RPC_URL} with the network RPC used for deployment
deploy-invoice-collection:
forge script script/DeployInvoiceCollection.s.sol:DeployInvoiceCollection \
$(CREATE2SALT) {RELAYER} {NAME} {SYMBOL} \
--sig "run(string,address,string,string)" --rpc-url {RPC_URL} --private-key $(PRIVATE_KEY) --etherscan-api-key $(ETHERSCAN_API_KEY)
{RELAYER} {NAME} {SYMBOL} \
--sig "run(address,string,string)" --rpc-url {RPC_URL} --account dev --etherscan-api-key $(ETHERSCAN_API_KEY)
--broadcast --verify

# Deploys the {ModuleKeeper} contract deterministically
Expand All @@ -34,7 +34,7 @@ deploy-deterministic-module-keeper:
forge script script/DeployDeterministicModuleKeeper.s.sol:DeployDeterministicModuleKeeper \
$(CREATE2SALT) {INITIAL_OWNER} \
--sig "run(string,address)" --rpc-url {RPC_URL} \
--private-key $(PRIVATE_KEY) --etherscan-api-key $(ETHERSCAN_API_KEY) \
--account dev --etherscan-api-key $(ETHERSCAN_API_KEY) \
--broadcast --verify

# Deploys the {StationRegistry} contract deterministically
Expand All @@ -47,7 +47,7 @@ deploy-deterministic-dock-registry:
forge script script/DeployDeterministicStationRegistry.s.sol:DeployDeterministicStationRegistry \
$(CREATE2SALT) {INITIAL_OWNER} {ENTRYPOINT} {MODULE_KEEPER} \
--sig "run(string,address,address)" --rpc-url {RPC_URL} \
--private-key $(PRIVATE_KEY) --etherscan-api-key $(ETHERSCAN_API_KEY) \
--account dev --etherscan-api-key $(ETHERSCAN_API_KEY) \
--broadcast --verify

# Deploys the {PaymentModule} contract deterministically
Expand All @@ -61,10 +61,10 @@ deploy-deterministic-dock-registry:
deploy-payment-module:
forge script script/DeployDeterministicPaymentModule.s.sol:DeployDeterministicPaymentModule \
$(CREATE2SALT) {SABLIER_LOCKUP_LINEAR} {SABLIER_LOCKUP_TRANCHED} {INITIAL_OWNER} {BROKER_ACCOUNT} \
--sig "run(string,address,address,address,address)" --rpc-url {RPC_URL} --private-key $(PRIVATE_KEY) --etherscan-api-key $(ETHERSCAN_API_KEY)
--sig "run(string,address,address,address,address)" --rpc-url {RPC_URL} --account dev --etherscan-api-key $(ETHERSCAN_API_KEY)
--broadcast --verify

# Deploys the {PaymentModule} contract deterministically
# Deploys the {PaymentModule} contract deterministically

# Deploys the core contracts deterministically
#
Expand All @@ -77,6 +77,6 @@ deploy-payment-module:
# - {RPC_URL} with the network RPC used for deployment
deploy-core:
forge script script/DeployDeterministicCore.s.sol:DeployDeterministicCore \
$(CREATE2SALT) {SABLIER_LOCKUP_LINEAR} {SABLIER_LOCKUP_TRANCHED} {INITIAL_OWNER} {BROKER_ACCOUNT} {ENTRYPOINT}\
--sig "run(string,address,address,address,address,address)" --rpc-url {RPC_URL} --private-key $(PRIVATE_KEY) --etherscan-api-key $(ETHERSCAN_API_KEY)
--broadcast --verify
$(CREATE2SALT) "0xfe7fc0bbde84c239c0ab89111d617dc7cc58049f" "0xb8c724df3ec8f2bf8fa808df2cb5dbab22f3e68c" "0x85E094B259718Be1AF0D8CbBD41dd7409c2200aa" "0x85E094B259718Be1AF0D8CbBD41dd7409c2200aa" "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" \
--sig "run(string,address,address,address,address,address)" --rpc-url https://sepolia.base.org --account dev \
--broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) --ffi
352 changes: 352 additions & 0 deletions broadcast/DeployDeterministicCore.s.sol/84532/run-1732543751.json

Large diffs are not rendered by default.

352 changes: 352 additions & 0 deletions broadcast/DeployDeterministicCore.s.sol/84532/run-latest.json

Large diffs are not rendered by default.

21 changes: 1 addition & 20 deletions script/Base.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,8 @@ pragma solidity ^0.8.22;
import { Script } from "forge-std/Script.sol";

contract BaseScript is Script {
/// @dev Junk mnemonic seed phrase use as a fallback in case there is no mnemonic set in the `.env` file
string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk";

/// @dev Used to derive the deployer's address
string internal mnemonic;

/// @dev Stores the deployer address
address deployer;

constructor() {
address from = vm.envOr({ name: "DEPLOYER", defaultValue: address(0) });
if (from != address(0)) {
deployer = from;
} else {
mnemonic = vm.envOr({ name: "MNEMONIC", defaultValue: TEST_MNEMONIC });
(deployer,) = deriveRememberKey(mnemonic, 0);
}
}

modifier broadcast() {
vm.startBroadcast(deployer);
vm.startBroadcast();
_;
vm.stopBroadcast();
}
Expand Down
2 changes: 2 additions & 0 deletions src/modules/payment-module/sablier-v2/StreamManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ abstract contract StreamManager is IStreamManager, Initializable, OwnableUpgrade
using SafeERC20 for IERC20;

/// @inheritdoc IStreamManager
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
ISablierV2LockupLinear public immutable override LOCKUP_LINEAR;

/// @inheritdoc IStreamManager
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
ISablierV2LockupTranched public immutable override LOCKUP_TRANCHED;

/*//////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 0d7b5a9

Please sign in to comment.