This is a friendly code review and my personal comments.
- Lock the contracts to a specific compiler version
- Add license to all contracts
| using System; | |
| using System.Collections.Generic; | |
| namespace JPT | |
| { | |
| public class TextProgressBar : IDisposable | |
| { | |
| private int _progress; | |
| private int _total; | |
| private int _width; |
| package main | |
| import ( | |
| "flag" | |
| "log" | |
| "net/http" | |
| "path/filepath" | |
| ) | |
| var ( |
| pragma solidity ^0.5.0; | |
| contract ObjectOriented { | |
| event Debug(string msg); | |
| constructor() public { | |
| } | |
| // Base method with two parameters | |
| function A(address _addr, uint256 _value) public returns(uint256) { |
| var etherWalletLib = require('ethereumjs-wallet'); | |
| var ethUtil = require('ethereumjs-util'); | |
| var BN = require('bn.js') | |
| const Peer_Secret = ethUtil.keccak256('ABC'); | |
| const wallet = etherWalletLib.generate(); | |
| console.log(`Peer Original PrivateKey: ${wallet.getPrivateKeyString()}`); | |
| console.log(`Peer Original PublicKey: ${wallet.getPublicKeyString()}`); |
| pragma solidity >=0.6.0 <0.7.0; | |
| interface IERC2429 { | |
| function defineHardRecovery(bytes32 _rootTree) external; | |
| } | |
| /* | |
| Example of a recovery account as DMS and Will. | |
| This contract define a new root as a mandatory recovery. A mandatory recovrey dont have a wait time to be active. After the activation is set, only the peers can recovery the account. We can think as the analogic lawyers :) gthat can prove the incapacity of the user. |
| pragma solidity ^0.7.0; | |
| contract superSpreader { | |
| event sendEther(address indexed receiver, uint256 amount); | |
| event deposit(address indexed sender, uint256 amount); | |
| mapping(address => bool) private _transferDone; | |
| constructor() payable { |
| pragma solidity 0.7.6; | |
| pragma experimental ABIEncoderV2; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/token/ERC721/ERC721.sol"; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/utils/Counters.sol"; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/access/AccessControl.sol"; | |
| contract SuperERC721 is ERC721, AccessControl { | |
| bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); |
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.4; | |
| import { | |
| ISuperfluid, | |
| ISuperToken | |
| } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; | |
| import { | |
| IConstantFlowAgreementV1 |
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.10; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol"; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/IERC20Metadata.sol"; | |
| /* | |
| Each operation you get the gas as token; | |
| There is small change of ragnorok of your balance; | |
| */ |