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