Skip to content

Instantly share code, notes, and snippets.

View thekillertoaster's full-sized avatar
📉
Optimising Hyperparameters

Aaron Hands thekillertoaster

📉
Optimising Hyperparameters
  • South England
View GitHub Profile
@thekillertoaster
thekillertoaster / ERC721TokenSwap.sol
Created March 29, 2023 19:11
Enabling the safe swapping of different NFTs between users. Requires setApprovalForAll to be ran on involved Token Contracts
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract ERC721TokenSwap is ReentrancyGuard {
event SwapCreated(uint256 indexed swapId, address indexed trader1, address indexed trader2);
event SwapExecuted(uint256 indexed swapId);
package tktoaster.tktoaster.opfarm.Tktoaster.helpers;

import org.bukkit.Material;

import java.util.HashMap;

public class Colors {

    public static final HashMap<String, Material> Wool = new HashMap<String, Material>() {{