Skip to content

Instantly share code, notes, and snippets.

Dmitry Khovratovich khovratovich

Block or report user

Report or block khovratovich

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wallie.sol
pragma solidity ^0.4.25;
/**
*
* ╔╗╔╗╔╗╔══╗╔╗──╔╗──╔══╗╔═══╗──╔╗──╔╗╔═══╗
* ║║║║║║║╔╗║║║──║║──╚╗╔╝║╔══╝──║║──║║║╔══╝
* ║║║║║║║╚╝║║║──║║───║║─║╚══╗──║╚╗╔╝║║╚══╗
* ║║║║║║║╔╗║║║──║║───║║─║╔══╝──║╔╗╔╗║║╔══╝
* ║╚╝╚╝║║║║║║╚═╗║╚═╗╔╝╚╗║╚══╗╔╗║║╚╝║║║╚══╗
* ╚═╝╚═╝╚╝╚╝╚══╝╚══╝╚══╝╚═══╝╚╝╚╝──╚╝╚═══╝
View Synchrocoin
pragma solidity ^0.4.23;
// File: node_modules/zeppelin-solidity/contracts/ownership/Ownable.sol
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
@khovratovich
khovratovich / Token.sol
Last active Oct 3, 2017
WIZ Token Contract
View Token.sol
pragma solidity ^0.4.17;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
@khovratovich
khovratovich / Crowdsale.sol
Last active Oct 3, 2017
WIZ Crowdsale contract
View Crowdsale.sol
pragma solidity ^0.4.17;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
View argon-freq.c
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "argon2.h"
#include "\Dima\Old Projects and Texts\Argon2\phc\src\core.h"
@khovratovich
khovratovich / AmIOnTheFork.sol
Created Jul 21, 2016
Oracle contract for forks
View AmIOnTheFork.sol
contract AmIOnTheFork {
bool public forked = false;
address constant darkDAO = 0x304a554a310c7e546dfe434669c62820b7d83490;
// Check the fork condition during creation of the contract.
// This function should be called between block 1920000 and 1921200.
// Approximately between 2016-07-20 12:00:00 UTC and 2016-07-20 17:00:00 UTC.
// After that the status will be locked in.
function update() {
if (block.number >= 1920000 && block.number <= 1921200) {
forked = darkDAO.balance < 3600000 ether;
@khovratovich
khovratovich / HFConditionalTransfer.sol
Created Jul 21, 2016
Split contract by Vitalik Buterin
View HFConditionalTransfer.sol
contract HFConditionalTransfer {
function transferIfHF(address to) {
if (address(0xbf4ed7b27f1d666546e30d74d50d173d20bca754).balance > 2000000 ether)
to.send(msg.value);
else
msg.sender.send(msg.value);
}
function transferIfNoHF(address to) {
if (address(0xbf4ed7b27f1d666546e30d74d50d173d20bca754).balance <= 2000000 ether)
@khovratovich
khovratovich / BranchSender.sol
Created Jul 21, 2016
Split contract by Mikhail Vladimirov
View BranchSender.sol
// Simple smart contract that allows anyone to send ether from one address to
// another in certain branch of the blockchain only. This contract is supposed
// to be used after hard forks to clearly separate "classic" ether from "new"
// ether.
contract BranchSender {
// Is set to true if and only if we are currently in the "right" branch of
// the blockchain, i.e. the branch this contract allows sending money in.
bool public isRightBranch;
// Instantiate the contract.
View SplitContractScript.txt
personal.unlockAccount (web3.eth.accounts[0], “****”); // ← REPLACE **** WITH YOUR ACCOUNT PASSWORD
var fromAddr = web3.eth.accounts[0];
var toAddr = web3.eth.accounts[1];
var valueWei = web3.toWei (1.3, 'ether'); // Send 1.3 ETH
var senderABI = web3.eth.contract([{“constant”:false,”inputs”:[{“name”:”recipient”,”type”:”address”}],”name”:”send”,
”outputs”:[],”type”:”function”},{“constant”:true,”inputs”:[],”name”:”isRightBranch”,”outputs”:[{“name”:””,”type”:”bool”}],
You can’t perform that action at this time.