Last active
January 2, 2018 04:46
-
-
Save sadaf2605/abc744a4612c816d2f988bab76d8a0a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from microraiden.client import Client | |
| from web3.providers.rpc import RPCProvider | |
| from web3 import Web3, HTTPProvider | |
| #web3 = Web3(HTTPProvider('https://kovan.infura.io/Ug2W9nZzjwN4lITvvLT0')) | |
| web3 = Web3(Web3.HTTPProvider("http://127.0.0.1:8545", request_kwargs={'timeout': 600})) | |
| #print(web3.eth.blockNumber) | |
| privkey = '0x651dd7356eed2381be5ddea2fa60f46155ad7e4315186c6ebbdee520e55a7bcb' | |
| client = Client(privkey, web3=web3) | |
| wei_value = 10**17 + 21000 | |
| #from test: https://github.com/raiden-network/microraiden/blob/f99f524d69a90621424088f001e1bb4a4e6b6c45/contracts/tests/test_token.py | |
| client.context.token.transact({'from': "0x6Ed9dd84cD7aa7eCB070997bbc267C0e95b24f42" ,'value': wei_value}).mint() | |
| token_balance = client.context.token.call().balanceOf(client.context.address) | |
| print(token_balance) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment