Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
{
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
@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
@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 / 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 / ghoulPrice.sol
Created September 11, 2021 07:21
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 / AlarmClockExample.sol
Last active August 23, 2021 02:42
kovan alarm clock contract
/** This example code is designed to quickly deploy an example contract using Remix.
* If you have never used Remix, try our example walkthrough: https://docs.chain.link/docs/example-walkthrough
* You will need testnet ETH and LINK.
* - Kovan ETH faucet: https://faucet.kovan.network/
* - Kovan LINK faucet: https://kovan.chain.link/
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
@camharris
camharris / WorkingAlarmClockSample.sol
Created August 23, 2021 02:40
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.12+commit.27d51765.js&optimize=false&runs=200&gist=
/** This example code is designed to quickly deploy an example contract using Remix.
* If you have never used Remix, try our example walkthrough: https://docs.chain.link/docs/example-walkthrough
* You will need testnet ETH and LINK.
* - Kovan ETH faucet: https://faucet.kovan.network/
* - Kovan LINK faucet: https://kovan.chain.link/
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
@camharris
camharris / Oracle.sol
Created August 13, 2021 20:41
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.4.24+commit.e67f0147.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity 0.4.24;
import "@chainlink/contracts/src/v0.4/Oracle.sol";
@camharris
camharris / Oracle.sol
Created August 13, 2021 20:25
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.4.24+commit.e67f0147.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity 0.4.24;
import "@chainlink/contracts/src/v0.4/Oracle.sol";
@camharris
camharris / walletExample.sol
Created August 11, 2021 07:15
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.12+commit.27d51765.js&optimize=true&runs=200&gist=
pragma solidity ^0.6.0;
contract MyWallet {
address payable private owner;
constructor() public {
owner = msg.sender;
}
receive() external payable {