@@ -3,15 +3,15 @@ title: Working with sBTC
3
3
description : Clarinet helps with building, testing, and deploying contracts that use sBTC.
4
4
---
5
5
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.
7
7
8
8
## About sBTC
9
9
10
10
sBTC is a fungible token on the Stacks blockchain. It follows the
11
11
[ SIP-010 standard] ( https://github.com/stacksgov/sips/blob/main/sips/sip-010/sip-010-fungible-token-standard.md )
12
12
for fungible tokens.
13
13
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.
15
15
16
16
## Using sBTC in your contract
17
17
@@ -28,12 +28,13 @@ smart contract to your project, along with it's dependencies:
28
28
- [ ` sbtc-token ` ] ( https://explorer.hiro.so/txid/SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token )
29
29
- [ ` sbtc-registry ` ] ( https://explorer.hiro.so/txid/SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-registry )
30
30
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 .
33
33
34
34
## Using sBTC in your contract
35
35
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
+
37
38
Let's say we have an NFT contract that allows users to mint an NFT by spending sBTC.
38
39
39
40
@@ -64,22 +65,22 @@ Let's say we have an NFT contract that allows users to mint an NFT by spending s
64
65
```
65
66
66
67
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.
68
69
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
72
73
sure that your contracts call the right address.
73
74
74
- ## Deploying your contract on Testnet
75
+ ## Deploying your contract on testnet
75
76
76
77
On testnet, the official Hiro sBTC contract is
77
78
[ ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-token] ( https://explorer.hiro.so/txid/ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-token?chain=testnet ) .
78
79
This is the contract that is linked to the sBTC faucet: ` ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-deposit ` .
79
80
80
81
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.
82
83
83
- ## Deploying your contract on Mainnet
84
+ ## Deploying your contract on mainnet
84
85
85
86
On mainnet, your contract will remain unchanged and call the one and only sBTC contract.
0 commit comments