Skip to content

Instantly share code, notes, and snippets.

@francestu96
francestu96 / CarrotPrivateSale.sol
Created February 22, 2022 15:10
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.12+commit.f00d7308.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity = 0.8.12;
interface ICarrot {
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
contract CarrotPrivateSale {
uint constant private _min = 10**14;
uint constant private _max = 10**18;
@francestu96
francestu96 / Carrot.sol
Created February 22, 2022 15:10
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.12+commit.f00d7308.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity = 0.8.12;
interface IERC20 {
function totalSupply() view external returns (uint256);
function balanceOf(address account) view external returns (uint256);
function allowance(address owner, address spender) view external returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);