Skip to content

Instantly share code, notes, and snippets.

View stechu's full-sized avatar
🎯
Focusing

Shumo Chu stechu

🎯
Focusing
View GitHub Profile
@stechu
stechu / risc-zero-stark-to-snark-prover_attestation.log
Created April 11, 2024 19:22
Attestation for RISC Zero STARK-to-SNARK Prover MPC Phase 2 Trusted Setup ceremony
Hey, I'm stechu-720571 and I have contributed to the RISC Zero STARK-to-SNARK Prover MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (stark_verify)
Contributor # 53
Contribution Hash: df26989f 5e671597 14ed0023 a9852c96
be241562 9fa82c56 140860d1 a7e86590
b02c3449 13729548 8f370ca9 69ba4738
66d4d0c3 cebb302f e92b5590 190b63bd
@stechu
stechu / nocturne-v1_attestation.log
Created October 26, 2023 02:48
Attestation for nocturne-v1 MPC Phase 2 Trusted Setup ceremony
Hey, I'm stechu-720571 and I have contributed to the nocturne-v1 MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (canonaddrsigcheck)
Contributor # 22
Contribution Hash: 23792874 1a9d0673 68aa25c9 8170258e
c15afd90 8e8a53c6 7a4a1879 80ad46d7
f87d17bd 172d13c6 bf418777 9de568af
9871301f f3636ec7 06122bc2 7696e968
Address of Sender/Delgator: B767GZZJI4YEDKZU62INJGFIGSWQHDIH2HP6NRSSWFTFUYMCNU5LN2M53A
5113319
5113000
5114000
Transaction ID: 5UZ4WQEUCF4P5FC2NGDSAREXS3OVVVKBJ2XRU533VYQV7XLIP3WQ
#!/usr/bin/env python3
from pyteal import *
import uuid, params, base64
from algosdk import algod, transaction, account, mnemonic
from periodic_payment import periodic_pay_escrow
#--------- compile & send transaction using Goal and Python SDK ----------
teal_source = periodic_pay_escrow.teal()
txn TypeEnum
int 1
==
txn Fee
int 1000
<=
&&
txn CloseRemainderTo
global ZeroAddress
==
periodic_pay_close = And(Txn.close_remainder_to() == tmpl_rcv,
Txn.receiver() == Global.zero_address(),
Txn.first_valid() >= tmpl_timeout,
Txn.amount() == Int(0))
periodic_pay_transfer = And(Txn.close_remainder_to() == Global.zero_address(),
Txn.receiver() == tmpl_rcv,
Txn.amount() == tmpl_amt,
Txn.first_valid() % tmpl_period == Int(0),
Txn.last_valid() == tmpl_dur + Txn.first_valid(),
Txn.lease() == tmpl_x)
periodic_pay_core = And(Txn.type_enum() == Int(1),
Txn.fee() <= tmpl_fee)
@stechu
stechu / periodic_payment.py
Last active February 26, 2020 13:14
Write a Periodic Payment Contract in PyTeal
#!/usr/bin/env python3
from pyteal import *
#template variables
tmpl_fee = Int(1000)
tmpl_period = Int(1000)
tmpl_dur = Int(1000)
tmpl_x = Bytes("base64", "y9OJ5MRLCHQj8GqbikAUKMBI7hom+SOj8dlopNdNHXI=")
tmpl_amt = Int(2000)