Skip to content

Instantly share code, notes, and snippets.

View janfilips's full-sized avatar
🏅
ETH Zürich - Academic Visitor

Jan Filips janfilips

🏅
ETH Zürich - Academic Visitor
  • 01:32 (UTC +03:00)
View GitHub Profile
@janfilips
janfilips / oraclizeRandomOrg.sol
Created December 26, 2018 22:13
working oraclized dice contract with random.org
pragma solidity ^0.5.0;
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
contract Dice is usingOraclize {
uint minimumBet;
// The oraclize callback structure: we use several oraclize calls.
// All oraclize calls will result in a common callback to __callback(...).
pragma solidity ^0.4.24;
contract DollarAuction {
address player;
uint public price;
uint public playersCount;
mapping(address => uint) playersBids;
mapping(uint => address) players;
pragma solidity ^0.4.24;
contract Notary {
address public jan = 0x45f5c8b556c3f2887b50184c823d1223f41a4156;
address public investor = 0x33c42ED630e29B939EB9cAc3B8AbfA1a711EA1f0;
address NotaryPersistentStorageAddress = 0x8439dacB099826eba3c56A8B2d3A15F108a89552;
import os
import sys
import time
import json
import web3
from web3.auto import w3
from web3 import Web3, Account
import os
import time
import json
import web3
from web3 import Web3, Account
from solc import compile_source
from web3.contract import ConciseContract
import os
import json
import web3
from web3 import Web3
from eth_account import Account
from solc import compile_source
import os
import json
import web3
from web3 import Web3
from solc import compile_source
from web3.contract import ConciseContract
from web3 import Web3
import json
from web3.providers.rpc import HTTPProvider
CONTRACT_ABI = '''
[{"constant": false,"inputs": [{"name": "hash","type": "bytes32"}],"name": "apply","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "email","type": "string"}],"name": "getApplicationID","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"}]
'''
CONTRACT_ADDRESS = '0xcbbfbafedb0eb83016d2a96a4e80d30b20fa3e30'
from web3 import Web3
import json
from web3.providers.rpc import HTTPProvider
CONTRACT_ABI = '''
[{"constant": false,"inputs": [{"name": "hash","type": "bytes32"}],"name": "apply","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "email","type": "string"}],"name": "getApplicationID","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"}]
'''
CONTRACT_ADDRESS = '0xcbbfbafedb0eb83016d2a96a4e80d30b20fa3e30'
from web3 import Web3
import json
from web3.providers.rpc import HTTPProvider
CONTRACT_ABI = '''
[{"constant": false,"inputs": [{"name": "hash","type": "bytes32"}],"name": "apply","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "email","type": "string"}],"name": "getApplicationID","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"}]
'''
CONTRACT_ADDRESS = '0xcbbfbafedb0eb83016d2a96a4e80d30b20fa3e30'