Skip to content

Instantly share code, notes, and snippets.

CoopHive x Filecoin Hackathon

Problem Statement

Web3 agreements often require complex coordination between on-chain assets and off-chain services. While blockchain provides powerful primitives for asset exchange, managing conditional agreements that involve real-world data or services remains challenging. This is especially true for decentralized storage, where proof of storage and data availability are critical but complex to integrate into smart contracts.

Alkahest provides a modular framework for building and executing conditional agreements on EVM-compatible chains, using EAS attestations as a foundational primitive. What's currently missing are specialized integrations for Filecoin ecosystem services that would enable conditional agreements based on storage proofs, retrieval guarantees, and other Filecoin-native capabilities.

We're looking for innovative integrations that connect Alkahest's agreement framework with Filecoin's storage capabilities, creating new possibilities for storage markets,

vs:0:"valid_solutions.txt"
vg:0:"valid_guesses.txt"
ch:{e-^(,/(=x@>e)@'<'=y)?<>e:x=y} /check::guess->solution->list (-1 b, 0 y, 1 g)
en:{-+/`ln[d]*'d:f%+/f:#'=x} /entropy::list->number
bg:{x@*>en'x ch/:\:y} /best_guess::guesses->solutions->string
ma:{[g;s;r]s@&r~/:g ch/:s} /matches::guess->solutions->response->string list
pl0:{ /solver that always guesses valid solutions
s:"raise"
@mlegls
mlegls / cli.k
Last active January 19, 2023 21:46
\d cli
(あ):{$[1~x;`$'x_y;`$x_y]}
p1:{ /parse 1
ta:"-"~*t:*|x; ha:"-"~*h:*x
d:{[x;h;t;ta]$[ta;(xあh)!1;(xあh)!`$t]}[;h;t;ta]
:$["--"~2#h;d 2;ha;d 1;ha|ta;`!`;(`$t)!`]
}
p:{x,y}/2p1': /parse all
a:{(^:)_(!l)[&^.l:p x]} /args
f:{(p x)_/`,a x} /flags
@mlegls
mlegls / http.k
Last active January 18, 2023 19:29
/ ngn/k
\d http
s:{$[`C=@x;x;$x]} / string
qs:{"'",(s x),"'"} / quote string
cp:{$[1~#p:$x;"-",p;"--",p]} / command param
c:{" "," "/(cp'!x),'" ",'qs'.x} / cp list
q:{"?","&"/($!x),'"=",'s'.x}. / dict -> qstring
gr:{."\\curl -Gs ",qs x} / GET raw
g:{gr x,(q y)} / GET[url;qs]
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=/opt/homebrew/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
#!/usr/bin/env bash
set -x
# ====== Variables =============================
declare -A gaps
declare -A color
gaps["top"]="4"
# Program shortcuts
shift + cmd - q : open -a "/Applications/qutebrowser.app"
shift + cmd - w : open -a "/Applications/kitty.app"
# Show system statistics
# fn + lalt - 1 : "${HOME}"/.config/yabai/scripts/show_cpu.sh
# fn + lalt - 2 : "${HOME}"/.config/yabai/scripts/show_mem.sh
# fn + lalt - 3 : "${HOME}"/.config/yabai/scripts/show_bat.sh
# fn + lalt - 4 : "${HOME}"/.config/yabai/scripts/show_disk.sh
# fn + lalt - 5 : "${HOME}"/.config/yabai/scripts/show_song.sh
@mlegls
mlegls / contracts...Lootbox.sol
Created September 16, 2021 19:07
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
pragma solidity >=0.8.0 <0.9.0;
/**
* @title Lootbox
* @dev Matrix lootbox contract
*/
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
@mlegls
mlegls / contracts...Lootbox.sol
Created September 16, 2021 19:06
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
pragma solidity >=0.8.0 <0.9.0;
/**
* @title Lootbox
* @dev Matrix lootbox contract
*/
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
@mlegls
mlegls / contracts...Lootbox.sol
Created September 16, 2021 05:17
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
pragma solidity >=0.8.0 <0.9.0;
/**
* @title Lootbox
* @dev Matrix lootbox contract
*/
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
// import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol";