Skip to content

Commit

Permalink
Update deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
danhper committed Sep 23, 2024
1 parent f9a4ac0 commit 7bc2b53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions script/deployments/DeploySGydStaker.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,26 @@ contract DeploySGyd is Deployment {
function run() public {
vm.startBroadcast(deployerPrivateKey);

address gyd_;
address distributor;
address arb;
address governance;
address treasury;
address sgyd = _getDeployed(SGYD);
if (block.chainid == 1) {
gyd_ = gyd;
distributor = _getDeployed(GYD_DISTRIBUTOR);
governance = l1Governance;
arb = 0xB50721BCf8d664c30412Cfbc6cf7a15145234ad1;
revert("add treasury address");
} else {
gyd_ = l2Gyd;
distributor = _getDeployed(L2_GYD_DISTRIBUTOR);
arb = 0x912CE59144191C1204E64559FE8253a0e49E6548;
governance = l2Governance;
treasury = 0x391714d83db20fde7110Cb80DC3857637c14E251;
}
console.log("gyd", gyd_);
console.log("distributor", distributor);
console.log("arb", arb);
console.log("governance", governance);
console.log("treasury", treasury);

sGydStaker sgydStaker = new sGydStaker();

bytes memory data = abi.encodeWithSelector(sGydStaker.initialize.selector, sgyd, gyd_, treasury, governance);
bytes memory data = abi.encodeWithSelector(sGydStaker.initialize.selector, sgyd, arb, treasury, governance);
bytes memory creationCode =
abi.encodePacked(type(UUPSProxy).creationCode, abi.encode(address(sgydStaker), data));
console.log("sGydStaker", _deploy(SGYD_STAKER, creationCode));
Expand Down
2 changes: 1 addition & 1 deletion src/sGydStaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ contract sGydStaker is
initializer
{
__UUPSUpgradeable_init();
__ERC20_init("Staked sGYD", "ssGYD");
__ERC20_init("Staked sGYD", "st-sGYD");
__ERC4626_init(_depositToken);
__AccessControlDefaultAdminRules_init(0, _initialAdmin);
__LiquidityMining_init(address(_rewardToken), _daoTreasury);
Expand Down

0 comments on commit 7bc2b53

Please sign in to comment.