1
0

Working on state download

This commit is contained in:
Jon Michael Aanes 2025-04-04 00:08:38 +02:00
parent a1c0771298
commit f659047f35

View File

@ -1,6 +1,7 @@
import flask
import pbc_client
import dataclasses
import requests_cache
HTML_INDEX = """
@ -11,6 +12,12 @@ HTML_INDEX = """
<head>
<style>
html {
background-color: #222;
color: white;
font-family: sans;
}
body {
width: 80%;
margin: auto;
@ -21,6 +28,7 @@ body {
grid-template-columns: repeat(10, 1fr);
justify-items: center;
text-align: center;
gap: 4em 1em;
}
.notamon h2, h3 {
@ -66,10 +74,18 @@ TEST_NOTAMON = Notamon(
species_name = 'Mudkip',
)
ADDRESS_NFTS = ''
ADDRESS_ASSETS = ''
SESSION = requests_cache.CachedSession()
def determine_notamons():
client = pbc_client.PbcClient(SESSION, pbc_client.HOSTNAME_TESTNET)
asset_contract_state = client.get_contract_state(ADDRESS_ASSETS)
return [TEST_NOTAMON for i in range(100)]
@app.route("/")
def hello_world():
notamons = [TEST_NOTAMON for i in range(100)]
return flask.render_template_string(HTML_INDEX, notamons = notamons)
return flask.render_template_string(HTML_INDEX, notamons = determine_notamons())