Merge branch 'master' of github.com:DefiLlama/peggedassets-server

This commit is contained in:
g1nt0ki
2024-07-15 18:13:44 +03:00
3 changed files with 61 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
const axios = require("axios");
const retry = require("async-retry");
import {
Balances,
ChainBlocks,
PeggedIssuanceAdapter,
} from "../peggedAsset.type";
async function hederaMinted() {
return async function (
_timestamp: number,
_ethBlock: number,
_chainBlocks: ChainBlocks
) {
const issuance = await retry(
async (_bail: any) =>
await axios.get(
"https://mainnet-public.mirrornode.hedera.com/api/v1/tokens/0.0.6070123"
)
);
const supply = issuance?.data?.total_supply;
let balance = supply / 10 ** 8;
console.log(balance);
return { peggedCHF: balance };
};
}
const adapter: PeggedIssuanceAdapter = {
hedera: {
minted: hederaMinted(),
unreleased: async () => ({}),
},
};
export default adapter;

View File

@@ -33,6 +33,7 @@ import sperax from "./sperax-usd";
import usdp from "./usdp";
import usdb from "./usd-balance";
import mimatic from "./mimatic";
import hchf from "./hedera-swiss-franc";
//import ratio from "./ratio-stable-coin";
import usdj from "./just-stablecoin";
import stbl from "./stbl";
@@ -397,5 +398,6 @@ export default {
"classic-usd": classicusd,
"resolv-usr": usr,
"stable-jack-ausd": ausd,
"hedera-swiss-franc": hchf,
"celo-real-creal": creal
};

View File

@@ -2202,19 +2202,19 @@ export default [
{
id: "110",
name: "crvUSD",
address: "0x95ECDC6caAf7E4805FCeF2679A92338351D24297",
address: "0xf939e0a03fb07f59a73314e73794be0e57ac1b4e",
symbol: "crvUSD",
url: "https://curve.fi",
description:
"crvUSD is a collateralized-debt-position (CDP) stablecoin pegged to the US Dollar",
mintRedeemDescription: "Users deposit collateral to borrow crvUSD",
onCoinGecko: "false",
onCoinGecko: "true",
gecko_id: "crvusd",
cmcId: null,
pegType: "peggedUSD",
pegMechanism: "crypto-backed",
priceSource: "defillama",
auditLinks: null,
auditLinks: ["https://docs.curve.fi/references/audits/#curve-stablecoin-and-lending"],
twitter: "https://twitter.com/CurveFinance",
wiki: null,
},
@@ -4004,4 +4004,24 @@ export default [
twitter: "https://twitter.com/CeloOrg",
wiki: "https://blog.celo.org/celo-launches-the-creal-stablecoin-11da0d560c1c",
},
{
id: "200",
name: "Hedera Swiss Franc",
address: "hedera:0x00000000000000000000000000000000005c9f6b",
symbol: "HCHF",
url: "https://hliquity.org/",
description:
"A stablecoin pegged to the Swiss Franc",
mintRedeemDescription:
"HLiquity offers interest-free loans. Lock up your HBAR, borrow HCHF against it, and repay later without interest",
onCoinGecko: "true",
gecko_id: "hedera-swiss-franc",
cmcId: null,
pegType: "peggedCHF",
pegMechanism: "crypto-backed",
priceSource: "defillama",
auditLinks: null,
twitter: "https://x.com/hliquity_",
wiki: "https://docs.hliquity.org/overview/overview#hchf-the-stablecoin",
},
] as PeggedAsset[];