Skip to content

Commit

Permalink
fixed l2 oft adapter script
Browse files Browse the repository at this point in the history
  • Loading branch information
dan13ram committed Sep 7, 2024
1 parent 80b0be0 commit 39b1fe5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions script/DeployL1OFTAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ contract DeployL1OFTAdapter is BaseScript {
}
vm.broadcast();
l1OFTAdapter.setRateLimits(rateLimitConfigs);

console.log("Rate limits updated");
return;
}
Expand Down
6 changes: 5 additions & 1 deletion script/DeployL2OFTAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {L2YnOFTAdapterUpgradeable} from "@/L2YnOFTAdapterUpgradeable.sol";
import {L2YnERC20Upgradeable} from "@/L2YnERC20Upgradeable.sol";
import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "forge-std/console.sol";

// forge script script/DeployL2OFTAdapter.s.sol:DeployL2Adapter --rpc-url ${rpc} --sig "run(string memory, string memory)" ${path2ERC20Input} ${path2OFTAdapterInput} --account ${deployerAccountName} --sender ${deployer} --broadcast --etherscan-api-key ${api} --verify

contract DeployL2OFTAdapter is BaseScript {
Expand Down Expand Up @@ -45,13 +46,15 @@ contract DeployL2OFTAdapter is BaseScript {
}
vm.broadcast();
oftAdapter.setRateLimits(rateLimitConfigs);

console.log("Rate limits updated");
return;
}

bytes32 proxySalt = createSalt(msg.sender, "L2YnERC20UpgradeableProxy");
bytes32 implementationSalt = createSalt(msg.sender, "L2YnERC20Upgradeable");

vm.startBroadcast();
l2ERC20Address = currentDeployer.deployL2YnERC20(
implementationSalt,
proxySalt,
Expand All @@ -67,7 +70,7 @@ contract DeployL2OFTAdapter is BaseScript {
proxySalt = createSalt(msg.sender, "L2YnOFTAdapterUpgradeableProxy");
implementationSalt = createSalt(msg.sender, "L2YnOFTAdapterUpgradeable");

l2YnOFTAdapter = (currentDeployer).deployL2YnOFTAdapter(
l2YnOFTAdapter = currentDeployer.deployL2YnOFTAdapter(
implementationSalt,
proxySalt,
l2ERC20Address,
Expand All @@ -77,6 +80,7 @@ contract DeployL2OFTAdapter is BaseScript {
getAddresses().PROXY_ADMIN,
type(L2YnOFTAdapterUpgradeable).creationCode
);
vm.stopBroadcast();

console.log("L2 OFT Adapter deployed at: ", l2YnOFTAdapter);

Expand Down

0 comments on commit 39b1fe5

Please sign in to comment.