Skip to content

Commit

Permalink
Merge pull request #2653 from starknet-io/cms/posts/getting-started-u…
Browse files Browse the repository at this point in the history
…sing-starknet-setting-up-a-starknet-wallet

Automatically generated. Merged on Netlify CMS.
  • Loading branch information
stoobie authored Mar 3, 2024
2 parents 97bc1c3 + 91950e4 commit 42e47e3
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,38 @@ blocks:
![](https://starkware.co/wp-content/uploads/2023/08/9-StarkGate_updated_bals-300x190.png)
## Swapping ETH for another token using JediSwap
JediSwap is a community-driven Automated Market Maker (AMM) on Starknet that enables you to swap one type of token for another. The JediSwap documentation provides information on swapping and on adding liquidity. This procedure demonstrates swapping ETH for WBTC.
#### Procedure
1. Go to JediSwap at <https://app.jediswap.xyz>.
2. Connect your wallet by clicking **Connect Wallet** and then selecting your Starknet wallet.
![](https://starkware.co/wp-content/uploads/2023/08/10-JediSwap_Connect_button-300x58.png)
3. When your wallet prompts you to approve the connection, click **Approve**.\
Once JediSwap connects to your wallet, it shows your balance in each token that it supports. For example, my wallet has about 0.05 ETH.
![](https://starkware.co/wp-content/uploads/2023/08/11-JediSwap_ETH_balance-300x85.png)
4. Select the tokens that you want to swap in **Swap From** and **Swap To (est.)**, and click **Swap**. I swapped 0.025 ETH for WBTC.
5. Your wallet prompts you to sign the transaction by clicking **Sign**. Clicking **Sign** submits the transaction
6. JediSwap shows Transaction Submitted. Click **Open in browser** to view the transaction on StarkScan.
7. Open your wallet to see your balance and the assets that you own. For example, this is my Braavos wallet after the swap:
## Using MetaMask as a Starknet wallet
Expand Down Expand Up @@ -199,36 +231,41 @@ blocks:
Once you have funds in your wallet, you can send funds to another Starknet address. Like I said, more features are coming soon.
## Swapping ETH for another token using JediSwap
JediSwap is a community-driven Automated Market Maker (AMM) on Starknet that enables you to swap one type of token for another. The JediSwap documentation provides information on swapping and on adding liquidity. This procedure demonstrates swapping ETH for WBTC.
## Using STRK Tokens with MetaMask’s Starknet Snap
#### Procedure
**To check if your (potentially undeployed) MM Snaps wallet has STRK tokens:**
1. Go to JediSwap at <https://app.jediswap.xyz>.
2. Connect your wallet by clicking **Connect Wallet** and then selecting your Starknet wallet.
1. Go to https://starkscan.co/contract/<wallet address>, where <wallet address> is your wallet’s address, and click **Portfolio**. You should see the wallet’s balances.
![Starkscan showing positive STRK balance](/assets/1_starkscan.png)
2. Open MetaMask and open Snaps: Click the three vertical dots to open the menu, and then **Snaps > Starknet**. Then click the URL <https://snaps.consensys.io/starknet>. The Starknet snap opens.
![](https://starkware.co/wp-content/uploads/2023/08/10-JediSwap_Connect_button-300x58.png)
3. Click **(+) ADD TOKEN**, and the **Add Token** screen opens.
![Snap before adding STRK token](/assets/3_snap_before_adding.png)
4. Fill in the following details:\
**ContractAddress:** `0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d`\
**Name:**`Starknet Token`\
**Symbol:** `STRK`\
**Decimal:** `18`
3. When your wallet prompts you to approve the connection, click **Approve**.\
Once JediSwap connects to your wallet, it shows your balance in each token that it supports. For example, my wallet has about 0.05 ETH.
![Add STRK token support to MetaMask Starknet snap](/assets/4_add_this_token.png)
![](https://starkware.co/wp-content/uploads/2023/08/11-JediSwap_ETH_balance-300x85.png)
11. Approve the request in MetaMask.
12. You should now see the Starknet token STRK in the list of tokens in the Snap.
4. Select the tokens that you want to swap in **Swap From** and **Swap To (est.)**, and click **Swap**. I swapped 0.025 ETH for WBTC.
![STRK is added to MetaMask Starknet snap](/assets/6_strk_is_added.png)
13. Currently, you can pay fees in STRK with the MetaMask Snap. You need to first transfer a small amount of ETH to the Snap’s wallet to pay for deploying the account and sending the STRK. You can send ETH to the wallet even before you have deployed it.
5. Your wallet prompts you to sign the transaction by clicking **Sign**. Clicking **Sign** submits the transaction
![ETH balance in Starknet wallet](/assets/7_eth_balance.png)
14. Once you have some ETH, you can send the STRK from the account. 
6. JediSwap shows Transaction Submitted. Click **Open in browser** to view the transaction on StarkScan.
7. Open your wallet to see your balance and the assets that you own. For example, this is my Braavos wallet after the swap:
**NOTE:** There might be a bug in Snaps where after transferring ETH to the account, the balance of the STRK tokens appears 0 instead of the actual amount. In this case, redo the steps to add the STRK token as described above.
## What now?
Expand Down
Binary file added public/assets/1_starkscan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/2_three_dots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/3_snap_before_adding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/4_add_this_token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/5_approve_adding_token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/6_strk_is_added.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/7_eth_balance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 42e47e3

Please sign in to comment.