Skip to content

Commit

Permalink
Adjust parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Dec 16, 2024
1 parent 21069e9 commit 196f3f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion script/DeployTCAP.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contract Deploy is Script {

function run() public {
address proxyAdminOwner = 0x570f581D23a2AB09FD1990279D9DB6f5DcE18F4A;
address admin = 0x570f581D23a2AB09FD1990279D9DB6f5DcE18F4A;
address admin = 0x6BF125D25cC4d00FAB06C30095f8DCBe2617bBBD;
AggregatorV3Interface oracleFeed = AggregatorV3Interface(0x962C0Df8Ca7f7C682B3872ccA31Ea9c8999ab23c);
vm.startBroadcast(vm.envUint("PRIVATE_KEY"));
new TCAPDeployer(proxyAdminOwner, admin, oracleFeed);
Expand Down
2 changes: 1 addition & 1 deletion script/DeployVaults.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract Deploy is VaultDeployer, VaultDeployParams {
for (uint256 i = 0; i < vaultsToDeployTokens.length; i++) {
if (tcap[block.chainid] == address(0)) revert("TCAP address not set");
address token = vaultsToDeployTokens[i];
Params memory params = params[block.chainid][token];
Params memory params = _params[block.chainid][token];
if (!params.exists) revert("Config for token not found");
AggregatedChainlinkOracle oracle = new AggregatedChainlinkOracle(params.oracleParams.priceFeed, token, params.oracleParams.heartbeat * 10);
deployVaultTransparent(
Expand Down
16 changes: 8 additions & 8 deletions script/deployers/VaultDeployParams.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,37 @@ struct Params {

contract VaultDeployParams {
mapping(uint256 chainId => address) internal tcap;
mapping(uint256 chainId => mapping(address token => Params)) internal params;
mapping(uint256 chainId => mapping(address token => Params)) internal _params;

constructor() {
// Base
tcap[8453] = address(0); // TODO set after deployment
// WETH
params[8453][0x4200000000000000000000000000000000000006] = Params({
_params[8453][0x4200000000000000000000000000000000000006] = Params({
exists: true,
oracleParams: OracleParams({priceFeed: 0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70, heartbeat: 1200}),
admin: 0x570f581D23a2AB09FD1990279D9DB6f5DcE18F4A,
initialFee: 0,
feeRecipient: 0x570f581D23a2AB09FD1990279D9DB6f5DcE18F4A,
feeRecipient: 0x6BF125D25cC4d00FAB06C30095f8DCBe2617bBBD,
liquidationParams: IVault.LiquidationParams({threshold: 1.3e18, penalty: 0.1e18, minHealthFactor: 0.05e18, maxHealthFactor: 0.1e18})
});
// cbBTC
params[8453][0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf] = Params({
_params[8453][0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf] = Params({
exists: true,
oracleParams: OracleParams({priceFeed: 0x07DA0E54543a844a80ABE69c8A12F22B3aA59f9D, heartbeat: 1200}),
admin: 0x570f581D23a2AB09FD1990279D9DB6f5DcE18F4A,
initialFee: 0,
feeRecipient: 0x570f581D23a2AB09FD1990279D9DB6f5DcE18F4A,
feeRecipient: 0x6BF125D25cC4d00FAB06C30095f8DCBe2617bBBD,
liquidationParams: IVault.LiquidationParams({threshold: 1.3e18, penalty: 0.1e18, minHealthFactor: 0.05e18, maxHealthFactor: 0.1e18})
});
// USDC
params[8453][0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913] = Params({
_params[8453][0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913] = Params({
exists: true,
oracleParams: OracleParams({priceFeed: 0x7e860098F58bBFC8648a4311b374B1D669a2bc6B, heartbeat: 86_400}),
admin: 0x570f581D23a2AB09FD1990279D9DB6f5DcE18F4A,
initialFee: 0,
feeRecipient: 0x570f581D23a2AB09FD1990279D9DB6f5DcE18F4A,
liquidationParams: IVault.LiquidationParams({threshold: 1.2e18, penalty: 0.1e18, minHealthFactor: 0.03e18, maxHealthFactor: 0.07e18})
feeRecipient: 0x6BF125D25cC4d00FAB06C30095f8DCBe2617bBBD,
liquidationParams: IVault.LiquidationParams({threshold: 1.3e18, penalty: 0.1e18, minHealthFactor: 0.05e18, maxHealthFactor: 0.1e18})
});
}
}

0 comments on commit 196f3f5

Please sign in to comment.