Skip to content

Instantly share code, notes, and snippets.

@JackBekket
JackBekket / ecverify.sol
Created January 16, 2017 23:55 — forked from axic/ecverify.sol
Ethereum ECVerify
//
// The new assembly support in Solidity makes writing helpers easy.
// Many have complained how complex it is to use `ecrecover`, especially in conjunction
// with the `eth_sign` RPC call. Here is a helper, which makes that a matter of a single call.
//
// Sample input parameters:
// (with v=0)
// "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
// "0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf200",
// "0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a"
/* A contract to store goods with escrowed funds. */
/* Deployment:
Contract:
Owner: seller
Last address: dynamic
ABI: [{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"escrows","outputs":[{"name":"buyer","type":"address"},{"name":"lockedFunds","type":"uint256"},{"name":"frozenFunds","type":"uint256"},{"name":"frozenTime","type":"uint64"},{"name":"count","type":"uint16"},{"name":"buyerNo","type":"bool"},{"name":"sellerNo","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"count","outputs":[{"name":"","type":"uint16"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_dataInfo","type":"string"},{"name":"_version","type":"uint256"}],"name":"cancel","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"seller","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"freezePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"functio
/* A contract to store goods with escrowed funds. */
/* Deployment:
Contract:
Owner: seller
Last address: dynamic
ABI: [{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"escrows","outputs":[{"name":"buyer","type":"address"},{"name":"lockedFunds","type":"uint256"},{"name":"frozenTime","type":"uint256"},{"name":"frozenFunds","type":"uint256"},{"name":"buyerNo","type":"uint256"},{"name":"sellerNo","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"count","outputs":[{"name":"","type":"uint16"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"datainfo","type":"string"},{"name":"_version","type":"uint256"}],"name":"cancel","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"seller","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"freezePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inpu
@JackBekket
JackBekket / Rinkeby
Created May 25, 2017 22:11
Rinkeby testnet address
0xFE36B232D4839FAe8751fa10768126ee17A156c1
[
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "owners",
https://www.reddit.com/user/sambekket - is my real account on Reddit
@JackBekket
JackBekket / pubsub_basic_test.go
Created June 19, 2019 14:21
Libp2p basic pubsub test
package main
import (
"bytes"
"context"
"fmt"
"time"
libp2p "github.com/libp2p/go-libp2p"
host "github.com/libp2p/go-libp2p-host"
@JackBekket
JackBekket / хакатон профунктора (Spork).md
Last active May 2, 2020 19:20
Spork - автоматический поиск разработчиков с опытом работы в стеке проекта

Spork - поиск разработчиков для тим-лидов

tl:dr - Поиск разработчиков для open-source проектов (используя Github)

"Найди разрабов с опытом работы в стеке твоего проекта"

User story -

  1. выбери свой репозиторий
  2. выбери стек
  3. найди всех разработчиков, которые использовали этот стек в своих проектах
@JackBekket
JackBekket / cryptofinance.gs
Created September 9, 2021 22:56
Google script which parce and get info about balances and cryptocurrencies prices
/**
* CODE LICENSED UNDER THE CREATIVE COMMON BY-NC-ND LICENSE.
* https://creativecommons.org/licenses/by-nc-nd/4.0/
*
* Copyright 2019 by cryptofinance.ai
*/
/**
* @OnlyCurrentDoc
@JackBekket
JackBekket / truffle_standard_test.js
Created October 30, 2021 16:23
test js asyncronous notaion example
// General notaion (any approach):
// говорим тесту, что мы хотим использовать артефакт контракта MST (mst.json из папки build)
const MST = artifacts.require('MST');
// говорим, что файл mst.json это смарт контракт, и что мы хотим использовать аккаунты в этом тесте
contract('MST', accounts => {
// before -- перед
// говорим, что перед прогоном теста мы хотим быть уверены, что MST контракт уже задеплоен, и что мы хотим обращаться к этому контракту