Skip to content

Instantly share code, notes, and snippets.

View cleancoindev's full-sized avatar
🦦
OtterMarkets eh? *rolls eyes*

cleancoindev

🦦
OtterMarkets eh? *rolls eyes*
View GitHub Profile
@cleancoindev
cleancoindev / gist:519e94a73c7a7b0f8dd7851de55baa7e
Created July 31, 2022 00:22
v7.4 sol Legendary.sol token BSC
// SPDX-License-Identifier: UNLISCENSED
pragma solidity ^0.7.4;
contract Legendary {
string public name = "Legendary Token";
string public symbol = "LGT";
uint256 public totalSupply = 1000000000000000000000000; // 1 million tokens
uint8 public decimals = 18;
@cleancoindev
cleancoindev / gist:e53f44705ba670ebcecdf416f65e888d
Created July 31, 2022 00:22
v8.4 sol Legendary Token BSC
// SPDX-License-Identifier: UNLISCENSED
pragma solidity ^0.8.4;
contract LegendaryToken {
string public name = "Legendary Token";
string public symbol = "LGT";
uint256 public totalSupply = 1000000000000000000000000; // 1 million tokens
uint8 public decimals = 18;
pragma solidity >=0.5.0;
interface IUniswapV2Migrator {
function migrate(address token, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external;
}
@cleancoindev
cleancoindev / contracts...scenario.json
Created March 28, 2022 09:35
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.5.17+commit.d19bba13.js&optimize=false&runs=200&gist=
{
"accounts": {
"account{0}": "0x8c1a0B65F5218649Db12fcbB2fB6Ad246f399bd6"
},
"linkReferences": {},
"transactions": [
{
"timestamp": 1648458668905,
"record": {
"value": "0",
@cleancoindev
cleancoindev / contracts...AutoSale.sol
Created March 28, 2022 09:06
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.5.17+commit.d19bba13.js&optimize=false&runs=200&gist=
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1e0f07751ea0badce1f51bc23578b5b1ddb4b464/contracts/GSN/Context.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1e0f07751ea0badce1f51bc23578b5b1ddb4b464/contracts/token/ERC20/IERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1e0f07751ea0badce1f51bc23578b5b1ddb4b464/contracts/token/ERC20/SafeERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1e0f07751ea0badce1f51bc23578b5b1ddb4b464/contracts/utils/ReentrancyGuard.sol";
/**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale,
@cleancoindev
cleancoindev / contracts...BITNCrowdsale.sol
Created March 28, 2022 05: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.5.17+commit.d19bba13.js&optimize=false&runs=200&gist=
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1e0f07751ea0badce1f51bc23578b5b1ddb4b464/contracts/crowdsale/Crowdsale.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5471fc808a17342d738853d7bf3e9e5ef3108074/contracts/ownership/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1e0f07751ea0badce1f51bc23578b5b1ddb4b464/contracts/token/ERC20/ERC20.sol";
pragma solidity ^0.4.23;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5471fc808a17342d738853d7bf3e9e5ef3108074/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5471fc808a17342d738853d7bf3e9e5ef3108074/contracts/math/SafeMath.sol";
/**
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale,
* allowing investors to purchase tokens with ether. This contract implements
@cleancoindev
cleancoindev / ReferralContract.sol
Created March 27, 2022 19:59 — forked from kbahr/ReferralContract.sol
A HEX/ETH "referral" contract that takes an erc20 token address (made for HEX, but any should work), a set of splitter addresses and their percentages. It will split ETH and ERC20 tokens by the addresses' percentages
pragma solidity ^0.5.12;
import "./HEX.sol"; // TODO: Windows file separator
contract ReferralSplitter {
event DistributedShares(
uint40 timestamp,
address indexed memberAddress,
uint256 amount
@cleancoindev
cleancoindev / README.txt
Created February 17, 2022 23:13
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.4.26+commit.4563c3fc.js&optimize=true&runs=20&gist=
PEG STORAGE FOR DEPLOYMENT
@cleancoindev
cleancoindev / README.txt
Created February 17, 2022 03:25
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.4.26+commit.4563c3fc.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads for the 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