Skip to content

Commit

Permalink
Merge pull request #591 from ionicprotocol/development
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
rhlsthrm authored Sep 16, 2024
2 parents d90e205 + 3b74a10 commit 6333046
Show file tree
Hide file tree
Showing 14 changed files with 1,191 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-bots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Liquidator-Bot/Push/PR - Create and publish a Docker image & Deploy

on:
push:
branches: [main, development]
branches: [main, development, fix/lambda]
paths:
- '.github/workflows/deploy-bots.yaml'
- 'packages/bots/**'
Expand Down Expand Up @@ -315,7 +315,7 @@ jobs:
# run: make price-change-verifier-smoke-test

terraform-deploy-bots:
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development'
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development' || github.ref == 'refs/heads/fix/lambda'
runs-on: ubuntu-latest
needs: [smoke-tests]
name: Deploy bots to ECS
Expand Down
4 changes: 2 additions & 2 deletions ops/prod/mode.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module "mode_mainnet_liquidation_rpc_0" {
{ WEB3_HTTP_PROVIDER_URLS = local.mode_mainnet_rpcs } # Directly use the string
)
schedule_expression = "rate(5 minutes)"
timeout = 900
timeout = 700
memory_size = 512
}

Expand All @@ -32,6 +32,6 @@ module "mode_mainnet_pyth_rpc_0" {
{ WEB3_HTTP_PROVIDER_URLS = local.mode_mainnet_rpcs } # Directly use the string
)
schedule_expression = "rate(5 minutes)"
timeout = 900
timeout = 700
memory_size = 512
}
21 changes: 21 additions & 0 deletions packages/chains/src/base/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export const RSR = "0xaB36452DbAC151bE02b16Ca17d8919826072f64a";
export const ION = "0x3eE5e23eEE121094f1cFc0Ccc79d6C809Ebd22e5";
export const hyUSD = "0xCc7FF230365bD730eE4B352cC2492CEdAC49383e";
export const cbBTC = "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf";
export const superOETHb = "0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3";
export const wsuperOETHb = "0x7FcD174E80f264448ebeE8c88a7C4476AAF58Ea6";

export const assets: SupportedAsset[] = [
{
Expand Down Expand Up @@ -206,6 +208,25 @@ export const assets: SupportedAsset[] = [
initialBorrowCap: parseUnits(String(1), 8).toString(),
initialCf: "0.30",
extraDocs: defaultDocs("https://basescan.org", cbBTC)
},
{
symbol: assetSymbols.superOETHb,
underlying: superOETHb,
name: "Super OETH",
decimals: 18,
oracle: OracleTypes.FixedNativePriceOracle,
extraDocs: defaultDocs("https://basescan.org", superOETHb)
},
{
symbol: assetSymbols.wsuperOETHb,
underlying: wsuperOETHb,
name: "Wrapped Super OETH",
decimals: 18,
oracle: OracleTypes.ERC4626Oracle,
extraDocs: defaultDocs("https://basescan.org", wsuperOETHb),
initialSupplyCap: parseEther(String(6000)).toString(),
initialBorrowCap: parseEther(String(4800)).toString(),
initialCf: "0.80"
}
// DO NOT ADD TO MARKET UNLESS PROPER ORACLE IS DEPLOYED
// {
Expand Down
3 changes: 1 addition & 2 deletions packages/contracts/chainDeploy/helpers/oracles/erc4626.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const deployErc4626PriceOracle = async ({
}: Erc4626OracleFnParams): Promise<void> => {
const { deployer } = await getNamedAccounts();
const publicClient = await viem.getPublicClient();
const walletClient = await viem.getWalletClient(deployer as Address);

const mpo = await viem.getContractAt(
"MasterPriceOracle",
Expand All @@ -37,5 +36,5 @@ export const deployErc4626PriceOracle = async ({
console.log("ERC4626Oracle: ", e4626o.address);

const underlyings = erc4626Assets.map((f) => f.assetAddress);
await addUnderlyingsToMpo(mpo, underlyings, e4626o.address, deployer, publicClient, walletClient);
await addUnderlyingsToMpo(mpo as any, underlyings, e4626o.address as Address, deployer, publicClient);
};
2 changes: 1 addition & 1 deletion packages/contracts/chainDeploy/helpers/oracles/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Address, encodeFunctionData, PublicClient, WalletClient, zeroAddress } from "viem";
import { addTransaction, prepareAndLogTransaction } from "../logging";
import { masterPriceOracleAbi } from "../../../generated";
import type { GetContractReturnType } from "@nomicfoundation/hardhat-viem/types.js";
import { masterPriceOracleAbi } from "../../../../sdk/src/generated";

export async function addUnderlyingsToMpo(
mpo: GetContractReturnType<typeof masterPriceOracleAbi>,
Expand Down
Loading

0 comments on commit 6333046

Please sign in to comment.