Skip to content

Instantly share code, notes, and snippets.

View killerstorm's full-sized avatar

Alex Mizrahi killerstorm

View GitHub Profile
@killerstorm
killerstorm / belief_market_summary.md
Created November 3, 2025 11:22
Belief market summary

Belief Markets — Quick Summary (main ideas only)

  • Core concept: A belief market lets people “bet” on answers to questions that may never be cleanly or universally resolvable. Instead of a single objective resolution, outcomes are virtually resolved by consensus within subsets of participants, and different factions can persist side-by-side.

  • How it differs from prediction markets:

    • Prediction markets require questions that will resolve unambiguously at a known time; payouts hinge on that resolution.
    • Belief markets accept inherently ambiguous, value-laden, or far-future questions. Positions can continue to have value even without universal agreement.
  • Mechanism intuition (non-technical):

Okay, let's break down that line of code and its significance within the useLoadTxHistory.ts file. We'll cover the method itself, the parameters used, what the returned logs represent, and some areas for further investigation.

Detailed Explanation of the Code

  • safeContract.queryFilter(safeContract.filters.ExecutionSuccess(), 0, 'latest')

    • safeContract: This is an instance of an ethers.js Contract object (specifically, a Gnosis_safe contract instance). It represents a connection to a specific Safe smart contract deployed on the blockchain, as defined in eternalsafe/src/utils/safe-versions.ts.
      • How safeContract is obtained: The safeContract is derived by combining the Safe's address, the Safe's version as retrieved from the Safe Info from the Safe Gateway, and the current web3 provider from /src/hooks/wallets/web3.ts. The version will help retrieve the specific ABI from /src/utils/safe-versions.ts. This all happens in `eternalsafe/src/hooks/loadables/use
contract EthGrowthToken {
uint256 ethBalance = 0;
uint constant depositFeePc = 1;
uint constant withdrawFeePc = 1;
// Following function implement growth logic:
// ether can be converted to and from tokens according to a current price which
// is calculated as (ethBalance / totalTokens), however we charge deposit
@killerstorm
killerstorm / chromiapyclientexample.ipynb
Last active January 22, 2025 00:16
ChromiaPyClientExample.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@killerstorm
killerstorm / gtv.py
Last active November 26, 2024 14:38
postchain python client, AI generated
from typing import Dict, List, Union, Any, Tuple
from enum import Enum
import asn1
# Define GTV types
RawGtv = Union[None, bool, bytes, str, int, Dict[str, Any], List[Any]]
DictPairTuple = Tuple[str, Any]
class GTVType(Enum):
NULL = 0
;; -*- lexical-binding: t; -*-
(require 'url)
(defun llm (command)
(interactive "sWhat: ")
(let* ((start (if (use-region-p) (region-beginning) (point)))
(end (if (use-region-p) (region-end) (point)))
(text-before (buffer-substring-no-properties (point-min) start))
(selection (buffer-substring-no-properties start end))
(text-after (buffer-substring-no-properties end (point-max))))

Hello. I want you to emulate SHRDLU behavior. We start with the following initial state:

objects:
  - id: B1
    type: BLOCK
    position: [110, 100, 0]
    size: [100, 100, 100]
    color: RED
  - id: B2
import requests
import yaml
from typing import List, Dict, Optional
class PlanItem:
def __init__(self, id: str, description: str, status: str, subtasks: List['PlanItem'] = None):
self.id = id
self.status = status
self.description = description
import re
from typing import List, Union, Dict, Optional
import yaml
import openai
import requests
MARKER_PREFIX = "///"
class CodeFragment:
def __init__(self, marker: str, description: str, content: str):
override fun createSpecialOperations(position: SpecialTransactionPosition, bctx: BlockEContext): List<OpData> {
if (position == SpecialTransactionPosition.Begin) {
val retval = mutableListOf<OpData>()
val rqs = this.module.query(bctx, "get_auth_requests",
GtvDictionary.build(mapOf()))
for (r in rqs.asArray()) {
val rString = r.asString()
val res = pendingRequests[rString]