Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Connolly dckc

View GitHub Profile
View borrow-from-vault.js
/* eslint-disable no-await-in-loop */
// @ts-check
import { E } from '@endo/eventual-send';
import { AmountMath } from '@agoric/ertp';
const createVault = async (
vfPubP,
collaterals,
deposit,
debt,
View my token on the AMM log
Welcome to Agoric!
command[0]
1+1
history[0]
2
command[1]
home.LOADING
history[1]
["agoric","wallet"]
command[2]
View loadgen-parts.dot
digraph G {
subgraph cluster_client {
label = "client machine"
loadGen -> ag_solo
loadGen [ label="loadGen\n(node.js)"]
}
ag_solo -> RPC
@dckc
dckc / docker-compose.yml
Last active Jul 18, 2021
genode goa in docker
View docker-compose.yml
version: "3"
# depends on /usr/local/genode/tool/19.05
# https://genode.org/download/tool-chain
# usage:
# docker-compose run cpp-ide bash
# ref:
# https://genodians.org/nfeske/2019-11-25-goa
@dckc
dckc / xs-all-vats.md
Last active Apr 23, 2021
XS all the Vats!
View xs-all-vats.md
Every 1.0s: pstree --arguments --show-pids --hide-threads 7822                                   jambox: Thu Apr 22 20:53:57 2021

bash,7822
  `-node,25408 /home/connolly/projects/agoric/agoric-sdk/packages/agoric-cli/bin/agoric --sdk start local-chain
      `-node,25439 /home/connolly/projects/agoric/agoric-sdk/packages/cosmic-swingset/bin/../lib/chain-entrypoint.js start...
          |-xsnap,25488 v1:board -l 10000000
          |-xsnap,25489 v11:bootstrap -l 10000000
          |-xsnap,25490 v2:host -l 10000000
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