blockshell no moduel bug fixed
This commit is contained in:
parent
b681197cb5
commit
dca5504dba
|
|
@ -1 +1,7 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
|
chain.txt
|
||||||
|
aaa/
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
blockshell/
|
||||||
|
blockshell.egg-info/
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import click
|
import click
|
||||||
import urllib
|
import urllib
|
||||||
import json
|
import json
|
||||||
from blockshell import Block, Blockchain
|
from blockchain.chain import Block, Blockchain
|
||||||
|
|
||||||
# Supported commands
|
# Supported commands
|
||||||
SUPPORTED_COMMANDS = [
|
SUPPORTED_COMMANDS = [
|
||||||
|
|
@ -44,7 +44,7 @@ def init(difficulty):
|
||||||
|
|
||||||
# Start lbc chell
|
# Start lbc chell
|
||||||
while True:
|
while True:
|
||||||
cmd = raw_input("[LBC] $ ")
|
cmd = raw_input("[BlockShell] $ ")
|
||||||
processInput(cmd)
|
processInput(cmd)
|
||||||
|
|
||||||
# Process input from LBC shell
|
# Process input from LBC shell
|
||||||
|
|
@ -86,6 +86,7 @@ def help(cmd):
|
||||||
print "Commands:"
|
print "Commands:"
|
||||||
print " dotx <transaction data> Create new transaction"
|
print " dotx <transaction data> Create new transaction"
|
||||||
print " allblocks Fetch all mined blocks in blockchain"
|
print " allblocks Fetch all mined blocks in blockchain"
|
||||||
|
print " getblock <block hash> Fetch information about particular block"
|
||||||
|
|
||||||
def throwError(msg):
|
def throwError(msg):
|
||||||
print "Error : " + msg
|
print "Error : " + msg
|
||||||
7
setup.py
7
setup.py
|
|
@ -7,13 +7,14 @@ setup(
|
||||||
author_email = "daxeelsoni44@gmail.com",
|
author_email = "daxeelsoni44@gmail.com",
|
||||||
url = "https://daxeel.github.io",
|
url = "https://daxeel.github.io",
|
||||||
description = ("A command line utility for learning Blockchain concepts."),
|
description = ("A command line utility for learning Blockchain concepts."),
|
||||||
py_modules=['bls'],
|
py_modules=['bscli'],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'Click',
|
'Click',
|
||||||
'colorama'
|
'colorama',
|
||||||
|
'flask'
|
||||||
],
|
],
|
||||||
entry_points='''
|
entry_points='''
|
||||||
[console_scripts]
|
[console_scripts]
|
||||||
blockshell=bls:cli
|
blockshell=bscli:cli
|
||||||
''',
|
''',
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,142 +1,133 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta charset="utf-8">
|
<meta name="description" content="Blockshell Web for Blockshell CLI">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="author" content="Daxeel Soni">
|
||||||
<meta name="description" content="">
|
<title>Blockshell | Block Data</title>
|
||||||
<meta name="author" content="">
|
<!-- Bootstrap core CSS -->
|
||||||
|
<link href="https://blackrockdigital.github.io/startbootstrap-bare/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<title>Blockshell | All Blocks</title>
|
<!-- Custom styles for this template -->
|
||||||
|
<style>
|
||||||
<!-- Bootstrap core CSS -->
|
body {
|
||||||
<link href="https://blackrockdigital.github.io/startbootstrap-bare/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
padding-top: 54px;
|
||||||
|
}
|
||||||
<!-- Custom styles for this template -->
|
@media (min-width: 992px) {
|
||||||
<style>
|
body {
|
||||||
body {
|
padding-top: 56px;
|
||||||
padding-top: 54px;
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
footer {
|
||||||
body {
|
position: fixed;
|
||||||
padding-top: 56px;
|
height: 40px;
|
||||||
}
|
bottom: 0;
|
||||||
}
|
width: 100%;
|
||||||
|
background-color: #e7e7e7;
|
||||||
footer {
|
padding-left: 80px;
|
||||||
position: fixed;
|
padding-top: 10px;
|
||||||
height: 40px;
|
color: #000;
|
||||||
bottom: 0;
|
}
|
||||||
width: 100%;
|
</style>
|
||||||
background-color: #e7e7e7;
|
</head>
|
||||||
padding-left: 80px;
|
<body>
|
||||||
padding-top: 10px;
|
<!-- Navigation -->
|
||||||
color: #000;
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
||||||
|
<div class="container">
|
||||||
}
|
<a class="navbar-brand" href="/">BlockShell</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
</style>
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
</head>
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
<body>
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#" data-toggle="modal" data-target="#exampleModal">About</a>
|
||||||
<!-- Navigation -->
|
</li>
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
</ul>
|
||||||
<div class="container">
|
</div>
|
||||||
<a class="navbar-brand" href="#">BlockShell</a>
|
</div>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
</nav>
|
||||||
<span class="navbar-toggler-icon"></span>
|
<!-- Page Content -->
|
||||||
</button>
|
<div class="container">
|
||||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
<div class="row">
|
||||||
<ul class="navbar-nav ml-auto">
|
<div class="col-lg-10" style="margin-top:20px;">
|
||||||
<li class="nav-item active">
|
<h2><span class="badge badge-primary">{{data['hash']}}</span></h2>
|
||||||
<a class="nav-link" href="#">All Blocks
|
<br>
|
||||||
<span class="sr-only">(current)</span>
|
<table class="table table-dark table-striped">
|
||||||
</a>
|
<tr>
|
||||||
</li>
|
<td><b>Height</b></td>
|
||||||
<li class="nav-item">
|
<td>{{data['index']}}</td>
|
||||||
<a class="nav-link" href="#">About</a>
|
</tr>
|
||||||
</li>
|
<tr>
|
||||||
|
<td><b>Timestamp</b></td>
|
||||||
</ul>
|
<td>{{data['timestamp']}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Data</b></td>
|
||||||
|
<td>{{data['data']}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Hash</b></td>
|
||||||
|
<td>{{data['hash']}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Previous Block Hash</b></td>
|
||||||
|
<td>{{data['previousHash']}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Nonce</b></td>
|
||||||
|
<td>{{data['nonce']}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p class="lead">
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2" style="margin-top:30px;">
|
||||||
|
<div class="card" style="width: 13rem;">
|
||||||
|
<img class="card-img-top" src="https://preview.ibb.co/e7SO4G/Logomakr_1rc0_PA.png" alt="Card image cap">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">About Project</h5>
|
||||||
|
<p class="card-text">Project BlockShell is created by with a vision to teach blockchain concepts to students and programmers.</p>
|
||||||
|
<a href="https://daxeel.github.io" target="_blank" class="btn btn-primary">Contact Creator</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- Modal -->
|
||||||
</nav>
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
<!-- Page Content -->
|
<div class="modal-content">
|
||||||
<div class="container">
|
<div class="modal-header">
|
||||||
<div class="row">
|
<h5 class="modal-title" id="exampleModalLabel">Blockshell Creator</h5>
|
||||||
<div class="col-lg-10" style="margin-top:20px;">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
<h2><span class="badge badge-primary">{{data['hash']}}</span></h2>
|
</button>
|
||||||
<br>
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
<table class="table table-dark table-striped">
|
<div class="row">
|
||||||
<tr>
|
<div class="col-md-4">
|
||||||
<td><b>Height</b></td>
|
<img class="card-img-top" src="https://image.ibb.co/nqzp4w/Daxeel_3.jpg" alt="Card image cap">
|
||||||
<td>{{data['index']}}</td>
|
<br><br>
|
||||||
</tr>
|
<a href="https://daxeel.github.io" target="_blank" class="btn btn-primary col-md-12">View Profile</a>
|
||||||
<tr>
|
</div>
|
||||||
<td><b>Timestamp</b></td>
|
<div class="col-md-8">
|
||||||
<td>{{data['timestamp']}}</td>
|
<h5 class="card-title">Daxeel Soni</h5>
|
||||||
</tr>
|
<p class="card-text">Young software engineer and with the passion of startup product building using tech skills. I am a co-lead of Facebook Developers Circle, Ahmedabad. A technology educator and speaker invited to various institutes and events such as IIM, Nirma, Google Developers Group, Facebook events etc.</p>
|
||||||
<tr>
|
</div>
|
||||||
<td><b>Data</b></td>
|
</div>
|
||||||
<td>{{data['data']}}</td>
|
</div>
|
||||||
</tr>
|
<div class="modal-footer">
|
||||||
<tr>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
<td><b>Hash</b></td>
|
</div>
|
||||||
<td>{{data['hash']}}</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<td><b>Previous Block Hash</b></td>
|
|
||||||
<td>{{data['previousHash']}}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><b>Nonce</b></td>
|
|
||||||
<td>{{data['nonce']}}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p class="lead">
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <footer class="fixed-bottom">
|
||||||
<div class="col-lg-2" style="margin-top:90px;">
|
<p>Project by <a href="https://daxeel.github.io" target="_blank">Daxeel Soni</a></p>
|
||||||
<div class="card" style="width: 13rem;">
|
</footer> -->
|
||||||
<img class="card-img-top" src="https://preview.ibb.co/e7SO4G/Logomakr_1rc0_PA.png" alt="Card image cap">
|
<!-- Bootstrap core JavaScript -->
|
||||||
<div class="card-body">
|
<script src="https://blackrockdigital.github.io/startbootstrap-bare/vendor/jquery/jquery.min.js"></script>
|
||||||
<h5 class="card-title">About Project</h5>
|
<script src="https://blackrockdigital.github.io/startbootstrap-bare/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||||
<p class="card-text">Project BlockShell is created by with a vision to teach blockchain concepts to students and programmers.</p>
|
</body>
|
||||||
<a href="https://daxeel.github.io" target="_blank" class="btn btn-primary">View Profile</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <footer class="fixed-bottom">
|
|
||||||
<p>Project by <a href="https://daxeel.github.io" target="_blank">Daxeel Soni</a></p>
|
|
||||||
</footer> -->
|
|
||||||
|
|
||||||
<!-- Bootstrap core JavaScript -->
|
|
||||||
<script src="https://blackrockdigital.github.io/startbootstrap-bare/vendor/jquery/jquery.min.js"></script>
|
|
||||||
<script src="https://blackrockdigital.github.io/startbootstrap-bare/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,114 +1,111 @@
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta charset="utf-8">
|
<meta name="description" content="Blockshell Web for Blockshell CLI">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="author" content="Daxeel Soni">
|
||||||
<meta name="description" content="">
|
<title>Blockshell | All Blocks</title>
|
||||||
<meta name="author" content="">
|
<!-- Bootstrap core CSS -->
|
||||||
|
<link href="https://blackrockdigital.github.io/startbootstrap-bare/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<title>Blockshell | All Blocks</title>
|
<!-- Custom styles for this template -->
|
||||||
|
<style>
|
||||||
<!-- Bootstrap core CSS -->
|
body {
|
||||||
<link href="https://blackrockdigital.github.io/startbootstrap-bare/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
padding-top: 54px;
|
||||||
|
}
|
||||||
<!-- Custom styles for this template -->
|
@media (min-width: 992px) {
|
||||||
<style>
|
body {
|
||||||
body {
|
padding-top: 56px;
|
||||||
padding-top: 54px;
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
footer {
|
||||||
body {
|
position: fixed;
|
||||||
padding-top: 56px;
|
height: 40px;
|
||||||
}
|
bottom: 0;
|
||||||
}
|
width: 100%;
|
||||||
|
background-color: #e7e7e7;
|
||||||
footer {
|
padding-left: 80px;
|
||||||
position: fixed;
|
padding-top: 10px;
|
||||||
height: 40px;
|
color: #000;
|
||||||
bottom: 0;
|
}
|
||||||
width: 100%;
|
</style>
|
||||||
background-color: #e7e7e7;
|
</head>
|
||||||
padding-left: 80px;
|
<body>
|
||||||
padding-top: 10px;
|
<!-- Navigation -->
|
||||||
color: #000;
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
||||||
|
<div class="container">
|
||||||
}
|
<a class="navbar-brand" href="#">BlockShell</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
</style>
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
</head>
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
<body>
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#" data-toggle="modal" data-target="#exampleModal">About</a>
|
||||||
<!-- Navigation -->
|
</li>
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
</ul>
|
||||||
<div class="container">
|
</div>
|
||||||
<a class="navbar-brand" href="#">BlockShell</a>
|
</div>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
</nav>
|
||||||
<span class="navbar-toggler-icon"></span>
|
<!-- Page Content -->
|
||||||
</button>
|
<div class="container">
|
||||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
<div class="row">
|
||||||
<ul class="navbar-nav ml-auto">
|
<div class="col-lg-10" style="margin-top:20px;">
|
||||||
<li class="nav-item active">
|
<h1><span class="badge badge-primary">Latest Blocks</span></h1>
|
||||||
<a class="nav-link" href="#">All Blocks
|
{% for item in data -%}
|
||||||
<span class="sr-only">(current)</span>
|
<div class="alert alert-success" role="alert">
|
||||||
</a>
|
<a href="/block/{{item.hash}}" target="_blank">{{ item.hash }}</a>
|
||||||
</li>
|
</div>
|
||||||
<li class="nav-item">
|
{%- endfor %}
|
||||||
<a class="nav-link" href="#">About</a>
|
<p class="lead">
|
||||||
</li>
|
</p>
|
||||||
|
</div>
|
||||||
</ul>
|
<div class="col-lg-2" style="margin-top:80px;">
|
||||||
</div>
|
<div class="card" style="width: 13rem;">
|
||||||
</div>
|
<img class="card-img-top" src="https://preview.ibb.co/e7SO4G/Logomakr_1rc0_PA.png" alt="Card image cap">
|
||||||
</nav>
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">About Project</h5>
|
||||||
<!-- Page Content -->
|
<p class="card-text">Project BlockShell is created by with a vision to teach blockchain concepts to students and programmers.</p>
|
||||||
<div class="container">
|
<a href="https://daxeel.github.io" target="_blank" class="btn btn-primary">Contact Creator</a>
|
||||||
<div class="row">
|
</div>
|
||||||
<div class="col-lg-10" style="margin-top:20px;">
|
</div>
|
||||||
|
</div>
|
||||||
<h1><span class="badge badge-primary">Latest Blocks</span></h1>
|
|
||||||
{% for item in data -%}
|
|
||||||
<div class="alert alert-success" role="alert">
|
|
||||||
<a href="/block/{{item.hash}}" target="_blank">{{ item.hash }}</a>
|
|
||||||
</div>
|
</div>
|
||||||
{%- endfor %}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p class="lead">
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Modal -->
|
||||||
<div class="col-lg-2" style="margin-top:80px;">
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
<div class="card" style="width: 13rem;">
|
<div class="modal-dialog" role="document">
|
||||||
<img class="card-img-top" src="https://preview.ibb.co/e7SO4G/Logomakr_1rc0_PA.png" alt="Card image cap">
|
<div class="modal-content">
|
||||||
<div class="card-body">
|
<div class="modal-header">
|
||||||
<h5 class="card-title">About Project</h5>
|
<h5 class="modal-title" id="exampleModalLabel">Blockshell Creator</h5>
|
||||||
<p class="card-text">Project BlockShell is created by with a vision to teach blockchain concepts to students and programmers.</p>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<a href="https://daxeel.github.io" target="_blank" class="btn btn-primary">View Profile</a>
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<img class="card-img-top" src="https://image.ibb.co/nqzp4w/Daxeel_3.jpg" alt="Card image cap">
|
||||||
|
<br><br>
|
||||||
|
<a href="https://daxeel.github.io" target="_blank" class="btn btn-primary col-md-12">View Profile</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<h5 class="card-title">Daxeel Soni</h5>
|
||||||
|
<p class="card-text">Young software engineer and with the passion of startup product building using tech skills. I am a co-lead of Facebook Developers Circle, Ahmedabad. A technology educator and speaker invited to various institutes and events such as IIM, Nirma, Google Developers Group, Facebook events etc.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- <footer class="fixed-bottom">
|
||||||
</div>
|
<p>Project by <a href="https://daxeel.github.io" target="_blank">Daxeel Soni</a></p>
|
||||||
|
</footer> -->
|
||||||
</div>
|
<!-- Bootstrap core JavaScript -->
|
||||||
</div>
|
<script src="https://blackrockdigital.github.io/startbootstrap-bare/vendor/jquery/jquery.min.js"></script>
|
||||||
|
<script src="https://blackrockdigital.github.io/startbootstrap-bare/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||||
<!-- <footer class="fixed-bottom">
|
</body>
|
||||||
<p>Project by <a href="https://daxeel.github.io" target="_blank">Daxeel Soni</a></p>
|
|
||||||
</footer> -->
|
|
||||||
|
|
||||||
<!-- Bootstrap core JavaScript -->
|
|
||||||
<script src="https://blackrockdigital.github.io/startbootstrap-bare/vendor/jquery/jquery.min.js"></script>
|
|
||||||
<script src="https://blackrockdigital.github.io/startbootstrap-bare/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
6
web.py
6
web.py
|
|
@ -2,12 +2,8 @@ from flask import Flask, render_template, jsonify
|
||||||
import json
|
import json
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
# Index endpoint
|
|
||||||
@app.route('/')
|
|
||||||
def hello_world():
|
|
||||||
return "Blockshell"
|
|
||||||
|
|
||||||
@app.route('/allblocks')
|
@app.route('/')
|
||||||
def blocks():
|
def blocks():
|
||||||
f = open("chain.txt", "r")
|
f = open("chain.txt", "r")
|
||||||
data = json.loads(f.read())
|
data = json.loads(f.read())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue