Skip to content

Instantly share code, notes, and snippets.

Thomas thodges-gh

Block or report user

Report or block thodges-gh

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 Oracle.sol
pragma solidity 0.4.24;
/**
* @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 {
address public owner;
View PrepaidAggregator.sol
pragma solidity 0.5.14;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
View BasicConsumer.sol
// File: contracts/vendor/Buffer.sol
pragma solidity >0.4.18;
/**
* @dev A library for working with mutable byte buffers in Solidity.
*
* Byte buffers are mutable and expandable, and provide a variety of primitives
* for writing to them. At any time you can fetch a bytes object containing the
View Betterman.sol
pragma solidity 0.4.24;
import "https://github.com/smartcontractkit/chainlink/evm/contracts/ChainlinkClient.sol";
contract Betterman is ChainlinkClient {
uint256 private ORACLE_PAYMENT = 1 * LINK;
uint256 public currentTemp;
constructor() public {
@thodges-gh
thodges-gh / MyContract.sol
Created Oct 26, 2019
Solidity 5 Chainlinked contract for Remix
View MyContract.sol
pragma solidity >=0.5.0;
import "https://github.com/smartcontractkit/chainlink/evm/v0.5/contracts/ChainlinkClient.sol";
import "https://github.com/smartcontractkit/chainlink/evm/v0.5/contracts/vendor/Ownable.sol";
/**
* @title MyContract is an example contract which requests data from
* the Chainlink network
* @dev This contract is designed to work on multiple networks, including
* local test networks
View DepositTester.sol
pragma solidity 0.5.0;
interface LinkTokenInterface {
function balanceOf(address owner) external returns (uint256 balance);
function transfer(address to, uint256 value) external returns (bool success);
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);
}
interface CoordinatorInterface {
function withdraw(address recipient, uint256 amount) external;
View Oracle.sol
pragma solidity 0.4.24;
import "https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.4/Oracle.sol";
View ATestnetConsumer.sol
pragma solidity 0.4.24;
import "https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.4/ChainlinkClient.sol";
import "https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.4/vendor/Ownable.sol";
contract ATestnetConsumer is ChainlinkClient, Ownable {
uint256 constant private ORACLE_PAYMENT = 1 * LINK;
uint256 public currentPrice;
int256 public changeDay;
View ChainlinkClause.sol
// File: @ensdomains/buffer/contracts/Buffer.sol
pragma solidity >0.4.18;
/**
* @dev A library for working with mutable byte buffers in Solidity.
*
* Byte buffers are mutable and expandable, and provide a variety of primitives
* for writing to them. At any time you can fetch a bytes object containing the
View Oracle.sol
pragma solidity 0.4.24;
import "https://github.com/thodges-gh/chainlink/evm/contracts/Oracle.sol";
You can’t perform that action at this time.