Skip to content

Commit 8c56b8a

Browse files
authored
Merge pull request #976 from hirosystems/develop
add missing og metadata
2 parents bba9521 + fbfe620 commit 8c56b8a

File tree

3 files changed

+34
-13
lines changed

3 files changed

+34
-13
lines changed

content/docs/stacks/clarinet/guides/working-with-sbtc.mdx

+13-12
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: Working with sBTC
33
description: Clarinet helps with building, testing, and deploying contracts that use sBTC.
44
---
55

6-
Make sure to use Clarinet 2.15.0 or later.
6+
To take advantage of these features, make sure to use Clarinet 2.15.0 or later.
77

88
## About sBTC
99

1010
sBTC is a fungible token on the Stacks blockchain. It follows the
1111
[SIP-010 standard](https://github.com/stacksgov/sips/blob/main/sips/sip-010/sip-010-fungible-token-standard.md)
1212
for fungible tokens.
1313

14-
Even though it's *just* a fungible token. Clarinet has some helpers to make it easier to work with.
14+
Even though it's *just* a fungible token, Clarinet has some helpers to make it easier to work with.
1515

1616
## Using sBTC in your contract
1717

@@ -28,12 +28,13 @@ smart contract to your project, along with it's dependencies:
2828
- [`sbtc-token`](https://explorer.hiro.so/txid/SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token)
2929
- [`sbtc-registry`](https://explorer.hiro.so/txid/SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-registry)
3030

31-
When Clarinet detects the `sbtc-deposit` contract, it will automatically fund the test wallets with
32-
sBTC that you can use to test your contract in the Simnet and Devnet.
31+
When Clarinet detects the `sbtc-deposit` contract, it will automatically fund your test wallets with
32+
sBTC that you can use to test your contract in Clarinet simnet and devnet.
3333

3434
## Using sBTC in your contract
3535

36-
As a SIP-010 token, sBTC let you call the `transfer` function to transfer tokens from one address to another.
36+
As a SIP-010 token, sBTC let you call the `transfer` function to transfer tokens from one address to another.
37+
3738
Let's say we have an NFT contract that allows users to mint an NFT by spending sBTC.
3839

3940

@@ -64,22 +65,22 @@ Let's say we have an NFT contract that allows users to mint an NFT by spending s
6465
```
6566

6667
Because Clarinet already took care of funding the test wallets with sBTC, you can call the
67-
`mint-one-with-sbtc` function with one of the test wallets.
68+
`mint-one-with-sbtc` function with one of your test wallets.
6869

69-
In the Simnet (unit tests or `clarinet console`), the deployer address of the contract will remain
70-
`SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4`, but in Devnet, like every otehr requirements, it will
71-
be deployed by the default deployer address. You don't have to care about it, Clarinet always make
70+
In simnet (unit tests or `clarinet console`), the deployer address of the contract will remain
71+
`SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4`, but in devnet, like every other requirements, the contract will
72+
be deployed by the default deployer address. You don't have to worry about this—Clarinet always make
7273
sure that your contracts call the right address.
7374

74-
## Deploying your contract on Testnet
75+
## Deploying your contract on testnet
7576

7677
On testnet, the official Hiro sBTC contract is
7778
[ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-token](https://explorer.hiro.so/txid/ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-token?chain=testnet).
7879
This is the contract that is linked to the sBTC faucet: `ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-deposit`.
7980

8081
Again, Clarinet will make sure that your contracts call this address when being deployed on mainnet.
81-
You can see the of the sbtc-contract being re-mapped in the testnet deployment plan.
82+
You can see the address of the sbtc-contract being re-mapped in the testnet deployment plan.
8283

83-
## Deploying your contract on Mainnet
84+
## Deploying your contract on mainnet
8485

8586
On mainnet, your contract will remain unchanged and call the one and only sBTC contract.

public/images/bitcoin-indexer-og.jpg

91.1 KB
Loading

utils/metadata.ts

+21-1
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,26 @@ const tokenMetadataApiMetadata: Partial<Metadata> = {
313313
},
314314
};
315315

316+
const bitcoinIndexerMetadata: Partial<Metadata> = {
317+
title: "Bitcoin Indexer",
318+
description:
319+
"Build accurate, lightweight databases with the Bitcoin Indexer.",
320+
openGraph: {
321+
title: "Bitcoin Indexer",
322+
description:
323+
"Build accurate, lightweight databases with the Bitcoin Indexer.",
324+
images: [
325+
{ url: "/images/bitcoin-indexer-og.jpg", width: 800, height: 600 },
326+
],
327+
},
328+
twitter: {
329+
title: "Bitcoin Indexer",
330+
description:
331+
"Build accurate, lightweight databases with the Bitcoin Indexer.",
332+
images: ["/images/bitcoin-indexer-og.jpg"],
333+
},
334+
};
335+
316336
export function createMetadata(override: Partial<Metadata>): Metadata {
317337
return {
318338
...defaultMetadata,
@@ -361,6 +381,6 @@ export function getRouteMetadata(path: string): Partial<Metadata> {
361381
if (path.startsWith("/stacks/rpc-api")) return stacksNodeRpcMetadata;
362382
if (path.startsWith("/stacks/token-metadata-api"))
363383
return tokenMetadataApiMetadata;
364-
384+
if (path.startsWith("/bitcoin/indexer")) return bitcoinIndexerMetadata;
365385
return {};
366386
}

0 commit comments

Comments
 (0)