Skip to content

Instantly share code, notes, and snippets.

View fourswordsio's full-sized avatar

Fourswords fourswordsio

View GitHub Profile
@fourswordsio
fourswordsio / based-existing-job.sol
Created December 29, 2020 23:07
Call existing GET job on Kovan node
pragma solidity ^0.6.0;
import "@chainlink/contracts/src/v0.6/ChainlinkClient.sol";
contract BasedGeckoConsumer is ChainlinkClient {
address private oracle;
bytes32 private jobId;
uint256 private fee;
uint256 public basedPrice;
@fourswordsio
fourswordsio / based-consumer.sol
Last active December 29, 2020 19:49
Based-Consumer-CoinGecko.sol
pragma solidity ^0.6.0;
import "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/ChainlinkClient.sol";
contract ConsumerBasedMoney is ChainlinkClient {
uint256 public price;
address private oracle;
bytes32 private jobId;
@fourswordsio
fourswordsio / oracle-flat-v0.5.0.sol
Last active December 29, 2020 03:21
Chainlink Oracle Contract Flat v0.5
pragma solidity ^0.5.0;
/**
* @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.
// File: https://github.com/smartcontractkit/chainlink/blob/develop/evm/contracts/interfaces/LinkTokenInterface.sol
pragma solidity ^0.4.24;
interface LinkTokenInterface {
function allowance(address owner, address spender) external returns (uint256 remaining);
function approve(address spender, uint256 value) external returns (bool success);
function balanceOf(address owner) external returns (uint256 balance);
function decimals() external returns (uint8 decimalPlaces);
function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);
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;
pragma solidity ^0.4.24;
contract ERC721 {
event Transfer(address indexed _from, address indexed _to, uint256 _tokenId);
event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId);
function balanceOf(address _owner) public view returns (uint256 _balance);
function ownerOf(uint256 _tokenId) public view returns (address _owner);
function transfer(address _to, uint256 _tokenId) public;
function approve(address _to, uint256 _tokenId) public;
function takeOwnership(uint256 _tokenId) public;
// File: https://github.com/smartcontractkit/chainlink/evm/contracts/vendor/Ownable.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".
ETH_URL=wss://ropsten-rpc.linkpool.io/ws
ROOT=/chainlink
LINK_CONTRACT_ADDRESS=0x20fe562d797a42dcb3399062ae9546cd06f6328
ETH_CHAIN_ID=3
LOG_LEVEL=debug
CHAINLINK_TLS_PORT=0
CHAINLINK_TLS_HOST=localhost

Keybase proof

I hereby claim:

  • I am fourswordsio on github.
  • I am fourswords (https://keybase.io/fourswords) on keybase.
  • I have a public key whose fingerprint is 7238 5CD2 A748 E333 5B5D 295C 45B4 121C 598D 333F

To claim this, I am signing this object:

FROM golang:1.12-alpine as builder
ENV GO111MODULE=on
RUN apk add --no-cache make curl git gcc musl-dev linux-headers
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
ADD . /go/src/github.com/fourswordsio/bridges
RUN cd /go/src/github.com/fourswordsio/bridges/examples/gasstation && go get && go build -o gasstation