Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nola11
nola11 / contract-d720fcc454_flat.sol
Created November 14, 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.17+commit.8df45f5f.js&optimize=true&runs=200&gist=
// File: @openzeppelin/contracts@4.8.0/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
@nola11
nola11 / contract-d720fcc454.sol
Created November 14, 2022 17:02
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts@4.8.0/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.8.0/security/Pausable.sol";
import "@openzeppelin/contracts@4.8.0/access/Ownable.sol";
contract CUBETest is ERC20, Pausable, Ownable {
constructor() ERC20("CUBE Test", "CUBE") {
_mint(msg.sender, 10000000 * 10 ** decimals());
@nola11
nola11 / .deps...npm...@uniswap...lib...contracts...libraries...TransferHelper.sol
Created November 11, 2022 17:12
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.1+commit.df193b15.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.6.0;
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(
address token,
address to,
uint256 value
@nola11
nola11 / .deps...npm...@uniswap...lib...contracts...libraries...TransferHelper.sol
Created November 7, 2022 14:51
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.6+commit.6c089d02.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.6.0;
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(
address token,
address to,
uint256 value
@nola11
nola11 / Ayt_flat.sol
Created October 28, 2022 03:42
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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC3156FlashBorrower.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC3156 FlashBorrower, as defined in
@nola11
nola11 / Ayt_flat.sol
Created October 27, 2022 16:59
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.17+commit.8df45f5f.js&optimize=true&runs=200&gist=
// File: @openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC3156FlashBorrower.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC3156 FlashBorrower, as defined in
@nola11
nola11 / MindchainswapRouter_flat.sol
Created October 25, 2022 17:01
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.6+commit.6c089d02.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
// File: interfaces/IWETH.sol
pragma solidity >=0.5.0;
interface IWETH {
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
@nola11
nola11 / MindchainswapRouter_flat.sol
Created October 25, 2022 16:49
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.6+commit.6c089d02.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// File: interfaces/IWETH.sol
pragma solidity >=0.5.0;
interface IWETH {
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
@nola11
nola11 / MindchainswapFactory_flat.sol
Created October 21, 2022 13: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.5.16+commit.9c3226ce.js&optimize=false&runs=200&gist=
// File: interfaces/IMindchainswapCallee.sol
pragma solidity >=0.5.0;
interface IMindchainswapCallee {
function mindCall(
address sender,
uint256 amount0,
@nola11
nola11 / MindchainswapFactory_flat.sol
Created October 21, 2022 11: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.5.16+commit.9c3226ce.js&optimize=true&runs=200&gist=
// File: interfaces/IMindchainswapCallee.sol
pragma solidity >=0.5.0;
interface IMindchainswapCallee {
function mindCall(
address sender,
uint256 amount0,