Compare commits

...

10 Commits

Author SHA1 Message Date
Sai Raj
06ebd81725
Update README.md 2019-02-24 00:29:02 +05:30
Sai Raj
f3e8b9068e
Update README.md 2019-02-24 00:26:04 +05:30
Sai Raj
8f0d650886
Update README.md 2019-02-24 00:25:07 +05:30
Sai Raj
30d7edace9
Update README.md 2019-02-24 00:24:13 +05:30
Sai Raj
dc68908e9d
Update README.md 2019-02-24 00:22:53 +05:30
Sai Raj
56423f2696
Adding screenshots 2019-02-24 00:12:38 +05:30
sairajzero
88508469e4 Merge branch 'master' of https://github.com/sairajzero/FLO-appStore 2019-02-23 23:48:42 +05:30
sairajzero
f95912d97e changed from testnet to mainnet 2019-02-23 23:46:43 +05:30
sairajzero
17278fa66c changed from testnet to mainnet 2019-02-23 23:45:54 +05:30
Sai Raj
0e970765d0
Delete send_floData.py 2019-02-23 00:50:56 +05:30
11 changed files with 24 additions and 103 deletions

Binary file not shown.

View File

@ -27,18 +27,29 @@ A button for each app (with icon and app name) is generated for each app.The app
## Requirements
1. Linux operating system(working on a cross platform version).
2. git (to install git):
sudo apt-get install git
3. Internet
4. Flo Wallet(Running)
## Usage
1. Clone/download this repository. (https://github.com/sairajzero/FLO-appStore/)
1. Clone/download this repository. (https://github.com/ranchimall/FLO-appStore/)
2. Run the binary file (FLO_appStore)
./FLO_appStore
3. For installing an dapp,user needs to click on respective app.A popup window will open which ask user to download the dapp if not previously installed.Once installed the same popup window will have extra buttons to open/remove dapp.
4. Updates for dapps are checked everytime when user is connected to Internet.Click on dapp which user want to update,if any updates are available,update button will automatically be displayed in the popup window.
5. User can also search for any dapp in flostore using Search bar feature.
6. For navigating to other pages in Flostore,use Next/Prev Buttons.
![Screenshot](screenshots/App-Store.png)
3. For installing an dapp,user needs to click on respective app.A popup window will open which ask user to download the dapp if not previously installed.
![Screenshot](screenshots/downloadApp.png)
4. Once installed the same popup window will have extra buttons to open/remove dapp.
![Screenshot](screenshots/openApp.png)
5. Click on open app to open the Dapp
![Screenshot](screenshots/appHome.png)
6. Updates for dapps are checked everytime when user is connected to Internet.Click on dapp which user want to update,if any updates are available,update button will automatically be displayed in the popup window.
7. For browser apps, open browser button will be shown instead of download/open buttons. Click on it to open the webpage in browser.
![Screenshot](screenshots/browserApp.png)
6. User can also search for any dapp in flostore using Search bar feature.
![Screenshot](screenshots/searchApp.png)
7. For navigating to other pages in Flostore,use Next/Prev Buttons.
## Other Infos

View File

@ -10,10 +10,10 @@ def searchDict(dicArr,key,val):
return -1
def readUnitFromBlockchain(txid):
rawtx = subprocess.check_output(["flo-cli","--testnet", "getrawtransaction", str(txid)])
rawtx = subprocess.check_output(["flo-cli", "getrawtransaction", str(txid)])
rawtx = str(rawtx)
rawtx = rawtx[2:-3]
tx = subprocess.check_output(["flo-cli","--testnet", "decoderawtransaction", str(rawtx)])
tx = subprocess.check_output(["flo-cli", "decoderawtransaction", str(rawtx)])
content = json.loads(tx)
text = content['floData']
return str(text)
@ -27,7 +27,7 @@ def Dappend(Dapps,app):
return Dapps
def getJsonData(JsonAddress):
r = requests.get("https://testnet.florincoin.info/ext/getaddress/"+JsonAddress)
r = requests.get("https://www.florincoin.info/ext/getaddress/"+JsonAddress)
data = json.loads(r.content)
#print(data)
Dapps = []
@ -73,11 +73,10 @@ else:
appData['location'] = 'apps/'+input('Enter Repository name \t: ') +'/'
appData['exec'] = input('Enter execution cmd (eg. ./binary) \t: ')
print(appData)
apps = Dappend(apps ,appData)
#print(apps)
apphash = findHash(str(apps))
floData = json.dumps({'Dapp':appData ,'hash':apphash})
print('\nfloData = '+floData)
print('\nfloData :\n'+floData)

View File

@ -11,7 +11,7 @@ import socket
import requests
import hashlib
JsonAddresses = ["oXa7t72t3CgnR11ycxVfdupz55eucHufHj","oYcLBQZkgj9taQ5Zj6ziu8eqMREhyAPCcT","oYtGSrrfLvurYLKouZw3E7AyNuM8ZushbC"]
JsonAddresses = ["FT9qkvuWXWBDRhHd42tDr5nMYFSx7bEhV7","FBcRbCxwChjTdgVewGMPBDDEFXzPcc7GAH","FC6CRkRCeJEKEGF2r1SFppPD5DXfVe1zWq"]
def searchDict(dicArr,key,val):
for i in range(len(dicArr)):
@ -32,10 +32,10 @@ def isConnected():
return False
def readUnitFromBlockchain(txid):
rawtx = subprocess.check_output(["flo-cli","--testnet", "getrawtransaction", str(txid)])
rawtx = subprocess.check_output(["flo-cli", "getrawtransaction", str(txid)])
rawtx = str(rawtx)
rawtx = rawtx[2:-3]
tx = subprocess.check_output(["flo-cli","--testnet", "decoderawtransaction", str(rawtx)])
tx = subprocess.check_output(["flo-cli", "decoderawtransaction", str(rawtx)])
content = json.loads(tx)
text = content['floData']
return str(text)
@ -64,7 +64,7 @@ def verifyHash(localHash,txid):
def getJsonData(Dapps, lastTx,JsonAddress):
try:
r = requests.get("https://testnet.florincoin.info/ext/getaddress/"+JsonAddress)
r = requests.get("https://www.florincoin.info/ext/getaddress/"+JsonAddress)
data = json.loads(r.content)
except:
isConnected()

BIN
screenshots/App-Store.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
screenshots/appHome.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
screenshots/browserApp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 KiB

BIN
screenshots/downloadApp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
screenshots/openApp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
screenshots/searchApp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,89 +0,0 @@
import subprocess
import json
import random
import requests
import hashlib
JsonAddress = 'oXa7t72t3CgnR11ycxVfdupz55eucHufHj'
toAddress = 'oXa7t72t3CgnR11ycxVfdupz55eucHufHj'
tempAcc = str(random.randint(100000,999999))
amt = '0.01'
def searchDict(dicArr,key,val):
for i in range(len(dicArr)):
if(dicArr[i][key]==val):
return i
return -1
def readUnitFromBlockchain(txid):
rawtx = subprocess.check_output(["flo-cli","--testnet", "getrawtransaction", str(txid)])
rawtx = str(rawtx)
rawtx = rawtx[2:-3]
tx = subprocess.check_output(["flo-cli","--testnet", "decoderawtransaction", str(rawtx)])
content = json.loads(tx)
text = content['floData']
return str(text)
def Dappend(Dapps,app):
i = searchDict(Dapps,'id',app['id'])
if (i!=-1):
del(Dapps[i])
if ('remove' not in app.keys()):
Dapps = Dapps + [app]
return Dapps
def getJsonData():
r = requests.get("https://testnet.florincoin.info/ext/getaddress/"+JsonAddress)
data = json.loads(r.content)
#print(data)
Dapps = []
for i in range(len(data['last_txs'])):
if(data['last_txs'][i]['type']=='vin'):
content = readUnitFromBlockchain(data['last_txs'][i]['addresses'])
try:
app = json.loads(content)
except :
continue
#print(app)
if 'Dapp' in app.keys():
Dapps = Dappend(Dapps,app['Dapp'])
#print(Dapps)
return Dapps
def findHash(data):
result = hashlib.sha1(data.encode())
return str(result.hexdigest())
apps = getJsonData()
print(apps)
print("Enter floData :")
lines = []
while True:
line = input()
if line:
lines.append(line)
else:
break
appData = ' '.join(lines)
try:
appData=json.loads(appData)
except:
print('Unable to parse JSON : '+appData)
exit(0)
print(appData)
apps = Dappend(apps , appData)
print(apps)
apphash = findHash(str(apps))
floData = json.dumps({'Dapp':appData ,'hash':apphash})
print('floData = '+floData)
process = subprocess.Popen(['flo-cli','-testnet','getaccount',JsonAddress], stdout=subprocess.PIPE)
account = process.communicate()[0].decode().strip()
process = subprocess.Popen(['flo-cli','-testnet','setaccount',JsonAddress,tempAcc], stdout=subprocess.PIPE)
process = subprocess.Popen(['flo-cli','-testnet','sendfrom',tempAcc,toAddress,amt,'6','','',floData], stdout=subprocess.PIPE)
txid = process.communicate()[0].decode()
print('txid : '+txid)
process = subprocess.Popen(['flo-cli','-testnet','setaccount',JsonAddress,account], stdout=subprocess.PIPE)