Skip to content

Instantly share code, notes, and snippets.

@camharris
camharris / GhoulPriceConsumer.sol
Created September 16, 2021 05:20
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.0+commit.26b70077.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity 0.6.0;
import "@chainlink/contracts/src/v0.6/ChainlinkClient.sol";
import "@chainlink/contracts/src/v0.6/vendor/Ownable.sol";
contract TestnetGhoulPrice is ChainlinkClient, Ownable {
uint256 constant private ORACLE_PAYMENT = 1 * LINK;
uint256 public currentPrice;
@camharris
camharris / example.js
Created January 12, 2022 22:36
How to setup rpc endpoints for tronweb
const TronWeb = require('tronweb')
const server = 'SERVER_ADDRESS_GOES_HERE'
const username = 'USERNAME_GOES_HERE';
const password = 'PASSWORD_GOES_HERE';
const rpc_url = (`https://${username}:${password}@${server}`);
// Build out rpc endpoints to be passed as seperate nodes
// since our node provides different endpoints for each tron api
const fullNodeEndpoint = (`${rpc_url}/full`);
@camharris
camharris / onb-02 hackathon...Event.sol
Created October 26, 2023 18:19
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.21+commit.d9974bed.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Ticket.sol";
// 0xAa6751DFE655096a15B13490591B62Dfb74B9eFC
/**
* @title Event contract for creating/managing events
This file has been truncated, but you can view the full file.
{
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [