Skip to content

Instantly share code, notes, and snippets.

View chebykin's full-sized avatar

Nikita Chebykin chebykin

View GitHub Profile
@chebykin
chebykin / verify.js
Last active May 4, 2019 12:38
Verify contracts using Blockscout API
const axios = require('axios');
const assert = require('assert');
axios.interceptors.request.use(request => {
console.log('Starting Request', request);
return request;
});
const base = 'https://explorer.testnet.galtproject.io';
const COMPILER_VERSION = 'v0.5.7+commit.6da8b019';
pragma solidity >=0.4.22 <0.6.0;
// Reference implementation at
// https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20.sol
contract ERC20HighAssembly {
// uint256 private _totalSupply;
// mapping(address => uint256) private _balances;
constructor() public {
@chebykin
chebykin / another-fomo3d.sol
Created July 23, 2018 17:43
another fomo3d (not proven)
pragma solidity ^0.4.24;
/**
* @title -FoMo-3D v0.7.1
* ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐
* │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐
* ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘
* _____ _____
* (, / /) /) /) (, / /) /)
* ┌─┐ / _ (/_ // // / _ // _ __ _(/
* ├─┤ ___/___(/_/(__(_/_(/_(/_ ___/__/_)_(/_(_(_/ (_(_(_
@chebykin
chebykin / fomo3d.sol
Created July 23, 2018 17:22
fomo3d sources (not verified)
pragma solidity ^0.4.20;
/*
* Team JUST presents..
* ===================================*
* _____ ____ _ _ ____ *
* | ___/ / __ \ / \ / \ / __ \ *
* | |___ | | | |/ \/ \| | | | *
* | __/ | | | || |\ /| || | | | *
* | | | |__| || | \/ | || |__| | *
class ETH { }
class Galt { }
class Space { }
class Universe {
dao: DAO;
eth: ETH;
constructor() {
@chebykin
chebykin / transfer.sol
Last active May 30, 2018 12:38
Transfer asset
pragma solidity ^0.4.11;
contract Test {
mapping (address => address[]) owner2assets;
mapping (address => address) asset2owner;
event ConstructorCall(string);
function Test () public {
owner2assets[msg.sender] = [0x661d576d9486cb7699648518a364d95301ecea6d,
0x3e11f1942810f0f64325e29fba754c34cb80a5a5];
{
"name": "PoaLoadTest",
"engine": {
"authorityRound": {
"params": {
"stepDuration": 4,
"blockReward": "0xDE0B6B3A7640000",
"maximumUncleCountTransition": 0,
"maximumUncleCount": 0,
"validators": {
@chebykin
chebykin / check_is_contract.sol
Created February 9, 2018 14:34
Check whether ethereum address is a contract or not
pragma solidity ^0.4.18;
// https://stackoverflow.com/a/40939341/3380173
contract Check {
function isContract(address addr) view public returns (bool) {
uint size;
assembly { size := extcodesize(addr) }
return size > 0;
}
@chebykin
chebykin / recover_ethereum_password.py
Created December 25, 2017 11:08
Recover Ethereum Password For Key JSON File (Python 3)
from ethereum.tools.keys import decode_keystore_json #keys.py from pyethereum, we only want the decode_keystore_json function
import json
import itertools
import sys
import traceback
from joblib import Parallel, delayed
print(sys.version)
class PasswordFoundException(Exception):
0xEcD4466470De611a4e8e9945a32c3f1cc394BeB4