How to access Ethereum-based applications?
medium.com
medium.com
from web3 import Web3, HTTPProvider
web3 = Web3(HTTPProvider('http://localhost:8545')) #Assuming you're running your own ETH node
your_eth_wallet_address = web3.eth.accounts[0] #Assuming you want to use your node's first wallet
web3.eth.defaultAccount = your_eth_wallet_address
dapp_contract = web3.eth.contract(contract_address)
#Read data from the dapp or execute a function locally (No transaction cost):
dapp_contract.call().function_name(*function_arguments)
#Send an ETH transaction (Pay for gas, plus whatever this transaction does):
dapp_contract.transact().function_name(*function_arguments)Additionally, all these web3 providers who are developing browser based solutions are trying to provide a psuedo app store to make their platforms more useful.
Some examples I've been playing with lately are:
https://www.cipherbrowser.com/
A competitor in this space is blockstack who is pushing the dApp model hard: https://blockstack.org
For instance, here is a demo of a social network dApp I built that is running a distributed correctness test across many real world devices that are updating character-by-character in realtime: https://youtu.be/C3akdQJs55E (fully P2P and encrypted!)
I know blockstack has been pushing this but they still require their own browser. Meanwhile you can build apps like above as easily as 40 lines of code and a few minutes, check out this interactive coding tutorial: https://scrimba.com/c/c2gBgt4
Instead, if we make it work out of the browser by default, then we can get much better user adoption and then optionally ask users to opt into more secure and reliable alternatives after they have already built trust with us and been won over. Does that make sense? Thoughts?