Skip to content

Instantly share code, notes, and snippets.

View jackpmorgan's full-sized avatar

Jack Morgan jackpmorgan

View GitHub Profile
@jackpmorgan
jackpmorgan / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created January 26, 2022 02:08
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
@jackpmorgan
jackpmorgan / contracts...ERC-721_Test.sol
Created January 26, 2022 17:00
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract NFT is ERC721Enumerable, Ownable {
using Strings for uint256;
@jackpmorgan
jackpmorgan / contracts...NFT_USE_PAYMENTS.sol
Created January 27, 2022 12:56
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract NFT_PAYSPLIT is ERC721Enumerable, Ownable {
using Strings for uint256;
@jackpmorgan
jackpmorgan / contracts...PAYMENTS.sol
Created January 27, 2022 12:57
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/finance/PaymentSplitter.sol";
contract PAYMENTS is PaymentSplitter {
constructor (address[] memory _payees, uint256[] memory _shares) PaymentSplitter(_payees, _shares) payable {}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
/**
@jackpmorgan
jackpmorgan / Ownable.Page Lottery Contract
Created March 7, 2022 15:11
The lottery smart contract that chooses a winner a Ownable.Page using Chainlink's VRF.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Lottery is VRFConsumerBase {
address public owner;
address payable[] public players;
uint public lotteryId;
@jackpmorgan
jackpmorgan / docs.chain.link...samples...VRF...Lottery.sol
Created March 7, 2022 15:29
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
@jackpmorgan
jackpmorgan / docs.chain.link...samples...VRF...Lottery.sol
Created March 7, 2022 15:30
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
@jackpmorgan
jackpmorgan / docs.chain.link...samples...VRF...Lottery.sol
Created March 10, 2022 17:32
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.12+commit.f00d7308.js&optimize=false&runs=200&gist=
@jackpmorgan
jackpmorgan / .deps...npm...@chainlink...contracts...src...v0.8...VRFConsumerBase.sol
Created March 10, 2022 17:33
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.12+commit.f00d7308.js&optimize=false&runs=200&gist=