This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): |
NewerOlder