This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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']; |