Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Connolly dckc

View GitHub Profile
View rev-issuer-works.json
[
{
"ExprPar": [
[
"got purse"
],
[
"got issuer"
],
[
View zoe-err.txt
$ npx ava
tokenized video
Rejected promise returned by test. Reason:
Error {
message: '"brand" not found: (an object)',
}
View README.md

run python3 go.py with xsnap in $PATH

Observe that the 70th iteration is 10x slower than the 1st: ~0.5sec vs ~0.05sec.

View go.py
import logging
import re
log = logging.getLogger(__name__)
def main(cwd, check_call):
scripts = cwd.glob('output/deliver-*.js')
byNum = {deliveryNum(str(s)): s for s in scripts}
# log.debug('scripts %s', byNum)
View harvest-incident.md

my tabs:

zooko on Twitter: "@QwQiao @kate_sills Have you looked at the Harvest contract? I'm wondering about Zoe in particular, but if Zoe wouldn't have fit, I'm wondering about the general notion of ocap security-by-construction wrt the Harvest failure…" / Twitter: https://twitter.com/zooko/status/1320791019278028803

Uniswap Info: https://info.uniswap.org/pair/0x514906fc121c7878424a5c928cad1852cc545892 Contract Address 0xa0246c9032bc3a600820415ae600c6388619a14d | Etherscan: https://etherscan.io/address/0xa0246c9032bc3a600820415ae600c6388619a14d

Harvest Finance: https://harvest.finance/faq

The Most Trusted Smart Contract Audit: https://haechi.io/#main

View xsnap-harden.md
connolly@jambox:~/projects/agoric/agoric-sdk/packages/xs-vat-worker/build-xsnap$ make  run-xsnap
xsnap -m output/build.js
about to harden top stuf...
enqueue(val, undefined)
enqueue(val, unknown.0)
enqueue(val, unknown.1)
enqueue(val, unknown.2)
enqueue(val, unknown.length)
View makefile
#
# Copyright (c) 2016-2017 Moddable Tech, Inc.
#
# This file is part of the Moddable SDK Tools.
#
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
View result.rho
new out, Result, REVAddress(`rho:rchain:REVAddress`) in {
/**
* The RChain genesis contracts typically use
* (true, T) \/ (false, Problem) to indicate
* a success or failure outcome.
* We abbreviate this as Result<T> (cf. rust).
*
* And we use `Problem` for { "message": String, ... }
*/
View README.md

Snapshot test sketch

see especially the // snapshot worker? comments in main.js.

tested on linux with moddable version 54d8e94710ed6f8c310f046c4fbc83c967ccd346

Run as usual

View scan_transactions.py
# pip install pyrchain
# pip install requests
from rchain.client import RClient
from rchain.param import testnet_param
from itertools import accumulate
from datetime import datetime
import requests
step = 50