When Clarinet detects the sbtc-deposit contract, it will automatically fund the test wallets with
sBTC that you can use to test your contract in the Simnet and Devnet.
As a SIP-010 token, sBTC let you call the transfer function to transfer tokens from one address to another.
Let's say we have an NFT contract that allows users to mint an NFT by spending sBTC.
;; this code is for demo purposes
;; it doesn't implement SIP-009 NFT standard
(define-non-fungible-tokennft-nameuint)
;; mint for 100 sats
(define-data-varsats-sbtc-mint-priceuintu100)
(define-data-varnext-iduintu0)
(define-public(mint-one-with-sbtc)
(begin
;; call the sbtc-token contract to transfer the sbtcs
(try!(contract-call?'SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token transfer
Because Clarinet already took care of funding the test wallets with sBTC, you can call the
mint-one-with-sbtc function with one of the test wallets.
In the Simnet (unit tests or clarinet console), the deployer address of the contract will remain
SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4, but in Devnet, like every otehr requirements, it will
be deployed by the default deployer address. You don't have to care about it, Clarinet always make
sure that your contracts call the right address.
Again, Clarinet will make sure that your contracts call this address when being deployed on mainnet.
You can see the of the sbtc-contract being re-mapped in the testnet deployment plan.