Skip to content

Instantly share code, notes, and snippets.

View bonustrack's full-sized avatar

Less bonustrack

View GitHub Profile
@perfectmak
perfectmak / abi.json
Created June 1, 2022 01:06
Starknet Code to interact with Poster Contract on Chain
[
{
"data": [
{
"name": "address",
"type": "felt"
},
{
"name": "content_len",
"type": "felt"
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.7.0 <0.8.0;
contract CongressRegistry {
// The first key is the delegator and the second key a id.
// The value is the address of the delegate
mapping (address => address) public delegation;
mapping (address => uint256) public expiration;
mapping (address => bytes) public affiliation;
[
{
"name": "DAppNodeDAO staked in Unipool rewards contracts multichain",
"strategy": {
"name": "multichain",
"params": {
"strategies": [
{
"name": "unipool-univ2-lp",
"network": 1,
@djmaze
djmaze / OrbitTest.vue
Last active December 19, 2021 17:22
Using OrbitDB as a reactive store with VueJS
<template>
<div>
<button @click="addItem('wut')">count is: {{ count }}</button>
<div
v-for="result in results"
:key="result.id"
@click="removeItem(result.id)"
>
{{ result.id }}
@tonyofbyteball
tonyofbyteball / oscript2.md
Last active June 11, 2020 11:46
Oscript 2.0

Changes in Oscript 2.0

Functions

$f = ($x) => {
	 $a = var['a'];
	 $x * $a
};

// one-line syntax for functions that have only one expression
@tonyofbyteball
tonyofbyteball / gist:ca071b74babdb368c0435fdff94f6858
Created April 20, 2020 23:30
Uniswap-like market maker with single-token contributions
{
init: `{
$asset = 'n9y3VomFeWFeZZ2PcSEcmyBb/bI7kzZduBJigNetnkY=';
$mm_asset = var['mm_asset'];
}`,
messages: {
cases: [
{ // define share asset
if: `{ trigger.data.define AND !$mm_asset }`,
messages: [
@BjornvdLaan
BjornvdLaan / BLSExample.sol
Last active April 10, 2023 07:49
Verification of BLS signatures and BGLS aggregate signatures in Ethereum
pragma solidity ^0.4.14;
/*
Example of how to verify BLS signatures and BGLS aggregate signatures in Ethereum.
Signatures are generated using https://github.com/Project-Arda/bgls
Code is based on https://github.com/jstoxrocky/zksnarks_example
*/
contract BLSExample {
<template>
<Page class="page">
<ActionBar class="action-bar" title="Miyha">
<NavigationButton text="Menu" icon="res://ic_list_black_24dp" @tap="toggleDrawer" />
<StackLayout orientation="horizontal">
<Image src="res://icon" width="40" height="40" verticalAlignment="center" />
<Label text="iyha" fontSize="24" verticalAlignment="center" />
</StackLayout>
</ActionBar>
<SideDrawer>
@bonustrack
bonustrack / account.json
Last active September 25, 2016 07:45
Steem Script: An Open JSON Standard for Trusted Workflows
{
"version": "0.0.1",
"dns": {"records":[["@","CNAME","steem.io"]]}},
"profile": {
"name": "Ned Scott",
"email": "ned@steem.io",
"birthday": "12/31/1999",
"gender": "male",
"about": "CEO and Co-founder at Steemit",
"first_name": "Ned",