Skip to content

Instantly share code, notes, and snippets.

View Kotevode's full-sized avatar
💻
🐈 💶 🤙

Kotevode

💻
🐈 💶 🤙
View GitHub Profile
@Kotevode
Kotevode / roi-widget.php
Created February 12, 2018 14:26
Виджет РОИ
<?php
define('URL', 'https://www.roi.ru/api/petition/39653.json');
$string = file_get_contents(URL);
$json = json_decode($string, true);
$vote = $json['data']['vote'];
$progress = $vote['progress'];
$threshold = $vote['threshold'];
pragma solidity ^0.6.0;
import "github.com/provable-things/ethereum-api/provableAPI_0.6.sol";
contract RecursiveRandomSource is usingProvable {
uint256 constant ROUND_TIME = 60;
uint256 constant MAX_INT_FROM_BYTE = 256;
uint256 constant NUM_RANDOM_BYTES_REQUESTED = 7;
uint public random;