Skip to content

Commit

Permalink
Use foundry keychain
Browse files Browse the repository at this point in the history
  • Loading branch information
byshape committed Aug 28, 2024
1 parent 065f9f0 commit 42c5bee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 1 addition & 2 deletions script/DeployEscrowFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ contract DeployEscrowFactory is Script {
FEE_TOKEN[8453] = 0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb; // Base (DAI)

Check warning on line 32 in script/DeployEscrowFactory.s.sol

View check run for this annotation

Codecov / codecov/patch

script/DeployEscrowFactory.s.sol#L25-L32

Added lines #L25 - L32 were not covered by tests

address deployer = vm.envAddress("DEPLOYER_ADDRESS");
uint256 deployerPK = vm.envUint("DEPLOYER_PRIVATE_KEY");
address feeBankOwner = deployer;
address feeToken = FEE_TOKEN[block.chainid];

Check warning on line 36 in script/DeployEscrowFactory.s.sol

View check run for this annotation

Codecov / codecov/patch

script/DeployEscrowFactory.s.sol#L34-L36

Added lines #L34 - L36 were not covered by tests

vm.startBroadcast(deployerPK);
vm.startBroadcast();
address escrowFactory = CREATE3_DEPLOYER.deploy(

Check warning on line 39 in script/DeployEscrowFactory.s.sol

View check run for this annotation

Codecov / codecov/patch

script/DeployEscrowFactory.s.sol#L38-L39

Added lines #L38 - L39 were not covered by tests
CROSSCHAIN_SALT,
abi.encodePacked(
Expand Down
11 changes: 10 additions & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@ fi
echo "Provided chain: $1"
echo "RPC URL: $rpc_url"

forge script script/DeployEscrowFactory.s.sol --fork-url $rpc_url --broadcast -vvvv
keystore="$HOME/.foundry-keystores/$2"
echo "Keystore: $keystore"
if [ -e "$keystore" ]; then
echo "Keystore provided"
else
echo "Keystore not provided"
exit 1
fi

forge script script/DeployEscrowFactory.s.sol --fork-url $rpc_url --keystore $keystore --broadcast -vvvv

0 comments on commit 42c5bee

Please sign in to comment.