Skip to content

Instantly share code, notes, and snippets.

View EmmanuelAdeiza's full-sized avatar

Emmanuel Adeiza EmmanuelAdeiza

View GitHub Profile
@EmmanuelAdeiza
EmmanuelAdeiza / contracts...Bull&Bear.sol
Created June 8, 2022 05:37
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.14+commit.80d49f37.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
@EmmanuelAdeiza
EmmanuelAdeiza / safe_remote_purchase_contract.sol
Last active June 6, 2022 01:47
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=builtin&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;
contract Purchase {
uint public value;
address payable public seller;
address payable public buyer;
uint256 public lastRun;
enum State { Created, Locked, Release, Inactive }
// The state variable has a default value of the first member, `State.created`