RSK - BTC Bridge (2-way peg)
Channel: AleBanzas
Date: 2018-07-30

Learn how to use the RSK-BTC Bridge, also known as 2-way peg, and convert your BTC to SBTC (Smart Bitcoin) to pay for fuel in your smart contracts execution.


REQUISITES
-A BTC Wallet with funds
-Whitelist your address here: https://github.com/rsksmart/rskj/wiki/Whitelisting-in-RSK


STEPS
1. Get the federation address by calling the Bridge contract

Navigate to https://mycrypto.com/contracts/interact and select from the network list in the right top corner “RSK”. then click on the “contracts” option in the menu.

Finally, to get the address, select the “bridge” contract, access it, select the “getFederationAddress” function and click on the “read” button to get the address.


2. Send funds to the Bridge
PLEASE, don’t follow this step until you are whitelisted!!!

Using your whitelisted address in BTC, send the amount to be converted to SBTC (Smart Bitcoin) to the federation address obtained in the previous step. Use the wallet you want. It’s just a BTC transaction.

The amount should be between 0.01 to 10 BTCs, no less, no more 


3. Check the funds converted in RSK
In order to check the funds in RSK we need 2 tools:

-RSK Utils: converts the BTC address into an RSK address
--Navigate to https://utils.rsk.co
--Or, run this tool locally by downloading the code and run it from here: https://github.com/rsksmart/utils

-RSK Explorer: https://explore.rsk.co