Skip to content

Instantly share code, notes, and snippets.

View Dominik1999's full-sized avatar

Dominik Schmid Dominik1999

View GitHub Profile
use miden_objects::{
accounts::{AccountId, ACCOUNT_ID_FUNGIBLE_FAUCET_ON_CHAIN, ACCOUNT_ID_FUNGIBLE_FAUCET_ON_CHAIN_2},
assembly::ProgramAst,
assets::{Asset, FungibleAsset},
notes::{NoteScript, Note},
transaction::TransactionArgs,
Felt,
utils::collections::BTreeMap,
Word, ZERO,
};

Running the node

You need to run the blockchain locally, since we are updating ours today and always restart

  • Clone miden-node (https://github.com/0xPolygonMiden/miden-node) and checkout the branch igamigo-export-seed
  • Install the node by typing cargo install --features testing --path node (this assumes you have Rust and the necessary libraries installed)
  • Copy the miden.toml from ./node/miden.toml to the root directory
  • Make the genesis file miden-node --make-genesis (We need to have something in the blockchain to be able to transact, the genesis block contains a faucet and a normal account)
  • Then, run the Node miden-node start
[package]
name = "min_example"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
miden = "0.3.0"
miden-core = "0.3.0"
# GAME OF LIFE - and we can prove it
# Provide initial configuaration in *.input {"stack_init": ["0" | "1" ] * 16 }
# Rules:
# 1. Any live cell with two or three live neighbours survives.
# 2. Any dead cell with three live neighbours becomes a live cell.
# 3. All other live cells die in the next generation. Similarly, all other dead cells stay dead.
# We store the initial configuration
proc.storecellsn.16
loc_store.0 drop
function bla() {
var domain = "https://bscscan.com/chart/etherprice?output=csv";
var options = {
'headers' : {
'User-Agent' : 'curl/7.54.0',
}
};
var data = Utilities.parseCsv(UrlFetchApp.fetch(domain, options))
}
# import libraries
from lxml import etree
from requests_html import HTMLSession
from datetime import datetime
from bs4 import BeautifulSoup
# create an HTML Session object
session = HTMLSession()
# Use the object above to connect to needed webpage
# import libraries
from lxml import etree
from requests_html import HTMLSession
from datetime import datetime
from bs4 import BeautifulSoup
# create an HTML Session object
session = HTMLSession()
# Use the object above to connect to needed webpage
# -*- coding: utf-8 -*- #
"""This provides the DuneAnalytics class implementation"""
from requests import Session
# --------- Constants --------- #
BASE_URL = "https://dune.xyz"
GRAPH_URL = 'https://core-hsr.duneanalytics.com/v1/graphql'
# import libraries
import csv
import os.path
import json
from requests_html import HTMLSession
from datetime import datetime
from bs4 import BeautifulSoup
# create an HTML Session object
# import libraries
from requests_html import HTMLSession
import csv
from datetime import datetime
import os.path
# create an HTML Session object
session = HTMLSession()
# Use the object above to connect to needed webpage
resp = session.get("https://l2fees.info/")