Skip to content

Instantly share code, notes, and snippets.

View korrio's full-sized avatar
👽

kOrriO korrio

👽
  • Hal Finney Co.,Ltd.
  • mempool
  • X @korrio
View GitHub Profile
@korrio
korrio / Escrow.sol
Created February 21, 2022 05:36
Escrow.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
@korrio
korrio / BonusReward.sol
Created December 9, 2021 03:51
BonusReward.sol
pragma solidity ^0.6.12;
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
@korrio
korrio / Arbitrage_multiverse.sol
Created November 28, 2021 06:38
Arbitrage_multiverse.sol
pragma solidity 0.6.12;
interface IMyRouterInterface { // UniswapV2Interface
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
@korrio
korrio / Artbitrage_nov.sol
Created November 28, 2021 04:10
Artbitrage_nov.sol
pragma solidity 0.6.12;
interface IMyRouterInterface { // UniswapV2Interface
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
@korrio
korrio / tokenURI.sol
Created November 11, 2021 00:24
tokenURI.sol
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
CharacterAttributes memory charAttributes = nftHolderAttributes[
_tokenId
];
@korrio
korrio / SimpleArbitrator_flat.sol
Created November 9, 2021 08:36
SimpleArbitrator_flat.sol
/**
* @authors: [@ferittuncer, @hbarcelos]
* @reviewers: []
* @auditors: []
* @bounties: []
* @deployments: []
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.9;
@korrio
korrio / SimpleEscrow_flat.sol
Created November 9, 2021 08:22
SimpleEscrow_flat.sol
/**
* @authors: [@ferittuncer, @hbarcelos]
* @reviewers: []
* @auditors: []
* @bounties: []
* @deployments: []
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.9;
@korrio
korrio / useVonderNFT.ts
Created November 8, 2021 03:32
useVonderNFT.ts
import { useWeb3React } from "@web3-react/core";
import { BigNumber, Contract, ethers } from "ethers";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useContract } from "./contracts/useContract";
import {
IVonderBabyBoomer,
VonderCharacter,
VonderElement,
VonderGeneration,
} from "types/Vonder";
@korrio
korrio / ERC20.sol
Created November 6, 2021 07:10
ERC20.sol
pragma solidity ^0.6.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.1.0/contracts/token/ERC20/ERC20.sol";
contract KORR is ERC20 {
constructor () public ERC20("Korr Token", "KORR") {
_mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
}
}
@korrio
korrio / truffle-config.js
Created October 28, 2021 17:34
truffle-config.js
const HDWalletProvider = require('@truffle/hdwallet-provider');
const Web3 = require('web3');
const fs = require('fs');
const { infuraProjectId, privateKeys, etherApiKey, bscApiKey } = JSON.parse(fs.readFileSync('.secret').toString().trim());
// const infuraProjectId = `86f947e6d8ad4483a95d5a53864e7a8e`;
const binanceTestnetProvider = new HDWalletProvider({
privateKeys: privateKeys,