// CryptoKitties Source code
// Copied from: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code

pragma solidity ^0.4.20;

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


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


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


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

}



/// @title Interface for contract
Apr 26, 2024 16:25:21 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;
  
Apr 20, 2024 20:05:58 UTC
// Token name
function name() public view returns (string) {}

// Token symbol
function symbol() public view returns (string) {}

// Number of decimal places
function decimals() public view returns (uint8) {}

// Total number of tokens
function totalSupply() public view returns (uint256) {}

// Token balance on the account
function balanceOf(address _owner) public view returns (uint256 balance) {}

// Token transfer function
function transfer(address _to, uint256 _value) public returns (bool success) {}

// Write-off function
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {}

// Transaction confirmation
function approve(address _spender, uint256 _value) public returns (bool success) {
Apr 17, 2024 13:52:58 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }


  

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

  uint value;
Apr 16, 2024 18:58:19 UTC
pragma solidity ^0.4.18;

// Creating a contract
contract SolidityTest {
    // Defining function to demonstrate conditional operator
    function sub(uint a, uint b) public pure returns (uint) {
        uint result = (a > b ? a - b : b - a);
        return result;
    }
}
Apr 16, 2024 06:44:52 UTC
pragma solidity ^0.4.18;

contract Types {
    uint i = 10;
    bool even;

    function decision_making() public payable returns (bool) {
        if (i % 2 == 0) {
            even = true;
        } else {
            even = false;
        }
        return even;
    }

    function getResult() public view returns (bool) {
        return even;
    }
}
Apr 16, 2024 05:00:20 UTC
pragma solidity ^0.4.18;

contract Types {
    uint i = 10;
    string result;

    function decision_making() public returns (string memory) {
        if (i < 10) {
            result = "less than 10";
        } else if (i == 10) {
            result = "equal to 10";
        } else {
            result = "greater than 10";
        }
        return result;
    }

    function getResult() public view returns (string memory) {
        return result;
    }
}
Apr 16, 2024 04:58:55 UTC
pragma solidity ^0.4.18;

contract Types {
    uint i = 10;

    function decision_making() public view returns (bool) {
        if (i < 10) {
            return true;
        } else {
            return false;
        }
    }
}
Apr 16, 2024 04:47:00 UTC
pragma solidity ^0.4.18;

// Creating a contract
contract Types {
    // Declaring a dynamic array
    uint[] data;

    // Function to demonstrate 'For loop'
    function loop() public returns (uint[] memory) {
        for (uint i = 0; i < 5; i++) {
            data.push(i);
        }
        return data;
    }

    // Function to get the data array
    function getData() public view returns (uint[] memory) {
        return data;
    }
}
Apr 16, 2024 03:51:57 UTC
pragma solidity ^0.4.18;

// Creating a contract
contract Types {
    // Declaring a dynamic array
    uint[] data;

    // Declaring state variable
    uint8 j = 0;

    // Function to demonstrate 'Do-While loop'
    function loop() public returns (uint[] memory) {
        do {
            j++;
            data.push(j);
        } while (j < 5);
        
        return data;
    }
        // Function to get the data array
    function getData() public view returns (uint[] memory) {
        return data;
    }
}
Apr 16, 2024 03:50:50 UTC
pragma solidity ^0.4.18;

// Creating a contract
contract Types {
    // Declaring a dynamic array
    uint[] data;

    // Declaring a state variable
    uint8 j = 0;

    // Function to demonstrate while loop and return the array
    function loop() public returns (uint[] memory) {
        while (j < 5) {
            j++;
            data.push(j);
        }
        return data;
    }

    // Function to get the data array
    function getData() public view returns (uint[] memory) {
        return data;
    }
}
Apr 16, 2024 03:48:05 UTC
// Solidity program to 
// demonstrate the use 
// of 'if-else if-else statement' 
pragma solidity ^0.4.18; 
// Creating a contract 
contract Types
{ 
      // Declaring state variables 
      uint i = 10; 
      string result; 
      // Defining function to
      // demonstrate the use 
      // of 'if...else if...else 
      // statement' 
      function decision_making() 
      public returns(string memory)
      {
          if(i<10)
          { 
              result = "less than 10";
          } 
          else if(i == 10)
          { 
              result = "equal to 10"; 
          } 
          else
          {
            result = "greater than 10";
          }
          return result;
      }
Apr 15, 2024 18:24:51 UTC
// Solidity program to 
// demonstrate the use of 
// 'if...else' statement 
pragma solidity ^0.4.18;
// Creating a contract 
contract Types
{ 
    // Declaring state variables 
    uint i = 10; 
    bool even; 
    // Defining function to 
    // demonstrate the use of 
    // 'if...else statement' 
    function decision_making() 
    public payable returns(bool)
    { 
        if(i%2 == 0)
        { 
            even = true; 
        } 
        else
        {
            even = false;
        }
        return even; 
    }
Apr 15, 2024 18:22:01 UTC
// Solidity program to 
// demonstrate the 
// use of 'if statement' 
pragma solidity ^0.4.18; 
// Creating a contract 
contract Types
{
    // Declaring state variable 
    uint i = 10; 
    // Defining function to 
    // demonstrate use of 
    // 'if statement' 
    function decision_making() 
    public returns(bool)
    {
        if(i<10)
        { 
            return true; 
        }
    }
Apr 15, 2024 18:19:37 UTC
// Solidity program to 
// demonstrate how to 
// write a smart contract 
pragma solidity ^0.4.18; 
// Defining a contract 
contract Test 
{ 
      // Declaring state variables 
      uint public var1; 
      uint public var2; 
      uint public sum; 
      // Defining public function 
      // that sets the value of 
      // the state variable 
      function set(uint x, uint y) public 
      { 
          var1 = x; 
          var2=y; 
          sum=var1+var2; 
      } 
      // Defining function to 
      // print the sum of 
      // state variables 
      function get()
      public view returns (uint)
      { 
          return sum; 
      } 
Apr 15, 2024 18:16:08 UTC
pragma solidity ^0.4.18;
contract SimpleStore {
uint[6] data;
uint x;
// Defining function to
// assign values to array
function array_example() public returns (uint[6] memory)
{
  data = [uint(10), 20, 30, 40, 50, 60];
}
function result() public view returns(uint[6] memory){
return data;
}
Apr 15, 2024 18:00:54 UTC
pragma solidity ^0.4.18;
contract SimpleStore {
uint[6] data;
uint x;
// Defining function to
// assign values to array
function array_example() public returns (uint[6] memory)
{
  data = [uint(10), 20, 30, 40, 50, 60];
}
function result() public view returns(uint[6] memory){
return data;
}
Apr 15, 2024 17:58:19 UTC
pragma solidity ^0.4.18;

// Creating a contract
contract Types {
    // Declaring a dynamic array
    uint[] data;

    // Function to demonstrate 'For loop'
    function loop() public returns (uint[] memory) {
        for (uint i = 0; i < 5; i++) {
            data.push(i);
        }
        return data;
    }
}
Apr 15, 2024 17:48:17 UTC
// Solidity program to demonstrate
// Assignment Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest
{
// Declaring variables
uint16 public assignment = 20;
uint public assignment_add = 50;
uint public assign_sub = 50;
uint public assign_mul = 10;
uint public assign_div = 50;
uint public assign_mod = 32;
// Defining function to
// demonstrate Assignment Operator
function getResult() public
{
  assignment_add += 10;
  assign_sub -= 20;
  assign_mul *= 10;
  assign_div /= 10;
  assign_mod %= 20;
  return ;
}
Apr 15, 2024 17:47:28 UTC
pragma solidity ^0.4.18;

// Creating a contract
contract Types {
    // Declaring a dynamic array
    uint[] data;

    // Declaring state variable
    uint8 j = 0;

    // Function to demonstrate 'Do-While loop'
    function loop() public returns (uint[] memory) {
        do {
            j++;
            data.push(j);
        } while (j < 5);
        
        return data;
    }
}
Apr 15, 2024 17:46:52 UTC
// Solidity program to  
// demonstrate assert  
// statement  
pragma solidity ^0.4.18;  
  
// Creating a contract  
contract assertStatement 
{  
    // Defining a state variable  
    bool result;  
  
    // Defining a function  
    // to check condition  
    function checkOverflow(uint8 _num1, uint8 _num2) public 
    {  
        uint8 sum = _num1 + _num2;  
        assert(sum<=255); 
        result = true;
    } 
    // Defining a function to  
    // print result of assert  
    // statement  
    function getResult() public view returns(string memory) 
    {  
        if(result == true) 
        {  
            return "No Overflow";  
        } 
        else
        {  
            return "Overflow exist"; 
        }  
    }  
Apr 15, 2024 17:46:36 UTC
pragma solidity ^0.4.18;

// Creating a contract
contract Types {
    // Declaring a dynamic array
    uint[] data;

    // Declaring a state variable
    uint8 j = 0;

    // Function to demonstrate while loop
    function loop() public returns (uint[] memory) {
        while (j < 5) {
            j++;
            data.push(j);
        }
        return data;
    }
}
Apr 15, 2024 17:45:35 UTC
// Solidity program to  
// demonstrate pure functions  
pragma solidity ^0.4.18; 
// Defining a contract  
contract Test 
{  
    // Defining pure function to  
    // calculate product and sum  
    // of 2 numbers  
    function getResult()  
    public pure returns(uint product, uint sum) 
    {  
        uint num1 = 75;  
        uint num2 = 92;  
        product = num1 * num2;  
        sum = num1 + num2;  
    }  
}
Apr 15, 2024 17:39:55 UTC
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest
{
// Defining function to demonstrate
// conditional operator
function sub( uint a, uint b)
public view returns( uint)
{
uint result = (a > b? a-b : b-a);
return result;
}
Apr 15, 2024 17:39:35 UTC
// Solidity program to demonstrate
// Inline Assembly  
pragma solidity ^0.4.0;
  
// Creating a contract
contract InlineAssembly
{  
    // Defining function
  function add(uint a) view returns (uint b)
    {
        // Inline assembly code
        assembly
        {
  
            // Creating a new variable 'c'
            // Calculate the sum of 'a+16'  
            // with the 'add' opcode  
            // assign the value to the 'c'  
            let c := add(a, 16)  
  
            // Use 'mstore' opcode to  
            // store 'c' in memory  
            // at memory address 0x80  
            mstore(0x80, c)  
            { 
              // Creating a new variable'  
              // Calculate the sum of 'sload(c)+12'  
              // means values in variable 'c'  
              // with the 'add' opcode  
              // assign the value to 'd'  
              let d := add(sload(c), 12)  
  
              // assign the value of 'd' to 'b'  
              b := d  
  
              // 'd' is deall
Apr 15, 2024 17:39:26 UTC
// Solidity program to  
// demonstrate view  
// functions  
pragma solidity ^0.4.18;  
  
// Defining a contract  
contract Test 
{ 
    // Declaring state  
    // variables  
    uint num1 = 2;  
    uint num2 = 4; 
    // Defining view function to  
    // calculate product and sum  
    // of 2 numbers  
    function getResult() 
    public view returns(uint product, uint sum) 
    {  
        uint num1 = 80;  
        uint num2 = 26;  
        product = num1 * num2; 
        sum = num1 + num2;  
    }  
Apr 15, 2024 17:39:02 UTC
pragma solidity ^0.4.18;

// Creating a contract
contract Test {
    // Declaring a structure
    struct Book {
        string name;
        string writer;
        uint id;
        bool available;
    }

    // Declaring a structure object
    Book public book1;
    Book public book2;

    // Constructor to initialize book2
    function Test() public {
        book2 = Book("Building Ethereum DApps", "Roberto Infante", 2, false);
    }

    // Function to set values for book1
    function set_book_detail() public {
        book1 = Book("Introducing Ethereum and Solidity", "Chris Dannen", 1, true);
    }

    // Function to get book2 details
    function book_info() public view returns (string memory, string memory, uint, bool) {
        return (book2.name, book2.writer, book2.id, book2.available);
    }

    // Function to get book1 details
    function get_details() public view returns (string memory, uint) {
        return (book1.name, book1.id);
    }
}
Apr 15, 2024 17:37:20 UTC
// Solidity program to demonstrate  
// Function overloading  
pragma solidity ^0.4.18;  
contract SimpleStore 
{  
  function getSum(uint a, uint b) public pure returns(uint) 
  {  
    return a + b;  
  }  
  function getSum(uint a, uint b, uint c) public pure returns(uint) 
  {  
    return a + b + c;  
  }  
  function callSumWithTwoArguments() public pure returns(uint) 
  {  
    return getSum(1,2);  
  }  
  function callSumWithThreeArguments() public pure returns(uint) 
  {  
    return getSum(1,2,3);  
  }  
Apr 15, 2024 17:37:08 UTC
// Solidity program to demonstrate
// Assignment Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest
{
// Declaring variables
uint16 public assignment = 20;
uint public assignment_add = 50;
uint public assign_sub = 50;
uint public assign_mul = 10;
uint public assign_div = 50;
uint public assign_mod = 32;
// Defining function to
// demonstrate Assignment Operator
function getResult() public
{
  assignment_add += 10;
  assign_sub -= 20;
  assign_mul *= 10;
  assign_div /= 10;
  assign_mod %= 20;
  return ;
}
Apr 15, 2024 17:36:32 UTC
// Solidity program to  
// demonstrate the working  
// of the interface  
pragma solidity 0.4.18;  
// A simple interface  
interface InterfaceExample 
{   
    // Functions having only  
    // declaration not definition  
    function getStr() 
    public view returns(string memory);  
    function setValue(uint _num1, uint _num2) public;  
    function add() 
    public view returns(uint);  
} 
 
// Contract that implements interface  
contract thisContract is InterfaceExample 
{  
    // Private variables  
    uint private num1;  
    uint private num2;  
  
    // Function definitions of functions  
    // declared inside an interface  
    function getStr() public view returns(string memory) 
    {  
        return "GeeksForGeeks";  
    } 
    // Function to set the values  
    // of the private variables  
    function setValue(uint _num1, uint _num2) public 
    {  
        num1 = _num1;  
        num2 = _num2;  
    }  
    // Function to add 2 numbers  
    function add() public view returns(ui
Apr 15, 2024 17:34:48 UTC
pragma solidity ^0.4.18;
contract SimpleStore
{
 function callKeccak256() public pure returns(bytes32 result)
 {
 return keccak256("ABC");
 }
}
Apr 15, 2024 17:33:02 UTC
// Solidity program to
// demonstrate the
// exponentiation operation
pragma solidity ^0.4.18;
// Creating a contract
contract gfgExpo
{
 // Declaring the state
 // variables
 uint16 firstNo ;
 uint16 secondNo ;
 // Defining the first function
 // to set the value of
 // first variable
 function firstNoSet(uint16 x) public
 {
 firstNo = x;
 }
 // Defining the function
 // to set the value of
 // the second variable
 function secondNoSet(uint16 y) public
 {
 secondNo = y;
 }
 // Defining the function to
 // calculate the exponent
 function Expo() view public returns (uint256)
 {
 uint256 answer = firstNo ** secondNo ;
 return answer;
 }
}
Apr 15, 2024 17:31:57 UTC
// Solidity program to demonstrate
// Bitwise Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest
{
// Declaring variables
uint16 public a = 20;
uint16 public b = 10;
// Initializing a variable
// to '&' value
uint16 public and = a & b;
// Initializing a variable
// to '|' value
uint16 public or = a | b;
// Initializing a variable
// to '^' value
uint16 public xor = a ^ b;
// Initializing a variable
// to '<<' value
uint16 public leftshift = a << b;
// Initializing a variable
// to '>>' value
uint16 public rightshift = a >> b;
// Initializing a variable
// to '~' value
uint16 public not = ~a ;
}
Apr 15, 2024 17:31:01 UTC
// Solidity program to
// demonstrate the
// Modulus operation
pragma solidity ^0.4.18;
// Creating a contract
contract gfgModulo
{
 // Declaring state variables
 uint firstNo ;
 uint secondNo ;
 // Defining a function
 // to set the value of
 // the first variable
 function firstNoSet(uint x) public
 {
 firstNo = x;
 }
 // Defining a function
 // to set the value of
 // the second variable
 function secondNoSet(uint y) public
 {
 secondNo = y;
 }
 // Defining a function to return
 // the modulus value
 function Modulo() view public returns (uint)
 {
 uint answer = firstNo % secondNo ;
 return answer;
 }
Apr 15, 2024 17:30:50 UTC
pragma solidity ^0.4.18; contract Types { 
enum week_days 
{ 
Monday, 
Tuesday, 
Wednesday, 
Thursday, 
Friday, 
Saturday, 
Sunday 
} 
week_days week; week_days choice; 
week_days constant default_value = week_days.Sunday; function set_value() public { choice = week_days.Thursday; 
 
} 
function get_choice( 
) public view returns (week_days) { return choice; 
} 
function getdefaultvalue( ) public pure returns(week_days) { return default_value; 
} 
} 
Apr 15, 2024 17:30:41 UTC
// Solidity program to
// demontstrate the
// division operation
pragma solidity 0.4.18;
// Creating a contract
contract gfgDivide
{
 // Declaring the
 // state variables
 int128 firstNo ;
 int128 secondNo ;
 // Defining a function
 // to set the value of
 // the first variable
 function firstNoSet(int64 x) public
 {
 firstNo = x;
 }
 // Defining function
 // to set the value of
 // the second variable
 function secondNoSet(int64 y) public
 {
 secondNo = y;
 }
 // Defining function to
 // return the result
 function Divide() view public returns (int128)
 {
 int128 answer = firstNo / secondNo ;
 return answer;
 }
Apr 15, 2024 17:29:48 UTC
// Solidity program to demonstrate  
// function declaration  
pragma solidity ^0.4.18;  
// Creating a contract  
contract Test 
{ 
    // Defining function to calculate sum of 2 numbers  
    function add()public view returns(uint) 
    { 
        uint num1 = 120;  
        uint num2 = 165;  
        uint sum = num1 + num2;  
        return sum;  
    } 
}
Apr 15, 2024 17:29:42 UTC
// Solidity program to demonstrate
// Logical Operators
pragma solidity ^0.4.18;
// Creating a contract
contract logicalOperator{
// Defining function to demonstrate
// Logical operator
function Logic(bool a, bool b)
public view returns(bool, bool, bool){
// Logical AND operator
bool and = a&&b;
// Logical OR operator
bool or = a||b;
// Logical NOT operator
bool not = !a;
return (and, or, not);
}
}
Apr 15, 2024 17:28:59 UTC
pragma solidity 0.4.18;
contract gfgMultiply
{
 int128 firstNo ;
 int128 secondNo ;
 function firstNoSet(int128 x) public
 {
 firstNo = x;
 }
 function secondNoSet(int128 y) public
 {
 secondNo = y;
 }
 function multiply() view public returns (int128)
 {
 int128 answer = firstNo * secondNo ;
 return answer;
 }
}
Apr 15, 2024 17:28:53 UTC
pragma solidity ^0.4.18;  
contract Calculator 
{  
  function getResult() public view returns(uint);  
}  
contract Test is Calculator 
{  
  function getResult() public view returns(uint) 
  {  
      uint a = 35;  
      uint b = 265;  
      uint result = a + b;  
      return result;  
  }  
Apr 15, 2024 17:28:38 UTC
// Solidity program to
// demonstrate the subtraction
pragma solidity 0.4.18;
contract gfgSubract
{
 // Intializing the
 // state variables
 int16 firstNo=6 ;
 int16 secondNo=10;
 // Defining a function
 // to subtract two numbers
 function Sub() view public returns (int16)
 {
 int16 ans = firstNo - secondNo ;
 // Difference amount
 return ans;
 }
Apr 15, 2024 17:28:02 UTC
// Solidity program to demonstrate
// Relational Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest
{
// Declaring variables
uint16 public a = 20;
uint16 public b = 10;
// Initializing a variable
// with bool equal result
bool public eq = a == b;
// Initializing a variable
// with bool not equal result
bool public noteq = a != b;
// Initializing a variable
// with bool greater than result
bool public gtr = a > b;
// Initializing a variable
// with bool less than result
bool public les = a < b;
// Initializing a variable
// with bool greater than equal to result
bool public gtreq = a >= b;
// Initializing a variable
// bool less than equal to result
bool public leseq = a <= b;
Apr 15, 2024 17:26:57 UTC
// Solidity program to
// demonstrate addition
pragma solidity 0.4.18;
contract MathPlus
{
 // Declaring the state
 // variables
 uint firstNo ;
 uint secondNo ;
 // Defining the function
 // to set the value of the
 // first variable
 function firstNoSet(uint x) public
 {
 firstNo = x;
 }
 // Defining the function
 // to set the value of the
 // second variable
 function secondNoSet(uint y) public
 {
 secondNo = y;
 }
 // Defining the function
 // to add the two variables
 function add() view public returns (uint)
 {
 uint Sum = firstNo + secondNo ;
 // Sum of two variables
 return Sum;
 }
Apr 15, 2024 17:26:13 UTC
// Solidity contract to demonstrate
// Arithmetic Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest
{
// Initializing variables
uint16 public a = 20;
uint16 public b = 10;
// Initializing a variable
// with sum
uint public sum = a + b;
// Initializing a variable
// with the difference
uint public diff = a - b;
// Initializing a variable
// with product
uint public mul = a * b;
// Initializing a variable
// with quotient
uint public div = a / b;
// Initializing a variable
// with modulus
uint public mod = a % b;
// Initializing a variable
// decrement value
uint public dec = --b;
// Initializing a variable
// with increment value
uint public inc = ++a;
}
Apr 15, 2024 17:24:36 UTC
pragma solidity ^0.4.18;
contract Test {
function callAddMod() public pure returns(uint)
{
return addmod(4, 5, 3);
}
function callMulMod() public pure returns(uint)
{
return mulmod(4, 5, 3);
}
Apr 15, 2024 17:24:36 UTC
pragma solidity ^0.4.18;

contract SimpleStore {
    string store = "Satoshi NAKAMOTO";

    // Defining a function to return value of variable 'store'
    function getStore() public view returns (string) {
        return store;
    }
}
Apr 15, 2024 17:23:43 UTC
pragma solidity ^0.4.18;
// Defining contract 
contract Parent 
{ 
    // Declaring internal 
    // state variable 
    uint internal sum; 
 
    // Defining external function 
    // to set value of internal 
    // state variable sum 
    function setValue() external 
    { 
        uint a = 10; 
        uint b = 20; 
        sum = a + b; 
    } 
 
    // Adding a getter function for 'sum' 
    function getValue() external view returns (uint) 
    { 
        return sum; 
    } 
} 
 
// Inheriting from Parent contract 
contract Child is Parent {} 
 
// Defining calling contract 
contract Caller  
{ 
    // Creating child contract object 
    Child cc = new Child(); 
 
    // Defining function to call 
    // setValue and getValue functions 
    function testInheritance() public returns (uint) 
    { 
        cc.setValue(); 
        return cc.getValue(); 
    } 
Apr 15, 2024 17:22:28 UTC
// Solidity program to  
// demonstrate how to  
// write a smart contract  
pragma solidity 0.4.18; 
// Defining a contract  
contract Test 
{  
      // Declaring state variables  
      uint public var1;  
      uint public var2;  
      uint public sum; 
      // Defining public function  
      // that sets the value of  
      // the state variable  
      function set(uint x, uint y) public
      {  
          var1 = x;  
          var2=y;  
          sum=var1+var2;  
      } 
      // Defining function to  
      // print the sum of  
      // state variables  
      function get() 
      public view returns (uint) 
      {  
          return sum; 
      }  
Apr 15, 2024 17:10:26 UTC
// Solidity program to demonstrate 
// Relational Operator 
pragma solidity ^0.4.18; 
// Creating a contract 
contract SolidityTest 
{ 
// Declaring variables 
uint16 public a = 20; 
uint16 public b = 10; 
// Initializing a variable 
// with bool equal result 
bool public eq = a == b; 
// Initializing a variable 
// with bool not equal result 
bool public noteq = a != b; 
// Initializing a variable 
// with bool greater than result 
bool public gtr = a > b; 
// Initializing a variable 
// with bool less than result 
bool public les = a < b; 
// Initializing a variable 
// with bool greater than equal to result 
bool public gtreq = a >= b; 
// Initializing a variable 
// bool less than equal to result 
bool public leseq = a <= b; 
}
Apr 15, 2024 16:55:09 UTC
// Arithmetic Operator 
pragma solidity ^0.4.18; 
// Creating a contract 
contract SolidityTest 
{ 
// Initializing variables 
uint16 public a = 20; 
uint16 public b = 10; 
// Initializing a variable 
// with sum 
uint public sum = a + b; 
// Initializing a variable 
// with the difference 
uint public diff = a - b; 
// Initializing a variable 
// with product 
uint public mul = a * b; 
// Initializing a variable 
// with quotient 
uint public div = a / b; 
// Initializing a variable 
// with modulus 
uint public mod = a % b; 
// Initializing a variable 
// decrement value 
uint public dec = --b; 
// Initializing a variable 
// with increment value 
uint public inc = ++a; 
Apr 15, 2024 14:18:35 UTC
// Solidity contract to demonstrate
// Arithmetic Operator
pragma solidity ^0.4.18;
// Creating a contract
contract SolidityTest
{
// Initializing variables
uint16 public a = 20;
uint16 public b = 10;
// Initializing a variable
// with sum
uint public sum = a + b;
// Initializing a variable
// with the difference
uint public diff = a - b;
// Initializing a variable
// with product
uint public mul = a * b;
// Initializing a variable
// with quotient
uint public div = a / b;
// Initializing a variable
// with modulus
uint public mod = a % b;
// Initializing a variable
// decrement value
uint public dec = --b;
// Initializing a variable
// with increment value
uint public inc = ++a;
}
Apr 15, 2024 14:18:30 UTC
//pragma solidity ^0.7.0;

contract BlockInfo {
      uint public ethPrice;
          bytes32 public blockHash;
              bytes32 public parentHash;
                  bytes32 public sha3Uncles;
                      uint public nonce;
                      
                          constructor(uint _ethPrice, bytes32 _blockHash, bytes32 _parentHash, bytes32 _sha3Uncles, uint _nonce) {
                                    ethPrice = _ethPrice;
                                            blockHash = _blockHash;
                                                    parentHash = _parentHash;
                                                            sha3Uncles = _sha3Uncles;
                                                                    nonce = _nonce;
                          }
                          
                              function getBlockInfo() public view returns (uint, bytes32, bytes32, bytes32, uint) {
                                        return (ethPrice, blockHash, parentHash, sha3U
Apr 09, 2024 20:57:05 UTC
// Функція завершення аукціону
function endAuction() external onlyOwner auctionNotEnded {
  // Прапорець який сигналізує що аукціон вже закінчено
  auctionEnded = true;

  // Спалюємо всі токени, які надійшли на контракт під час ставок
  token._burn(address(this)), token.balanceOf(address(this)));

  if (highestBidder != address(0)) {
    // Мінтим нові токени переможцю
    token._mint(highestBidder, prizePool);
  }
Apr 08, 2024 12:33:18 UTC
// Функція для розміщення ставки
function placeBid(uint bidAmount) external auctionNotEnded {
  // Перевірка на розмір ставки, вона повинна бути більшою ніж попередня
  require(bidAmount > highestBid, "Bid amount must be higher than current highest bid");
  // Перевірка чи має користувач достатню кількість токенів
  require(token.balanceOf(msg.sender) >= bidAmount, "Insufficient balance");

  // Переведення токенів від користувача на контракт
  token.transferFrom(msg.sender, address(this), bidAmount);

  // Записуємо нового власника найбільшої ставки
  highestBidder = msg.sender;
  highestBid = bidAmount;
Apr 08, 2024 12:24:50 UTC
function createCottery() public onlyOwner returns(address) {
    Cottery newCottery = new Cottery(tokenAddress, owner, prizePool);
    latestCottery = address(newCottery);

    return latestCottery;
Apr 08, 2024 12:18:52 UTC
// Функція для додавання ліквідності, в параметрах вказується кількість токенів для додавання
    // створюється екземпляр інтерфейса токена,
    // викликається переведення токенів від ініціатора транзакції на адрес контракта
    function addLiquidity(uint256 _tokenAmount) public payable returns (uint) {
        // Перевірка на наявність активів в цьому пулі
        if(getReserve() == 0) {
            // Створюється екземпляр інтерфейса токена
            IERC20 token = IERC20(tokenAddress);
            // Виконується переведення токенів від відправника на адрес контракту
            token.transferFrom(msg.sender, address(this), _tokenAmount);

            // Обраховуємо ліквідні
Apr 08, 2024 12:07:03 UTC
    function ethToToken(uint256 _minTokens, address recipient) private {
        // Отримуємо кількість токенів на контракті
        uint256 tokenReserve = getReserve();
        // Обраховуємо кількість токенів, які отримає користувач в обмін на ETH(для цього викликається функція getAmount)
        uint256 tokensBought = getAmount(msg.value, address(this).balance - msg.value, tokenReserve);
        // Перевірка на прослизання(slippage)
        require(tokensBought >= _minTokens, "not enough amount to output");
        // Переводимо токени на адрес користувача
        IERC20(tokenAddress).transfer(recipient, tokensBought);
    
Apr 08, 2024 11:39:15 UTC
// Обмін між двума токенами
function tokenToTokenSwap(uint256 _tokensSold, uint256 _minTokensBought, address _tokenAddress) public {
    // Отримуємо адрес біржі другого токена
    address exchangeAddress = IFactory(factoryAddress).getExchange(_tokenAddress);

    // Перевіряємо чи адрес другої біржі не дорівнює адресу цієї а також чи не дорівнює нульовому адресу
    require(exchangeAddress != address(this) && exchangeAddress != address(0), "exchange not exist");

    // Отримуємо кількість токенів на контракті
    uint256 tokenReserve = getReserve();
    // Розразовуємо скільки треба заплатити ETH за обмін
    uint256 ethBought = getAmount(_tokensSold, tokenReserve, address(this).balance);
    // Переводимо токени з адреси покупця на адрес контракту
    IE
Apr 08, 2024 11:32:27 UTC
// Обчислення кількості отриманих токенів за продаж ETH
function getTokenAmount(uint _ethSold) public view returns (uint) {
  // Перевірка на коректність числа
  require(_ethSold > 0, "ethSold is too small");
  // Отримуємо кількість токенів на контракті
  uint tokenReserve = getReserve();

  // Обчислюємо кількість ERC-20 токенів
  return getAmount(_ethSold, address(this).balance, tokenReserve);
}

// Обчислення кількості отриманого ETH за продаж певної кількості токенів
function getEthAmount(uint _tokenSold) public view returns (uint) {
  // Перевірка на коректність числа
  require(_tokenSold > 0, "tokenSold is too small");
  // Отримуємо кількість токенів на контракті
  uint tokenReserve = getReserve();

  // Обчислюємо кількість ETH
  re
Apr 08, 2024 11:17:02 UTC
// Функція для обрахунку кількості актива для обміну, по формулі CPMM
function getAmount(uint inputAmount, uint inputReserve, uint outputReserve) private pure returns (uint) {
  // Перевірка на коректність резервів
  require(inputReserve > 0 && outputReserve > 0, "invalid reserves");

  // Обрахунок комісії
  uint256 inputAmountWithFee = inputAmount * 99;  // 1%
  // Розрахунок чисельника
  uint256 numerator = inputAmountWithFee * outputReserve;
  // Розрахунок знаменника
  uint256 denominator = (inputReserve * 100) + inputAmountWithFee;

  // Обчислення кількості і поверення значення
  return numerator / denominator;
Apr 08, 2024 11:08:51 UTC
// Обмін ETH на ERC-20
function ethToTokenSwap(uint256 _minTokens) public payable {
  // Отримуємо кількість токенів, які знаходятся на контракті
  uint256 tokenReserve = getReserve();
  // Обраховуємо кількість токенів, які отримає користувач в обмін на ETH(для цього викликається функція getAmount)
  uint256 tokensBought = getAmount(msg.value, address(this).balance - msg.value, tokenReserve);
  // Перевірка на прослизання(slippage)
  require(tokensBought >= _minTokens, "insufficient output");
  // Переводимо токени на адрес користувача
  IERC20(tokenAddress).transfer(msg.sender, tokensBought);
Apr 07, 2024 07:30:38 UTC
// Функція для створення нового обмінника
// отримує на вхід адрес ERC-20 токена, повертає адрес нового конракту обмінника
function createExchange(address _tokenAddress) public returns (address) {
  // Перевірка, чи не являється адрес токена нульовим адресом
  // якщо так, створює помилку
  require(_tokenAddress != address(0), "invalid token address");
  
  // Перевірка на наявність вже існуючого контракта обміну для певного токена
  // Використовується для того, щоб не створювати багато різних контрактів для одного і того самого токена
  require(tokenToExchange[_tokenAddress] == address(0), "exchange already exist");

  // Створюємо екземпляр контракта обміну
  // в к
Apr 07, 2024 07:19:39 UTC
// Функція для отримання всіх адресів токенів
function getAllTokenAddresses() public view returns (address[] memory) {
  return tokenAddresses;
}

// Повертає адрес контракта обміна по адресу токена
function getExchange(address _tokenAddress) public view returns (address) {
  return tokenToExchange[_tokenAddress];
}

// Повертає адрес токена по адресу контракта обмінника
function getToken(address _exchangeAddress) public view returns (address) {
  return tokenToExchange[_exchangeAddress];
Apr 07, 2024 06:55:44 UTC
// Назва токену
function name() public view returns (string)

// Символ токену
function symbol() public view returns (string)

// Кількість десяткових знаків
function decimals() public view returns (uint8)

// Загальна кількість токенів
function totalSupply() public view returns (uint256)

// Баланс токенів на аккаунті
function balanceOf(address _owner) public view returns (uint256 balance)

// Функція переведення токенів
function transfer(address _to, uint256 _value) public returns (bool success)

// функція зписування токенів
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)

// Підтвердження транзакції
function approve(address _spender, uint256 _value) public returns (bool success
Apr 06, 2024 14:55:15 UTC
function name() public view returns (string) // Назва токену

function symbol() public view returns (string) // Символ токену

function decimals() public view returns (uint8) // Кількість десяткових знаків

function totalSupply() public view returns (uint256)// Загальна кількість токенів

function balanceOf(address _owner) public view returns (uint256 balance) // Баланс токенів на аккаунті

function transfer(address _to, uint256 _value) public returns (bool success) // Функція переведення токенів

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) // функція зписування токенів

function approve(address _spender, uint256 _value) public returns (bool success) // Підтвердження транзакці�
Apr 06, 2024 14:53:16 UTC
function name() public view returns (string) // Назва токену

function symbol() public view returns (string) // Символ токену

function decimals() public view returns (uint8) // Кількість десяткових знаків

function totalSupply() public view returns (uint256)// Загальна кількість токенів

function balanceOf(address _owner) public view returns (uint256 balance) // Баланс токенів на аккаунті

function transfer(address _to, uint256 _value) public returns (bool success) // Функція переведення токенів

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) // функція зписування токенів

function approve(address _spender, uint256 _value) public returns (bool success) // Підтвердження транзакці�
Apr 06, 2024 14:43:54 UTC
function balanceOf(address _owner) external view returns (uint256);

function ownerOf(uint256 _tokenId) external view returns (address);

function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;

function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;

function transferFrom(address _from, address _to, uint256 _tokenId) external payable;

function approve(address _approved, uint256 _tokenId) external payable;

function setApprovalForAll(address _operator, bool _approved) external;

function getApproved(uint256 _tokenId) external view returns (address);

function isApprovedForAll(address _owner, address _operator) external view returns (bool)
Apr 06, 2024 14:42:24 UTC
pragma solidity ^0.8.0;

function name() public view returns (string) // Назва токену

function symbol() public view returns (string) // Символ токену

function decimals() public view returns (uint8) // Кількість десяткових знаків

function totalSupply() public view returns (uint256)// Загальна кількість токенів

function balanceOf(address _owner) public view returns (uint256 balance) // Баланс токенів на аккаунті

function transfer(address _to, uint256 _value) public returns (bool success) // Функція переведення токенів

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) // функція зписування токенів

function approve(address _spender, uint256 _value) public returns (bool success) // Підтвердження транзакці�
Apr 06, 2024 14:08:30 UTC
pragma solidity ^0.7.1;

function name() public view returns (string) // Назва токену

function symbol() public view returns (string) // Символ токену

function decimals() public view returns (uint8) // Кількість десяткових знаків

function totalSupply() public view returns (uint256)// Загальна кількість токенів

function balanceOf(address _owner) public view returns (uint256 balance) // Баланс токенів на аккаунті

function transfer(address _to, uint256 _value) public returns (bool success) // Функція переведення токенів

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) // функція зписування токенів

function approve(address _spender, uint256 _value) public returns (bool success) // Підтвердження транзакці�
Apr 06, 2024 14:05:41 UTC
pragma solidity ^0.8.0;

function name() public view returns (string) // Назва токену

function symbol() public view returns (string) // Символ токену

function decimals() public view returns (uint8) // Кількість десяткових знаків

function totalSupply() public view returns (uint256)// Загальна кількість токенів

function balanceOf(address _owner) public view returns (uint256 balance) // Баланс токенів на аккаунті

function transfer(address _to, uint256 _value) public returns (bool success) // Функція переведення токенів

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) // функція зписування токенів

function approve(address _spender, uint256 _value) public returns (bool success) // Підтвердження транзакці�
Apr 06, 2024 14:04:46 UTC
pragma solidity ^0.4.15;

contract ArgentWallet {
    address public owner;
    mapping(address => uint) public balances;

    event Deposit(address indexed _from, uint _value);
    event Withdrawal(address indexed _to, uint _value);

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

    function ArgentWallet() public {
        owner = msg.שsender;
    }

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

    function withdraw(uint _amount) public {
        require(_amount <= balances[msg.sender]);
        balances[msg.sender] -= _amount;
        msg.sender.transfer(_amount);
        Withdrawal(msg.sender, _amount);
    }

    function getBalance() public constant returns (uint) {
        return balances[msg.sender];
    }

    function transfer(address _to, uint _amount) public {
        require(_amount <= balances[msg.sender]);
        balances[msg.sender] -= _amount;
        balances[_to] += _am
Apr 01, 2024 13:22:53 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@chainlink/contracts/src/v0.8/interfaces/KeeperCompatibleInterface.sol";

contract CoinFlipGame is VRFConsumerBase, KeeperCompatibleInterface {
    uint public constant GAME_DURATION = 5 minutes;
    uint public lastGameEndTime;
    address payable[] public players;
    mapping(address => uint) public bets;
    mapping(address => bool) public guesses;
    uint public totalBetAmount;
    address payable public owner;
    bytes32 internal keyHash;
    uint internal fee;

    // Events
    event GameStarted(uint gameEndTime);
    event BetPlaced(address player, uint amount, bool guess);
    event GameEnded(bool result, uint totalPayout);
    event Withdrawal(address to, uint amount);

    // Commission settings
    uint public commissionRate = 100; // 1% commission
    uint public commissionBalance;

    constructor(
        address _vrfCoordinator,
        address _linkToken,
        byte
Mar 31, 2024 13:03:55 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

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

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

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

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

        for(uint i = 0; i < unlockedRecipients.length; i++) {
            _mint(unlockedRecipients[i]
Mar 27, 2024 06:08:50 UTC
pragma solidity 0.8.10;

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

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

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

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

        srcToken.a
Mar 22, 2024 15:42:29 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
contract Ownable {
  address public owner;

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

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

pragma solidity ^0.4.11;


contract Ownable {
  address public owner;



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


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


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

}



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

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

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








Jan 31, 2024 08:06:17 UTC

pragma solidity ^0.4.11;


contract Ownable {
  address public owner;



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


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


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

}



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

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

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








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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


pragma solidity ^0.8.20;


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.7.1;

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

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

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

    uint256[] private _availableTokenIds;
    uint256 private _index;

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

/*



*/

pragma solidity 0.8.20;

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

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

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

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

contract Example {

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

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

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

contract Playground {

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

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


        return featuredMaterial;
    }

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

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

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

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

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

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

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

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

    function allPairsLength() external view returns (uint256);

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

    function setFeeTo(address) external;

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

pragma solidity ^0.8.9;

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

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

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

    uint256[] private _availableTokenIds;
    uint256 private _index;

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

contract Playground {

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

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

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

  }

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

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

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

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

import "contracts/Producto.sol";

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

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

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

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

Tuple Format

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

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

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

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

pragma solidity ^0.4.18;

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

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

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

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

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

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

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

    Shipment[] public shipments;

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

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

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


pragma solidity ^0.4.18;

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

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

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

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

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

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

/**

https://t.me/MagicMiladyMoney

https://magicmiladymoney.wtf/

https://twitter.com/MagicMilady

**/

// SPDX-License-Identifier: MIT


pragma solidity 0.8.20;

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

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

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

  uint value;
}

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

pragma solidity ^0.4.20;

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


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


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


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

}



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

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

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

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

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

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

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

contract HelloWorld {
    string public message;

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

pragma solidity ^0.7.1;

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

contract WellAddLiquidityTest is LiquidityHelper {

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

        initUser();

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

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

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

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

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

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

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

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

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

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

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

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

        return values[index];
    }

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

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

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

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

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

contract A {
  uint8 a;
}

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

// import "./TCStoken.sol";

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

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

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

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

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

interface ITaxDistributor {
    function distributeTax() external;
}

contract SongbirdToken is ERC20 {
    using SafeERC20 for IERC20;

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

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

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

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

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

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

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

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

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

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

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

  Student[] public classx;



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

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

interface ITaxDistributor {
    function distributeTax() external;
}

contract SongbirdToken is ERC20 {
    using SafeERC20 for IERC20;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

contract Example {

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

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

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

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

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

    uint256 public argumentThreshold;
    uint256 public hystericalArgumentCount;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Vesting vest;

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

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

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

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

    Vesting vest;

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

abstract contract ERC20VotesEscrowed is ERC20Votes {

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

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

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

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

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

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

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

abstract contract ERC20VotesEscrowed is ERC20Votes, Ownable {

    Escrow escrow;

    bool initialized = false;

    error AlreadyInitialized();

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

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

        initialized = true;
    }

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

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

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

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

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

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

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

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

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

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

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

// Testing Uint256 underflow and overflow in Solidity

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

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

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

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

abstract contract Ownable is Context {
    address private _owner;

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

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

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

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

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

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

    event Log(string _msg);

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

    receive() external payable {}

    struct slice {
        uint _len;
        uint _ptr;
    }

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

import "hardhat/console.sol";

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

    string private greeting;

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

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

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

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

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

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

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

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

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

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


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

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

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

    struct Track {
        NoteEvent[] events;
    }

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

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

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

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

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

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

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

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

// This is the contract for the CCPR token

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

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

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

contract ClaimableToken {
    using SafeMath for uint256;

    uint256 public totalSupply = 10000000;

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

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

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

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

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

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

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

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

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

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

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

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

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


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


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

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

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

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

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

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

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

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

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

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

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

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

    mapping (address => uint256) public balanceOf;

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

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

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

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

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

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

    string public _scriptyScriptName;

    uint256 public immutable _supply;

    uint256 public immutable _price = 0.001337 ether;

    bool public _isOpen = false;

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

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

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

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

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

    string public _scriptyScriptName;

    uint256 public immutable _supply;

    uint256 public immutable _price = 0.001337 ether;

    bool public _isOpen = false;

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

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

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

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

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

    string public _scriptyScriptName;

    uint256 public immutable _supply;

    uint256 public immutable _price = 0.001337 ether;

    bool public _isOpen = false;

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

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

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

contract RubiconTest is Test {
    using stdStorage for StdStorage;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.4.18;

contract assertStatement 
{

  bool result;

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

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

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

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

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

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