Where replace with your PK, and also you need to have funds in this account
"""

from decimal import Decimal

from moneyonchain.networks import NetworkManager
from moneyonchain.tokens import WRBTCToken

connection_network = 'rskTesnetPublic'
config_network = 'dexTestnet'

# init network manager
# connection network is the brownie connection network
# config network is our enviroment we want to connect
network_manager = NetworkManager(connection_network=connection_network,
                                 config_network=config_network)

# run install() if is the first time and you want to install
# networks connection from brownie
# network_manager.install()

# Connect to network
network_manager.connect()

token_address = '0x09b6ca5E4496238A1F176aEa6Bb607DB96c2286E'  # token address
amount_to_wrap = Decimal(0.001)  # the amount you want to wrap

token_sc = WRBTCToken(network_manager,
                      contract_address=token_address).from_abi()

token_sc.deposit(amount_to_wrap)
예제 #2
0
"""
Only run the first time to install brownie connections in your machine
"""

from moneyonchain.networks import NetworkManager

connection_network = 'rskTesnetPublic'
config_network = 'dexTestnet'

# init network manager
# connection network is the brownie connection network
# config network is our enviroment we want to connect
network_manager = NetworkManager(connection_network=connection_network,
                                 config_network=config_network)

# run install() if is the first time and you want to install
# networks connection from brownie
network_manager.install()