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.4.2; | |
contract token { function transfer(address, uint256){ } } | |
contract DVFooCrowdsale5 { | |
address public beneficiary; | |
uint public fundingGoal; | |
uint public amountRaised; | |
uint public deadline; | |
// uint public price; |
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.4.18; | |
/** | |
* @title ERC20Basic | |
* @dev Simpler version of ERC20 interface | |
* @dev see https://github.com/ethereum/EIPs/issues/179 | |
*/ | |
contract ERC20Basic { | |
uint256 public totalSupply; | |
function balanceOf(address who) public constant returns (uint256); |
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.4.13; | |
interface token { | |
function transfer(address receiver, uint amount); | |
} | |
contract DVFooCrowdsale6 { | |
address public beneficiary; | |
uint public fundingGoal; | |
uint public amountRaised; |
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.4.13; | |
interface token { | |
function transfer(address receiver, uint amount); | |
} | |
contract DVFooCrowdsale7 { | |
address public beneficiary; | |
uint public fundingGoal; | |
uint public amountRaised; |
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.4.13; | |
interface token { | |
function transfer(address receiver, uint256 amount); | |
function burn(uint256 value); | |
} | |
contract DVFooCrowdsale8 { | |
address public beneficiary; | |
uint public fundingGoal; |
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
// <ORACLIZE_API> | |
/* | |
Copyright (c) 2015-2016 Oraclize SRL | |
Copyright (c) 2016 Oraclize LTD | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
let address = '0xaea16217c589bf736344fd62daa7bdbc428ca5d3'; | |
let abi = [{"constant":true,"inputs":[],"name":"client","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contract_owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"ad_placed","type":"bool"},{"name":"ad_views","type":"uint256"}],"name":"updatePrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"total_price_in_szabo","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"szabo_per_placement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"payForWork","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"co |
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
// Usage: nodejs deploy-ad-contract-test-5.js PATH_TO_COMPILED_JSON CONTRACT_CLASS_NAME TOKENS_PER_PLACEMENT TOKENS_PER_VIEW TOKEN_REWARD_ADDRESS CLIENT_ADDRESS BLOGGER_ADDRESS | |
// Requires running geth node, to launch it execute: geth console --rinkeby --rpc --rpcapi db,eth,net,web3,personal --cache=2048 --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" 2>> geth.log | |
// To compile ".sol" file to ".json", required for this file, do: solc SOURCE_SOL_FILE_PATH --combined-json abi,asm,ast,bin,bin-runtime,clone-bin,devdoc,interface,opcodes,srcmap,srcmap-runtime,userdoc > DESTINATION_JSON_FILE_PATH | |
let eth_secrets = require('./eth_secrets'); | |
let fs = require('fs'); | |
let Web3 = require('web3'); // Requires web3 0.* version, does not work with web3 1.* | |
let web3 = new Web3(); | |
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545')); | |
let source_path = process.argv[2]; |
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
let eth_secrets = require('./eth_secrets'); | |
let Web3 = require('web3'); // Requires web3 0.* version, does not work with web3 1.* | |
let sleep = require('system-sleep'); | |
let web3 = new Web3(); | |
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545')); | |
let address = process.argv[2]; | |
let abi = JSON.parse(process.argv[3]); | |
let adc = web3.eth.contract(abi).at(address); |
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.4.21; | |
// From https://github.com/Dexaran/ERC223-token-standard/blob/Recommended/Receiver_Interface.sol | |
contract ContractReceiver { | |
function tokenFallback(address _from, uint _value, bytes _data) public; | |
} | |
// From https://github.com/Dexaran/ERC223-token-standard/blob/Recommended/ERC223_Interface.sol | |
contract ERC223 { | |
uint public totalSupply; |
OlderNewer