-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add deploy stkGHO script * Fixed script comment and name() on stkGHO * Update scripts/StkGHO.s.sol Co-authored-by: Lukas <[email protected]> * Reverted previous permit() name param * fix: use proxy factory --------- Co-authored-by: eboado <[email protected]>
- Loading branch information
Showing
6 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule aave-helpers
added at
6cc788
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {StakeToken} from '../src/contracts/StakeToken.sol'; | ||
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; | ||
import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol'; | ||
import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; | ||
import {EthereumScript} from 'aave-helpers/ScriptUtils.sol'; | ||
import {IERC20} from 'openzeppelin-contracts/contracts/token/ERC20/IERC20.sol'; | ||
import {ITransparentProxyFactory} from 'solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol'; | ||
|
||
/** | ||
* @dev Deploy Ethereum | ||
* deploy-command: make deploy-ledger contract=scripts/StkGHO.s.sol:DeployStkGHO chain=mainnet | ||
* verify-command: npx catapulta-verify -b broadcast/StkGHO.s.sol/1/run-latest.json | ||
* Params from https://snapshot.org/#/aave.eth/proposal/0x4bc99a842adab6cdd8c7d5c7a787ee4c0056be554fde0d008d53b45b3e795065 | ||
* - 100% slashing is technically not possible without breaking the stk exchangeRate, therfore maxSlashing is set to 99% | ||
*/ | ||
contract DeployStkGHO is EthereumScript { | ||
function run() external broadcast { | ||
// StakeToken stkTokenImpl = new StakeToken( | ||
// 'stkGHO', | ||
// IERC20(AaveV3EthereumAssets.GHO_UNDERLYING), | ||
// IERC20(AaveV3EthereumAssets.AAVE_UNDERLYING), | ||
// 2 days, | ||
// MiscEthereum.ECOSYSTEM_RESERVE, | ||
// GovernanceV3Ethereum.EXECUTOR_LVL_1 | ||
// ); | ||
StakeToken stkTokenImpl = StakeToken(0x50F9d4E28309303F0cdcAc8AF0b569e8b75Ab857); | ||
ITransparentProxyFactory(MiscEthereum.TRANSPARENT_PROXY_FACTORY).create( | ||
address(stkTokenImpl), | ||
address(MiscEthereum.PROXY_ADMIN), | ||
abi.encodeWithSelector( | ||
StakeToken.initialize.selector, | ||
'stk GHO', | ||
'stkGHO', | ||
GovernanceV3Ethereum.EXECUTOR_LVL_1, | ||
GovernanceV3Ethereum.EXECUTOR_LVL_1, | ||
GovernanceV3Ethereum.EXECUTOR_LVL_1, | ||
9900, // 99 % | ||
20 days | ||
) | ||
); | ||
} | ||
} |