Skip to content

Commit

Permalink
Ultrasound Fix (#290)
Browse files Browse the repository at this point in the history
* Fix title, description and add missing og tags

* Rename github action

* Fixes
  • Loading branch information
noisekit authored Jun 3, 2024
1 parent 49fff5e commit fa44f45
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 72 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: release-ultrasound-homes
name: release-ultrasound

on:
push:
tags:
- 'release-ultrasound-homes-*'
- 'release-ultrasound-*'
branches:
- 'release-ultrasound-homes'
- 'release-ultrasound'
- 'releases'

jobs:
Expand All @@ -28,10 +28,10 @@ jobs:
ref: '${{ github.sha }}'
ssh-key: '${{ secrets.V3UI_SSH_KEY }}'

- run: yarn workspaces focus @snx-v3/ultrasound-homes
- run: yarn workspaces focus @snx-v3/ultrasound
working-directory: v3ui

- run: yarn workspace @snx-v3/ultrasound-homes build
- run: yarn workspace @snx-v3/ultrasound build
working-directory: v3ui

- run: rm -rf ./ultrasound/*
Expand Down
2 changes: 1 addition & 1 deletion ultrasound/ui/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# ULTRASOUND HOMES
# ultrasoundsnx.money
2 changes: 1 addition & 1 deletion ultrasound/ui/components/BurnSNX.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function BurnSNX() {
<Text fontWeight={700} fontSize="20px" display="flex" alignItems="center" gap="2">
Buyback Price:{' '}
{!SNXPrice ? (
<Skeleton h="20px" width="100px" ml="2" />
<Skeleton as="span" h="20px" width="100px" ml="2" />
) : (
<>
<s>$ {SNXPrice?.toNumber().toFixed(2)}</s> $
Expand Down
22 changes: 10 additions & 12 deletions ultrasound/ui/components/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Flex, Heading, Image, Link, Spinner, Text, Tooltip } from '@chakra-ui/react';
import { InfoIcon } from '@chakra-ui/icons';
import { Flex, Heading, Link, Spinner, Text, Tooltip } from '@chakra-ui/react';
import { useBurnEvents } from '../hooks/useBurnEvents';
import { BurnSNX } from './BurnSNX';
import { Chart } from './Chart';
import { CurrentSupplyStats } from './CurrentSupplyStats';
import kainSvg from './svgs/kain.svg';
import { SupplyChangeStats } from './SupplyChangeStats';
import { InfoIcon } from '@chakra-ui/icons';

export function Main() {
const { data: events, isLoading } = useBurnEvents();
Expand All @@ -14,25 +13,24 @@ export function Main() {
<Flex flexDir="column" mt="8" width="100%" maxW="1200px">
<Flex justifyContent="space-between" flexWrap={{ base: 'wrap', xl: 'nowrap' }}>
<Flex flexDir="column">
<Heading fontSize={{ base: '48px', xl: '72px' }} fontWeight={700} color="white">
ultrasoundsnx.money
<Heading fontSize={{ base: '48px', xl: '56px' }} fontWeight={700} color="white">
Zero inflation, infinite burn
</Heading>
<Heading fontSize="30px" fontWeight={700} color="white">
Zero inflation, infinite burn: Perps fuel SNX deflation
<Heading fontSize="36px" fontWeight={700} color="white">
Perps fuel SNX deflation
</Heading>
</Flex>
<Flex alignItems="center" mt={{ base: 10, xl: 0 }}>
<Image src={kainSvg} />
<Flex flexDir="column">
<Flex alignItems="baseline" gap="2">
<Text fontSize="16px" fontWeight={700} color="white">
Mansion counter
<Text as="div" fontSize="16px" fontWeight={700} color="white">
Burn counter
</Text>
<Tooltip label="Times the BuyBack and Burn contract was triggered">
<InfoIcon w="10px" h="10px" />
</Tooltip>
</Flex>
<Text fontSize="24px" fontWeight={700} color="white">
<Text as="div" fontSize="24px" fontWeight={700} color="white">
{isLoading ? <Spinner colorScheme="cyan" /> : events?.totalBurns}
</Text>
</Flex>
Expand All @@ -58,7 +56,7 @@ export function Main() {
<Text fontWeight={700} fontSize="16px">
Share
</Text>
<Link href="https://twitter.com/intent/tweet?text=I%20am%20paying%20for%20Kains%20Mansion">
<Link href="https://twitter.com/intent/tweet?text=I%20am%20burning%20SNX">
<svg
width="48"
height="48"
Expand Down
9 changes: 0 additions & 9 deletions ultrasound/ui/components/svgs/kain.svg

This file was deleted.

4 changes: 2 additions & 2 deletions ultrasound/ui/components/svgs/snx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 21 additions & 35 deletions ultrasound/ui/hooks/useSNXPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,32 @@ export function useSNXPrice() {

return useQuery({
refetchInterval: 10000,
enabled: !!baseProvider,
queryKey: ['snx-price', !!baseProvider],
enabled: Boolean(baseProvider && baseNetwork?.id && baseNetwork?.preset),
queryKey: ['snx-price'],
queryFn: async () => {
if (baseProvider && baseNetwork?.id && baseNetwork?.preset) {
try {
const { address, abi } = await importOracleManagerProxy(
baseNetwork.id,
baseNetwork.preset
);
const OracleManagerProxy = new Contract(
address,
abi,
baseProvider
) as OracleManagerProxyType;
if (!baseNetwork || !baseNetwork?.id || !baseNetwork?.preset) throw new Error('OMFG');
const { address, abi } = await importOracleManagerProxy(baseNetwork.id, baseNetwork.preset);
const OracleManagerProxy = new Contract(address, abi, baseProvider) as OracleManagerProxyType;

const price = [
await OracleManagerProxy.populateTransaction.process(
await BuyBack.connect(baseProvider).getSnxNodeId()
),
];
const price = [
await OracleManagerProxy.populateTransaction.process(
await BuyBack.connect(baseProvider!).getSnxNodeId()
),
];

price[0].from = '0x4200000000000000000000000000000000000006';
price[0].from = '0x4200000000000000000000000000000000000006';

return await erc7412Call(
baseNetwork,
baseProvider,
price,
(txs) => {
return new Wei(
OracleManagerProxy.interface.decodeFunctionResult('process', txs[0])[0].price
);
},
'useSNXPrice'
return await erc7412Call(
baseNetwork!,
baseProvider!,
price,
(txs) => {
return new Wei(
OracleManagerProxy.interface.decodeFunctionResult('process', txs[0])[0].price
);
} catch (error) {
console.error(error);
return new Wei(0);
}
}
return new Wei(0);
},
'useSNXPrice'
);
},
});
}
25 changes: 22 additions & 3 deletions ultrasound/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,31 @@
<meta charset="UTF-8" />
<meta content="initial-scale=1, width=device-width" name="viewport" />
<meta content="ie=edge" http-equiv="X-UA-Compatible" />
<meta name="description" content="Ultrasound Homes" />
<link rel="icon" href="favicon.ico" />
<title>Ultrasoundsnx Money</title>
<title>UltrasoundSNX Money</title>
<meta
name="description"
content="Celebrate the deflationary impact on SNX supply driven by the fee burn from Synthetix Perps fees. Discover how the SNX supply is evolving, the mechanics behind the fee burn, and the role of Perps in driving SNX deflation."
/>

<meta property="og:type" content="website" />
<meta property="og:site_name" content="ultrasoundsnx.money" />
<meta
property="og:title"
content="ultrasoundsnx.money Zero inflation, infinite burn: Perps fuel SNX deflation"
/>
<meta
property="og:description"
content="Celebrate the deflationary impact on SNX supply driven by the fee burn from Synthetix Perps fees. Discover how the SNX supply is evolving, the mechanics behind the fee burn, and the role of Perps in driving SNX deflation."
/>
<meta property="og:image" content="https://ultrasoundsnx.money/metatag.png" />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@synthetix_io" />
<meta name="twitter:title" content="Ultrasoundsnx.money" />
<meta
name="twitter:title"
content="ultrasoundsnx.money Zero inflation, infinite burn: Perps fuel SNX deflation"
/>
<meta
name="twitter:description"
content="Celebrate the deflationary impact on SNX supply driven by the fee burn from Synthetix Perps fees. Discover how the SNX supply is evolving, the mechanics behind the fee burn, and the role of Perps in driving SNX deflation."
Expand Down
4 changes: 2 additions & 2 deletions ultrasound/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@snx-v3/ultrasound-homes",
"name": "@snx-v3/ultrasound",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "webpack-cli serve",
"build": "NODE_ENV=production webpack-cli",
"focus": "yarn workspaces focus '@snx-v3/ultrasound-homes'"
"focus": "yarn workspaces focus '@snx-v3/ultrasound'"
},
"dependencies": {
"@chakra-ui/icons": "^2.1.1",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6599,9 +6599,9 @@ __metadata:
languageName: unknown
linkType: soft

"@snx-v3/ultrasound-homes@workspace:ultrasound/ui":
"@snx-v3/ultrasound@workspace:ultrasound/ui":
version: 0.0.0-use.local
resolution: "@snx-v3/ultrasound-homes@workspace:ultrasound/ui"
resolution: "@snx-v3/ultrasound@workspace:ultrasound/ui"
dependencies:
"@babel/core": "npm:^7.23.3"
"@babel/plugin-transform-runtime": "npm:^7.23.3"
Expand Down

0 comments on commit fa44f45

Please sign in to comment.