Skip to content

Instantly share code, notes, and snippets.

View blackluv's full-sized avatar
🎯
Focusing

YummyDAO blackluv

🎯
Focusing
View GitHub Profile
// Copyright (c) 2017-2021 The Gemma Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef GEMMA_ASSET_PROTOCOL_H
#define GEMMA_ASSET_PROTOCOL_H
#include "amount.h"
#include "tinyformat.h"
// SPDX-License-Identifier: Unlicensed
/**
* United Apes Defi Token
* @developer: yummyDAO, @Discord: yummy#3220
**/
pragma solidity ^0.8.4;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
//SPDX-License-Identifier: MIT
/// @custom:security-contact [email protected]
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract YUMMYNFT is ERC721Enumerable, Ownable {
@blackluv
blackluv / .deps...npm...@pancakeswap...pancake-swap-lib...contracts...GSN...Context.sol
Created January 6, 2022 01:22
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.4.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
@blackluv
blackluv / README.txt
Created January 5, 2022 01:17
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=true&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
@blackluv
blackluv / MyineToken.sol
Created January 5, 2022 00:32
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.2+commit.661d1103.js&optimize=true&runs=200&gist=
pragma solidity ^0.8.2;
contract Token {
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowance;
uint public totalSupply = 10000 * 10 ** 18;
string public name = "Myine";
string public symbol = "MYE";
uint public decimals = 18;
## How to hide API keys from github ##
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while
retaining your commits: https://help.github.com/articles/remove-sensitive-data/
2. In the terminal, create a config.js file and open it up:
touch config.js
atom config.js
@blackluv
blackluv / block.js
Created February 22, 2018 22:23 — forked from lhartikk/block.js
class Block {
constructor(index, previousHash, timestamp, data, hash) {
this.index = index;
this.previousHash = previousHash.toString();
this.timestamp = timestamp;
this.data = data;
this.hash = hash.toString();
}
}
@blackluv
blackluv / blockchain.py
Created February 22, 2018 21:12 — forked from dvf/blockchain.py
Step 12: New Endpoints for Consensus
@app.route('/nodes/register', methods=['POST'])
def register_nodes():
values = request.get_json()
nodes = values.get('nodes')
if nodes is None:
return "Error: Please supply a valid list of nodes", 400
for node in nodes:
blockchain.register_node(node)
@blackluv
blackluv / blockchain.py
Created February 22, 2018 21:10 — forked from dvf/blockchain.py
Creating a simple Blockchain in Python
class Blockchain(object):
def __init__(self):
self.current_transactions = []
self.chain = []
def new_block(self):
# Creates a new Block in the Blockchain
pass
def new_transaction(self):