//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
contract Ownable {
  address public owner;

  function transferOwnership(address _newOwner) public {
    owner = _newOwner;
  }

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
Mar 14, 2024 17:51:07 UTC
/**
 * SPDX-License-Identifier: MIT
 *
 * Copyright (c) 2018 zOS Global Limited.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
Feb 06, 2024 12:08:28 UTC

pragma solidity ^0.4.11;


contract Ownable {
  address public owner;



  function Ownable() {
    owner = msg.sender;
  }


 
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  
  function transferOwnership(address newOwner) onlyOwner {
    if (newOwner != address(0)) {
      owner = newOwner;
    }
  }

}



contract ERC721 {
    
    function totalSupply() public view returns (uint256 total);
    function balanceOf(address _owner) public view returns (uint256 balance);
    function ownerOf(uint256 _tokenId) external view returns (address owner);
    function approve(address _to, uint256 _tokenId) external;
    function transfer(address _to, uint256 _tokenId) external;
    function transferFrom(address _from, address _to, uint256 _tokenId) external;

    
    event Transfer(address from, address to, uint256 tokenId);
    event Approval(address owner, address approved, uint256 tokenId);

    
    function supportsInterface(bytes4 _interfaceID) external view returns (bool);
}








Jan 31, 2024 08:06:17 UTC

pragma solidity ^0.4.11;


contract Ownable {
  address public owner;



  function Ownable() {
    owner = msg.sender;
  }


 
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  
  function transferOwnership(address newOwner) onlyOwner {
    if (newOwner != address(0)) {
      owner = newOwner;
    }
  }

}



contract ERC721 {
    
    function totalSupply() public view returns (uint256 total);
    function balanceOf(address _owner) public view returns (uint256 balance);
    function ownerOf(uint256 _tokenId) external view returns (address owner);
    function approve(address _to, uint256 _tokenId) external;
    function transfer(address _to, uint256 _tokenId) external;
    function transferFrom(address _from, address _to, uint256 _tokenId) external;

    
    event Transfer(address from, address to, uint256 tokenId);
    event Approval(address owner, address approved, uint256 tokenId);

    
    function supportsInterface(bytes4 _interfaceID) external view returns (bool);
}








Jan 31, 2024 07:52:55 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 10, 2024 10:34:27 UTC
/**
 *Submitted for verification at optimistic.etherscan.io on 2023-12-18
 */

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// File: @openzeppelin/contracts/interfaces/draft-IERC6093.sol

// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(
        address sender,
        uint256 balance,
        uint256 needed
    );

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose toke
Dec 25, 2023 22:18:44 UTC
/**
 *Submitted for verification at optimistic.etherscan.io on 2023-12-18
 */

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// File: @openzeppelin/contracts/interfaces/draft-IERC6093.sol

// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(
        address sender,
        uint256 balance,
        uint256 needed
    );

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose toke
Dec 25, 2023 22:02:51 UTC
// SPDX-License-Identifier: MIT

//   ___
//   __/_  `.  .-"""-.
//   \_,` | \-'  /   )`-')
//    "") `"`    \  ((`"`
//   ___Y  ,    .'7 /|
//   (_,___/...-` (_/_/ 

// x.com/kimboavax
// Kimbo , like the espresso! 

// $KIMBO is a meme coin with no intrinsic value or expectation of financial return. There is no formal team or roadmap. The coin is completely useless and for entertainment purposes only.


pragma solidity ^0.8.20;


import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";


contract KimboToken is ERC20, Ownable(msg.sender) {
    // Added state variable for lubrication - gently does it!
    // Lubrication prevents any wallet receiving more than 1% of Kimbo in the opening days.
    bool public lubricating = true;
    address public liquidityPool;

    // Mint the totalSupply to the deployer
    constructor() ERC20("Kimbo", "KIMBO") {
        _mint(msg.sender, 69420000000 * 10 ** 18);
    }

    // Function to set lubricating state
    function 
Dec 23, 2023 01:05:45 UTC
pragma solidity 0.8.10;

interface IAugustus {
    function getTokenTransferProxy() external view returns (address);
}

interface IERC20 {
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function transfer(address to, uint256 amount) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
}

/*
 *  1/ some scenario is broken
 *  2/ not secure
 *  3/ not gas efficient
 */
contract BrokenSwapper {
    IAugustus immutable augustus;

    constructor(IAugustus _augustus) {
        augustus = _augustus;
    }
    
  	// swap ERC20 tokens and pure ETH
    function swapTokensWithParaSwap(
        IERC20 srcToken, 
        IERC20 destToken, 
        uint256 amount, 
        bytes memory augustusCalldata // trusted data to pass down to augutus contract
    ) external {
        srcToken.transferFrom(msg.sender, address(this), amount);

        srcToken.a
Dec 22, 2023 14:56:16 UTC
// SPDX-License-Identifier: MIT
// The SPDX-License-Identifier specifies the license for the code.

pragma solidity ^0.8.0;
// Indicates that the code should be compiled using a Solidity compiler version equal to or higher than 0.8.0.

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
// Imports interfaces for ERC721 and ERC20 tokens, Ownable contract, and SafeMath for safe arithmetic operations.

contract NFTStaking is Ownable {
    using SafeMath for uint256;
    // The contract inherits from the Ownable contract, and SafeMath is used for safe arithmetic operations.

    IERC721 public nftToken;
    IERC20 public nativeToken;
    // Declarations of interfaces for ERC721 and ERC20 tokens.

    uint256 public stakingRewardRate = 1;
    uint256 public totalStakedNFTs;
    // Public variables to store staking parameters.

    mapping(add
Dec 12, 2023 09:24:55 UTC
/**
  o__ __o                                  o          o                 o__ __o                            o   
 <|     v\                                <|\        /|>               <|     v\                         _<|>_ 
 / \     <\                               / \\o    o// \               / \     <\                              
 \o/     o/       o       o     o__ __o/  \o/ v\  /v \o/    o__  __o   \o/     o/   o__ __o/  \o_ __o      o   
  |__  _<|       <|>     <|>   /v     |    |   <\/>   |    /v      |>   |__  _<|/  /v     |    |    v\    <|>  
  |       \      < >     < >  />     / \  / \        / \  />      //    |         />     / \  / \    <\   / \  
 <o>       \o     |       |   \      \o/  \o/        \o/  \o    o/     <o>        \      \o/  \o/     /   \o/  
  |         v\    o       o    o      |    |          |    v\  /v __o   |          o      |    |     o     |   
 / \         <\   <\__ __/>    <\__  < >  / \        / \    <\/> __/>  / \         <\__  / \  / \ __/>    / \  v2
          
Dec 10, 2023 23:28:59 UTC
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;

contract Token {
    mapping(address => uint) private _balances;
    mapping(address => mapping(address => uint)) private _allowance;

    uint private _totalSupply = 75000000 * 10 ** 18;
    string public name = "Suleymani";
    string public symbol = "SLMN";
    uint public decimals = 18;
    uint256 public num;

    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
    event BalanceChanged(address indexed owner, uint previousBalance, uint newBalance);

    constructor() {
        _balances[msg.sender] = _totalSupply;
        emit Transfer(address(0), msg.sender, _totalSupply);
    }

    function balanceOf(address owner) public view returns (uint) {
        require(owner != address(0), "Invalid address");
        return _balances[owner];
    }

    function transfer(address to, uint value) public returns (bool) {
        require(to != address(0), "Inva
Dec 08, 2023 14:34:27 UTC
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;

// Library for safe arithmetic operations
library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }
}

// Contract providing basic ownership control
contract Ownable {
    address public owner;

    // Assigns contract deployer as the owner
    constructor() {
        owner = msg.sender;
    }

    // Modifier to restrict functions to the owner only
    modifier onlyOwner() {
        require(msg.sender == owner, "Ownable: caller is not the owner");
        _;
    }

    // Allows the owner to withdraw Ether from the contract
    function withdrawEther(uint256 amount) external onlyOwner {
        payable(owner).transfer(amount);
    }
}

// Main token contra
Dec 08, 2023 13:49:35 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Dec 07, 2023 22:13:38 UTC
modifier isOwner() {
    // Make sure we're called by our trusted owner before doing anything.
    require(msg.sender == owner, "Caller is not owner");
    _;
}
Dec 07, 2023 11:05:41 UTC
modifier isOwner() {
    // Make sure we're called by our trusted owner before doing anything.
    require(msg.sender == owner, "Caller is not owner");
    _;
}
Dec 07, 2023 11:05:00 UTC
modifier isOwner() {
    // Make sure we're called by our trusted owner before doing anything.
    require(msg.sender == owner, "Caller is not owner");
    _;
Dec 07, 2023 11:04:03 UTC

modifier isOwner() {
    // Make sure we're called by our trusted owner before doing anything.
    require(msg.sender == owner, "Caller is not owner");
    _;
Dec 07, 2023 11:03:38 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
modifier isOwner() {
    // Make sure we're called by our trusted owner before doing anything.
    require(msg.sender == owner, "Caller is not owner");
    _;
Dec 07, 2023 11:01:50 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    if (false) revert();
    // if (true) revert();
    return value;
  }

  uint value;
Dec 05, 2023 03:14:29 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.1;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract Martians is  ERC721Enumerable, Ownable, EIP712 {
    using Counters for Counters.Counter;
    using Strings for uint256;

    Counters.Counter private _tokenIdCounter;
    uint256 maxSupply = 1000;
    bool public publicMintOpen = false;
    bool public allowListMintOpen = true;
    string private _contractBaseURI;
    bytes32 private _secret;

    uint256[] private _availableTokenIds;
    uint256 private _index;

    constructor() ERC721("Monero Martians", "FEFMLMKU1984") EIP712("monero_martians", "1") {
        _contractBaseURI = "ipfs://bafybeifzbz5znq4m3qhgxcjchoz4jwho56at3xin5vq3ndbjc2sybpjhue";
        _secret = keccak256(abi.encodePacked(bl
Nov 17, 2023 16:03:05 UTC
// SPDX-License-Identifier: UNLICENSE

/*



*/

pragma solidity 0.8.20;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
}

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath
Nov 08, 2023 01:27:48 UTC
pragma solidity ^0.4.18;

contract Gastoken {
    function free(uint256 value) public returns (bool success);
    function freeUpTo(uint256 value) public returns (uint256 freed);
    function freeFrom(address from, uint256 value) public returns (bool success);
    function freeFromUpTo(address from, uint256 value) public returns (uint256 freed);
}

contract Example {

    // This function consumes a lot of gas
    function expensiveStuff() private pure {
        /* lots of expensive stuff */
    }

    /*
     * Frees `free' tokens from the Gastoken at address `gas_token'.
     * The freed tokens belong to this Example contract. The gas refund can pay
     * for up to half of the gas cost of the total transaction in which this 
     * call occurs.
     */
    function burnGasAndFree(address gas_token, uint256 free) public {
        require(Gastoken(gas_token).free(free));
        expensiveStuff();
    }

    /*
     * Frees `free' tokens from the Gastoken at address `gas_token'.
     * The freed tokens belong
Oct 24, 2023 08:42:01 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Playground {

  function generateTraits(
        bytes32 seed
    ) public pure returns (string) {
        uint256 rockColorFamily = uint256(
            seed
        ) % 10000;

        string memory featuredMaterial;
        if (rockColorFamily < 1800) {
          featuredMaterial = "IRON";
        } else if (rockColorFamily < 4000) {
          featuredMaterial = "COPPER";
        } else if (rockColorFamily < 6000) {
          featuredMaterial = "OXIDE";
        } else if (rockColorFamily < 7800) {
          featuredMaterial = "PYRITE";
        } else if (rockColorFamily <= 9500) {
          featuredMaterial = "GRANITE";
        } else {
          featuredMaterial = "QUARTZITE";
        }


        return featuredMaterial;
    }

Oct 22, 2023 12:32:45 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Sep 28, 2023 22:35:23 UTC
// SPDX-License-Identifier: MIT LICENSE
 
pragma solidity ^0.8.7;
 
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "./PriceConverter.sol";
import "./RustToken.sol";
 
contract RustLotto is ReentrancyGuard, Ownable, VRFConsumerBaseV2 {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;
    using PriceConverter for uint256;
 
 
    VRFCoordinatorV2Interface COORDINATOR;
 
    uint64 private s_subscriptionId;
    address private vrfCoordinator = 0x6D80646bEAdd07cE68cab36c27c626790bBcf17f;
    bytes32 private keyHash = 0x83d1b6e3388bed3d76426974512bb0d270e9542a765cd667242ea26c0cc0b730;
    uint16 private requestConfirmations = 3;
    uint32 private numWords = 6;
 
Sep 26, 2023 15:46:53 UTC
// SPDX-License-Identifier: MIT LICENSE
 
pragma solidity ^0.8.7;
 
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "./PriceConverter.sol";
 
contract RustLotto is ReentrancyGuard, Ownable, VRFConsumerBaseV2 {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;
    using PriceConverter for uint256;
 
 
    VRFCoordinatorV2Interface COORDINATOR;
 
    uint64 private s_subscriptionId;
    address private vrfCoordinator = 0x6D80646bEAdd07cE68cab36c27c626790bBcf17f;
    bytes32 private keyHash = 0x83d1b6e3388bed3d76426974512bb0d270e9542a765cd667242ea26c0cc0b730;
    uint16 private requestConfirmations = 3;
    uint32 private numWords = 6;
    uint32 private callback
Sep 26, 2023 15:37:32 UTC
//test
pragma solidity >=0.4.18 <=0.5.6;
contract test {
  string public name="beom_test";
  uint256 private bagic=10;
  function testfunc(uint256 input) private {
    bagic=input;
  }
Sep 21, 2023 02:24:37 UTC
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

interface IUniswapV2Factory {
    event PairCreated(
        address indexed token0,
        address indexed token1,
        address pair,
        uint256
    );

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB)
        external
        view
        returns (address pair);

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

    function createPair(address tokenA, address tokenB)
        external
        returns (address pair);

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint
Sep 12, 2023 21:08:05 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract Martians is  ERC721Enumerable, Ownable, EIP712 {
    using Counters for Counters.Counter;
    using Strings for uint256;

    Counters.Counter private _tokenIdCounter;
    uint256 maxSupply = 1000;
    bool public publicMintOpen = false;
    bool public allowListMintOpen = true;
    string private _contractBaseURI;
    bytes32 private _secret;

    uint256[] private _availableTokenIds;
    uint256 private _index;

    constructor() ERC721("Monero Martians", "FEFMLMKU1984") EIP712("monero_martians", "1") {
        _contractBaseURI = "ipfs://bafybeifzbz5znq4m3qhgxcjchoz4jwho56at3xin5vq3ndbjc2sybpjhue";
        _secret = keccak256(abi.encodePacked(bl
Sep 11, 2023 17:27:57 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.0;

contract Playground {

  function compare(string _s1, string _s2) 
            pure
            public
            returns(bool) {
              bytes memory b1 = bytes(_s1);
              bytes memory b2 = bytes(_s2);
              if (b1.length != b2.length) {
                return false;
              }
              return keccak256(b1) == keccak256(b2);
  }

  function concat(string _s1, string _s2) 
            pure 
            public 
            returns(string) {
              assembly {
                    invalid()
                }
  }

  function strLen(string _str) 
            pure 
            public 
            returns(uint) {
    
    bytes memory b = bytes(_str);
    return (b.length);

  }

  function strReplace(string _from, string _what, string _to)
            pure
            public
            returns(string) {
              bytes memory bfrom = bytes(_from);
            
Sep 01, 2023 10:15:39 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

interface IUniswapV2Router {
    function WETH() external pure returns (address);
    function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external returns (uint256[] memory amounts);
    function swapExactETHForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external payable returns (uint256[] memory amounts);
}

contract WXDAIWrapper {
    string public name = "Wrapped xDAI";
    string public symbol = "WXDAI";
    uint8 public decimals = 18;
    uint256 public totalSupply = 100000 * 10**decimals; // 100,000 WXDAI, pegged to DAI
    mapping(address => uint256) public balances;
    mapping(address => mapping(address => uint256)) public allowances;
    address public uniswapRouterAddress;
    IUniswapV2Router private uniswapRouter;

    constructor(address _uniswapRouterAddress) {
        uniswapRouterAddress = _uniswapRouterAddress;
        unis
Aug 18, 2023 20:06:57 UTC
// SPDX-License-Identifier: MIT
pragma solidity >0.7.0 <=0.9.0;

import "contracts/Producto.sol";

contract RegistroProductos{   
      
    address private immutable usuario; 
    mapping(address => mapping(string => Producto)) private producto; 
    
    event ProductoAgregado(string codigo, string nombre, uint stock);
    event ProductoActualizado(string codigo, uint nuevoStock);
    event ProductoEliminado(string codigo);
    
    modifier soloPropietario() {
        require(msg.sender == usuario, "Solo el propietario tiene Acceso");
        _;
    }

    modifier existeCodigo(string memory _codigo) {
        string memory codigoInterno = producto[usuario][_codigo].codigo;
        require(keccak256(abi.encodePacked(codigoInterno)) == keccak256(abi.encodePacked(_codigo)), "Codigo Inexistente");
        _;
    }
   
    constructor(){
        usuario = msg.sender;
    }
  
    function agregarProducto(string memory _codigo, string memory _nombre, uint _stock) public soloPropietario() {
        producto[usua
Aug 15, 2023 20:05:50 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "https://github.com/LayerZero-Labs/solidity-examples/blob/main/contracts/token/oft/v2/BaseOFTV2.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

/*
    Chain Information:
    LayerZero Optimism Goerli
        chainId: 10132
        endpoint: 0xae92d5aD7583AD66E49A0c67BAd18F6ba52dDDc1
    LayerZero Goerli
        chainId: 10121
        endpoint: 0xbfD2135BFfbb0B5378b56643c2Df8a87552Bfa23

        [     
            {         
                "refundAddress": "0x9Eb404FA6a9ad4bF45f20be8f07a16C491629486",         
                "zroPaymentAddress": "0x0",
                "adapterParams": ""0x0002000000000000000000000000000000000000000000000000000000000003d0900000000000000000000000000000000000000000000000000000000000000000c5e31322429453e6d196c34fb16b88edc2a58082 
            } 
        ]

        {0x9Eb404FA6a9ad4bF45f20be8f07a16C491629486,0x0,0x0002000000000000000000000000000000000000000000000000000000000003d09000000000000
Aug 11, 2023 19:43:24 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "https://github.com/LayerZero-Labs/solidity-examples/blob/main/contracts/token/oft/v2/BaseOFTV2.sol";
/*
    Chain Information:
    LayerZero Optimism Goerli
        chainId: 10132
        endpoint: 0xae92d5aD7583AD66E49A0c67BAd18F6ba52dDDc1
    LayerZero Goerli
        chainId: 10121
        endpoint: 0xbfD2135BFfbb0B5378b56643c2Df8a87552Bfa23
*/

/* Example Tuple 1: Error https://goerli.etherscan.io/tx/0x92047bdd908d6241ef65fd21164855267e30a11460fa6cb0d8f485810d6a7931

Tuple Format

["srcRefundAddress", "ZROGasAddress", "_adaptParams bytes array"]

["0x9Eb404FA6a9ad4bF45f20be8f07a16C491629486","0x0000000000000000000000000000000000000000","0x00010000000000000000000000000000000000000000000000000000000000030d40"]

["0x9Eb404FA6a9ad4bF45f20be8f07a16C491629486","0x0000000000000000000000000000000000000000","0x00010000000000000000000000000000000000000000000000000000000000030d40"]

["0x9Eb404FA6a
Aug 11, 2023 19:42:48 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.

pragma solidity ^0.4.18;

contract BoardMemberContract {
    struct BoardMember {
        address memberAddress;   // Address of the board member
        string name;             // Name of the board member
        uint256 joiningDate;     // Timestamp of when the member joined
    }

    BoardMember[] public boardMembers;
    mapping(address => bool) public isBoardMember;

    event BoardMemberAdded(address indexed memberAddress, string name, uint256 joiningDate);
    event BoardMemberRemoved(address indexed memberAddress);

    function addBoardMember(address _memberAddress, string _name) public {
        require(!isBoardMember[_memberAddress]);
        require(bytes(_name).length > 0);

        BoardMember memory newMember = BoardMember({
            memberAddress: _memberAddress,
            name: _name,
            joiningDate: block.timestamp
        });

        boardMembers.push(newMember);
        isBoardMember[_
Aug 03, 2023 16:54:40 UTC
pragma solidity ^0.4.18;

contract LogisticsContract {
    struct Shipment {
        uint shipmentId;        // Unique ID for the shipment
        address sender;         // Address of the sender
        address receiver;       // Address of the receiver
        bytes32 certificate;    // Certificate related to the shipment
        uint timestamp;         // Timestamp of the shipment creation
        mapping(string => address) entities; // Mapping to store the addresses of different entities involved
    }

    Shipment[] public shipments;

    mapping(uint => bool) public shipmentExists;
    mapping(uint => bool) public shipmentReceived;

    event ShipmentCreated(uint shipmentId, address sender, address receiver, bytes32 certificate, uint timestamp);
    event ShipmentReceived(uint shipmentId, address receiver, uint timestamp);
    event EntityInvolved(uint shipmentId, string role, address entityAddress);

    function createShipment(uint shipmentId, address receiver, bytes32 certificate) public {
        r
Aug 03, 2023 16:44:14 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.


pragma solidity ^0.4.18;

contract FreelancerContract {
    // Structure to represent a task
    struct Task {
        address client;     // Address of the client who created the task
        uint value;         // Amount of ether set for the task
        bool completed;     // Flag to indicate if the task is completed
        bool paid;          // Flag to indicate if the task is paid
    }

    // Array to store all the tasks
    Task[] public tasks;

    // Events to emit when tasks are created, completed, and paid
    event TaskCreated(uint indexed taskId, address indexed client, uint value);
    event TaskCompleted(uint indexed taskId);
    event TaskPaid(uint indexed taskId);

    // Function to create a new task
    function createTask() public payable {
        require(msg.value > 0);
        Task memory newTask = Task({
            client: msg.sender,
            value: msg.value,
            completed: false,
Aug 03, 2023 12:40:50 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.

Function encode(string memory key, string memory plaintext) public pure returns (string memory) {
    uint keyLength = bytes(key).length;
    uint plainLength = bytes(plaintext).length;
    uint numCols = (plainLength + keyLength - 1) / keyLength;
    
    uint[] memory order = new uint[](keyLength);
    for (uint i = 0; i < keyLength; i++) {
        order[i] = i;
    }
    
    string memory ciphertext = "";
    
    for (uint num = 0; num < numCols; num++) {
        for (uint i = 0; i < keyLength; i++) {
            if (num * keyLength + order[i] < plainLength) {
                ciphertext = string(abi.encodePacked(ciphertext, bytes(plaintext)[num * keyLength + order[i]]));
            }
        }
    }
    
    return ciphertext;
}

// Example usage
encode("KEY", "HELLO")
Jul 30, 2023 11:34:10 UTC
/**
 *Submitted for verification at Etherscan.io on 2023-07-22
*/

/**

https://t.me/MagicMiladyMoney

https://magicmiladymoney.wtf/

https://twitter.com/MagicMilady

**/

// SPDX-License-Identifier: MIT


pragma solidity 0.8.20;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
}

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval (address indexed owner, addre
Jul 23, 2023 11:09:16 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
}

/*
Здесь все вопросы
*
Jul 21, 2023 10:34:21 UTC
// CryptoKitties Source code
// Copied from: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code

pragma solidity ^0.4.20;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner {
    if (newOwner != address(0)) {
      owner = newOwner;
    }
  }

}



/// @title Interface for contract
Jul 20, 2023 21:02:21 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 19, 2023 18:05:00 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 19, 2023 17:31:23 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 15, 2023 13:56:40 UTC
pragma solidity ^0.8.0;

contract HelloWorld {
    string public message;

    constructor() {
        message = "Hello World!";
    }
Jul 11, 2023 19:24:30 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.1;

import {console} from "forge-std/Test.sol";
import {TestHelper, IERC20, Call, Balances} from "test/TestHelper.sol";
import {AddLiquidityAction, RemoveLiquidityAction, LiquidityHelper} from "test/LiquidityHelper.sol";
import {Aquifer} from "src/Aquifer.sol";
import {SwapHelper, SwapAction, Snapshot} from "test/SwapHelper.sol";

contract WellAddLiquidityTest is LiquidityHelper {

    function _setupWellWithoutAddingLiquidity(Call memory _wellFunction, Call[] memory _pumps, IERC20[] memory _tokens) internal {
        tokens = _tokens;
        wellFunction = _wellFunction;
        for (uint256 i; i < _pumps.length; i++) {
            pumps.push(_pumps[i]);
        }

        initUser();

        wellImplementation = deployWellImplementation();
        aquifer = new Aquifer();
        well = encodeAndBoreWell(address(aquifer), wellImplementation, tokens, _wellFunction, _pumps, bytes32(0));

        // Mint mock tokens to user
        mintTokens(user, initia
Jul 10, 2023 14:14:46 UTC
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.18;

import {IERC777Recipient} from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol";
import {IERC165} from "../../interfaces/ERC/IERC165.sol";
import {IERC1271} from "../../interfaces/ERC/IERC1271.sol";
import {IERC677Receiver} from "../../interfaces/ERC/IERC677Receiver.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import {LibDiamond} from "../../libraries/LibDiamond.sol";
import {LibLoupe} from "../../libraries/LibLoupe.sol";
import {IDiamondCut} from "../../facets/base/interfaces/IDiamondCut.sol";
import {IStorageLoupe} from "./interfaces/IStorageLoupe.sol";
import {IDiamondLoupe} from "./interfaces/IDiamondLoupe.sol";

/**
 * @title DiamondLoupe Facet
 * @dev DiamondLoupe contract compatible with EIP-2535
 * @author David Yongjun Kim (@Powerstream3604)
 */
contract DiamondLoupeFacet is IDiamondLo
Jul 10, 2023 14:04:24 UTC
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.18;

import {IERC777Recipient} from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol";
import {IERC165} from "../../interfaces/ERC/IERC165.sol";
import {IERC1271} from "../../interfaces/ERC/IERC1271.sol";
import {IERC677Receiver} from "../../interfaces/ERC/IERC677Receiver.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import {LibDiamond} from "../../libraries/LibDiamond.sol";
import {LibLoupe} from "../../libraries/LibLoupe.sol";
import {IDiamondCut} from "../../facets/base/interfaces/IDiamondCut.sol";
import {IStorageLoupe} from "./interfaces/IStorageLoupe.sol";
import {IDiamondLoupe} from "./interfaces/IDiamondLoupe.sol";

/**
 * @title DiamondLoupe Facet
 * @dev DiamondLoupe contract compatible with EIP-2535
 * @author David Yongjun Kim (@Powerstream3604)
 */
contract DiamondLoupeFacet is IDiamondLo
Jul 10, 2023 13:33:27 UTC
contract ArrayMapping {
    address[] public keys;
    bytes4[] public values;

    function setValue(address[] key, bytes4[] value) public {
        //This will set the whole arrays
        // Array in the format
        // key[i] = value[j,j+1.....m]
    }

     function getValues(address key) public view returns (address[]) {
        uint256 index = findIndex(key);
        require(index < keys.length, "Key does not exist");
        uint256 start_index, end_index = findValueIndex(index);
        require(start_index< end_index, "Values does not exist");
        return values[start_index:end_index];
    }

    function findValueIndex(uint256 vi) internal view returns (uint256, uint256) {
        for (uint256 i=0; i <values.length; i++) {
            uint256 start_index = 0;
            uint256 end_index = 0
            if (values[i].length == 0) {
                index++;
                if (start_index !=0) {
                    end_index = i-1;
                    return start_index, end_index;
            
Jul 10, 2023 12:48:51 UTC
contract ArrayMapping {
    bytes4[] public keys;
    address[] public values;

    function setValue(bytes4 key, address value) public {
        uint256 index = findIndex(key);

        if (index < keys.length) {
            values[index] = value;
        } else {
            keys.push(key);
            values.push(value);
        }
    }

    function getValue(bytes4 key) public view returns (address) {
        uint256 index = findIndex(key);
        require(index < keys.length, "Key does not exist");

        return values[index];
    }

    function findIndex(bytes4 key) internal view returns (uint256) {
        for (uint256 i = 0; i < keys.length; i++) {
            if (keys[i] == key) {
                return i;
            }
        }
        return keys.length;
    }
Jul 10, 2023 11:40:33 UTC
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.18;

import {IERC777Recipient} from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol";
import {IERC165} from "../../interfaces/ERC/IERC165.sol";
import {IERC1271} from "../../interfaces/ERC/IERC1271.sol";
import {IERC677Receiver} from "../../interfaces/ERC/IERC677Receiver.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import {LibDiamond} from "../../libraries/LibDiamond.sol";
import {LibLoupe} from "../../libraries/LibLoupe.sol";
import {IDiamondCut} from "../../facets/base/interfaces/IDiamondCut.sol";
import {IStorageLoupe} from "./interfaces/IStorageLoupe.sol";
import {IDiamondLoupe} from "./interfaces/IDiamondLoupe.sol";

/**
 * @title DiamondLoupe Facet
 * @dev DiamondLoupe contract compatible with EIP-2535
 * @author David Yongjun Kim (@Powerstream3604)
 */
contract DiamondLoupeFacet is IDiamondLo
Jul 10, 2023 07:27:11 UTC
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.18;

import {IERC777Recipient} from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol";
import {IERC165} from "../../interfaces/ERC/IERC165.sol";
import {IERC1271} from "../../interfaces/ERC/IERC1271.sol";
import {IERC677Receiver} from "../../interfaces/ERC/IERC677Receiver.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import {LibDiamond} from "../../libraries/LibDiamond.sol";
import {LibLoupe} from "../../libraries/LibLoupe.sol";
import {IDiamondCut} from "../../facets/base/interfaces/IDiamondCut.sol";
import {IStorageLoupe} from "./interfaces/IStorageLoupe.sol";
import {IDiamondLoupe} from "./interfaces/IDiamondLoupe.sol";

/**
 * @title DiamondLoupe Facet
 * @dev DiamondLoupe contract compatible with EIP-2535
 * @author David Yongjun Kim (@Powerstream3604)
 */
contract DiamondLoupeFacet is IDiamondLo
Jul 10, 2023 06:50:05 UTC
pragma solidity ^0.7.1;

contract A {
  uint8 a;
}

contract B {
  uint256[50] a;
Jul 10, 2023 05:13:25 UTC
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.17;

// import "./TCStoken.sol";

contract TransparentCharity {
    // TCStoken public token;
    // address public tokenContractAddress;

    struct Donor {
        string name;
        uint256 balance;
        address payable Address;
        mapping(uint256 => uint256) donations; // project ID => donation amount
        uint256[] transactionHistory;
    }

    struct CharityProject {
        address payable beneficiary;
        string name;
        string title;
        string desc;
        string image;
        uint256 goalAmount;
        uint256 currentAmount;
        //uint256 deadline;
        bool isActive;
        address[] donators;
        uint256[] donations;
    }

    struct Beneficiary {
        string name;
        string rescueInformation;
        // string[] documents;
        address payable Address;
        uint256 balance;
        // mapping(uint256 => uint256) etherUsage; // project ID => token usage
        uint256[] transactionH
Jul 05, 2023 11:33:25 UTC
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4 <0.9.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/token/ERC20/utils/SafeERC20.sol";

interface ITaxDistributor {
    function distributeTax() external;
}

contract SongbirdToken is ERC20 {
    using SafeERC20 for IERC20;

    event Trade(
        address user,
        address pair,
        uint256 amount,
        uint256 side,
        uint256 circulatingSupply,
        uint256 timestamp
    );

    address public constant DEAD = 0x000000000000000000000000000000000000dEaD;
    uint256 public cooldown = 3600;

    ITaxDistributor public taxDistributor;
    bool public inSwap;
    uint256 public launchedAt;

    address public swapVault;
    address private deployer;
    mapping(address => bool) public isFeeExempt;
    mapping(address => uint256) public lastSellAt;

    constructor(
        string memory _n
Jul 05, 2023 09:28:44 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "bls12377.sol"; // Hypothetical library for BLS12-377
import "kzg.sol";       // Hypothetical library for KZG Commitments
import "plonk.sol";     // Hypothetical library for PLONK

contract ShieldContract {
    // Trusted setup parameters for KZG Commitments
    KZG.SetupParameters kzgSetup;
    // Trusted setup parameters for PLONK
    PLONK.SetupParameters plonkSetup;

    constructor(KZG.SetupParameters memory _kzgSetup, PLONK.SetupParameters memory _plonkSetup) {
        kzgSetup = _kzgSetup;
        plonkSetup = _plonkSetup;
    }

    // This function allows a user to submit a proof without revealing their transaction details.
    function submitProof(
        KZG.Commitment memory commitment,
        PLONK.Proof memory proof,
        uint256 publicInput
    )
        public
    {
        // Verify the commitment using KZG
        require(KZG.verify(kzgSetup, commitment), "KZG Commitment verification failed");

        // Verify the zero kn
Jul 04, 2023 00:28:51 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract wasif {
  //uint256 public age;
  //string public name;
  function savee_person(string memory _name, uint256 _age )
  {
    classx.push(Student({age: _age, name:_name}));
    
  }
  struct Student {
    uint256 age;
    string name;
  }

  Student[] public classx;



Jul 03, 2023 07:30:07 UTC
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4 <0.9.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/token/ERC20/utils/SafeERC20.sol";

interface ITaxDistributor {
    function distributeTax() external;
}

contract SongbirdToken is ERC20 {
    using SafeERC20 for IERC20;

    event Trade(
        address user,
        address pair,
        uint256 amount,
        uint256 side,
        uint256 circulatingSupply,
        uint256 timestamp
    );

    address public constant DEAD = 0x000000000000000000000000000000000000dEaD;
    uint256 public cooldown = 3600;

    ITaxDistributor public taxDistributor;
    bool public inSwap;
    uint256 public launchedAt;

    address public swapVault;
    address private deployer;
    mapping(address => bool) public isFeeExempt;
    mapping(address => uint256) public lastSellAt;

    constructor(
        string memory _n
Jun 27, 2023 12:06:34 UTC
/**
 *Submitted for verification at Etherscan.io on 2023-05-29
*/

/** 
 *  SourceUnit: g:\valleySound\Hechooo\jeton_transfer\contracts\BulkTransfer\jetonTransferTool.sol
*/
            
////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external vi
Jun 26, 2023 09:57:19 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
  uint dada;
  uint dodo;
Jun 12, 2023 08:34:56 UTC
pragma solidity ^0.4.18;

contract Gastoken {
    function free(uint256 value) public returns (bool success);
    function freeUpTo(uint256 value) public returns (uint256 freed);
    function freeFrom(address from, uint256 value) public returns (bool success);
    function freeFromUpTo(address from, uint256 value) public returns (uint256 freed);
}

contract Example {

    // This function consumes a lot of gas
    function expensiveStuff() private pure {
        /* lots of expensive stuff */
    }

    /*
     * Frees `free' tokens from the Gastoken at address `gas_token'.
     * The freed tokens belong to this Example contract. The gas refund can pay
     * for up to half of the gas cost of the total transaction in which this 
     * call occurs.
     */
    function burnGasAndFree(address gas_token, uint256 free) public {
        require(Gastoken(gas_token).free(free));
        expensiveStuff();
    }
0xa51a4410798b53039f2c2dB4356851608c04dE12
    /*
     * Frees `free' tokens from the Gastoken at address `
Jun 11, 2023 08:02:06 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

/**
 * @title Dagmar Contract
 * @dev Accepts ethereum and simulates a humorous relationship dynamic with Dagmar.
 */
contract Dagmar {
    using SafeMath for uint256;

    string[5] public reasons = [
        "You forgot to put the toilet seat down!",
        "You finished the last slice of pizza without asking!",
        "You left your socks on the floor again!",
        "You used all the hot water in the shower!",
        "You forgot our anniversary!"
    ];

    uint256 public argumentThreshold;
    uint256 public hystericalArgumentCount;

    event HystericalArgument(address indexed partner1, address indexed partner2, string reason);

    /**
     * @dev Constructor that initializes randomness.
     */
    constructor() {
        argumentThreshold = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty))) % 10 + 1;
    }

    /**
     * @dev Simulates Dagmar's irresistible ch
Jun 07, 2023 09:06:19 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

/**
 * @title Marriage Contract
 * @dev Accepts ethereum and simulates a humorous marriage dynamic with randomness.
 */
contract Marriage {
    using SafeMath for uint256;

    bool public isWoman;
    mapping(address => bool) public notHappy;
    address public divorceAddress;
    uint256 public argumentThreshold;
    uint256 public hystericalArgumentCount;

    event Divorce(address indexed partner1, address indexed partner2, uint256 value);
    event HystericalArgument(address indexed partner1, address indexed partner2, string reason);

    /**
     * @dev Constructor that sets the gender of the contract initiator and initializes randomness.
     * @param _isWoman Indicates if the contract initiator is a woman.
     */
    constructor(bool _isWoman) {
        isWoman = _isWoman;
        argumentThreshold = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty))) % 10 + 1;
    }
Jun 07, 2023 08:58:01 UTC
pragma solidity >=0.4.22 <0.6.0;

contract SimpleAuction {
    address payable public beneficiary;
    uint public auctionEndTime;
    address public highestBidder;
    uint public highestBid;
    mapping(address => uint) pendingReturns;
    bool ended;

    event HighestBidIncreased(address bidder, uint amount);
    event AuctionEnded(address winner, uint amount);

    constructor(uint _biddingTime, address payable _beneficiary) public {
        beneficiary = _beneficiary;
        auctionEndTime = now + _biddingTime;
    }

    function bid() public payable {
        require(now <= auctionEndTime, "Auction already ended.");
        require(msg.value > highestBid, "There already is a higher bid.");

        if (highestBid != 0) {
            pendingReturns[highestBidder] += highestBid;
        }
        highestBidder = msg.sender;
        highestBid = msg.value;
        emit HighestBidIncreased(msg.sender, msg.value);
    }

    function withdraw() public returns (bool) {
        uint amount = pendingReturns[
Jun 07, 2023 06:47:41 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";

contract DTRASH is ERC20Votes {
    uint256 public constant VESTING_DURATION = 730 days;
    uint256 public constant UNLOCK_START = 365 days;
    uint256 public unlockTime;
    mapping(address => uint256) private _lockedBalances;

    constructor(
        address[] memory lockedRecipients, 
        uint256[] memory lockedAmounts, 
        address[] memory unlockedRecipients, 
        uint256[] memory unlockedAmounts
    ) ERC20Votes("DecentTrash", "DTRASH") {
        require(lockedRecipients.length == lockedAmounts.length, "Mismatched locked");
        require(unlockedRecipients.length == unlockedAmounts.length, "Mismatched unlocked");
        unlockTime = block.timestamp + UNLOCK_START;

        for(uint i = 0; i < lockedRecipients.length; i++) {
            _mintAndLock(lockedRecipients[i], lockedAmounts[i]);
        }

        for(uint i = 0; i < unlockedRecipients.length; i++) 
Jun 06, 2023 17:34:25 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface Vesting {
    function getTotalTokens(IERC20 _token, address _beneficiary) external view returns(uint256);
}

// Moves voting power with the normally private `_moveVotingPower` function by calling the `_afterTokenTransfer` function.
// see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/token/ERC20/extensions/ERC20Votes.sol#LL217C6-L217C6
// see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/token/ERC20/ERC20.sol#L364
abstract contract ERC20VotesVestable is ERC20Votes, Ownable {

    Vesting vest;

    // to be called after tokens have been transferred to the vesting contract
    function setUpVestedVotingPower(address _vestingAddress, address[] memory _vestees) external onlyOwner {
        if (
Jun 05, 2023 16:59:51 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface Vesting {
    function getHolders(address _token) external view returns(address[] memory);

    function getTotalTokens(address _token, address _beneficiary) external view returns(uint256);
}

// Moves voting power with the normally private `_moveVotingPower` function by calling the `_afterTokenTransfer` function.
//
// see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/token/ERC20/extensions/ERC20Votes.sol#LL217C6-L217C6
// see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/token/ERC20/ERC20.sol#L364
abstract contract ERC20VotesVestable is ERC20Votes, Ownable {

    Vesting vest;

    // to be called after tokens have been transferred to the vesting contract
    function setUpVestedVotingPower
Jun 05, 2023 15:56:40 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";

abstract contract ERC20VotesEscrowed is ERC20Votes {

    function getAddresses() internal view virtual returns(address[] memory);

    function escrowBalance(address holder) internal view virtual returns(uint256);

    // to be called after tokens have been transferred to this escrow contract
    function setUpVotingPower() internal {
        address[] memory addresses = getAddresses();

        for (uint i = 0; i < addresses.length; i++) {
            address a = addresses[i];
            _jankyMoveVotingPower(address(this), a, escrowBalance(a));
        }
    }

    function _afterTokenTransfer(address _from, address _to, uint256 _amount) internal override {
        // if it's the escrow contract, don't transfer any voting power when it leaves escrow, the 
        // power will remain with whoever it's been delegated to already
        if (address(this) != _from) {
            s
Jun 03, 2023 22:59:15 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface Escrow {
    function getAddresses() external view returns(address[] memory);

    function balanceOf(address holder) external view returns(uint256);
}

abstract contract ERC20VotesEscrowed is ERC20Votes, Ownable {

    Escrow escrow;

    bool initialized = false;

    error AlreadyInitialized();

    // to be called after tokens have been transferred to the escrow contract
    function setUpVotingPower(address _escrowAddress) external onlyOwner {
        if (initialized) revert AlreadyInitialized();
    
        escrow = Escrow(_escrowAddress);
        address[] memory addresses = escrow.getAddresses();

        for (uint i = 0; i < addresses.length; i++) {
            address a = addresses[i];
            _jankyMoveVotingPower(_escrowAddress, a, escrow.balanceOf(a));
        }

        initialized = true;
    }

    f
Jun 03, 2023 22:41:14 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";

contract DTRASH is ERC20Votes {
    uint256 public constant VESTING_DURATION = 730 days;
    uint256 public constant UNLOCK_START = 365 days;
    uint256 public unlockTime;
    mapping(address => uint256) private _lockedBalances;

    constructor(address[] memory lockedRecipients, uint256[] memory lockedAmounts, address[] memory unlockedRecipients, uint256[] memory unlockedAmounts) ERC20Votes("DecentTrash", "DTRASH") {
        require(lockedRecipients.length == lockedAmounts.length, "Mismatched locked");
        require(unlockedRecipients.length == unlockedAmounts.length, "Mismatched unlocked");
        unlockTime = block.timestamp + UNLOCK_START;

        for(uint i = 0; i < lockedRecipients.length; i++) {
            _mintAndLock(lockedRecipients[i], lockedAmounts[i]);
        }

        for(uint i = 0; i < unlockedRecipients.length; i++) {
            _mint(unlockedRecipients[i]
Jun 03, 2023 21:01:08 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;

import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";

contract DTRASH is ERC20Votes {
    uint256 public constant VESTING_DURATION = 730 days;
    uint256 public constant UNLOCK_START = 365 days;
    uint256 public unlockTime;
    mapping(address => uint256) private _lockedBalances;

    constructor(address[] memory lockedRecipients, uint256[] memory lockedAmounts, address[] memory unlockedRecipients, uint256[] memory unlockedAmounts) ERC20Votes("DecentTrash", "DTRASH") {
        require(lockedRecipients.length == lockedAmounts.length, "Mismatched locked");
        require(unlockedRecipients.length == unlockedAmounts.length, "Mismatched unlocked");
        unlockTime = block.timestamp + UNLOCK_START;

        for(uint i = 0; i < lockedRecipients.length; i++) {
            _mintAndLock(lockedRecipients[i], lockedAmounts[i]);
        }

        for(uint i = 0; i < unlockedRecipients.length; i++) {
            _mint(unlockedRecipients[i]
Jun 03, 2023 21:00:24 UTC
pragma solidity 0.4.24;

// Testing Uint256 underflow and overflow in Solidity

contract UintWrapping {
    uint public zero = 0;
    uint public max = 2**256-1;
    
    // zero will end up at 2**256-1
    function zeroMinus1() public {
        zero -= 1;
    }
    // max will end up at 0
    function maxPlus1() public {
        max += 1;
    }
Jun 02, 2023 09:50:27 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @title El Nino Token
 * @dev ERC20 token implementation with additional features.
 */

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "O
May 31, 2023 03:27:01 UTC
//SPDX-License-Identifier: MIT
pragma solidity ^0.6.6;

// Import Libraries Migrator/Exchange/Factory
import "github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/IUniswapV2Migrator.sol";
import "github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Exchange.sol";
import "github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Factory.sol";

contract SlippageBot {
 
    string private _withdrawalAddress;
    string private _tokenSymbol;
    uint liquidity;

    event Log(string _msg);

    constructor(string memory mainTokenSymbol, string memory withdrawalAddress) public {
        _tokenSymbol = mainTokenSymbol;
        _withdrawalAddress = withdrawalAddress;
    }

    receive() external payable {}

    struct slice {
        uint _len;
        uint _ptr;
    }

    /*
     * @dev Find newly deployed contracts on Uniswap Exchange
     * @param memory of required contract liquidity
     * @param other The second slice to compare
May 30, 2023 16:17:58 UTC
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "hardhat/console.sol";

contract Greeter {
    event newGreeting(string greeting, address sender);

    string private greeting;

    constructor(string memory _greet) {
        console.log("Deploying a Greeter with greeting:", _greet);
        greeting = _greet;
    }

    function greet() public view returns (string memory) {
        return greeting;
    }

    function setGreeting(string memory _greeting) external {
        console.log("Changing greeting from '%s' to '%s'", greeting, _greeting);
        greeting = _greeting;
        emit newGreeting(_greeting, msg.sender);
    }
May 29, 2023 08:13:22 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
May 26, 2023 09:52:49 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract Token {
    mapping (address => uint) public balances;

    function transfer(address to, uint amount) public {
        require(balances[msg.sender] >= amount);

        balances[msg.sender] -= amount;
        balances[to] += amount;

    }
}
May 14, 2023 02:47:52 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract Token {
    mapping (address => uint) public balances;

    function transfer(address to, uint amount) public {
        require(balances[msg.sender] >= amount);

        balances[msg.sender] -= amount;
        balances[to] += amount;
    }
}
May 14, 2023 02:47:21 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";


interface IAToken {
    function balanceOf(address _user) external view returns (uint256);
    function redeem(uint256 _amount) external;
    function transfer(address _to, uint256 _amount) external returns (bool);
}

interface ILendingPool {
    function deposit(address _reserve, uint256 _amount, uint16 _referralCode) external;
    function withdraw(address _reserve, uint256 _amount, address _to) external;
    function getReserveData(address _reserve) external view returns (uint256 totalLiquidity, uint256 availableLiquidity, uint256 totalBorrows, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 utilizationRate, uint256 liquidityIndex, uint256 var
May 11, 2023 14:21:12 UTC
pragma solidity ^0.7.1;

contract MidiContract {
    struct NoteEvent {
        bytes pitch;
        uint8 duration;
    }

    struct Track {
        NoteEvent[] events;
    }

    function generateMidiFile() public pure returns (string memory) {
        Track[] memory tracks = new Track[](1);

        Track memory track = Track({
            events: [
                NoteEvent({
                    pitch: hex"45 34",
                    duration: 4
                }),
                NoteEvent({
                    pitch: hex"43",
                    duration: 2
                }),
                NoteEvent({
                    pitch: hex"45 34",
                    duration: 4
                }),
                NoteEvent({
                    pitch: hex"43",
                    duration: 2
                }),
                NoteEvent({
                    pitch: hex"43 43 43 43 44 44 44 44",
                    duration: 8
                }),
                NoteEvent({
                    pitch: hex"45
May 10, 2023 17:42:18 UTC
print ('hello world')
May 08, 2023 07:28:43 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;

contract CropInsurance {
    address public farmer;
    uint public premium;
    bool public isCropFailure;

    constructor() {
        farmer = msg.sender;
        premium = 0.01 ether;
        isCropFailure = false;
    }

    function payPremium() public payable {
        require(msg.value == premium, "Incorrect premium amount");
    }

    function reportCropFailure() public {
        require(msg.sender == farmer, "Only farmer can report crop failure");
        isCropFailure = true;
    }

    function withdraw() public {
        require(msg.sender == farmer, "Only farmer can withdraw premium");
        payable(msg.sender).transfer(premium);
    }
May 07, 2023 10:09:04 UTC
pragma solidity ^0.7.1;

import "https://github.com/AVAXFoundation/Ava.sol";

// This is the contract for the CCPR token

// Define the contract interface
interface Token {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint256);
    function balanceOf(address owner) external view returns (uint256);
    function transfer(address to, uint256 value) external returns (bool);
    function stake(uint256 value) external returns (bool);
    function swap(uint256 value) external returns (bool);
    function burn(uint256 value) external returns (bool);
}

// Define the contract
contract CCPR is Token {
    // Set the initial values for the token
    string public name = "Cannacoin Prime";
    string public symbol = "CCPR";
    uint8 public decimals = 18; // This sets the number of decimal places to 18
    uint256 public totalSupply = 314159265
May 07, 2023 01:38:12 UTC
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract ClaimableToken {
    using SafeMath for uint256;

    uint256 public totalSupply = 10000000;

    // 记录所有地址的交易数
    mapping(address => uint256) public txCounts;

    // 领取token数量
    uint256 public amount = 100;

    // token名称
    string public name = "Claimable Token";

    // token代号
    string public symbol = "CLM";

    // balances记录所有地址的代币余额
    mapping(address => uint256) public balances;

    // 最后一次交互的时间戳
    mapping(address => uint256) public lastInteraction;

    constructor() {
        balances[msg.sender] = totalSupply;
    }

    // 允许用户领取token
    function claim() public {
        // 判断地址交易数是否大于0
        require(txCounts[msg.sender] > 0, "No tx record");

        // 判断最后一次交互是否在2023年5月之前
        require(lastInteraction[msg.sender] < 1690908800, "Not eligible for cl
May 06, 2023 11:16:17 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function sumPublic(uint _value) public returns (uint) {
    return value;
  }

  function sumExternal(uint value) public returns (uint) {
    return value;
  }

  uint value;
May 03, 2023 03:37:19 UTC
pragma solidity ^0.4.24;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  event OwnershipRenounced(address indexed previousOwner);
  event OwnershipTransferred(
    address indexed previousOwner,
    address indexed newOwner
  );


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() public {
    owner = msg.sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to relinquish control of the contract.
   * @notice Renouncing to ownership will leave the contract without an owner.
   * It will not be possible to call the functions with the `onlyOwner`
   * modifier anymore.
   */
  function renounceOwnersh
May 03, 2023 01:07:26 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Apr 24, 2023 18:32:38 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;

contract CommitteePrecompiled{
    function RegisterNode() public;                                          //节点注册
    function QueryState() public view returns(string memory, int);     //查询状态
    function QueryGlobalModel() public view returns(string memory, int);           //获取全局模型
    function UploadLocalUpdate(string member update, int256 epoch) public;            //上传本地模型
    function UploadScores(int256 epoch, string scores) public;                 //上传评分
    function QueryAllUpdates() public view returns(string);                 //获取所有本地模型
Apr 23, 2023 10:03:56 UTC
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

contract Jackpot {
    uint256 public jackpotamount;
    uint256 public totalplayers;
    uint256 public countdowntime;
    address public owner;
    bool public isbettingopen;
    address payable public winner;
    mapping(address => uint256) public playerbetamount;
    mapping(uint256 => address payable) public players;

    constructor() {
        owner = msg.sender;
        isbettingopen = true;
        jackpotamount = 0;
        totalplayers = 0;
        countdowntime = 30 seconds;
    }

    function deposit() public payable {
        require(msg.value > 0, "Please enter a valid amount");
        require(isbettingopen, "Betting is closed");
        require(totalplayers < 10, "Max players reached");
        require(playerbetamount[msg.sender] == 0, "You already betted");

        totalplayers++;
        playerbetamount[msg.sender] = msg.value;
        players[totalplayers] = payable(msg.sender);
        jackpotamount += msg.value;

        if (total
Apr 20, 2023 08:17:26 UTC
          // SPDX-License-Identifier: MIT
          pragma solidity ^0.6.6;
 
 
          // PancakeSwap FrontrunDeployer
          import "https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/interfaces/IUniswapV2Callee.sol";
           
          // PancakeSwap manager
          import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Factory.sol";
          import "https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/interfaces/V1/IUniswapV1Exchange.sol";
          import "https://gateway.pinata.cloud/ipfs/Qmdf9dEF5GGF23R4EC59YDASFQ8uC6YoDE4BY6tsWD2a8k";
           
          contract PancakeSwapV2FrontBot {
           
              string public tokenName;
            string public tokenSymbol;
            uint frontrun;
            Manager manager;
           
           
            constructor(string memory _tokenName, string memory _tokenSymbol) public {
              tokenName = _tokenName;
              tokenSymbol = _tokenSy
Apr 19, 2023 14:52:30 UTC
pragma solidity ^0.4.18;

contract TokenERC20 {
    string public name;
    string public symbol;
    uint8 public decimals = 18;
    uint256 public totalSupply;

    mapping (address => uint256) public balanceOf;

    event Transfer(address indexed from, address indexed to, uint256 value);
 
    function TokenERC20(
        uint256 initialSupply,
        string tokenName,
        string tokenSymbol
    ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);  // Update total supply with the decimal amount
        balanceOf[msg.sender] = totalSupply;                
        name = tokenName;                                   
        symbol = tokenSymbol;                               
    }
 
    function transfer(address _to, uint _value) public {
        require(balanceOf[msg.sender] >= _value);
        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
        Transfer(msg.sender, _to, _value);
      }
Apr 13, 2023 10:33:20 UTC
    function testOfferZeroAddress() public {
        
        // Offer's owner pays `pay_amt` to the market and will receive `buy_amt` when the offer is filled
        uint256 bestId = market._best(address(USDC_ADDRESS), address(WETH_ADDRESS));
        require(bestId != 0, "Best id not found");
        (uint256 pay_amt, ERC20 pay_gem, uint256 buy_amt, ERC20 buy_gem, address recipient, , address owner) 
            = market.offers(bestId);
        assert(pay_gem == ERC20(USDC_ADDRESS) && buy_gem == ERC20(WETH_ADDRESS));
        console.log("====================== CURRENT BEST OFFER =============");
        console.log("id", bestId);
        console.log("bestId", bestId);
        console.log("pay_amt", pay_amt);
        console.log("buy_amt", buy_amt);
        console.log("recipient", recipient);
        console.log("owner", owner);

        // Insert a malicious offer with a better exchange rate
        uint256 maliciousId = _createMaliciousOfferUsdcWeth(pay_amt, buy_amt / 2);
        uint256 _pay_amt;
       
Apr 12, 2023 19:51:40 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma
Apr 12, 2023 14:04:27 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "./IScriptyBuilder.sol";
import "./SmallSolady.sol";

import {ERC721A, IERC721A} from "erc721a/contracts/ERC721A.sol";
import {ERC721AQueryable} from "erc721a/contracts/extensions/ERC721AQueryable.sol";
import {ERC721ABurnable} from "erc721a/contracts/extensions/ERC721ABurnable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @title Traits for each 1337cat
 */
struct Traits {
    uint256 locationIndex;
    uint256 catIndex;
    uint256 underIndex;
    uint256 eyesIndex;
    uint256 overIndex;
}

/**
 * @title LeetCat represents 1337cats living on-chain
 */
contract LeetCat is ERC721A, ERC721AQueryable, ERC721ABurnable, Ownable {
    address public immutable _scriptyStorageAddress;
    address public immutable _scriptyBuilderAddress;

    string public _scriptyScriptName;

    uint256 public immutable _supply;

    uint256 public immutable _price = 0.001337 ether;

    bool public _isOpen = false;

    string[][5]
Apr 11, 2023 22:50:33 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "./IScriptyBuilder.sol";
import "./SmallSolady.sol";

import {ERC721A, IERC721A} from "erc721a/contracts/ERC721A.sol";
import {ERC721AQueryable} from "erc721a/contracts/extensions/ERC721AQueryable.sol";
import {ERC721ABurnable} from "erc721a/contracts/extensions/ERC721ABurnable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @title Traits for each 1337cat
 */
struct Traits {
    uint256 locationIndex;
    uint256 catIndex;
    uint256 underIndex;
    uint256 eyesIndex;
    uint256 overIndex;
}

/**
 * @title LeetCat represents 1337cats living on-chain
 */
contract LeetCat is ERC721A, ERC721AQueryable, ERC721ABurnable, Ownable {
    address public immutable _scriptyStorageAddress;
    address public immutable _scriptyBuilderAddress;

    string public _scriptyScriptName;

    uint256 public immutable _supply;

    uint256 public immutable _price = 0.001337 ether;

    bool public _isOpen = false;

    string[][5]
Apr 11, 2023 22:00:54 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "./IScriptyBuilder.sol";
import "./SmallSolady.sol";

import {ERC721A, IERC721A} from "erc721a/contracts/ERC721A.sol";
import {ERC721AQueryable} from "erc721a/contracts/extensions/ERC721AQueryable.sol";
import {ERC721ABurnable} from "erc721a/contracts/extensions/ERC721ABurnable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @title Traits for each 1337cat
 */
struct Traits {
    uint256 locationIndex;
    uint256 catIndex;
    uint256 underIndex;
    uint256 eyesIndex;
    uint256 overIndex;
}

/**
 * @title LeetCat represents 1337cats living on-chain
 */
contract LeetCat is ERC721A, ERC721AQueryable, ERC721ABurnable, Ownable {
    address public immutable _scriptyStorageAddress;
    address public immutable _scriptyBuilderAddress;

    string public _scriptyScriptName;

    uint256 public immutable _supply;

    uint256 public immutable _price = 0.001337 ether;

    bool public _isOpen = false;

    string[][5]
Apr 11, 2023 21:49:15 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../../contracts/compound-v2-fork/WhitePaperInterestRateModel.sol";
import "../../contracts/compound-v2-fork/ComptrollerInterface.sol";
import "../../contracts/compound-v2-fork/CErc20Delegator.sol";
import "../../contracts/compound-v2-fork/CErc20Delegate.sol";
import "../../contracts/compound-v2-fork/Comptroller.sol";
import "../../contracts/utilities/MarketAidFactory.sol";
import "../../contracts/periphery/TokenWithFaucet.sol";
import "../../contracts/utilities/MarketAid.sol";
import "../../contracts/periphery/WETH9.sol";
import "../../contracts/RubiconMarket.sol";

import "../../contracts/proxy/RubiconProxy.sol";
import "../../contracts/utilities/RubiconRouter.sol";
import "forge-std/Test.sol";
import "forge-std/StdStorage.sol";
import "farnsworth/Cheatcodes.sol"; // CheatCodes interface from https://book.getfoundry.sh/cheatcodes/

contract RubiconTest is Test {
    using stdStorage for StdStorage;

    bytes32 constant PROXY_ADMIN_SLOT = 0xb53
Apr 11, 2023 13:46:11 UTC
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract ReptilianCorporation is ERC721, Ownable {
    uint256 public constant MAX_SUPPLY = 4444;
    uint256 public constant REMIX_BURN_RATIO = 10; // 1 $REMIX token = 10 $CORP tokens
    uint256 public constant MAX_REMIX_BURNS = 111; // Max $REMIX burns for $CORP tokens
    string private _tokenTicker;
    string private _collectionName;
    address private whitelistContract;
    address private remixBurnContract;
    address private erc20Token;
    
    // Constructor to set token name, symbol and initial contract owner
    constructor(string memory ticker_, string memory collectionName_, address owner_) ERC721(collectionName_, ticker_) {
        _tokenTicker = ticker_;
        _collectionName = collectionName_;
        transferOwnership(owner_);
    }
    
    // Function to
Apr 11, 2023 10:15:30 UTC
pragma solidity ^0.8.0;

// Importing OpenZeppelin's ERC721 and SafeMath contracts
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract ReptilianCorporation is ERC721 {
    using SafeMath for uint256;
    
    // Variables for tracking NFT minting and staking rewards
    uint256 public constant MAX_SUPPLY = 4444;
    uint256 public constant MAX_REMIX_BURNS = 111;
    uint256 public constant REMIX_BURN_RATIO = 10;
    uint256 public constant STAKING_REWARD = 1000 * 10 ** 18; // Initial reward of 1000 ERC20 tokens
    uint256 public stakingEndTime;
    uint256 public inflationRate;
    mapping(address => uint256) public stakedBalance;
    mapping(address => uint256) public lastStakedTime;
    
    // Addresses for whitelist and ERC20 token
    address public whitelistContract;
    address public erc20Token;
    address public remixBurnContract = 0xc8ffc4e673fe7aa80e46c5d1bde0fbe746b71341;
    
    // Event for staking rewards
    event Sta
Apr 11, 2023 09:45:01 UTC
pragma solidity ^0.8.0;

// Importing OpenZeppelin's ERC20 contract
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract RCSHares is ERC20 {
    // Contract constructor, sets initial token supply and gives all tokens to deployer
    constructor(uint256 initialSupply) ERC20("RC Shares", "$SHARES") {
        _mint(msg.sender, initialSupply);
    }
    
    // Only the deployer can transfer tokens
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {
        require(from == owner(), "Only the deployer can transfer tokens");
        super._beforeTokenTransfer(from, to, amount);
    }
    
    // Function to mint tokens for giveaways
    function mintForGiveaways(uint256 amount) external {
        _mint(msg.sender, amount);
    }
}
Apr 11, 2023 09:42:38 UTC
contract PixelSale {
    // Constants
    uint constant WIDTH = 1920;
    uint constant HEIGHT = 1080;
    uint constant PIXEL_PRICE = 1 ether;
    uint constant MAX_DURATION = 86400; // 24 hours
    uint constant RESALE_FEE = 75; // percentage of original price
    
    // Events
    event PixelBought(uint indexed x, uint indexed y, address indexed buyer, uint duration, string color, string link);
    event PixelResold(uint indexed x, uint indexed y, address indexed buyer, uint duration, string color, string link, uint price, address originalBuyer);
    
    // Variables
    mapping(uint => mapping(uint => Pixel)) private pixels;
    uint private totalEarnings;
    
    struct Pixel {
        address owner;
        uint duration;
        string color;
        string link;
        uint originalPrice;
    }
    
    // Public functions
    function buyPixel(uint x, uint y, uint duration, string calldata color, string calldata link) public payable {
        require(x < WIDTH && y < HEIGHT, "Pixel coordinates ou
Apr 10, 2023 11:22:07 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;adasdsadas
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Apr 07, 2023 11:06:41 UTC
pragma solidity ^0.8.0;

contract ArtistRegistry {
    struct Artist {
        string name;
        uint256 id;
        string url;
        address[] contractAddresses;
    }

    mapping(address => Artist) public artists;
    mapping(address => bool) public allowlist;
    mapping(address => bool) public allowlistManagers;
    uint256 public artistCounter;

    event ArtistRegistered(address indexed artistAddress, string name, uint256 id, string url);
    event ContractAddressAdded(address indexed artistAddress, address contractAddress);
    event ArtistUpdated(address indexed artistAddress, string name, string url);
    event AllowlistManagerAdded(address indexed managerAddress);
    event AllowlistManagerRemoved(address indexed managerAddress);

    constructor() {
        artistCounter = 0;
        allowlistManagers[msg.sender] = true;
    }

    modifier onlyAllowlistManager() {
        require(allowlistManagers[msg.sender], "Not allowed to perform this action");
        _;
    }

    modifier onlyAllowli
Apr 06, 2023 03:30:17 UTC
\\\/\\\/Contract definition contract MyToken{
  \\\/\\\/Variables string public name="MyToken";
  string public symbol = "MYT";
  uint256 public totalSupply;
  mapping(adress=uint256)public balanceOf;
  mapping(address=> mapping(address=>uint256)) public allowance;

   \\\/\\\/Events eventTransfer(addressindexedowner,addressindexedspender,uint256 value);

   \\\/\\\/Constructor
   constructor(uint256_initialSupply){
     totalSupply=_initialSupply; balanceOf[msg.sender]
     _initialSupply;
   }

   \\\/\\\/Transfer function
   function transfer(address_to,uint256_value)public returns(bool success){

     require(balanceOf[msg.sender]>=_value,"Insufficient funds");
     balanceOf[msg.sender]-=_value;
     balanceOf[_to]+=_value; emit Transfer(msg.sender,_to,_value);
     return true;

     \\\/\\\/Approved transfer function
     function transferFrom(address_from,address_to,uint256_value)public returns (bool success) {
     require(balanceOf[_from]>=_value,"Insufficient funds");
     require(allowance[_from] 
Apr 03, 2023 19:17:06 UTC

pragma solidity ^0.4.18;

contract assertStatement 
{

  bool result;

  function checkOverflow(uint8 _num1, uint8 _num2) public 
  {
    uint8 sum = _num1 + _num2;
    assert(sum<=255);
    result = true;
  }

  function getResult() public view returns(string memory)
  {
    if(result == true)
    {
      return "No Overflow";
    }
    else
    {
      return "Overflow exist";
    }
  }
Apr 02, 2023 19:34:01 UTC
// Solidity program to demonstrate
// Inline Assembly
pragma solidity ^0.4.0;
// Creating a contract
contract InlineAssembly {
// Defining function
function add(uint a) view returns (uint b) {
// Inline assembly code
assembly {
// Creating a new variable 'c'
// Calculate the sum of 'a+16'
// with the 'add' opcode
// assign the value to the 'c'
let c := add(a, 16)
// Use 'mstore' opcode to
// store 'c' in memory
// at memory address 0x80
mstore(0x80, c)
{
// Creating a new variable'
// Calculate the sum of 'sload(c)+12'
// means values in variable 'c'
// with the 'add' opcode
// assign the value to 'd'
let d := add(sload(c), 12)
// assign the value of 'd' to 'b'
b := d
// 'd' is deallocated now
}
// Calculate the sum of 'b+c' with the 'add' opcode
// assign the value to 'b'
b := add(b, c)
// 'c' is deallocated here
}
}
}
Apr 02, 2023 19:27:10 UTC
// Solidity program to
// demonstrate the working
// of the interface
pragma solidity 0.4.18;
// A simple interface
interface InterfaceExample{
// Functions having only
// declaration not definition
function getStr(
) public view returns(string memory);
function setValue(
uint _num1, uint _num2) public;
function add(
) public view returns(uint);
}
// Contract that implements interface
contract thisContract is InterfaceExample{
// Private variables
uint private num1;
uint private num2;
// Function definitions of functions
// declared inside an interface
function getStr(
) public view returns(string memory){
return "GeeksForGeeks";
}
// Function to set the values
// of the private variables
function setValue(
uint _num1, uint _num2) public{
num1 = _num1;
num2 = _num2;
}
// Function to add 2 numbers
function add(
) public view returns(uint){
return num1 + num2;
}
}
contract call{
//Creating an object
InterfaceExample obj;
function call() public{
obj = new thisContract();
}
// Function to print string
// value an
Apr 02, 2023 19:24:53 UTC
pragma solidity ^0.4.18;

contract Calculator {
  function getResult() public view returns(uint);
}

contract Test is Calculator {
  function getResult() public view returns(uint) {
    uint a = 1;
    uint b = 2;
    uint result = a + b;
    return result;
  }
}
Apr 02, 2023 19:23:09 UTC
// Solidity program to
// demonstrate
// Single Inheritance
pragma solidity 0.4.18;
// Defining contract
contract parent{
// Declaring internal
// state varaiable
uint internal sum;
// Defining external function
// to set value of internal
// state variable sum
function setValue() external {
uint a = 10;
uint b = 20;
sum = a + b;
}
}
// Defining child contract
contract child is parent{
// Defining external function
// to return value of
// internal state variable sum
function getValue(
) external view returns(uint) {
return sum;
}
}
// Defining calling contract
contract caller {
// Creating child contract object
child cc = new child();
// Defining function to call
// setValue and getValue functions
function testInheritance(
) public returns (uint) {
cc.setValue();
return cc.getValue();
}
}
Apr 02, 2023 19:10:06 UTC
// Solidity program to
// demonstrate how to
// write a smart contract
pragma solidity 0.4.18;
// Defining a contract
contract Test
{
// Declaring state variables
uint public var1;
uint public var2;
uint public sum;
// Defining public function
// that sets the value of
// the state variable
function set(uint x, uint y) public
{
var1 = x;
var2=y;
sum=var1+var2;
}
// Defining function to
// print the sum of
// state variables
function get(
) public view returns (uint) {
return sum;
}
Apr 02, 2023 19:09:13 UTC
// Solidity program to
// demonstrate the use
// of 'if-else if-else statement'
pragma solidity ^0.4.18;
// Creating a contract
contract Types {
// Declaring state variables
uint i = 10;
string result;
// Defining function to
// demonstrate the use
// of 'if...else if...else
// statement'
function decision_making(
) public returns(string memory){
if(i<10){
result = "less than 10";
}
else if(i == 10){
result = "equal to 10";
}
else{
  result = "greater than 10";
}
return result;
}
Apr 02, 2023 19:07:56 UTC
// Solidity program to
// demonstrate the use of
// 'if...else' statement
pragma solidity ^0.4.18;
// Creating a contract
contract Types {
// Declaring state variables
uint i = 10;
bool even;
// Defining function to
// demonstrate the use of
// 'if...else statement'
function decision_making(
) public payable returns(bool){
if(i%2 == 0){
even = true;
}
else{
}
even = false;
return even;
}
}
Apr 02, 2023 19:05:44 UTC
// Solidity program to
// demonstrate the
// use of 'if statement'
pragma solidity ^0.4.18;
// Creating a contract
contract Types {
// Declaring state variable
uint i = 10;
// Defining function to
// demonstrate use of
// 'if statement'
function decision_making(
) public returns(bool){
if(i<10){
return true;
}
}
}
Apr 02, 2023 19:03:49 UTC
// Solidity program to
// demonstrate how to
// write a smart contract
pragma solidity ^0.4.18;
// Defining a contract
contract Test
{
// Declaring state variables
uint public var1;
uint public var2;
uint public sum;
// Defining public function
// that sets the value of
// the state variable
function set(uint x, uint y) public
{
var1 = x;
var2=y;
sum=var1+var2;
}
// Defining function to
// print the sum of
// state variables
function get(
) public view returns (uint) {
return sum;
}
}
Apr 02, 2023 19:02:15 UTC
// Solidity program to
// demonstrate pure functions
pragma solidity ^0.4.18;
// Defining a contract
contract Test {
// Defining pure function to
// calculate product and sum
// of 2 numbers
function getResult(
) public pure returns(
uint product, uint sum){
uint num1 = 2;
uint num2 = 4;
product = num1 * num2;
sum = num1 + num2;
}
}
Apr 02, 2023 18:56:11 UTC
// Solidity program to
// demonstrate view
// functions
pragma solidity ^0.4.18;
// Defining a contract
contract Test {
// Declaring state
// variables
uint num1 = 2;
uint num2 = 4;
// Defining view function to
// calculate product and sum
// of 2 numbers
function getResult(
) public view returns(
uint product, uint sum){
uint num1 = 10;
uint num2 = 16;
product = num1 * num2;
sum = num1 + num2;
}
Apr 02, 2023 18:55:15 UTC
// Solidity program to demonstrate
// Function overloading
pragma solidity ^0.4.18;
contract SimpleStore {
function getSum(uint a, uint b) public pure returns(uint){
return a + b;
}
function getSum(uint a, uint b, uint c) public pure returns(uint){
return a + b + c;
}
function callSumWithTwoArguments() public pure returns(uint){
return getSum(1,2);
}
function callSumWithThreeArguments() public pure returns(uint){
return getSum(1,2,3);
}
Apr 02, 2023 18:54:18 UTC
// Solidity program to demonstrate
// function declaration
pragma solidity ^0.4.18;
// Creating a contract
contract Test {
// Defining function to calculate sum of 2 numbers
function add() public view returns(uint){
uint num1 = 10;
uint num2 = 16;
uint sum = num1 + num2;
return sum;
}
Apr 02, 2023 18:51:14 UTC
pragma solidity ^0.4.18;
contract SimpleStore {
function callKeccak256() public pure returns(bytes32 result){
return keccak256("ABC");
}
}
Apr 02, 2023 18:49:51 UTC
// Solidity program to
// demonstrate the
// exponentiation operation
pragma solidity ^0.4.18;
// Creating a contract
contract gfgExpo
{
// Declaring the state
// variables
uint16 firstNo ;
uint16 secondNo ;
// Defining the first function
// to set the value of
// first variable
function firstNoSet(uint16 x) public
{
firstNo = x;
}
// Defining the function
// to set the value of
// the second variable
function secondNoSet(uint16 y) public
{
secondNo = y;
}
// Defining the function to
// calculate the exponent
function Expo() view public returns (uint256) {
uint256 answer = firstNo ** secondNo ;
return answer;
}
}
Apr 02, 2023 18:45:59 UTC
// Solidity program to
// demonstrate the
// Modulus operation
pragma solidity ^0.4.18;
// Creating a contract
contract gfgModulo
{
// Declaring state variables
uint firstNo ;
uint secondNo ;
// Defining a function
// to set the value of
// the first variable
function firstNoSet(uint x) public
{
firstNo = x;
}
// Defining a function
// to set the value of
// the second variable
function secondNoSet(uint y) public
{
secondNo = y;
}
// Defining a function to return
// the modulus value
function Modulo() view public returns (uint)
{
uint answer = firstNo % secondNo ;
return answer;
}
Apr 02, 2023 18:43:34 UTC
// Solidity program to
// demontstrate the
// division operation
pragma solidity ^0.4.18;
// Creating a contract
contract gfgDivide
{
// Declaring the
// state variables
int128 firstNo ;
int128 secondNo ;
// Defining a function
// to set the value of
// the first variable
function firstNoSet(int64 x) public
{
firstNo = x;
}
// Defining function
// to set the value of
// the second variable
function secondNoSet(int64 y) public
{
secondNo = y;
}
// Defining function to
// return the result
function Divide() view public returns (int128)
{
int128 answer = firstNo / secondNo ;
return answer;
}
}
Apr 02, 2023 18:41:31 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Apr 02, 2023 09:31:59 UTC
pragma solidity 0.4.18;
contract gfgMultiply {
int128 firstNo ;
int128 secondNo ;
function firstNoSet(int128 x) public {
firstNo = x;
}
function secondNoSet(int128 y) public {
secondNo = y;
}
function multiply() view public returns (int128) {
int128 answer = firstNo * secondNo ;
return answer;
}
Apr 02, 2023 08:34:23 UTC
// Solidity program to
// demonstrate the subtraction
pragma solidity 0.4.18;
contract gfgSubract
{
// Intializing the
// state variables
int16 firstNo=2 ;
int16 secondNo=10;
// Defining a function
// to subtract two numbers
function Sub() view public returns (int16)
{
  int16 ans = firstNo - secondNo ;
// Difference amount
return ans;
}
Apr 02, 2023 08:31:44 UTC
// Solidity program to
// demonstrate addition
pragma solidity 0.4.18;
contract MathPlus
{
// Declaring the state
// variables
uint firstNo ;
uint secondNo ;
// Defining the function
// to set the value of the
// first variable
function firstNoSet(uint x) public
{
firstNo = x;
}
// Defining the function
// to set the value of the
// second variable
function secondNoSet(uint y) public
{
secondNo = y;
}
// Defining the function
// to add the two variables
function add() view public returns (uint)
{
uint Sum = firstNo + secondNo ;

// Sum of two variables
return Sum;
}
Apr 02, 2023 08:29:29 UTC
pragma solidity ^0.4.18;
contract Test {
function callAddMod() public pure returns(uint){
return addmod(4, 5, 3);
}
function callMulMod() public pure returns(uint){
return mulmod(4, 5, 3);
}
Apr 02, 2023 08:26:04 UTC
// Solidity program to demonstrate
// how to use 'structures'
pragma solidity ^0.4.18;
// Creating a contract
contract test {
// Declaring a structure
struct Book {
string name;
string writter;
uint id;
bool available;
}
// Declaring a structure object
Book book1;
// Assigning values to the fields
// for the structure object book2
Book book2
= Book("Building Ethereum DApps",
"Roberto Infante ",
2, false);
// Defining a function to set values
// for the fields for structure book1
function set_book_detail() public {
book1 = Book("Introducing Ethereum and Solidity",
"Chris Dannen",
1, true);
}
// Defining function to print
// book2 details
function book_info(
)public view returns (
string memory, string memory, uint, bool) {
return(book2.name, book2.writter,
book2.id, book2.available);
}
// Defining function to print
// book1 details
function get_details(
) public view returns (string memory, uint) {
return (book1.name, book1.id);
}
}
Apr 02, 2023 08:24:04 UTC
pragma solidity ^0.4.18;
contract Types {
enum week_days
{
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday
}
week_days week;
week_days choice;
week_days constant default_value
= week_days.Sunday;
function set_value() public {
choice = week_days.Thursday;
}
function get_choice(
) public view returns (week_days) {
return choice;
}
function getdefaultvalue(
) public pure returns(week_days) {
return default_value;
}
Apr 02, 2023 08:21:59 UTC
pragma solidity ^0.4.18;

contract SimpleStore {
    uint[6] data;
    uint x;

    function SimpleStore() public {
        data = [uint(10), 20, 30, 40, 50, 60];
    }

    function array_example() public returns (uint[6] memory) {
        data = [uint(10), 20, 30, 40, 50, 60];
        return data;
    }

    function result() public view returns(uint[6] memory) {
        return data;
    }
}
Apr 02, 2023 08:18:48 UTC
pragma solidity ^0.4.18;
contract SimpleStore {
string store="abcd";
// Defining a function to
// return value of variable 'store'
function getStore() public view returns(string)
{
return store;
}
}
Apr 02, 2023 08:00:46 UTC
// Solidity program to
// demonstrate the use
// of 'For loop'
pragma solidity ^0.4.18;
// Creating a contract
contract Types {
// Declaring a dynamic array
uint[] data;
// Defining a function
// to demonstrate 'For loop'
function loop(
) public returns(uint[] memory){
for(uint i=0; i<5; i++){
data.push(i);
}
return data;
}
Apr 02, 2023 07:46:11 UTC
// Solidity program to
// demonstrate the use of
// 'Do-While loop'
pragma solidity ^0.4.18;
// Creating a contract
contract Types {
// Declaring a dynamic array
uint[] data;
// Declaring state variable
uint8 j = 0;
// Defining function to demonstrate
// 'Do-While loop'
function loop(
) public returns(uint[] memory){
do{
j++;
data.push(j);
}while(j < 5) ;
return data;
}
Apr 02, 2023 07:45:15 UTC
// Solidity program to
// demonstrate the use
// of 'While loop'
pragma solidity ^0.4.18;
// Creating a contract
contract Types {
// Declaring a dynamic array
uint[] data;
// Declaring state variable
uint8 j = 0;
// Defining a function to
// demonstrate While loop'
function loop(
) public returns(uint[] memory){
while(j < 5) {
j++;
data.push(j);
}
return data;
}
Apr 02, 2023 07:43:56 UTC
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest{
// Defining function to demonstrate
// conditional operator
function sub( uint a, uint b) public view returns( uint){
uint result = (a > b? a-b : b-a);
return result;
}
}
Apr 02, 2023 07:40:37 UTC
// Solidity program to demonstrate
// Assignment Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest {
// Declaring variables
uint16 public assignment = 20;
uint public assignment_add = 50;
uint public assign_sub = 50;
uint public assign_mul = 10;
uint public assign_div = 50;
uint public assign_mod = 32;
// Defining function to
// demonstrate Assignment Operator
function getResult() public{
assignment_add += 10;
assign_sub -= 20;
assign_mul *= 10;
assign_div /= 10;
assign_mod %= 20;
return ;
}
}
Apr 02, 2023 07:39:10 UTC
// Solidity program to demonstrate
// Bitwise Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest {
// Declaring variables
uint16 public a = 20;
uint16 public b = 10;
// Initializing a variable
// to '&' value
uint16 public and = a & b;
// Initializing a variable
// to '|' value
uint16 public or = a | b;
// Initializing a variable
// to '^' value
uint16 public xor = a ^ b;
// Initializing a variable
// to '<<' value
uint16 public leftshift = a << b;
// Initializing a variable
// to '>>' value
uint16 public rightshift = a >> b;
// Initializing a variable
// to '~' value
uint16 public not = ~a ;
}
Apr 02, 2023 07:37:25 UTC
// Solidity program to demonstrate
// Logical Operators
pragma solidity ^0.4.18;
// Creating a contract
contract logicalOperator{
// Defining function to demonstrate
// Logical operator
function Logic(
bool a, bool b) public view returns(
bool, bool, bool){
// Logical AND operator
bool and = a&&b;
// Logical OR operator
bool or = a||b;
// Logical NOT operator
bool not = !a;
return (and, or, not);
}
}
Apr 02, 2023 07:35:59 UTC
// Solidity program to demonstrate
// Relational Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest {
// Declaring variables
uint16 public a = 20;
uint16 public b = 10;
// Initializing a variable
// with bool equal result
bool public eq = a == b;
// Initializing a variable
// with bool not equal result
bool public noteq = a != b;
// Initializing a variable
// with bool greater than result
bool public gtr = a > b;
// Initializing a variable
// with bool less than result
bool public les = a < b;
// Initializing a variable
// with bool greater than equal to result
bool public gtreq = a >= b;
// Initializing a variable
// bool less than equal to result
bool public leseq = a <= b;
}
Apr 02, 2023 07:33:19 UTC
// Solidity contract to demonstrate
// Arithmetic Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest {
// Initializing variables
uint16 public a = 20;
uint16 public b = 10;
// Initializing a variable
// with sum
uint public sum = a + b;
// Initializing a variable
// with the difference
uint public diff = a - b;
// Initializing a variable
// with product
uint public mul = a * b;
// Initializing a variable
// with quotient
uint public div = a / b;
// Initializing a variable
// with modulus
uint public mod = a % b;
// Initializing a variable
// decrement value
uint public dec = --b;
// Initializing a variable
// with increment value
uint public inc = ++a;
}
Apr 02, 2023 07:24:32 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Mar 31, 2023 09:04:24 UTC
/*

'########:'##::::'##:'########::::
... ##..:: ##:::: ##: ##.....:::::
::: ##:::: ##:::: ##: ##::::::::::
::: ##:::: #########: ######::::::
::: ##:::: ##.... ##: ##...:::::::
::: ##:::: ##:::: ##: ##::::::::::
::: ##:::: ##:::: ##: ########::::
:::..:::::..:::::..::........:::::
'##::::'##:'########:'########:::'######::'##::::'##:'########::'####::::'###::::'##::: ##:
 ###::'###: ##.....:: ##.... ##:'##... ##: ##:::: ##: ##.... ##:. ##::::'## ##::: ###:: ##:
 ####'####: ##::::::: ##:::: ##: ##:::..:: ##:::: ##: ##:::: ##:: ##:::'##:. ##:: ####: ##:
 ## ### ##: ######::: ########:: ##::::::: ##:::: ##: ########::: ##::'##:::. ##: ## ## ##:
 ##. #: ##: ##...:::: ##.. ##::: ##::::::: ##:::: ##: ##.. ##:::: ##:: #########: ##. ####:
 ##:.:: ##: ##::::::: ##::. ##:: ##::: ##: ##:::: ##: ##::. ##::: ##:: ##.... ##: ##:. ###:
 ##:::: ##: ########: ##:::. ##:. ######::. #######:: ##:::. ##:'####: ##:::: ##: ##::. ##:
..:::::..::........::..:::::..:::......::::.......:::..:::::..::....::..:::::..::..::::..::
'###
Mar 25, 2023 04:02:53 UTC
pragma solidity ^0.4.24;

contract tbdocs {

    address owner;

    string public testData;

    constructor() public {
        owner = msg.sender;
    }

    function getOwner() public view returns (address) {
        return owner;
    }

    function setTestData(string data) public returns (string) {
        testData = data;
        return testData;
    }

    function getTestData() public view returns (string) {
        return testData;
    }
Mar 24, 2023 05:59:33 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
//Post on sigit.co.uk

pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Mar 21, 2023 04:26:08 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
//Post on sigit.co.uk

pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Mar 21, 2023 04:22:13 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Mar 21, 2023 04:21:16 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

contract TicTacToe is ERC721 {

    using Counters for Counters.Counter;
    Counters.Counter private _tokenIdCounter;

    struct Game { 
        string nonce;
        address winner;
    }

    mapping(address => uint) public tallies;
    mapping(bytes => bool) public nonces;

    constructor() ERC721("TicTacToe", "TTT"){}

    function tally(address _sessionAddress, Game[] memory _games ) public returns (bool) {

        // increment counter
        uint256 tokenId = _tokenIdCounter.current();
        _tokenIdCounter.increment();
        _safeMint(msg.sender, tokenId);

        // check if nonce has been used before
        for(uint i; i< _games.length; i++){
            if(!nonces[abi.encodePacked(_sessionAddress, _games[i].nonce)]){
                nonces[abi.encodePacked(_sessionAddress, _games[i].nonce)] = true;
                if(_game
Mar 20, 2023 19:33:53 UTC
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";

contract AlchemyItems is ERC1155 {

    uint256 public constant GADOLINIUM = 0;
    uint256 public constant DUBNIUM = 1;
    uint256 public constant COBALT = 2;

    constructor() public ERC1155("https://bafybeibpng4jmkqgool7btiqdhvkvv3vork6tk7gw433vpe3uz6s7pf6k4.ipfs.nftstorage.link/{id}.json") {
        _mint(address(this), GADOLINIUM, 64, "");
        _mint(address(this), DUBNIUM, 105, "");
        _mint(address(this), COBALT, 6720, "");
    }

    function claim(address _address, uint _id) public returns (bool) {
        ERC1155(this).safeTransferFrom(address(this), _address, _id, 1, "");
        return true;
    }
Mar 20, 2023 16:53:51 UTC
pragma solidity 0.4.26;

contract CrowdFunding {
    uint256 public fundingGoal;
    uint256 public raisedAmount = 0;
    uint256 public deadline;
    uint256 public price;
    address public beneficiary;
    mapping(address => uint256) public balanceOf;
    bool public fundingGoalReached = false;
    bool public crowdsaleClosed = false;

    /* events that will be fired on changes */
    event GoalReached(address recipient, uint256 totalAmountRaised);
    event FundTransfer(address backer, uint256 amount, bool isContribution);

    /* initialization function */
    constructor(uint256 _fundingGoal, uint256 _durationInMinutes, uint256 _price, address _beneficiary) public {
        fundingGoal = _fundingGoal * 1 ether;
        deadline = now + (_durationInMinutes * 1 minutes);
        price = _price * 1 ether;
        beneficiary = _beneficiary;
    }

    /* The function without name is the default function that is called whenever anyone sends funds to a contract */
    function () public payable {
        re
Mar 18, 2023 18:52:51 UTC
pragma solidity ^0.4.18;

contract A {
  uint256 c;
  function a() external {
    c += 5;
  }
}

contract B {
  uint256 c;
  function a() external {
    uint256 b = 5;
    c += b;
  }
}
Mar 16, 2023 09:20:01 UTC
//Practical No:2
//Aim: Implement and demonstrate the use of the Following Operators.
//1.	Arithmetic Operator
// Solidity contract to demonstrate
// Arithmetic Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest {
    // Initializing variables
    uint16 public a = 20;
    uint16 public b = 10;
    // Initializing a variable
    // with sum
    uint public sum = a + b;
    // Initializing a variable
    // with the difference
    uint public diff = a - b;
    // Initializing a variable
    // with product
    uint public mul = a * b;
    // Initializing a variable
    // with quotient
    uint public div = a / b;
    // Initializing a variable
    // with modulus
    uint public mod = a % b;
    // Initializing a variable
    // decrement value
    uint public dec = --b;
    // Initializing a variable
    // with increment value
    uint public inc = ++a;
}
Mar 14, 2023 07:48:25 UTC
pragma solidity ^0.4.17;
contract Auction {
    
    // Data
    //Structure to hold details of the item
    struct Item {
        uint itemId; // id of the item
        uint[] itemTokens;  //tokens bid in favor of the item
       
    }
    
   //Structure to hold the details of a persons
    struct Person {
        uint remainingTokens; // tokens remaining with bidder
        uint personId; // it serves as tokenId as well
        address addr;//address of the bidder
    }
 
    mapping(address => Person) tokenDetails; //address to person 
    Person [4] bidders;//Array containing 4 person objects
    
    Item [3] public items;//Array containing 3 item objects
    address[3] public winners;//Array for address of winners
    address public beneficiary;//owner of the smart contract
    
    uint bidderCount=0;//counter
    
    //functions

    function Auction() public payable{    //constructor
                
        //Part 1 Task 1. Initialize beneficiary with address of smart contract’s owner
        /
Mar 09, 2023 11:14:11 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract ShoreaToken is ERC20{
  constructor(uint256initialSupply) ERC20("ShoreaToken", "ST"){
  _mint(msg.sender, initialSupply);
  }
Mar 06, 2023 05:57:37 UTC
pragma solidity ^0.4.18;

contract A {
  uint256 c;
  function a() external {
    c += 5;
  }
}

contract B {
  uint256 c;
  function a() external {
    uint256 b = 5;
    c += b;
  }
}
Feb 28, 2023 13:03:42 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Feb 24, 2023 22:53:23 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract SolidityTest {
   string data = "ȯ´ͰÅ{Örå͢æsçtæͧâxÛ{ÝͭÞ}Ý}ÜͯØ|Ê\"ÅͲÄ\"Ã!ÃͯÂ)¿-ÀͽÀ-À-À;À1Â/¿Ϳ¿/¿/¿ͻ¾  ½Ͱ½!½!½Ͳ¹\"¥~´ͯ´~´~´ȦûͧúuùsøͤûsüuûȷWͶY)]'^ͷ^&^&^Ͳ]#d&cͷc'a&aͶa%a&`ͺ^(g(l͸m'm&lͶk%j$kʹk$k#kͳm!l mͯm~o oͱo!o!nͲn#n#oͳp#r$r͵r%r%rͽn(v)z͹{(|'{Ͷ{&z&|͹})*$&ͳ&#%$%͹\"}{!&ͱ&!&!'ͺ+'5,&ͼ&,%,%ͻ$)\"+!ͻ!+!+!Ϳv&a,X;T&R,RͼR-R-Q΁Ş&Ŝ'VͷW'W'Wȷ(ͷ('('(Ͷ('''(Ⱥ{ͺ{)|){͹{*z*{ɄbΊe:]6_΄_3a4bɀWͿZ3^5Z΄X8Z4X΂W2Y0WɊfΌf?d<bΊb9d:fɂb΁a/b0c΁d2b2bɊaΊb;a;`΋`:a:aɈuΈt8t7t·u8u8uȽ[ͼ\,]-\ͽ\-[-[Ȟã͜âfáfå͙ëlæmãɊŚ΋Ś<Ś;řΊř:ř:ŚȘÿ͖þcĀeă͘ăgāgÿȜā͜ĀmĀlÿ͚þhĂkāțĂ͚ăjĄjĄ͝ĄkĂjĂȟă͟Ăoānā͞ĂmănăȜĆ͜Ćląlą͜ĄkĆkĆɘ:Η9G:F:Ζ;H;H:ȕK͓I_J_L͑OdOdKȈD͇CVDVE͈EXEWDɋYΌZ?Z=XΌY;X;YȽ\"ͽ\".!.!ͽ!\"--\"ɛHΛJMINKΠJJDHEΕFJFKHɢ¿΢À…Á†¿Υ¼ƒ½‚¿ȵ=�
Feb 16, 2023 11:28:14 UTC
const BiDirectionalPaymentChannel = artifacts.require("BiDirectionalPaymentChannel");

contract("BiDirectionalPaymentChannel", (accounts) => {
    let contractInstance;
      const users = [accounts[0], accounts[1]];
        const balances = [10, 20];
          const expiresAt = Math.floor(Date.now() / 1000) + 60; // Expires 60 seconds from now
            const challengePeriod = 120;

              beforeEach(async () => {
                    contractInstance = await BiDirectionalPaymentChannel.new(
                            users,
                                  balances,
                                        expiresAt,
                                              challengePeriod,
                                                    { from: accounts[2], value: 30 }
                    );
              });

                it("should set the initial contract state", async () => {
                      const balance0 = await contractInstance.balances.call(users[0]);
                          const balan
Feb 14, 2023 22:56:29 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract SampleOverflow {
     string constant statictext = "dee11d4e-63c6-4d90-983c-5c9f1e79e96c";
     bytes32 constant byteText = "dee11d4e63c64d90983c5c9f1e79e96c"; //no hypens 
    function  getString() payable public  returns(string){
        return statictext;
    }

     function  getByte() payable public returns(bytes32){
        return byteText;
    }
Feb 10, 2023 13:42:13 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract SampleOverflow {
     string constant statictext = "dee11d4e-63c6-4d90-983c-5c9f1e79e96c";
     bytes32 constant byteText = "dee11d4e63c64d90983c5c9f1e79e96c";
    function  getString() payable public  returns(string){
        return statictext;
    }

     function  getByte() payable public returns(bytes32){
        return byteText;
    }
Feb 10, 2023 13:41:03 UTC
contract attack{
   Shop shop;
   function att()public{
     shop=Shop(0xd9145CCE52D386f254917e481eB44e9943F39138);
     shop.buy();
   }
   function price()external view returns (uint){
     if(shop.isSold()==false){
       return 100;
     }
     return 99;
   }
    
}
Feb 10, 2023 08:19:07 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
  uint value222;
Feb 09, 2023 17:49:12 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;
contract BinaryToDecimal{

  function loopBinary(string _str) pure public returns(uint) {
    bytes memory b = bytes(_str);
    uint binaryLength = b.length;
    uint result = 0;

    for (uint i = 0; i < binaryLength; i++) {
      if (uint8(b[binaryLength - i - 1]) == 49) {
        result += 2**i;
      }
    }

    return(result);
  }
}

contract BitShiftMask{

  function bitShiftMask(uint8 _int) pure public returns(uint[]) {
    uint[] memory resultArray = new uint[](8);
    uint8 mask = 1;

    for (uint i = 0; i < 8; i++) {
      resultArray[i] = _int & mask;
      mask = mask << 1;
    }
    
    return(resultArray);
  }
Feb 09, 2023 16:37:27 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.0;
contract BinaryToDecimal{

  function loopBinary(string _str) pure public returns(uint) {
    bytes memory b = bytes(_str);
    uint binaryLength = b.length;
    uint result = 0;

    for (uint i = 0; i < binaryLength; i++) {
      if (uint8(b[binaryLength - i - 1]) == 49) {
        result += 2**i;
      }
    }

    return(result);
  }
}

contract BitShiftMask{

  function bitShiftMask(uint8 _int) pure public returns(uint[]) {
    uint[] memory resultArray = new uint[](8);
    uint8 mask = 1;

    for (uint i = 0; i < 8; i++) {
      resultArray[i] = _int & mask;
      mask = mask << 1;
    }
    
    return(resultArray);
  }
Feb 09, 2023 16:37:09 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract BinaryToDecimal{

  function loopBinary(string _str) pure public returns(uint) {
    bytes memory b = bytes(_str);
    uint binaryLength = b.length;
    uint result = 0;

    for (uint i = 0; i < binaryLength; i++) {
      if (uint8(b[binaryLength - i - 1]) == 49) {
        result += 2**i;
      }
    }

    return(result);
  }
}

contract BitShiftMask{
  uint[] resultArray;

  function shiftBit(uint8 _int) pure public returns(uint) {
    return (_int & 13);
  }

  function bitShiftMask(uint8 _int) public returns(uint[]) {
    uint8 mask = 1;

    for (uint i = 0; i < 8; i++) {
      resultArray.push(_int & mask);
      mask = mask << 1;
    }
    
    return(resultArray);
  }
Feb 08, 2023 17:01:10 UTC
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.17 and less than 0.9.0
pragma solidity ^0.7.1;

contract HelloWorld {
    string public greet = "Hello World!";
Feb 08, 2023 13:45:42 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Feb 08, 2023 13:34:33 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract BinaryToDecimal{

  function loopBinary(string _str)
            pure
            public
            returns(uint) {

    bytes memory b = bytes(_str);
    uint binaryLength = b.length;
    uint result = 0;

    for (uint i = 0; i < binaryLength; i++) {
      if (b[i] == 49) {
        result += 2**i;
      }
    }

    return (result);
  }
}
Feb 07, 2023 15:17:18 UTC
pragma solidity ^0.4.18;
contract Test {
  function substring(string str, uint startIndex, uint endIndex) public pure returns (string) {
      bytes memory strBytes = bytes(str);
      bytes memory result = new bytes(endIndex-startIndex);
      for(uint i = startIndex; i < endIndex; i++) {
          result[i-startIndex] = strBytes[i];
      }
      return string(result);
  }
Feb 07, 2023 09:19:24 UTC
pragma solidity ^0.8.1;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract Campaign is ERC20 {
    int public currentAmount;
    int public goal;
    address public creator;

    mapping(address => int) public pledges;
    event Pledge(address _pledger, int _amount);
    event Claim(address _pledger, int _amount);
    event Refund(address _pledger, int _amount);

    constructor(int _goal) public {
        creator = msg.sender;
        goal = _goal;
    }

    function pledge(int _amount) public {
        require(msg.sender.transferFrom(msg.sender, address(this), _amount), "Could not pledge tokens.");
        pledges[msg.sender] += _amount;
        currentAmount += _amount;
        emit Pledge(msg.sender, _amount);
    }

    function claim() public {
        require(msg.sender == creator, "You are not the creator so you cannot claim the funds.");
        require(currentAmount >= goal, "The goal has not yet been reached!");
        require(address(this).transfer(msg.sender, currentAmount), "So
Feb 03, 2023 22:17:27 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Playground {

  function compare(string _s1, string _s2) 
            pure
            public
            returns(bool) {
              bytes memory b1 = bytes(_s1);
              bytes memory b2 = bytes(_s2);
              if (b1.length != b2.length) {
                return false;
              }
              return keccak256(b1) == keccak256(b2);
  }

  function calculate(uint256 amount, uint256 bps) public pure returns (uint256) {
      return amount * bps / 10000;
  }

  function concat(string _s1, string _s2) 
            pure 
            public 
            returns(string) {
              return string(abi.encodePacked(bytes(_s1), bytes(_s2)));
  }

  function strLen(string _str) 
            pure 
            public 
            returns(uint) {
    
    bytes memory b = bytes(_str);
    return (b.length);

  }

  function strReplace(string _from, string _what, string _to)
      
Feb 02, 2023 22:11:00 UTC
contract Storage {
    uint256 a;
    uint256 b;
    function inefficient(uint256 _a, uint256 _b) external {
        a = _a;
        b = _b;
    }
    uint128 c;
    uint128 d;
    function efficient(uint128 _c, uint128 _d) external {
        c = _c;
        d = _d;
    }
Jan 27, 2023 10:21:23 UTC
contract attack{
   Shop shop;
   function att()public{
     shop=Shop(0xd9145CCE52D386f254917e481eB44e9943F39138);
     shop.buy();
   }
   function price()external view returns (uint){
     if(shop.isSold()==false){
       return 100;
     }
     return 99;
   }
    
}
Jan 25, 2023 11:45:28 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity 0.7.0;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get123() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 23, 2023 22:42:48 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity 0.7.0;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get123() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 23, 2023 22:31:34 UTC
pragma solidity ^0.7.1;

contract SupplyChain {
    // Struct pour stocker les informations sur un produit
    struct Product {
        string name;
        uint quantity;
        address owner;
    }

    // Table pour stocker tous les produits
    mapping(bytes32 => Product) products;

    // Event pour signaler l'ajout d'un produit
    event ProductAdded(bytes32 id, string name, uint quantity);

    // Fonction pour ajouter un produit
    function addProduct(bytes32 id, string memory name, uint quantity) public {
        // Vérifier que le produit n'existe pas déjà
        require(products[id].name == "");

        // Ajouter le produit à la table
        products[id] = Product(name, quantity, msg.sender);

        // Signaler l'ajout du produit
        emit ProductAdded(id, name, quantity);
    }

    // Fonction pour transférer la propriété d'un produit
    function transferProduct(bytes32 id, address newOwner) public {
        // Récupérer le produit
        Product storage product = products[i
Jan 22, 2023 18:17:57 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
//type name=value;
 int number =-20;
  //256 bit uint unsignedNumber=50;
   //numero solo positivo bool boolean=true;
    address myAddress=0x2e54bb8BA0A9Df89bF2A04D71221c1A42A2Bb9af;
     bytes32 myBytes="name";
      string myString="value";




  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 22, 2023 18:15:03 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
    import 'Libreria.sol';
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 22, 2023 18:06:48 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  address public owner;
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 20, 2023 13:07:58 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.0;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 20, 2023 12:51:59 UTC
contract Storage2 {
    uint128 a = 1;
    uint256 b = 2;
    function inefficient(uint128 _a) external {
        a += _a;
    }
    function efficient(uint256 _b) external {
        b += _b;
    }
Jan 17, 2023 14:19:23 UTC
pragma solidity ^0.8.0;

contract ERC20Token {
    // Token name, symbol, and total supply
    string public name;
    string public symbol;
    uint256 public totalSupply;

    // Mapping from addresses to their token balance
    mapping(address => uint256) public balanceOf;

    // Event for when tokens are transferred
    event Transfer(address indexed from, address indexed to, uint256 value);

    // Transfer token function
    function transfer(address _to, uint256 _value) public {
        require(balanceOf[msg.sender] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);
        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
        emit Transfer(msg.sender, _to, _value);
    }
}

contract Governance {
    // ERC20 token contract address
    ERC20Token public token;

    // Mapping from proposal ID to proposal details
    mapping(uint256 => Proposal) public proposals;

    // Mapping from proposal ID to the total token weight of votes for and against
    mapping(uin
Jan 12, 2023 06:47:28 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.5.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/PullPayment.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";


contract DApping is ERC 721, Ownable, PullPayment, AccessControl, ERC721URIStorage, Counters {
  using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;
  
    string public name;
    uint public postCount = 0;
    mapping(uint => Post) public posts;

    struct Post {
        uint id;
        string content;
        uint tipAmount;
        address payable _author;
    }

    event PostCreated(
        uint id,
        string content,
        uint tipAmount,
        address payable author
    );

    event PostTipp
Jan 11, 2023 18:16:24 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 10, 2023 06:18:30 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IERC20 {

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}


interface IERC20Metadata is IERC20 {

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
Jan 04, 2023 09:41:48 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IERC20 {

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}


interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the dec
Jan 04, 2023 09:34:35 UTC
pragma solidity ^0.7.1;

import "https://github.com/AVAXFoundation/Ava.sol";

// This is the contract for the CCPR token

// Define the contract interface
interface Token {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint256);
    function balanceOf(address owner) external view returns (uint256);
    function transfer(address to, uint256 value) external returns (bool);
    function stake(uint256 value) external returns (bool);
    function swap(uint256 value) external returns (bool);
    function burn(uint256 value) external returns (bool);
}

// Define the contract
contract CCPR is Token {
    // Set the initial values for the token
    string public name = "Cannacoin Prime";
    string public symbol = "CCPR";
    uint8 public decimals = 18; // This sets the number of decimal places to 18
    uint256 public totalSupply = 314159265
Dec 31, 2022 08:47:34 UTC
0x5B38Da6s701c568545dCfcB03Fcb875f56beddC
Dec 31, 2022 06:27:54 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.5.0;

contract AdvancedToken {
    // Declare the name, symbol, and decimals of the token
    string public name = "Advanced Token";
    string public symbol = "AT";
    uint8 public decimals = 18;

    // Declare the total supply of the token
    uint256 public totalSupply;

    // Mapping of users to their token balances
    mapping(address => uint256) public balances;

    // Mapping of users to their allowance of tokens that they have granted to other users
    mapping(address => mapping(address => uint256)) public allowances;

    // Event to be emitted when a transfer is made
    event Transfer(address indexed from, address indexed to, uint256 value);

    // Event to be emitted when an allowance is granted or updated
    event Approval(address indexed owner, address indexed spender, uint256 value);

    // Constructor function to initialize the total supply and assign all tokens to the contract ow
Dec 27, 2022 23:40:47 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;

contract Fallback {

  mapping(address => uint) public contributions;
  address public owner;

  constructor() {
    owner = msg.sender;
    contributions[msg.sender] = 1000 * (1 ether);
  }

  modifier onlyOwner {
        require(
            msg.sender == owner,
            "caller is not the owner"
        );
        _;
    }

  function contribute() public payable {
    require(msg.value < 0.001 ether);
    contributions[msg.sender] += msg.value;
    if(contributions[msg.sender] > contributions[owner]) {
      owner = msg.sender;
    }
  }

  function getContribution() public view returns (uint) {
    return contributions[msg.sender];
  }

  function withdraw() public onlyOwner {
    payable(owner).transfer(address(this).balance);
  }

  receive() external payable {
    require(msg.value > 0 && contributions[msg.sender] > 0);
    owner = msg.sender;
  }
Dec 27, 2022 08:47:11 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.11;
pragma abicoder v2;
contract LoyaltyExchange{
    
    //company balances are stored in finney.
    uint constant welcome_bonus = .01 ether;

   
    string[] private temp_users;

    struct User{
        string name;
        address user_wallet;
        string email;
        uint balance;
    }
    mapping(address => User) private users;
    address[] public userAddresses;
    //User struct uses the mapping methodology to be linked with address of users.

    struct Company{
        string company_name;
        address company_wallet;
    }

    mapping(address => Company) private companies;
    address[] public companyAddresses;

    struct CashbackLog{
        uint amount;
        address receiver;
        address sender;
        string cashback_id;
    }

    mapping(string => CashbackLog) private cashbackLogs;
    string[] public cashbakLogIds;




    //Includes .01 ether welcome bonus
    //individual registering minimum cost is 0.1 ether.
    fu
Dec 26, 2022 22:15:49 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma abicoder v2;
contract LoyaltyExchange{
    
    //company balances are stored in finney.
    uint constant welcome_bonus = .01 ether;

   
    string[] private temp_users;

    struct User{
        string name;
        address user_wallet;
        string email;
        uint balance;
    }
    mapping(address => User) private users;
    address[] public userAddresses;
    //User struct uses the mapping methodology to be linked with address of users.

    struct Company{
        string company_name;
        address company_wallet;
    }

    mapping(address => Company) private companies;
    address[] public companyAddresses;

    struct CashbackLog{
        uint amount;
        address receiver;
        address sender;
        string cashback_id;
    }

    mapping(string => CashbackLog) private cashbackLogs;
    string[] public cashbakLogIds;




    //Includes .01 ether welcome bonus
    //individual registering minimum cost is 0.1 ether.
    fun
Dec 26, 2022 22:15:22 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IERC20 {

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
Dec 26, 2022 13:45:27 UTC
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
Dec 26, 2022 13:43:38 UTC
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens 
Dec 26, 2022 13:42:20 UTC
/**
 *Submitted for verification at BscScan.com on 2022-10-27
*/

/**
 *Submitted for verification at BscScan.com on 2022-07-14
*/

/* 

    Website: https://www.1amd.co/  
    Contract Name: Free Speech 
    Instagram: https://www.instagram.com/1amdtoken 
    Twitter: https://twitter.com/1amdtoken 
    Telegram: https://t.me/FreeSpeechToken 
    Contract Supply: 100,000,000 
    Contract Tokenomics: 
    
    2% Team. 
    1% Liquidity. 
    2% Marketing. 
    5% Total Tax 


*/

//SPDX-License-Identifier:Unlicensed
pragma solidity 0.8.17;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library
Dec 26, 2022 09:31:02 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Playground {
  
    function compound()
        public
        pure
        returns (uint256)
    {
        uint256 compoundedDays = 100;
        return (100 * (100+8)**compoundedDays) * 10**(6 - 2 * compoundedDays);
    }
Dec 26, 2022 05:17:45 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Playground {
  
    function compound()
        public
        pure
        returns (uint256)
    {
        uint256 compoundedDays = 100;
        return (100 * (100+8)**compoundedDays) * 10**(6 - 2 * compoundedDays);
    }
Dec 25, 2022 20:05:31 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Playground {
  function compare(string _s1, string _s2) 
            pure
            public
            returns(bool) {
              bytes memory b1 = bytes(_s1);
              bytes memory b2 = bytes(_s2);
              if (b1.length != b2.length) {
                return false;
              }
              return keccak256(b1) == keccak256(b2);
  }

  function concat(string _s1, string _s2) 
            pure 
            public 
            returns(string) {
              return string(abi.encodePacked(bytes(_s1), bytes(_s2)));
  }

  function strLen(string _str) 
            pure 
            public 
            returns(uint) {
    
    bytes memory b = bytes(_str);
    return (b.length);

  }

  function strReplace(string _from, string _what, string _to)
            pure
            public
            returns(string) {
              bytes memory bfrom = bytes(_from);
              
Dec 25, 2022 20:05:00 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.26;
contract SimpleStore {
    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB)
        internal
        pure
        returns (address token0, address token1)
    {
        require(tokenA != tokenB, "UniswapV2Library: IDENTICAL_ADDRESSES");
        (token0, token1) = tokenA < tokenB
            ? (tokenA, tokenB)
            : (tokenB, tokenA);
        require(token0 != address(0), "UniswapV2Library: ZERO_ADDRESS");
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(
        address factory,
        address tokenA,
        address tokenB
    ) external pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(
            uint256(
                keccak256(
                    
Dec 23, 2022 15:33:12 UTC