Skip to content

Instantly share code, notes, and snippets.


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)',

run python3 with xsnap in $PATH

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

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)

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:

Uniswap Info: Contract Address 0xa0246c9032bc3a600820415ae600c6388619a14d | Etherscan:

Harvest Finance:

The Most Trusted Smart Contract Audit:

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, ... }

Snapshot test sketch

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

tested on linux with moddable version 54d8e94710ed6f8c310f046c4fbc83c967ccd346

Run as usual

# 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