diff --git a/assets/icons.json b/assets/icons.json
index dc280c9e..93d7aa61 100644
--- a/assets/icons.json
+++ b/assets/icons.json
@@ -201,5 +201,7 @@
"line-chart": "M3.5,18.5L9.5,12.5L13.5,16.5L22,6.92L20.59,5.5L13.5,13.5L9.5,9.5L2,17L3.5,18.5Z",
"bar-chart": "M3,22V8H7V22H3M10,22V2H14V22H10M17,22V14H21V22H17Z",
"gantt-chart": "M2,5H10V2H12V22H10V18H6V15H10V13H4V10H10V8H2V5M14,5H17V8H14V5M14,10H19V13H14V10M14,15H22V18H14V15Z",
- "crown": "M5 16L3 5L8.5 10L12 4L15.5 10L21 5L19 16H5M19 19C19 19.6 18.6 20 18 20H6C5.4 20 5 19.6 5 19V18H19V19Z"
+ "crown": "M5 16L3 5L8.5 10L12 4L15.5 10L21 5L19 16H5M19 19C19 19.6 18.6 20 18 20H6C5.4 20 5 19.6 5 19V18H19V19Z",
+ "drop": "M12 18C12 18.7 12.12 19.36 12.34 20C12.23 20 12.12 20 12 20C8.69 20 6 17.31 6 14C6 10 12 3.25 12 3.25S16.31 8.1 17.62 12C16.93 12.06 16.28 12.22 15.67 12.47C15 10.68 13.5 8.33 12 6.39C10 8.96 8 12.23 8 14C8 16.21 9.79 18 12 18M19 17V14H17V17H14V19H17V22H19V19H22V17H19Z",
+ "faucet": "M21 21H3C3 19.9 3.9 19 5 19H19C20.11 19 21 19.89 21 21M19 7C19 5.39 17.93 3 15 3S11 5.39 11 7V18H13V7C13 6.54 13.17 5 15 5S17 6.54 17 7H16.5V9H19.5V7H19M7 12C6.45 12 6 12.45 6 13V14H3V15H6V18H8V13C8 12.45 7.55 12 7 12M21 14H18V13C18 12.45 17.55 12 17 12S16 12.45 16 13V18H18V15H21V14Z"
}
diff --git a/components/LeftSidebar.vue b/components/LeftSidebar.vue
index cc34e8ce..19b8d3a5 100644
--- a/components/LeftSidebar.vue
+++ b/components/LeftSidebar.vue
@@ -127,6 +127,11 @@ const modularLinks = reactive([
const isToolsLinkCollapsed = ref(false)
const toolsLinks = reactive([
+ {
+ icon: "drop",
+ name: "Faucet",
+ path: "/faucet",
+ },
{
icon: "blob",
name: "Blobstream",
@@ -351,9 +356,9 @@ const handleNavigate = (url) => {
.group_title {
border-radius: 5px;
- cursor: default;
+ cursor: pointer;
- padding: 4px 6px;
+ padding: 6px 6px;
margin: 0 2px;
transition: all 0.2s ease;
diff --git a/components/cmd/CommandMenu.vue b/components/cmd/CommandMenu.vue
index 52c19ed2..cf664c20 100644
--- a/components/cmd/CommandMenu.vue
+++ b/components/cmd/CommandMenu.vue
@@ -291,6 +291,15 @@ const rawNavigationActions = [
router.push("/calculators/savings")
},
},
+ {
+ type: "callback",
+ icon: "arrow-narrow-right",
+ title: "Go to Faucet",
+ runText: "Open Faucet",
+ callback: () => {
+ router.push("/faucet")
+ },
+ },
{
type: "callback",
icon: "arrow-narrow-right",
diff --git a/components/modals/SendModal.vue b/components/modals/SendModal.vue
index 3440aa35..367f575c 100644
--- a/components/modals/SendModal.vue
+++ b/components/modals/SendModal.vue
@@ -10,7 +10,6 @@ import Button from "@/components/ui/Button.vue"
/** API */
import { search } from "@/services/api/search"
-import { fetchAddressByHash } from "@/services/api/address"
/** Services */
import amp from "@/services/amp"
diff --git a/components/modals/StakingModal.vue b/components/modals/StakingModal.vue
index 29fc3ae9..b6cd3217 100644
--- a/components/modals/StakingModal.vue
+++ b/components/modals/StakingModal.vue
@@ -210,7 +210,7 @@ watch(
}
if (cacheStore.current.validator) {
- address.value = cacheStore.current.validator.address
+ address.value = cacheStore.current.validator.address?.hash
}
nextTick(() => {
diff --git a/components/shared/AdvBanner.vue b/components/shared/AdvBanner.vue
index eea02784..fa816677 100644
--- a/components/shared/AdvBanner.vue
+++ b/components/shared/AdvBanner.vue
@@ -17,11 +17,15 @@ const props = defineProps({
},
})
+const router = useRouter()
+
const adv = ref({})
const isDisplayed = ref(true)
const handleClick = () => {
- if (adv.value.link) {
+ if (adv.value.internalLink) {
+ router.push(adv.value.internalLink)
+ } else if (adv.value.link) {
window.open(adv.value.link, '_blank')
} else if (adv.value.modal) {
modalsStore.open(adv.value.modal)
diff --git a/components/widgets/StakingWidget.vue b/components/widgets/StakingWidget.vue
index 76857323..eeeda644 100644
--- a/components/widgets/StakingWidget.vue
+++ b/components/widgets/StakingWidget.vue
@@ -20,12 +20,12 @@ const wrapperEl = ref(null)
const wrapperWidth = ref(0)
const barWidth = computed(() => Math.round(wrapperWidth.value - 32))
-const totalSupply = computed(() => lastHead.value.total_supply / 1_000_000)
+const totalSupply = computed(() => lastHead.value?.total_supply / 1_000_000)
const totalSupplyUSD = computed(() => totalSupply.value * currentPrice.value?.close)
-const totalVotingPower = computed(() => lastHead.value.total_voting_power)
+const totalVotingPower = computed(() => lastHead.value?.total_voting_power)
const totalVotingPowerUSD = computed(() => totalVotingPower.value * currentPrice.value?.close)
-const bondedShare = computed(() => shareOfTotal(lastHead?.value.total_voting_power * 1_000_000, lastHead?.value.total_supply, 2))
+const bondedShare = computed(() => shareOfTotal(lastHead.value?.total_voting_power * 1_000_000, lastHead.value?.total_supply, 2))
const isRefetching = ref(true)
const totalValidators = ref(0)
@@ -51,7 +51,7 @@ const validatorsGraph = ref([
},
])
-const getValidatorsStats = async () => {
+const fetchValidatorsStats = async () => {
isRefetching.value = true
const { data } = await fetchValidatorsCount()
diff --git a/pages/calculators/savings.vue b/pages/calculators/savings.vue
index 6d5e7a92..3a776a37 100644
--- a/pages/calculators/savings.vue
+++ b/pages/calculators/savings.vue
@@ -304,414 +304,424 @@ useHead({
-
-
-
-
-
- Cost Saving Calculator
-
-
-
- Rollup Estimation Cost
-
- Discover the potential cost benefits of building on Celestia, modular blockchain network.
-
-
-
+
+
+
+
+
+
+
+
+ Cost Saving Calculator
+
-
-
-
-
- Rollup Stack
-
+
+ Rollup Estimation Cost
+
+ Discover the potential cost benefits of building on Celestia, modular blockchain network.
+
+
- Rollup underlying technology (SDK).
-
-
-
-
-
-
-
-
- {{ stack.name }}
-
-
- ${{ comma(getAvgCallDataCostByStack(stack.name)) }}
-
- Unavailable
-
+
+
+
+
+ Rollup Stack
+
-
-
- {{ percentDiff(rollupStacks[selectedRollupStack].price, rollupStacks[idx].price).pos ? "-" : "+"
- }}{{ percentDiff(rollupStacks[selectedRollupStack].price, rollupStacks[idx].price).val.toFixed(2) }}%
-
-
-
-
-
+ Rollup underlying technology (SDK).
+
-
-
-
-
- Transaction Type
-
-
+
+
+
+
- Type of transaction used to calculate the total size of posted data.
-
-
-
-
-
-
-
-
- {{ stack.name }}
- {{ stack.description }}
+
+ {{ stack.name }}
+
+
+ ${{ comma(getAvgCallDataCostByStack(stack.name)) }}
+
+ Unavailable
+
-
-
-
-
+
+
+ {{ percentDiff(rollupStacks[selectedRollupStack].price, rollupStacks[idx].price).pos ? "-" : "+"
+ }}{{ percentDiff(rollupStacks[selectedRollupStack].price, rollupStacks[idx].price).val.toFixed(2) }}%
+
+
+
-
-
-
-
+
+
- Expected transactions
+ Transaction Type
- Total number of posted transactions.
+ Type of transaction used to calculate the total size of posted data.
-
+
+
+
+
-
- {{ comma(txs) }}
-
-
-
-
-
-
+
+ {{ stack.name }}
+ {{ stack.description }}
+
+
+
+
+
+
-
+
-
-
-
-
-
- Using L2 the expected cost ~${{ comma(expectedCostL2, ",", 0) }}, with Celestia ~${{ comma(expectedCostCelestia, ",", 0) }} for
- {{ abbreviate(txs) }} transactions
-
-
-
-
-
-
- ${{ comma(savingsUsingCelestia, ",", 0) }}
-
- You'll save using Celestia
-
+
+
+
+
+
+ Expected transactions
+
+
-
- ${{ tiaPerMb.toFixed(5) }}
- Price per Mb in Celestia
-
+ Total number of posted transactions.
+
+
+
+
+
+ {{ comma(txs) }}
+
+
+
+
+
+
+
+
-
-
-
- ~{{ payLessPercentCelestia.toFixed(2) }}%
-
- You'll pay % less
+
+
+
+
+
+ Using L2 the expected cost ~${{ comma(expectedCostL2, ",", 0) }}, with Celestia ~${{ comma(expectedCostCelestia, ",", 0) }} for
+ {{ abbreviate(txs) }} transactions
+
+
+
+
+
+
+ ${{ comma(savingsUsingCelestia, ",", 0) }}
+
+ You'll save using Celestia
+
+
+
+ ${{ tiaPerMb.toFixed(5) }}
+ Price per Mb in Celestia
+
-
-
- ${{ comma(additionalSettlementCost, ",", 0) }}
-
- Settlement Cost
+
+
+
+ ~{{ payLessPercentCelestia.toFixed(2) }}%
+
+ You'll pay % less
+
+
+
+
+ ${{ comma(additionalSettlementCost, ",", 0) }}
+
+ Settlement Cost
+
-
-
-
+
+
-
- This estimation assumes a constant $TIA price. It should only be used as an estimation and
- reference to compare what-if scenarios.
-
+
+ This estimation assumes a constant $TIA price. It should only be used as an estimation and
+ reference to compare what-if scenarios.
+
+
-
-
-
-
-
-
- Constants
-
-
-
- Reset
-
-
-
-
- Variables used to calculate the savings of Celestia's usage.
-
-
-
- Editable variables
-
-
-
- Static
-
+
+
+
+
+
+ Constants
+
+
+ Reset
-
-
-
-
-
-
-
- TIA Price
-
-
-
- ${{ tiaPrice }}
-
-
-
+
+
+
+ Variables used to calculate the savings of Celestia's usage.
+
+
+
+ Editable variables
+
-
-
-
+
+ Static
-
+
+
+
-
- Average Gas
- {{ comma(averageGas) }}
-
-
+
+
+
+
+ TIA Price
+
+
+
+ ${{ tiaPrice }}
+
+
+
+
+
+
+
+
+
+
-
-
- Price per gas
+
+ Average Gas
+ {{ comma(averageGas) }}
+
+
-
-
- {{ pricePerGas }} UTIA
-
-
-
-
-
-
-
-
-
+
+
+ Price per gas
+
+
+
+ {{ pricePerGas }} UTIA
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
- Avg batch size
-
-
- {{ formatBytes(batchSize) }} / block
-
-
-
-
-
-
-
-
-
+
+
+
+
+ Avg batch size
+
+
+
+ {{ formatBytes(batchSize) }} / block
+
+
+
+
+
+
+
+
+
+
-
-
-
- Avg num of shares
- 215
+
+
+ Avg num of shares
+ 215
+
-
-
-
- Use EIP-4844
+
+
+ Use EIP-4844
+
-
-
+ -->
+
+
+
+
+
+
+ Build with Celenium API
+
-
-
-
-
-
- Build with Celenium API
+
+ Unlock the power of Celestia: Scalable, Secure and Modular Blockchain.
+
-
- Unlock the power of Celestia: Scalable, Secure and Modular Blockchain.
-
+ Get started ->
-
- Get started ->
-
-
+
+
@@ -721,6 +731,10 @@ useHead({
padding: 20px 24px 60px 24px;
}
+.breadcrumbs {
+ margin-bottom: 16px;
+}
+
.left {
}
diff --git a/pages/faucet.vue b/pages/faucet.vue
new file mode 100644
index 00000000..351fb556
--- /dev/null
+++ b/pages/faucet.vue
@@ -0,0 +1,650 @@
+
+
+
+
+
+
+
+
+
+ Celenium Faucet
+
+
+
+ Faucet is only available for
+ Mocha
+ network.
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ validation.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Faucet
+
+
+
+ {{ tia(faucetBalance, 2) }} TIA
+
+
+
+
+
+ {{ splitAddress(faucetAddress) }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ account?.hash
+ ? $getDisplayName("addresses", "", account) === splitAddress(account?.hash)
+ ? 'Address'
+ : $getDisplayName("addresses", "", account)
+ : 'Address'
+ }}
+
+
+
+ {{ tia(account?.balance?.spendable || 0, 2) }} TIA
+
+
+
+
+ {{ account?.hash
+ ? splitAddress(account.hash)
+ : 'celestia ••• celestia'
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ View Tx
+
+
+
+
+
+ {{ executionResult.message }}
+
+
+
+
+
+
+
+ Please do not forget to
+
+ return
+
+ the test tokens if you no longer need them so that they can be used by other developers and testers.
+
+
+
+
+
+ Frequently asked questions
+
+
+
+ handleOpenQuestion(1)" align="center" justify="between" gap="12" :class="$style.head">
+ What is the Celestia Faucet?
+
+
+
+
+
+
+ The Celestia testnet faucet is a service that provides free testnet tokens for developers and users who want to interact with the Celestia blockchain without spending real assets. These tokens have no monetary value and are solely for testing purposes.
+
+
+
+ handleOpenQuestion(2)" align="center" justify="between" gap="12" :class="$style.head">
+ How can I request testnet tokens?
+
+
+
+
+
+
+ You can request testnet tokens by entering your Celestia testnet address, and clicking the "Received 0.5 TIA" button. Tokens will be sent to your wallet within a few moments.
+
+
+
+ handleOpenQuestion(3)" align="center" justify="between" gap="12" :class="$style.head">
+ What are the limitations on requesting tokens?
+
+
+
+
+
+
+ To ensure fair distribution and prevent abuse, the faucet has the following limitations:
+ • You can receive 0.5 TIA per request.
+ • You can request tokens only once per hour per IP address or wallet address.
+ • If you reach the limit, you will need to wait before requesting again.
+
+
+
+ handleOpenQuestion(4)" align="center" justify="between" gap="12" :class="$style.head">
+ What should I do if I don’t receive my tokens?
+
+
+
+
+
+
+ If you haven't received your tokens:
+ • Double-check that you entered the correct Celestia address.
+ • Ensure you are using the Mocha network.
+ • If the issue persists, contact support.
+
+
+
+ handleOpenQuestion(5)" align="center" justify="between" gap="12" :class="$style.head">
+ Can I use testnet tokens on the mainnet?
+
+
+
+
+
+
+ No, testnet tokens are only for testing on the Celestia Mocha network. They cannot be transferred or used on the Celestia mainnet.
+
+
+
+ handleOpenQuestion(6)" align="center" justify="between" gap="12" :class="$style.head">
+ What happens if I run out of testnet tokens?
+
+
+
+
+
+
+ If you run out of testnet tokens, you can request more from the faucet (subject to request limits). You may also check community channels for alternative ways to obtain test tokens.
+
+
+
+ handleOpenQuestion(7)" align="center" justify="between" gap="12" :class="$style.head">
+ How can I contribute to the Celestia testnet?
+
+
+
+
+
+
+ If you no longer need the testnet tokens, please return them to the faucet so that other developers and testers can use them. You can send them back to the
+
+ faucet
+
+ .
+ Your contribution helps keep the testnet accessible for everyone!
+
+
+
+
+
+
+
+
+
+
diff --git a/services/api/faucet.js b/services/api/faucet.js
new file mode 100644
index 00000000..4975a187
--- /dev/null
+++ b/services/api/faucet.js
@@ -0,0 +1,29 @@
+/** Services */
+import { faucetURL } from "@/services/config"
+
+export const faucetAddress = "celestia16etnwjxg6dsjuavjpr9tk822czfeylfm9f7x5g"
+
+export const fetchBalance = async () => {
+ try {
+ const data = await useFetch(`${faucetURL}/balance`)
+ return data
+ } catch (error) {
+ console.error(error)
+ }
+}
+
+export const executeFaucet = async (address) => {
+ try {
+
+ const data = await useFetch(`${faucetURL}/faucet`, {
+ method: "post",
+ body: {
+ address,
+ },
+ })
+
+ return data
+ } catch (error) {
+ console.error(error)
+ }
+}
diff --git a/services/config.js b/services/config.js
index 34d066bc..97280b7e 100644
--- a/services/config.js
+++ b/services/config.js
@@ -107,5 +107,6 @@ export const getStartChainDate = () => {
}
}
-export const tvlServiceURL = "https://tvl.celenium.io/v1"
export const blockscoutURL = "https://celestia-l2-router.k8s-dev.blockscout.com/api/v1/celestia/l2BatchMetadata"
+export const faucetURL = "https://api-faucet.celenium.io/v1"
+export const tvlServiceURL = "https://tvl.celenium.io/v1"
diff --git a/services/constants/advertising.js b/services/constants/advertising.js
index 30d76e8d..692adf30 100644
--- a/services/constants/advertising.js
+++ b/services/constants/advertising.js
@@ -9,6 +9,15 @@ const advertisements = [
weight: 0.4,
},
{
+ name: 'faucet',
+ internalLink: '/faucet',
+ icon: 'drop',
+ header: 'Celenium Faucet',
+ body: 'Free testnet TIA for the Celestia Mocha network!',
+ footer: 'Get Tokens',
+ weight: 0.2,
+ },
+ {
name: 'celestials',
link: 'https://celestials.id/',
icon: 'celestials',
@@ -24,7 +33,7 @@ const advertisements = [
header: 'Your Own Node',
body: 'Easily launch a node right in your browser or on your phone.',
footer: 'Run Light Node',
- weight: 0.4,
+ weight: 0.2,
},
{
name: 'celestia_update',
@@ -33,7 +42,7 @@ const advertisements = [
header: 'Celestia Upgrade',
body: 'Mainnet update scheduled for 28.01.2025.',
footer: 'View Docs',
- weight: 1.1,
+ weight: 0,
},
{
name: 'celenium_survey',