comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
pragma solidity ^0.5.0; /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(<FILL_ME>) return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } }
c/a==b
203
c/a==b
null
contract ModultradeProposal is OracleOwnable, ContractReceiver { address public seller; address public buyer; uint public id; string public title; uint public price; ModultradeLibrary.Currencies public currency; uint public units; uint public total; uint public validUntil; ModultradeLibrary.ProposalStates public state; uint public payDate; string public deliveryId; uint public fee; address public feeAddress; ERC20 mtrContract; Modultrade modultrade; bytes public tokenFallbackData; event CreatedEvent(uint _id, ModultradeLibrary.ProposalStates _state); event PaidEvent(uint _id, ModultradeLibrary.ProposalStates _state, address _buyer); event DeliveryEvent(uint _id, ModultradeLibrary.ProposalStates _state, string _deliveryId); event ClosedEvent(uint _id, ModultradeLibrary.ProposalStates _state, address _seller, uint _amount); event CanceledEvent(uint _id, ModultradeLibrary.ProposalStates _state, address _buyer, uint _amount); function ModultradeProposal(address _modultrade, address _seller, address _mtrContractAddress) public { } function setProposal(uint _id, string _title, uint _price, ModultradeLibrary.Currencies _currency, uint _units, uint _total, uint _validUntil ) public onlyOracleOrOwner { } function setFee(uint _fee, address _feeAddress) public onlyOracleOrOwner { } function() public payable { } function purchase() public payable { } function setPaid(address _buyer) internal { } function paid(address _buyer) public onlyOracleOrOwner { require(<FILL_ME>) setPaid(_buyer); } function mtrTokenFallBack(address from, uint value) internal { } function tokenFallback(address from, uint value) public { } function tokenFallback(address from, uint value, bytes data) public { } function delivery(string _deliveryId) public onlyOracleOrOwner { } function close() public onlyOracleOrOwner { } function closeEth() private { } function closeMtr() private { } function cancel(uint cancelFee) public onlyOracleOrOwner { } function cancelEth(uint cancelFee) private { } function cancelMtr(uint cancelFee) private { } function getBalance() public constant returns (uint) { } }
getBalance()>=total
245
getBalance()>=total
"Org: Must provide claimId"
// SPDX-License-Identifier: BSD 3-Clause pragma solidity ^0.6.10; pragma experimental ABIEncoderV2; import "./Administratable.sol"; import "./interfaces/IFactory.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/upgrades/contracts/Initializable.sol"; //ORG CONTRACT /** * @title Org * @author rheeger * @notice Org is a contract that serves as a smart wallet for US nonprofit * organizations. It holds the organization's federal Tax ID number as taxID, * and allows for an address to submit a Claim struct to the contract whereby * the organization can directly receive grant awards from Endaoment Funds. */ contract Org is Initializable, Administratable { using SafeERC20 for IERC20; // ========== STRUCTS & EVENTS ========== struct Claim { string firstName; string lastName; string eMail; address desiredWallet; } event CashOutComplete(uint256 cashOutAmount); event ClaimCreated(string claimId, Claim claim); event ClaimApproved(string claimId, Claim claim); event ClaimRejected(string claimId, Claim claim); // ========== STATE VARIABLES ========== IFactory public orgFactoryContract; uint256 public taxId; mapping(string => Claim) public pendingClaims; // claim UUID to Claim Claim public activeClaim; // ========== CONSTRUCTOR ========== /** * @notice Create new Organization Contract * @dev Using initializer instead of constructor for minimal proxy support. This function * can only be called once in the contract's lifetime * @param ein The U.S. Tax Identification Number for the Organization * @param orgFactory Address of the Factory contract. */ function initializeOrg(uint256 ein, address orgFactory) public initializer { } // ========== Org Management & Info ========== /** * @notice Creates Organization Claim and emits a `ClaimCreated` event * @param claimId UUID representing this claim * @param fName First name of Administrator * @param lName Last name of Administrator * @param eMail Email contact for Organization Administrator. * @param orgAdminWalletAddress Wallet address of Organization's Administrator. */ function claimRequest( string calldata claimId, string calldata fName, string calldata lName, string calldata eMail, address orgAdminWalletAddress ) public { require(<FILL_ME>) require(!isEqual(fName, ""), "Org: Must provide the first name of the administrator"); require(!isEqual(lName, ""), "Org: Must provide the last name of the administrator"); require(!isEqual(eMail, ""), "Org: Must provide the email address of the administrator"); require(orgAdminWalletAddress != address(0), "Org: Wallet address cannot be the zero address"); require( pendingClaims[claimId].desiredWallet == address(0), "Org: Pending Claim with Id already exists" ); Claim memory newClaim = Claim({ firstName: fName, lastName: lName, eMail: eMail, desiredWallet: orgAdminWalletAddress }); emit ClaimCreated(claimId, newClaim); pendingClaims[claimId] = newClaim; } /** * @notice Approves an Organization Claim and emits a `ClaimApproved` event * @param claimId UUID of the claim being approved */ function approveClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Rejects an Organization Claim and emits a 'ClaimRejected` event * @param claimId UUID of the claim being rejected */ function rejectClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Cashes out Organization Contract and emits a `CashOutComplete` event * @param tokenAddress ERC20 address of desired token withdrawal */ function cashOutOrg(address tokenAddress) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.ACCOUNTANT) { } /** * @notice Retrieves Token Balance of Org Contract * @param tokenAddress Address of desired token to query for balance * @return Balance of conract in token base unit of provided tokenAddress */ function getTokenBalance(address tokenAddress) external view returns (uint256) { } /** * @notice Org Wallet convenience accessor * @return The wallet specified in the active, approved claim */ function orgWallet() public view returns (address) { } }
!isEqual(claimId,""),"Org: Must provide claimId"
377
!isEqual(claimId,"")
"Org: Must provide the first name of the administrator"
// SPDX-License-Identifier: BSD 3-Clause pragma solidity ^0.6.10; pragma experimental ABIEncoderV2; import "./Administratable.sol"; import "./interfaces/IFactory.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/upgrades/contracts/Initializable.sol"; //ORG CONTRACT /** * @title Org * @author rheeger * @notice Org is a contract that serves as a smart wallet for US nonprofit * organizations. It holds the organization's federal Tax ID number as taxID, * and allows for an address to submit a Claim struct to the contract whereby * the organization can directly receive grant awards from Endaoment Funds. */ contract Org is Initializable, Administratable { using SafeERC20 for IERC20; // ========== STRUCTS & EVENTS ========== struct Claim { string firstName; string lastName; string eMail; address desiredWallet; } event CashOutComplete(uint256 cashOutAmount); event ClaimCreated(string claimId, Claim claim); event ClaimApproved(string claimId, Claim claim); event ClaimRejected(string claimId, Claim claim); // ========== STATE VARIABLES ========== IFactory public orgFactoryContract; uint256 public taxId; mapping(string => Claim) public pendingClaims; // claim UUID to Claim Claim public activeClaim; // ========== CONSTRUCTOR ========== /** * @notice Create new Organization Contract * @dev Using initializer instead of constructor for minimal proxy support. This function * can only be called once in the contract's lifetime * @param ein The U.S. Tax Identification Number for the Organization * @param orgFactory Address of the Factory contract. */ function initializeOrg(uint256 ein, address orgFactory) public initializer { } // ========== Org Management & Info ========== /** * @notice Creates Organization Claim and emits a `ClaimCreated` event * @param claimId UUID representing this claim * @param fName First name of Administrator * @param lName Last name of Administrator * @param eMail Email contact for Organization Administrator. * @param orgAdminWalletAddress Wallet address of Organization's Administrator. */ function claimRequest( string calldata claimId, string calldata fName, string calldata lName, string calldata eMail, address orgAdminWalletAddress ) public { require(!isEqual(claimId, ""), "Org: Must provide claimId"); require(<FILL_ME>) require(!isEqual(lName, ""), "Org: Must provide the last name of the administrator"); require(!isEqual(eMail, ""), "Org: Must provide the email address of the administrator"); require(orgAdminWalletAddress != address(0), "Org: Wallet address cannot be the zero address"); require( pendingClaims[claimId].desiredWallet == address(0), "Org: Pending Claim with Id already exists" ); Claim memory newClaim = Claim({ firstName: fName, lastName: lName, eMail: eMail, desiredWallet: orgAdminWalletAddress }); emit ClaimCreated(claimId, newClaim); pendingClaims[claimId] = newClaim; } /** * @notice Approves an Organization Claim and emits a `ClaimApproved` event * @param claimId UUID of the claim being approved */ function approveClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Rejects an Organization Claim and emits a 'ClaimRejected` event * @param claimId UUID of the claim being rejected */ function rejectClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Cashes out Organization Contract and emits a `CashOutComplete` event * @param tokenAddress ERC20 address of desired token withdrawal */ function cashOutOrg(address tokenAddress) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.ACCOUNTANT) { } /** * @notice Retrieves Token Balance of Org Contract * @param tokenAddress Address of desired token to query for balance * @return Balance of conract in token base unit of provided tokenAddress */ function getTokenBalance(address tokenAddress) external view returns (uint256) { } /** * @notice Org Wallet convenience accessor * @return The wallet specified in the active, approved claim */ function orgWallet() public view returns (address) { } }
!isEqual(fName,""),"Org: Must provide the first name of the administrator"
377
!isEqual(fName,"")
"Org: Must provide the last name of the administrator"
// SPDX-License-Identifier: BSD 3-Clause pragma solidity ^0.6.10; pragma experimental ABIEncoderV2; import "./Administratable.sol"; import "./interfaces/IFactory.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/upgrades/contracts/Initializable.sol"; //ORG CONTRACT /** * @title Org * @author rheeger * @notice Org is a contract that serves as a smart wallet for US nonprofit * organizations. It holds the organization's federal Tax ID number as taxID, * and allows for an address to submit a Claim struct to the contract whereby * the organization can directly receive grant awards from Endaoment Funds. */ contract Org is Initializable, Administratable { using SafeERC20 for IERC20; // ========== STRUCTS & EVENTS ========== struct Claim { string firstName; string lastName; string eMail; address desiredWallet; } event CashOutComplete(uint256 cashOutAmount); event ClaimCreated(string claimId, Claim claim); event ClaimApproved(string claimId, Claim claim); event ClaimRejected(string claimId, Claim claim); // ========== STATE VARIABLES ========== IFactory public orgFactoryContract; uint256 public taxId; mapping(string => Claim) public pendingClaims; // claim UUID to Claim Claim public activeClaim; // ========== CONSTRUCTOR ========== /** * @notice Create new Organization Contract * @dev Using initializer instead of constructor for minimal proxy support. This function * can only be called once in the contract's lifetime * @param ein The U.S. Tax Identification Number for the Organization * @param orgFactory Address of the Factory contract. */ function initializeOrg(uint256 ein, address orgFactory) public initializer { } // ========== Org Management & Info ========== /** * @notice Creates Organization Claim and emits a `ClaimCreated` event * @param claimId UUID representing this claim * @param fName First name of Administrator * @param lName Last name of Administrator * @param eMail Email contact for Organization Administrator. * @param orgAdminWalletAddress Wallet address of Organization's Administrator. */ function claimRequest( string calldata claimId, string calldata fName, string calldata lName, string calldata eMail, address orgAdminWalletAddress ) public { require(!isEqual(claimId, ""), "Org: Must provide claimId"); require(!isEqual(fName, ""), "Org: Must provide the first name of the administrator"); require(<FILL_ME>) require(!isEqual(eMail, ""), "Org: Must provide the email address of the administrator"); require(orgAdminWalletAddress != address(0), "Org: Wallet address cannot be the zero address"); require( pendingClaims[claimId].desiredWallet == address(0), "Org: Pending Claim with Id already exists" ); Claim memory newClaim = Claim({ firstName: fName, lastName: lName, eMail: eMail, desiredWallet: orgAdminWalletAddress }); emit ClaimCreated(claimId, newClaim); pendingClaims[claimId] = newClaim; } /** * @notice Approves an Organization Claim and emits a `ClaimApproved` event * @param claimId UUID of the claim being approved */ function approveClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Rejects an Organization Claim and emits a 'ClaimRejected` event * @param claimId UUID of the claim being rejected */ function rejectClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Cashes out Organization Contract and emits a `CashOutComplete` event * @param tokenAddress ERC20 address of desired token withdrawal */ function cashOutOrg(address tokenAddress) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.ACCOUNTANT) { } /** * @notice Retrieves Token Balance of Org Contract * @param tokenAddress Address of desired token to query for balance * @return Balance of conract in token base unit of provided tokenAddress */ function getTokenBalance(address tokenAddress) external view returns (uint256) { } /** * @notice Org Wallet convenience accessor * @return The wallet specified in the active, approved claim */ function orgWallet() public view returns (address) { } }
!isEqual(lName,""),"Org: Must provide the last name of the administrator"
377
!isEqual(lName,"")
"Org: Must provide the email address of the administrator"
// SPDX-License-Identifier: BSD 3-Clause pragma solidity ^0.6.10; pragma experimental ABIEncoderV2; import "./Administratable.sol"; import "./interfaces/IFactory.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/upgrades/contracts/Initializable.sol"; //ORG CONTRACT /** * @title Org * @author rheeger * @notice Org is a contract that serves as a smart wallet for US nonprofit * organizations. It holds the organization's federal Tax ID number as taxID, * and allows for an address to submit a Claim struct to the contract whereby * the organization can directly receive grant awards from Endaoment Funds. */ contract Org is Initializable, Administratable { using SafeERC20 for IERC20; // ========== STRUCTS & EVENTS ========== struct Claim { string firstName; string lastName; string eMail; address desiredWallet; } event CashOutComplete(uint256 cashOutAmount); event ClaimCreated(string claimId, Claim claim); event ClaimApproved(string claimId, Claim claim); event ClaimRejected(string claimId, Claim claim); // ========== STATE VARIABLES ========== IFactory public orgFactoryContract; uint256 public taxId; mapping(string => Claim) public pendingClaims; // claim UUID to Claim Claim public activeClaim; // ========== CONSTRUCTOR ========== /** * @notice Create new Organization Contract * @dev Using initializer instead of constructor for minimal proxy support. This function * can only be called once in the contract's lifetime * @param ein The U.S. Tax Identification Number for the Organization * @param orgFactory Address of the Factory contract. */ function initializeOrg(uint256 ein, address orgFactory) public initializer { } // ========== Org Management & Info ========== /** * @notice Creates Organization Claim and emits a `ClaimCreated` event * @param claimId UUID representing this claim * @param fName First name of Administrator * @param lName Last name of Administrator * @param eMail Email contact for Organization Administrator. * @param orgAdminWalletAddress Wallet address of Organization's Administrator. */ function claimRequest( string calldata claimId, string calldata fName, string calldata lName, string calldata eMail, address orgAdminWalletAddress ) public { require(!isEqual(claimId, ""), "Org: Must provide claimId"); require(!isEqual(fName, ""), "Org: Must provide the first name of the administrator"); require(!isEqual(lName, ""), "Org: Must provide the last name of the administrator"); require(<FILL_ME>) require(orgAdminWalletAddress != address(0), "Org: Wallet address cannot be the zero address"); require( pendingClaims[claimId].desiredWallet == address(0), "Org: Pending Claim with Id already exists" ); Claim memory newClaim = Claim({ firstName: fName, lastName: lName, eMail: eMail, desiredWallet: orgAdminWalletAddress }); emit ClaimCreated(claimId, newClaim); pendingClaims[claimId] = newClaim; } /** * @notice Approves an Organization Claim and emits a `ClaimApproved` event * @param claimId UUID of the claim being approved */ function approveClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Rejects an Organization Claim and emits a 'ClaimRejected` event * @param claimId UUID of the claim being rejected */ function rejectClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Cashes out Organization Contract and emits a `CashOutComplete` event * @param tokenAddress ERC20 address of desired token withdrawal */ function cashOutOrg(address tokenAddress) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.ACCOUNTANT) { } /** * @notice Retrieves Token Balance of Org Contract * @param tokenAddress Address of desired token to query for balance * @return Balance of conract in token base unit of provided tokenAddress */ function getTokenBalance(address tokenAddress) external view returns (uint256) { } /** * @notice Org Wallet convenience accessor * @return The wallet specified in the active, approved claim */ function orgWallet() public view returns (address) { } }
!isEqual(eMail,""),"Org: Must provide the email address of the administrator"
377
!isEqual(eMail,"")
"Org: Pending Claim with Id already exists"
// SPDX-License-Identifier: BSD 3-Clause pragma solidity ^0.6.10; pragma experimental ABIEncoderV2; import "./Administratable.sol"; import "./interfaces/IFactory.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/upgrades/contracts/Initializable.sol"; //ORG CONTRACT /** * @title Org * @author rheeger * @notice Org is a contract that serves as a smart wallet for US nonprofit * organizations. It holds the organization's federal Tax ID number as taxID, * and allows for an address to submit a Claim struct to the contract whereby * the organization can directly receive grant awards from Endaoment Funds. */ contract Org is Initializable, Administratable { using SafeERC20 for IERC20; // ========== STRUCTS & EVENTS ========== struct Claim { string firstName; string lastName; string eMail; address desiredWallet; } event CashOutComplete(uint256 cashOutAmount); event ClaimCreated(string claimId, Claim claim); event ClaimApproved(string claimId, Claim claim); event ClaimRejected(string claimId, Claim claim); // ========== STATE VARIABLES ========== IFactory public orgFactoryContract; uint256 public taxId; mapping(string => Claim) public pendingClaims; // claim UUID to Claim Claim public activeClaim; // ========== CONSTRUCTOR ========== /** * @notice Create new Organization Contract * @dev Using initializer instead of constructor for minimal proxy support. This function * can only be called once in the contract's lifetime * @param ein The U.S. Tax Identification Number for the Organization * @param orgFactory Address of the Factory contract. */ function initializeOrg(uint256 ein, address orgFactory) public initializer { } // ========== Org Management & Info ========== /** * @notice Creates Organization Claim and emits a `ClaimCreated` event * @param claimId UUID representing this claim * @param fName First name of Administrator * @param lName Last name of Administrator * @param eMail Email contact for Organization Administrator. * @param orgAdminWalletAddress Wallet address of Organization's Administrator. */ function claimRequest( string calldata claimId, string calldata fName, string calldata lName, string calldata eMail, address orgAdminWalletAddress ) public { require(!isEqual(claimId, ""), "Org: Must provide claimId"); require(!isEqual(fName, ""), "Org: Must provide the first name of the administrator"); require(!isEqual(lName, ""), "Org: Must provide the last name of the administrator"); require(!isEqual(eMail, ""), "Org: Must provide the email address of the administrator"); require(orgAdminWalletAddress != address(0), "Org: Wallet address cannot be the zero address"); require(<FILL_ME>) Claim memory newClaim = Claim({ firstName: fName, lastName: lName, eMail: eMail, desiredWallet: orgAdminWalletAddress }); emit ClaimCreated(claimId, newClaim); pendingClaims[claimId] = newClaim; } /** * @notice Approves an Organization Claim and emits a `ClaimApproved` event * @param claimId UUID of the claim being approved */ function approveClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Rejects an Organization Claim and emits a 'ClaimRejected` event * @param claimId UUID of the claim being rejected */ function rejectClaim(string calldata claimId) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.REVIEWER) { } /** * @notice Cashes out Organization Contract and emits a `CashOutComplete` event * @param tokenAddress ERC20 address of desired token withdrawal */ function cashOutOrg(address tokenAddress) public onlyAdminOrRole(orgFactoryContract.endaomentAdmin(), IEndaomentAdmin.Role.ACCOUNTANT) { } /** * @notice Retrieves Token Balance of Org Contract * @param tokenAddress Address of desired token to query for balance * @return Balance of conract in token base unit of provided tokenAddress */ function getTokenBalance(address tokenAddress) external view returns (uint256) { } /** * @notice Org Wallet convenience accessor * @return The wallet specified in the active, approved claim */ function orgWallet() public view returns (address) { } }
pendingClaims[claimId].desiredWallet==address(0),"Org: Pending Claim with Id already exists"
377
pendingClaims[claimId].desiredWallet==address(0)
"trading is already open"
pragma solidity ^0.8.4; // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT // 'AIRBets' token contract // // Symbol : AIRBets // Name : AIRBets // Twitter : https://twitter.com/air_bets // Fee : 1% fee auto distribute to all holders // // RoadMap : Let Rat Race // Uniswap listing // Holder 1000 // Audit smart contract audit // $5M market cap // // Phase 2: Crown // Price Tracker listings: CoinGecko and CoinMarketCap // Exchange More DEX & CEX listings // Initial marketing strategy execution // Expanding& Developing // Full website redesign // Grow hodlers to 10,000 // $10M market cap // // Phase 3: Macau // Partnership execution // DeFi Market Place // Grow hodlers to 25,000 // ---------------------------------------------------------------------------- abstract contract Context { function _msgSender() internal view virtual returns (address) { } } /** * IERC20.sol * @dev Interface of the ERC20 standard as defined in the EIP. */ 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); } /** * SafeMath.sol * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ 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 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 AIRBets is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 35e12 * 10**6; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "AIRBets"; string private constant _symbol = 'AIRBets'; uint8 private constant _decimals = 6; uint256 private _taxFee = 1; uint256 private _charityFee = 3; uint256 private _previousTaxFee = _taxFee; uint256 private _previousCharityFee = _charityFee; address private _charityAddress = 0x601699Ba78D91c7e6b8e3B67eF4C129BB782b8d7; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 private _maxTxAmount = _tTotal; 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 tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve(address owner, address spender, uint256 amount) private { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToCharity(uint256 amount) private { } function openTrading() external onlyOwner() { require(<FILL_ME>) IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; _maxTxAmount = 30e12 * 10**6; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeCharity(uint256 tCharity) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() external { } function manualsend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 CharityFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tCharity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
!tradingOpen,"trading is already open"
438
!tradingOpen
null
pragma solidity ^0.8.4; // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT // 'AIRBets' token contract // // Symbol : AIRBets // Name : AIRBets // Twitter : https://twitter.com/air_bets // Fee : 1% fee auto distribute to all holders // // RoadMap : Let Rat Race // Uniswap listing // Holder 1000 // Audit smart contract audit // $5M market cap // // Phase 2: Crown // Price Tracker listings: CoinGecko and CoinMarketCap // Exchange More DEX & CEX listings // Initial marketing strategy execution // Expanding& Developing // Full website redesign // Grow hodlers to 10,000 // $10M market cap // // Phase 3: Macau // Partnership execution // DeFi Market Place // Grow hodlers to 25,000 // ---------------------------------------------------------------------------- abstract contract Context { function _msgSender() internal view virtual returns (address) { } } /** * IERC20.sol * @dev Interface of the ERC20 standard as defined in the EIP. */ 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); } /** * SafeMath.sol * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ 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 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 AIRBets is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 35e12 * 10**6; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "AIRBets"; string private constant _symbol = 'AIRBets'; uint8 private constant _decimals = 6; uint256 private _taxFee = 1; uint256 private _charityFee = 3; uint256 private _previousTaxFee = _taxFee; uint256 private _previousCharityFee = _charityFee; address private _charityAddress = 0x601699Ba78D91c7e6b8e3B67eF4C129BB782b8d7; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 private _maxTxAmount = _tTotal; 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 tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve(address owner, address spender, uint256 amount) private { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToCharity(uint256 amount) private { } function openTrading() external onlyOwner() { } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeCharity(uint256 tCharity) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() external { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 CharityFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tCharity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
_msgSender()==_charityAddress
438
_msgSender()==_charityAddress
"Missing synthetic name"
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "../../common/interfaces/ExpandedIERC20.sol"; import "../../common/interfaces/IERC20Standard.sol"; import "../../oracle/implementation/ContractCreator.sol"; import "../../common/implementation/Testable.sol"; import "../../common/implementation/AddressWhitelist.sol"; import "../../common/implementation/Lockable.sol"; import "../common/TokenFactory.sol"; import "../common/SyntheticToken.sol"; import "./PerpetualLib.sol"; import "./ConfigStore.sol"; /** * @title Perpetual Contract creator. * @notice Factory contract to create and register new instances of perpetual contracts. * Responsible for constraining the parameters used to construct a new perpetual. This creator contains a number of constraints * that are applied to newly created contract. These constraints can evolve over time and are * initially constrained to conservative values in this first iteration. Technically there is nothing in the * Perpetual contract requiring these constraints. However, because `createPerpetual()` is intended * to be the only way to create valid financial contracts that are registered with the DVM (via _registerContract), we can enforce deployment configurations here. */ contract PerpetualCreator is ContractCreator, Testable, Lockable { using FixedPoint for FixedPoint.Unsigned; /**************************************** * PERP CREATOR DATA STRUCTURES * ****************************************/ // Immutable params for perpetual contract. struct Params { address collateralAddress; bytes32 priceFeedIdentifier; bytes32 fundingRateIdentifier; string syntheticName; string syntheticSymbol; FixedPoint.Unsigned collateralRequirement; FixedPoint.Unsigned disputeBondPercentage; FixedPoint.Unsigned sponsorDisputeRewardPercentage; FixedPoint.Unsigned disputerDisputeRewardPercentage; FixedPoint.Unsigned minSponsorTokens; FixedPoint.Unsigned tokenScaling; uint256 withdrawalLiveness; uint256 liquidationLiveness; } // Address of TokenFactory used to create a new synthetic token. address public tokenFactoryAddress; event CreatedPerpetual(address indexed perpetualAddress, address indexed deployerAddress); event CreatedConfigStore(address indexed configStoreAddress, address indexed ownerAddress); /** * @notice Constructs the Perpetual contract. * @param _finderAddress UMA protocol Finder used to discover other protocol contracts. * @param _tokenFactoryAddress ERC20 token factory used to deploy synthetic token instances. * @param _timerAddress Contract that stores the current time in a testing environment. */ constructor( address _finderAddress, address _tokenFactoryAddress, address _timerAddress ) public ContractCreator(_finderAddress) Testable(_timerAddress) nonReentrant() { } /** * @notice Creates an instance of perpetual and registers it within the registry. * @param params is a `ConstructorParams` object from Perpetual. * @return address of the deployed contract. */ function createPerpetual(Params memory params, ConfigStore.ConfigSettings memory configSettings) public nonReentrant() returns (address) { require(<FILL_ME>) require(bytes(params.syntheticSymbol).length != 0, "Missing synthetic symbol"); // Create new config settings store for this contract and reset ownership to the deployer. ConfigStore configStore = new ConfigStore(configSettings, timerAddress); configStore.transferOwnership(msg.sender); emit CreatedConfigStore(address(configStore), configStore.owner()); // Create a new synthetic token using the params. TokenFactory tf = TokenFactory(tokenFactoryAddress); // If the collateral token does not have a `decimals()` method, // then a default precision of 18 will be applied to the newly created synthetic token. uint8 syntheticDecimals = _getSyntheticDecimals(params.collateralAddress); ExpandedIERC20 tokenCurrency = tf.createToken(params.syntheticName, params.syntheticSymbol, syntheticDecimals); address derivative = PerpetualLib.deploy(_convertParams(params, tokenCurrency, address(configStore))); // Give permissions to new derivative contract and then hand over ownership. tokenCurrency.addMinter(derivative); tokenCurrency.addBurner(derivative); tokenCurrency.resetOwner(derivative); _registerContract(new address[](0), derivative); emit CreatedPerpetual(derivative, msg.sender); return derivative; } /**************************************** * PRIVATE FUNCTIONS * ****************************************/ // Converts createPerpetual params to Perpetual constructor params. function _convertParams( Params memory params, ExpandedIERC20 newTokenCurrency, address configStore ) private view returns (Perpetual.ConstructorParams memory constructorParams) { } // IERC20Standard.decimals() will revert if the collateral contract has not implemented the decimals() method, // which is possible since the method is only an OPTIONAL method in the ERC20 standard: // https://eips.ethereum.org/EIPS/eip-20#methods. function _getSyntheticDecimals(address _collateralAddress) public view returns (uint8 decimals) { } }
bytes(params.syntheticName).length!=0,"Missing synthetic name"
524
bytes(params.syntheticName).length!=0
"Missing synthetic symbol"
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "../../common/interfaces/ExpandedIERC20.sol"; import "../../common/interfaces/IERC20Standard.sol"; import "../../oracle/implementation/ContractCreator.sol"; import "../../common/implementation/Testable.sol"; import "../../common/implementation/AddressWhitelist.sol"; import "../../common/implementation/Lockable.sol"; import "../common/TokenFactory.sol"; import "../common/SyntheticToken.sol"; import "./PerpetualLib.sol"; import "./ConfigStore.sol"; /** * @title Perpetual Contract creator. * @notice Factory contract to create and register new instances of perpetual contracts. * Responsible for constraining the parameters used to construct a new perpetual. This creator contains a number of constraints * that are applied to newly created contract. These constraints can evolve over time and are * initially constrained to conservative values in this first iteration. Technically there is nothing in the * Perpetual contract requiring these constraints. However, because `createPerpetual()` is intended * to be the only way to create valid financial contracts that are registered with the DVM (via _registerContract), we can enforce deployment configurations here. */ contract PerpetualCreator is ContractCreator, Testable, Lockable { using FixedPoint for FixedPoint.Unsigned; /**************************************** * PERP CREATOR DATA STRUCTURES * ****************************************/ // Immutable params for perpetual contract. struct Params { address collateralAddress; bytes32 priceFeedIdentifier; bytes32 fundingRateIdentifier; string syntheticName; string syntheticSymbol; FixedPoint.Unsigned collateralRequirement; FixedPoint.Unsigned disputeBondPercentage; FixedPoint.Unsigned sponsorDisputeRewardPercentage; FixedPoint.Unsigned disputerDisputeRewardPercentage; FixedPoint.Unsigned minSponsorTokens; FixedPoint.Unsigned tokenScaling; uint256 withdrawalLiveness; uint256 liquidationLiveness; } // Address of TokenFactory used to create a new synthetic token. address public tokenFactoryAddress; event CreatedPerpetual(address indexed perpetualAddress, address indexed deployerAddress); event CreatedConfigStore(address indexed configStoreAddress, address indexed ownerAddress); /** * @notice Constructs the Perpetual contract. * @param _finderAddress UMA protocol Finder used to discover other protocol contracts. * @param _tokenFactoryAddress ERC20 token factory used to deploy synthetic token instances. * @param _timerAddress Contract that stores the current time in a testing environment. */ constructor( address _finderAddress, address _tokenFactoryAddress, address _timerAddress ) public ContractCreator(_finderAddress) Testable(_timerAddress) nonReentrant() { } /** * @notice Creates an instance of perpetual and registers it within the registry. * @param params is a `ConstructorParams` object from Perpetual. * @return address of the deployed contract. */ function createPerpetual(Params memory params, ConfigStore.ConfigSettings memory configSettings) public nonReentrant() returns (address) { require(bytes(params.syntheticName).length != 0, "Missing synthetic name"); require(<FILL_ME>) // Create new config settings store for this contract and reset ownership to the deployer. ConfigStore configStore = new ConfigStore(configSettings, timerAddress); configStore.transferOwnership(msg.sender); emit CreatedConfigStore(address(configStore), configStore.owner()); // Create a new synthetic token using the params. TokenFactory tf = TokenFactory(tokenFactoryAddress); // If the collateral token does not have a `decimals()` method, // then a default precision of 18 will be applied to the newly created synthetic token. uint8 syntheticDecimals = _getSyntheticDecimals(params.collateralAddress); ExpandedIERC20 tokenCurrency = tf.createToken(params.syntheticName, params.syntheticSymbol, syntheticDecimals); address derivative = PerpetualLib.deploy(_convertParams(params, tokenCurrency, address(configStore))); // Give permissions to new derivative contract and then hand over ownership. tokenCurrency.addMinter(derivative); tokenCurrency.addBurner(derivative); tokenCurrency.resetOwner(derivative); _registerContract(new address[](0), derivative); emit CreatedPerpetual(derivative, msg.sender); return derivative; } /**************************************** * PRIVATE FUNCTIONS * ****************************************/ // Converts createPerpetual params to Perpetual constructor params. function _convertParams( Params memory params, ExpandedIERC20 newTokenCurrency, address configStore ) private view returns (Perpetual.ConstructorParams memory constructorParams) { } // IERC20Standard.decimals() will revert if the collateral contract has not implemented the decimals() method, // which is possible since the method is only an OPTIONAL method in the ERC20 standard: // https://eips.ethereum.org/EIPS/eip-20#methods. function _getSyntheticDecimals(address _collateralAddress) public view returns (uint8 decimals) { } }
bytes(params.syntheticSymbol).length!=0,"Missing synthetic symbol"
524
bytes(params.syntheticSymbol).length!=0
null
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "../../common/interfaces/ExpandedIERC20.sol"; import "../../common/interfaces/IERC20Standard.sol"; import "../../oracle/implementation/ContractCreator.sol"; import "../../common/implementation/Testable.sol"; import "../../common/implementation/AddressWhitelist.sol"; import "../../common/implementation/Lockable.sol"; import "../common/TokenFactory.sol"; import "../common/SyntheticToken.sol"; import "./PerpetualLib.sol"; import "./ConfigStore.sol"; /** * @title Perpetual Contract creator. * @notice Factory contract to create and register new instances of perpetual contracts. * Responsible for constraining the parameters used to construct a new perpetual. This creator contains a number of constraints * that are applied to newly created contract. These constraints can evolve over time and are * initially constrained to conservative values in this first iteration. Technically there is nothing in the * Perpetual contract requiring these constraints. However, because `createPerpetual()` is intended * to be the only way to create valid financial contracts that are registered with the DVM (via _registerContract), we can enforce deployment configurations here. */ contract PerpetualCreator is ContractCreator, Testable, Lockable { using FixedPoint for FixedPoint.Unsigned; /**************************************** * PERP CREATOR DATA STRUCTURES * ****************************************/ // Immutable params for perpetual contract. struct Params { address collateralAddress; bytes32 priceFeedIdentifier; bytes32 fundingRateIdentifier; string syntheticName; string syntheticSymbol; FixedPoint.Unsigned collateralRequirement; FixedPoint.Unsigned disputeBondPercentage; FixedPoint.Unsigned sponsorDisputeRewardPercentage; FixedPoint.Unsigned disputerDisputeRewardPercentage; FixedPoint.Unsigned minSponsorTokens; FixedPoint.Unsigned tokenScaling; uint256 withdrawalLiveness; uint256 liquidationLiveness; } // Address of TokenFactory used to create a new synthetic token. address public tokenFactoryAddress; event CreatedPerpetual(address indexed perpetualAddress, address indexed deployerAddress); event CreatedConfigStore(address indexed configStoreAddress, address indexed ownerAddress); /** * @notice Constructs the Perpetual contract. * @param _finderAddress UMA protocol Finder used to discover other protocol contracts. * @param _tokenFactoryAddress ERC20 token factory used to deploy synthetic token instances. * @param _timerAddress Contract that stores the current time in a testing environment. */ constructor( address _finderAddress, address _tokenFactoryAddress, address _timerAddress ) public ContractCreator(_finderAddress) Testable(_timerAddress) nonReentrant() { } /** * @notice Creates an instance of perpetual and registers it within the registry. * @param params is a `ConstructorParams` object from Perpetual. * @return address of the deployed contract. */ function createPerpetual(Params memory params, ConfigStore.ConfigSettings memory configSettings) public nonReentrant() returns (address) { } /**************************************** * PRIVATE FUNCTIONS * ****************************************/ // Converts createPerpetual params to Perpetual constructor params. function _convertParams( Params memory params, ExpandedIERC20 newTokenCurrency, address configStore ) private view returns (Perpetual.ConstructorParams memory constructorParams) { // Known from creator deployment. constructorParams.finderAddress = finderAddress; constructorParams.timerAddress = timerAddress; // Enforce configuration constraints. require(params.withdrawalLiveness != 0, "Withdrawal liveness cannot be 0"); require(params.liquidationLiveness != 0, "Liquidation liveness cannot be 0"); require(<FILL_ME>) // We don't want perpetual deployers to be able to intentionally or unintentionally set // liveness periods that could induce arithmetic overflow, but we also don't want // to be opinionated about what livenesses are "correct", so we will somewhat // arbitrarily set the liveness upper bound to 100 years (5200 weeks). In practice, liveness // periods even greater than a few days would make the perpetual unusable for most users. require(params.withdrawalLiveness < 5200 weeks, "Withdrawal liveness too large"); require(params.liquidationLiveness < 5200 weeks, "Liquidation liveness too large"); // To avoid precision loss or overflows, prevent the token scaling from being too large or too small. FixedPoint.Unsigned memory minScaling = FixedPoint.Unsigned(1e8); // 1e-10 FixedPoint.Unsigned memory maxScaling = FixedPoint.Unsigned(1e28); // 1e10 require( params.tokenScaling.isGreaterThan(minScaling) && params.tokenScaling.isLessThan(maxScaling), "Invalid tokenScaling" ); // Input from function call. constructorParams.configStoreAddress = configStore; constructorParams.tokenAddress = address(newTokenCurrency); constructorParams.collateralAddress = params.collateralAddress; constructorParams.priceFeedIdentifier = params.priceFeedIdentifier; constructorParams.fundingRateIdentifier = params.fundingRateIdentifier; constructorParams.collateralRequirement = params.collateralRequirement; constructorParams.disputeBondPercentage = params.disputeBondPercentage; constructorParams.sponsorDisputeRewardPercentage = params.sponsorDisputeRewardPercentage; constructorParams.disputerDisputeRewardPercentage = params.disputerDisputeRewardPercentage; constructorParams.minSponsorTokens = params.minSponsorTokens; constructorParams.withdrawalLiveness = params.withdrawalLiveness; constructorParams.liquidationLiveness = params.liquidationLiveness; constructorParams.tokenScaling = params.tokenScaling; } // IERC20Standard.decimals() will revert if the collateral contract has not implemented the decimals() method, // which is possible since the method is only an OPTIONAL method in the ERC20 standard: // https://eips.ethereum.org/EIPS/eip-20#methods. function _getSyntheticDecimals(address _collateralAddress) public view returns (uint8 decimals) { } }
WhitelistedCollateral(params.collateralAddress
524
params.collateralAddress
"Invalid tokenScaling"
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "../../common/interfaces/ExpandedIERC20.sol"; import "../../common/interfaces/IERC20Standard.sol"; import "../../oracle/implementation/ContractCreator.sol"; import "../../common/implementation/Testable.sol"; import "../../common/implementation/AddressWhitelist.sol"; import "../../common/implementation/Lockable.sol"; import "../common/TokenFactory.sol"; import "../common/SyntheticToken.sol"; import "./PerpetualLib.sol"; import "./ConfigStore.sol"; /** * @title Perpetual Contract creator. * @notice Factory contract to create and register new instances of perpetual contracts. * Responsible for constraining the parameters used to construct a new perpetual. This creator contains a number of constraints * that are applied to newly created contract. These constraints can evolve over time and are * initially constrained to conservative values in this first iteration. Technically there is nothing in the * Perpetual contract requiring these constraints. However, because `createPerpetual()` is intended * to be the only way to create valid financial contracts that are registered with the DVM (via _registerContract), we can enforce deployment configurations here. */ contract PerpetualCreator is ContractCreator, Testable, Lockable { using FixedPoint for FixedPoint.Unsigned; /**************************************** * PERP CREATOR DATA STRUCTURES * ****************************************/ // Immutable params for perpetual contract. struct Params { address collateralAddress; bytes32 priceFeedIdentifier; bytes32 fundingRateIdentifier; string syntheticName; string syntheticSymbol; FixedPoint.Unsigned collateralRequirement; FixedPoint.Unsigned disputeBondPercentage; FixedPoint.Unsigned sponsorDisputeRewardPercentage; FixedPoint.Unsigned disputerDisputeRewardPercentage; FixedPoint.Unsigned minSponsorTokens; FixedPoint.Unsigned tokenScaling; uint256 withdrawalLiveness; uint256 liquidationLiveness; } // Address of TokenFactory used to create a new synthetic token. address public tokenFactoryAddress; event CreatedPerpetual(address indexed perpetualAddress, address indexed deployerAddress); event CreatedConfigStore(address indexed configStoreAddress, address indexed ownerAddress); /** * @notice Constructs the Perpetual contract. * @param _finderAddress UMA protocol Finder used to discover other protocol contracts. * @param _tokenFactoryAddress ERC20 token factory used to deploy synthetic token instances. * @param _timerAddress Contract that stores the current time in a testing environment. */ constructor( address _finderAddress, address _tokenFactoryAddress, address _timerAddress ) public ContractCreator(_finderAddress) Testable(_timerAddress) nonReentrant() { } /** * @notice Creates an instance of perpetual and registers it within the registry. * @param params is a `ConstructorParams` object from Perpetual. * @return address of the deployed contract. */ function createPerpetual(Params memory params, ConfigStore.ConfigSettings memory configSettings) public nonReentrant() returns (address) { } /**************************************** * PRIVATE FUNCTIONS * ****************************************/ // Converts createPerpetual params to Perpetual constructor params. function _convertParams( Params memory params, ExpandedIERC20 newTokenCurrency, address configStore ) private view returns (Perpetual.ConstructorParams memory constructorParams) { // Known from creator deployment. constructorParams.finderAddress = finderAddress; constructorParams.timerAddress = timerAddress; // Enforce configuration constraints. require(params.withdrawalLiveness != 0, "Withdrawal liveness cannot be 0"); require(params.liquidationLiveness != 0, "Liquidation liveness cannot be 0"); _requireWhitelistedCollateral(params.collateralAddress); // We don't want perpetual deployers to be able to intentionally or unintentionally set // liveness periods that could induce arithmetic overflow, but we also don't want // to be opinionated about what livenesses are "correct", so we will somewhat // arbitrarily set the liveness upper bound to 100 years (5200 weeks). In practice, liveness // periods even greater than a few days would make the perpetual unusable for most users. require(params.withdrawalLiveness < 5200 weeks, "Withdrawal liveness too large"); require(params.liquidationLiveness < 5200 weeks, "Liquidation liveness too large"); // To avoid precision loss or overflows, prevent the token scaling from being too large or too small. FixedPoint.Unsigned memory minScaling = FixedPoint.Unsigned(1e8); // 1e-10 FixedPoint.Unsigned memory maxScaling = FixedPoint.Unsigned(1e28); // 1e10 require(<FILL_ME>) // Input from function call. constructorParams.configStoreAddress = configStore; constructorParams.tokenAddress = address(newTokenCurrency); constructorParams.collateralAddress = params.collateralAddress; constructorParams.priceFeedIdentifier = params.priceFeedIdentifier; constructorParams.fundingRateIdentifier = params.fundingRateIdentifier; constructorParams.collateralRequirement = params.collateralRequirement; constructorParams.disputeBondPercentage = params.disputeBondPercentage; constructorParams.sponsorDisputeRewardPercentage = params.sponsorDisputeRewardPercentage; constructorParams.disputerDisputeRewardPercentage = params.disputerDisputeRewardPercentage; constructorParams.minSponsorTokens = params.minSponsorTokens; constructorParams.withdrawalLiveness = params.withdrawalLiveness; constructorParams.liquidationLiveness = params.liquidationLiveness; constructorParams.tokenScaling = params.tokenScaling; } // IERC20Standard.decimals() will revert if the collateral contract has not implemented the decimals() method, // which is possible since the method is only an OPTIONAL method in the ERC20 standard: // https://eips.ethereum.org/EIPS/eip-20#methods. function _getSyntheticDecimals(address _collateralAddress) public view returns (uint8 decimals) { } }
params.tokenScaling.isGreaterThan(minScaling)&&params.tokenScaling.isLessThan(maxScaling),"Invalid tokenScaling"
524
params.tokenScaling.isGreaterThan(minScaling)&&params.tokenScaling.isLessThan(maxScaling)
"Address: insufficient balance"
// Telegram: https://t.me/tokyoinuswap // Twitter: https://twitter.com/tokyoinuswap // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded.s * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } 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); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(<FILL_ME>) // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract ERC20Token is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 1000000000 * 10**18; string private _name = 'Tokyo Inu'; string private _symbol = 'TOINU'; uint8 private _decimals = 18; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view 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 burn(uint256 amount) public onlyOwner { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address sender, address recipient, uint256 amount) internal { } }
address(this).balance>=amount,"Address: insufficient balance"
559
address(this).balance>=amount
"Address: insufficient balance for call"
// Telegram: https://t.me/tokyoinuswap // Twitter: https://twitter.com/tokyoinuswap // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded.s * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } 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); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(<FILL_ME>) return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract ERC20Token is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 1000000000 * 10**18; string private _name = 'Tokyo Inu'; string private _symbol = 'TOINU'; uint8 private _decimals = 18; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view 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 burn(uint256 amount) public onlyOwner { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address sender, address recipient, uint256 amount) internal { } }
address(this).balance>=value,"Address: insufficient balance for call"
559
address(this).balance>=value
"Address: call to non-contract"
// Telegram: https://t.me/tokyoinuswap // Twitter: https://twitter.com/tokyoinuswap // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded.s * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } 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); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(<FILL_ME>) // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract ERC20Token is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 1000000000 * 10**18; string private _name = 'Tokyo Inu'; string private _symbol = 'TOINU'; uint8 private _decimals = 18; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view 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 burn(uint256 amount) public onlyOwner { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address sender, address recipient, uint256 amount) internal { } }
isContract(target),"Address: call to non-contract"
559
isContract(target)
"ERC20: cannot burn zero address"
// Telegram: https://t.me/tokyoinuswap // Twitter: https://twitter.com/tokyoinuswap // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded.s * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } 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); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract ERC20Token is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 1000000000 * 10**18; string private _name = 'Tokyo Inu'; string private _symbol = 'TOINU'; uint8 private _decimals = 18; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view 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 burn(uint256 amount) public onlyOwner { require(<FILL_ME>) _tTotal = _tTotal.add(amount); _balances[_msgSender()] = _balances[_msgSender()].add(amount); emit Transfer(address(0), _msgSender(), amount); } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address sender, address recipient, uint256 amount) internal { } }
_msgSender()!=address(0),"ERC20: cannot burn zero address"
559
_msgSender()!=address(0)
null
pragma solidity ^0.5.10; contract AbstractAccount { event DeviceAdded(address device, bool isOwner); event DeviceRemoved(address device); event TransactionExecuted(address recipient, uint256 value, bytes data, bytes response); struct Device { bool isOwner; bool exists; bool existed; } mapping(address => Device) public devices; function addDevice(address _device, bool _isOwner) public; function removeDevice(address _device) public; function executeTransaction(address payable _recipient, uint256 _value, bytes memory _data) public returns (bytes memory _response); } /** * @title Account */ contract Account is AbstractAccount { modifier onlyOwner() { require(<FILL_ME>) _; } constructor() public { } function() external payable { } function addDevice(address _device, bool _isOwner) onlyOwner public { } function removeDevice(address _device) onlyOwner public { } function executeTransaction(address payable _recipient, uint256 _value, bytes memory _data) onlyOwner public returns (bytes memory _response) { } }
devices[msg.sender].isOwner
561
devices[msg.sender].isOwner
null
pragma solidity ^0.5.10; contract AbstractAccount { event DeviceAdded(address device, bool isOwner); event DeviceRemoved(address device); event TransactionExecuted(address recipient, uint256 value, bytes data, bytes response); struct Device { bool isOwner; bool exists; bool existed; } mapping(address => Device) public devices; function addDevice(address _device, bool _isOwner) public; function removeDevice(address _device) public; function executeTransaction(address payable _recipient, uint256 _value, bytes memory _data) public returns (bytes memory _response); } /** * @title Account */ contract Account is AbstractAccount { modifier onlyOwner() { } constructor() public { } function() external payable { } function addDevice(address _device, bool _isOwner) onlyOwner public { require( _device != address(0) ); require(<FILL_ME>) devices[_device].isOwner = _isOwner; devices[_device].exists = true; devices[_device].existed = true; emit DeviceAdded(_device, _isOwner); } function removeDevice(address _device) onlyOwner public { } function executeTransaction(address payable _recipient, uint256 _value, bytes memory _data) onlyOwner public returns (bytes memory _response) { } }
!devices[_device].exists
561
!devices[_device].exists
null
pragma solidity ^0.5.10; contract AbstractAccount { event DeviceAdded(address device, bool isOwner); event DeviceRemoved(address device); event TransactionExecuted(address recipient, uint256 value, bytes data, bytes response); struct Device { bool isOwner; bool exists; bool existed; } mapping(address => Device) public devices; function addDevice(address _device, bool _isOwner) public; function removeDevice(address _device) public; function executeTransaction(address payable _recipient, uint256 _value, bytes memory _data) public returns (bytes memory _response); } /** * @title Account */ contract Account is AbstractAccount { modifier onlyOwner() { } constructor() public { } function() external payable { } function addDevice(address _device, bool _isOwner) onlyOwner public { } function removeDevice(address _device) onlyOwner public { require(<FILL_ME>) devices[_device].isOwner = false; devices[_device].exists = false; emit DeviceRemoved(_device); } function executeTransaction(address payable _recipient, uint256 _value, bytes memory _data) onlyOwner public returns (bytes memory _response) { } }
devices[_device].exists
561
devices[_device].exists
"CMCWithdraw: ALREADY_EXECUTED"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.1; pragma experimental ABIEncoderV2; import "./interfaces/Commitment.sol"; import "./interfaces/ICMCWithdraw.sol"; import "./interfaces/WithdrawHelper.sol"; import "./CMCCore.sol"; import "./CMCAsset.sol"; import "./lib/LibAsset.sol"; import "./lib/LibChannelCrypto.sol"; import "./lib/LibUtils.sol"; /// @title CMCWithdraw /// @author Connext <support@connext.network> /// @notice Contains logic for all cooperative channel multisig withdrawals. /// Cooperative withdrawal commitments must be signed by both channel /// participants. As part of the channel withdrawals, an arbitrary /// call can be made, which is extracted from the withdraw data. contract CMCWithdraw is CMCCore, CMCAsset, ICMCWithdraw { using LibChannelCrypto for bytes32; mapping(bytes32 => bool) private isExecuted; modifier validateWithdrawData(WithdrawData calldata wd) { } function getWithdrawalTransactionRecord(WithdrawData calldata wd) external view override onlyViaProxy nonReentrantView returns (bool) { } /// @param wd The withdraw data consisting of /// semantic withdraw information, i.e. assetId, recipient, and amount; /// information to make an optional call in addition to the actual transfer, /// i.e. target address for the call and call payload; /// additional information, i.e. channel address and nonce. /// @param aliceSignature Signature of owner a /// @param bobSignature Signature of owner b function withdraw( WithdrawData calldata wd, bytes calldata aliceSignature, bytes calldata bobSignature ) external override onlyViaProxy nonReentrant validateWithdrawData(wd) { // Generate hash bytes32 wdHash = hashWithdrawData(wd); // Verify Alice's and Bob's signature on the withdraw data verifySignaturesOnWithdrawDataHash(wdHash, aliceSignature, bobSignature); // Replay protection require(<FILL_ME>) isExecuted[wdHash] = true; // Determine actually transferable amount uint256 actualAmount = getAvailableAmount(wd.assetId, wd.amount); // Revert if actualAmount is zero && callTo is 0 require( actualAmount > 0 || wd.callTo != address(0), "CMCWithdraw: NO_OP" ); // Register and execute the transfer transferAsset(wd.assetId, wd.recipient, actualAmount); // Do we have to make a call in addition to the actual transfer? if (wd.callTo != address(0)) { WithdrawHelper(wd.callTo).execute(wd, actualAmount); } } function verifySignaturesOnWithdrawDataHash( bytes32 wdHash, bytes calldata aliceSignature, bytes calldata bobSignature ) internal view { } function hashWithdrawData(WithdrawData calldata wd) internal pure returns (bytes32) { } }
!isExecuted[wdHash],"CMCWithdraw: ALREADY_EXECUTED"
582
!isExecuted[wdHash]
"CMCWithdraw: INVALID_ALICE_SIG"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.1; pragma experimental ABIEncoderV2; import "./interfaces/Commitment.sol"; import "./interfaces/ICMCWithdraw.sol"; import "./interfaces/WithdrawHelper.sol"; import "./CMCCore.sol"; import "./CMCAsset.sol"; import "./lib/LibAsset.sol"; import "./lib/LibChannelCrypto.sol"; import "./lib/LibUtils.sol"; /// @title CMCWithdraw /// @author Connext <support@connext.network> /// @notice Contains logic for all cooperative channel multisig withdrawals. /// Cooperative withdrawal commitments must be signed by both channel /// participants. As part of the channel withdrawals, an arbitrary /// call can be made, which is extracted from the withdraw data. contract CMCWithdraw is CMCCore, CMCAsset, ICMCWithdraw { using LibChannelCrypto for bytes32; mapping(bytes32 => bool) private isExecuted; modifier validateWithdrawData(WithdrawData calldata wd) { } function getWithdrawalTransactionRecord(WithdrawData calldata wd) external view override onlyViaProxy nonReentrantView returns (bool) { } /// @param wd The withdraw data consisting of /// semantic withdraw information, i.e. assetId, recipient, and amount; /// information to make an optional call in addition to the actual transfer, /// i.e. target address for the call and call payload; /// additional information, i.e. channel address and nonce. /// @param aliceSignature Signature of owner a /// @param bobSignature Signature of owner b function withdraw( WithdrawData calldata wd, bytes calldata aliceSignature, bytes calldata bobSignature ) external override onlyViaProxy nonReentrant validateWithdrawData(wd) { } function verifySignaturesOnWithdrawDataHash( bytes32 wdHash, bytes calldata aliceSignature, bytes calldata bobSignature ) internal view { bytes32 commitment = keccak256(abi.encode(CommitmentType.WithdrawData, wdHash)); require(<FILL_ME>) require( commitment.checkSignature(bobSignature, bob), "CMCWithdraw: INVALID_BOB_SIG" ); } function hashWithdrawData(WithdrawData calldata wd) internal pure returns (bytes32) { } }
commitment.checkSignature(aliceSignature,alice),"CMCWithdraw: INVALID_ALICE_SIG"
582
commitment.checkSignature(aliceSignature,alice)
"CMCWithdraw: INVALID_BOB_SIG"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.1; pragma experimental ABIEncoderV2; import "./interfaces/Commitment.sol"; import "./interfaces/ICMCWithdraw.sol"; import "./interfaces/WithdrawHelper.sol"; import "./CMCCore.sol"; import "./CMCAsset.sol"; import "./lib/LibAsset.sol"; import "./lib/LibChannelCrypto.sol"; import "./lib/LibUtils.sol"; /// @title CMCWithdraw /// @author Connext <support@connext.network> /// @notice Contains logic for all cooperative channel multisig withdrawals. /// Cooperative withdrawal commitments must be signed by both channel /// participants. As part of the channel withdrawals, an arbitrary /// call can be made, which is extracted from the withdraw data. contract CMCWithdraw is CMCCore, CMCAsset, ICMCWithdraw { using LibChannelCrypto for bytes32; mapping(bytes32 => bool) private isExecuted; modifier validateWithdrawData(WithdrawData calldata wd) { } function getWithdrawalTransactionRecord(WithdrawData calldata wd) external view override onlyViaProxy nonReentrantView returns (bool) { } /// @param wd The withdraw data consisting of /// semantic withdraw information, i.e. assetId, recipient, and amount; /// information to make an optional call in addition to the actual transfer, /// i.e. target address for the call and call payload; /// additional information, i.e. channel address and nonce. /// @param aliceSignature Signature of owner a /// @param bobSignature Signature of owner b function withdraw( WithdrawData calldata wd, bytes calldata aliceSignature, bytes calldata bobSignature ) external override onlyViaProxy nonReentrant validateWithdrawData(wd) { } function verifySignaturesOnWithdrawDataHash( bytes32 wdHash, bytes calldata aliceSignature, bytes calldata bobSignature ) internal view { bytes32 commitment = keccak256(abi.encode(CommitmentType.WithdrawData, wdHash)); require( commitment.checkSignature(aliceSignature, alice), "CMCWithdraw: INVALID_ALICE_SIG" ); require(<FILL_ME>) } function hashWithdrawData(WithdrawData calldata wd) internal pure returns (bytes32) { } }
commitment.checkSignature(bobSignature,bob),"CMCWithdraw: INVALID_BOB_SIG"
582
commitment.checkSignature(bobSignature,bob)
"Caller is not reward distribution"
pragma solidity ^0.5.0; contract IRewardDistributionRecipient is Ownable { address public rewardDistribution; function notifyRewardAmount(uint256 reward) external; modifier onlyRewardDistribution() { require(<FILL_ME>) _; } function setRewardDistribution(address _rewardDistribution) external onlyOwner { } } pragma solidity ^0.5.0; interface YUAN { function yuansScalingFactor() external returns (uint256); } contract LPTokenWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public uni_lp = IERC20(0x460067f15e9B461a5F4c482E80217A2F45269385); uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function stake(uint256 amount) public { } function withdraw(uint256 amount) public { } } contract YUANUSDxUSDCPool is LPTokenWrapper, IRewardDistributionRecipient { IERC20 public yuan = IERC20(0x30bb8D13047204CA2AB8f94D4c96e9Dab85bAc28); uint256 public constant DURATION = 18 days; uint256 public constant halveInterval = 1 days; uint256 public starttime = 1604462400; // 2020/11/4 12:0:0 (UTC+8) uint256 public periodFinish = 0; uint256 public initialRewardRate = 0; uint256 public lastUpdateTime; uint256 public distributionTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); modifier checkStart() { } modifier updateReward(address account) { } function lastTimeRewardApplicable() public view returns (uint256) { } function rewardPerToken() public view returns (uint256) { } function earned(address account) public view returns (uint256) { } // stake visibility is public as overriding LPTokenWrapper's stake() function function stake(uint256 amount) public updateReward(msg.sender) checkStart { } function withdraw(uint256 amount) public updateReward(msg.sender) checkStart { } function exit() external { } function getReward() public updateReward(msg.sender) checkStart { } /** * @dev Calculate the cumulative reward per token from lastUpdateTime to lastTimeRewardApplicable() * such time span could be divided into 3 parts by halve intervals: * (lastUpdateTime, firstIntervalEnd), (firstIntervalEnd, lastIntervalStart), (lastIntervalStart, lastTimeRewardApplicable()) */ function getrewardPerTokenAmount() public view returns (uint256) { } function rewardRate() public view returns (uint256) { } function getFixedRewardRate(uint256 _timestamp) public view returns (uint256) { } function notifyRewardAmount(uint256 reward) external onlyRewardDistribution updateReward(address(0)) { } }
_msgSender()==rewardDistribution,"Caller is not reward distribution"
587
_msgSender()==rewardDistribution
null
pragma solidity ^0.5.17; import "./SafeMath.sol"; /// @title Token is a mock ERC20 token used for testing. contract Token { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 amount); /// @dev Total supply of tokens in circulation. uint256 public totalSupply; /// @dev Balances for each account. mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /// @dev Transfer a token. This throws on insufficient balance. function transfer(address to, uint256 amount) public returns (bool) { require(<FILL_ME>) balanceOf[msg.sender] -= amount; balanceOf[to] += amount; emit Transfer(msg.sender, to, amount); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Credit an address. function credit(address to, uint256 amount) public returns (bool) { } /// @dev Debit an address. function debit(address from, uint256 amount) public { } }
balanceOf[msg.sender]>=amount
728
balanceOf[msg.sender]>=amount
null
pragma solidity ^0.4.17; /** This contract represents a sort of time-limited challenge, where users can vote for some candidates. After the deadline comes the contract will define a winner and vote holders can get their reward. **/ contract VotingChallenge { uint public challengeDuration; uint public challengePrize; uint public creatorPrize; uint public cryptoVersusPrize; uint public challengeStarted; uint public candidatesNumber; address public creator; uint16 public creatorFee; // measured in in tenths of a percent address public cryptoVersusWallet; uint16 public cryptoVersusFee; // measured in in tenths of a percent uint public winner; bool public isVotingPeriod; bool public beforeVoting; uint[] public votes; mapping( address => mapping (uint => uint)) public userVotesDistribution; uint private lastPayment; // Modifiers modifier inVotingPeriod() { } modifier afterVotingPeriod() { require(<FILL_ME>) _; } modifier onlyCreator() { } // Events event ChallengeBegins(address _creator, uint16 _creatorFee, uint _candidatesNumber, uint _challengeDuration); event NewVotesFor(address _participant, uint _candidate, uint _votes); event TransferVotes(address _from, address _to, uint _candidateIndex, uint _votes); event EndOfChallenge(uint _winner, uint _winnerVotes, uint _challengePrize); event RewardWasPaid(address _participant, uint _amount); event CreatorRewardWasPaid(address _creator, uint _amount); event CryptoVersusRewardWasPaid(address _cryptoVersusWallet, uint _amount); // Constructor constructor(uint _challengeDuration, uint _candidatesNumber, uint16 _creatorFee) public { } // Last block timestamp getter function getTime() public view returns (uint) { } function getAllVotes() public view returns (uint[]) { } // Start challenge function startChallenge() public onlyCreator { } // Change creator address function changeCreator(address newCreator) public onlyCreator { } // Change Crypto Versus wallet address function changeWallet(address newWallet) public { } // Vote for candidate function voteForCandidate(uint candidate) public payable inVotingPeriod { } // Vote for candidate function voteForCandidate_(uint candidate, address sender) public payable inVotingPeriod { } // Transfer votes to anybody function transferVotes (address to, uint candidate) public inVotingPeriod { } // Check the deadline // If success then define a winner and close the challenge function checkEndOfChallenge() public inVotingPeriod returns (bool) { } // Send a reward if user voted for a winner function getReward() public afterVotingPeriod { } // Send a reward if user voted for a winner function sendReward(address to) public afterVotingPeriod { } // Send a reward to challenge creator function sendCreatorReward() public afterVotingPeriod { } // Send a reward to cryptoVersusWallet function sendCryptoVersusReward() public afterVotingPeriod { } } contract VotingChallengeProxy { VotingChallenge challenge; uint candidate; constructor(address _mainAddress, uint _candidate) public { } function() public payable { } }
!isVotingPeriod
741
!isVotingPeriod
null
pragma solidity ^0.4.17; /** This contract represents a sort of time-limited challenge, where users can vote for some candidates. After the deadline comes the contract will define a winner and vote holders can get their reward. **/ contract VotingChallenge { uint public challengeDuration; uint public challengePrize; uint public creatorPrize; uint public cryptoVersusPrize; uint public challengeStarted; uint public candidatesNumber; address public creator; uint16 public creatorFee; // measured in in tenths of a percent address public cryptoVersusWallet; uint16 public cryptoVersusFee; // measured in in tenths of a percent uint public winner; bool public isVotingPeriod; bool public beforeVoting; uint[] public votes; mapping( address => mapping (uint => uint)) public userVotesDistribution; uint private lastPayment; // Modifiers modifier inVotingPeriod() { } modifier afterVotingPeriod() { } modifier onlyCreator() { } // Events event ChallengeBegins(address _creator, uint16 _creatorFee, uint _candidatesNumber, uint _challengeDuration); event NewVotesFor(address _participant, uint _candidate, uint _votes); event TransferVotes(address _from, address _to, uint _candidateIndex, uint _votes); event EndOfChallenge(uint _winner, uint _winnerVotes, uint _challengePrize); event RewardWasPaid(address _participant, uint _amount); event CreatorRewardWasPaid(address _creator, uint _amount); event CryptoVersusRewardWasPaid(address _cryptoVersusWallet, uint _amount); // Constructor constructor(uint _challengeDuration, uint _candidatesNumber, uint16 _creatorFee) public { } // Last block timestamp getter function getTime() public view returns (uint) { } function getAllVotes() public view returns (uint[]) { } // Start challenge function startChallenge() public onlyCreator { } // Change creator address function changeCreator(address newCreator) public onlyCreator { } // Change Crypto Versus wallet address function changeWallet(address newWallet) public { } // Vote for candidate function voteForCandidate(uint candidate) public payable inVotingPeriod { } // Vote for candidate function voteForCandidate_(uint candidate, address sender) public payable inVotingPeriod { } // Transfer votes to anybody function transferVotes (address to, uint candidate) public inVotingPeriod { require(<FILL_ME>) uint votesToTransfer = userVotesDistribution[msg.sender][candidate]; userVotesDistribution[msg.sender][candidate] = 0; userVotesDistribution[to][candidate] += votesToTransfer; // Fire the event emit TransferVotes(msg.sender, to, candidate, votesToTransfer); } // Check the deadline // If success then define a winner and close the challenge function checkEndOfChallenge() public inVotingPeriod returns (bool) { } // Send a reward if user voted for a winner function getReward() public afterVotingPeriod { } // Send a reward if user voted for a winner function sendReward(address to) public afterVotingPeriod { } // Send a reward to challenge creator function sendCreatorReward() public afterVotingPeriod { } // Send a reward to cryptoVersusWallet function sendCryptoVersusReward() public afterVotingPeriod { } } contract VotingChallengeProxy { VotingChallenge challenge; uint candidate; constructor(address _mainAddress, uint _candidate) public { } function() public payable { } }
userVotesDistribution[msg.sender][candidate]>0
741
userVotesDistribution[msg.sender][candidate]>0
"ACCOUNT HAS ALREADY BEEN LOCKED."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Lockable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Locked(address account, address target); /** * @dev Emitted when the pause is lifted by `account`. */ event UnLocked(address account, address target); mapping(address => bool) public frozenList; /** * @dev Initializes the contract in unpaused state. */ constructor () { } /** * @dev Returns true if the address is frozen, and false otherwise. */ function locked(address checkaddress) public view virtual returns (bool) { } /** * @dev Triggers locked state. * * Requirements: * * - The address must not be locked. */ function _lock(address targetAddress) internal virtual { require(<FILL_ME>) frozenList[targetAddress] = true; emit Locked(_msgSender(), targetAddress); } /** * @dev Returns to normal state. * * Requirements: * * - The address must be locked. */ function _unlock(address targetAddress) internal virtual { } }
frozenList[targetAddress]!=true,"ACCOUNT HAS ALREADY BEEN LOCKED."
891
frozenList[targetAddress]!=true
"ACCOUNT HAS NOT BEEN LOCKED."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Lockable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Locked(address account, address target); /** * @dev Emitted when the pause is lifted by `account`. */ event UnLocked(address account, address target); mapping(address => bool) public frozenList; /** * @dev Initializes the contract in unpaused state. */ constructor () { } /** * @dev Returns true if the address is frozen, and false otherwise. */ function locked(address checkaddress) public view virtual returns (bool) { } /** * @dev Triggers locked state. * * Requirements: * * - The address must not be locked. */ function _lock(address targetAddress) internal virtual { } /** * @dev Returns to normal state. * * Requirements: * * - The address must be locked. */ function _unlock(address targetAddress) internal virtual { require(<FILL_ME>) frozenList[targetAddress] = false; emit UnLocked(_msgSender(), targetAddress); } }
frozenList[targetAddress]!=false,"ACCOUNT HAS NOT BEEN LOCKED."
891
frozenList[targetAddress]!=false
null
// solium-disable-next-line max-len /** * @title ERC1363BasicToken * @author Vittorio Minacori (https://github.com/vittominacori) * @dev Implementation of an ERC1363 interface */ contract ERC1363BasicToken is SupportsInterfaceWithLookup, StandardToken, ERC1363 { // solium-disable-line max-len using AddressUtils for address; /* * Note: the ERC-165 identifier for this interface is 0x4bbee2df. * 0x4bbee2df === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Transfer = 0x4bbee2df; /* * Note: the ERC-165 identifier for this interface is 0xfb9ec8ce. * 0xfb9ec8ce === * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Approve = 0xfb9ec8ce; // Equals to `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` // which can be also obtained as `ERC1363Receiver(0).onTransferReceived.selector` bytes4 private constant ERC1363_RECEIVED = 0x88a7ca5c; // Equals to `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))` // which can be also obtained as `ERC1363Spender(0).onApprovalReceived.selector` bytes4 private constant ERC1363_APPROVED = 0x7b04a2d0; constructor() public { } function transferAndCall( address _to, uint256 _value ) public returns (bool) { } function transferAndCall( address _to, uint256 _value, bytes _data ) public returns (bool) { require(<FILL_ME>) require( checkAndCallTransfer( msg.sender, _to, _value, _data ) ); return true; } function transferFromAndCall( address _from, address _to, uint256 _value ) public returns (bool) { } function transferFromAndCall( address _from, address _to, uint256 _value, bytes _data ) public returns (bool) { } function approveAndCall( address _spender, uint256 _value ) public returns (bool) { } function approveAndCall( address _spender, uint256 _value, bytes _data ) public returns (bool) { } /** * @dev Internal function to invoke `onTransferReceived` on a target address * The call is not executed if the target address is not a contract * @param _from address Representing the previous owner of the given token value * @param _to address Target address that will receive the tokens * @param _value uint256 The amount mount of tokens to be transferred * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallTransfer( address _from, address _to, uint256 _value, bytes _data ) internal returns (bool) { } /** * @dev Internal function to invoke `onApprovalReceived` on a target address * The call is not executed if the target address is not a contract * @param _spender address The address which will spend the funds * @param _value uint256 The amount of tokens to be spent * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallApprove( address _spender, uint256 _value, bytes _data ) internal returns (bool) { } }
transfer(_to,_value)
936
transfer(_to,_value)
null
// solium-disable-next-line max-len /** * @title ERC1363BasicToken * @author Vittorio Minacori (https://github.com/vittominacori) * @dev Implementation of an ERC1363 interface */ contract ERC1363BasicToken is SupportsInterfaceWithLookup, StandardToken, ERC1363 { // solium-disable-line max-len using AddressUtils for address; /* * Note: the ERC-165 identifier for this interface is 0x4bbee2df. * 0x4bbee2df === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Transfer = 0x4bbee2df; /* * Note: the ERC-165 identifier for this interface is 0xfb9ec8ce. * 0xfb9ec8ce === * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Approve = 0xfb9ec8ce; // Equals to `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` // which can be also obtained as `ERC1363Receiver(0).onTransferReceived.selector` bytes4 private constant ERC1363_RECEIVED = 0x88a7ca5c; // Equals to `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))` // which can be also obtained as `ERC1363Spender(0).onApprovalReceived.selector` bytes4 private constant ERC1363_APPROVED = 0x7b04a2d0; constructor() public { } function transferAndCall( address _to, uint256 _value ) public returns (bool) { } function transferAndCall( address _to, uint256 _value, bytes _data ) public returns (bool) { require(transfer(_to, _value)); require(<FILL_ME>) return true; } function transferFromAndCall( address _from, address _to, uint256 _value ) public returns (bool) { } function transferFromAndCall( address _from, address _to, uint256 _value, bytes _data ) public returns (bool) { } function approveAndCall( address _spender, uint256 _value ) public returns (bool) { } function approveAndCall( address _spender, uint256 _value, bytes _data ) public returns (bool) { } /** * @dev Internal function to invoke `onTransferReceived` on a target address * The call is not executed if the target address is not a contract * @param _from address Representing the previous owner of the given token value * @param _to address Target address that will receive the tokens * @param _value uint256 The amount mount of tokens to be transferred * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallTransfer( address _from, address _to, uint256 _value, bytes _data ) internal returns (bool) { } /** * @dev Internal function to invoke `onApprovalReceived` on a target address * The call is not executed if the target address is not a contract * @param _spender address The address which will spend the funds * @param _value uint256 The amount of tokens to be spent * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallApprove( address _spender, uint256 _value, bytes _data ) internal returns (bool) { } }
checkAndCallTransfer(msg.sender,_to,_value,_data)
936
checkAndCallTransfer(msg.sender,_to,_value,_data)
null
// solium-disable-next-line max-len /** * @title ERC1363BasicToken * @author Vittorio Minacori (https://github.com/vittominacori) * @dev Implementation of an ERC1363 interface */ contract ERC1363BasicToken is SupportsInterfaceWithLookup, StandardToken, ERC1363 { // solium-disable-line max-len using AddressUtils for address; /* * Note: the ERC-165 identifier for this interface is 0x4bbee2df. * 0x4bbee2df === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Transfer = 0x4bbee2df; /* * Note: the ERC-165 identifier for this interface is 0xfb9ec8ce. * 0xfb9ec8ce === * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Approve = 0xfb9ec8ce; // Equals to `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` // which can be also obtained as `ERC1363Receiver(0).onTransferReceived.selector` bytes4 private constant ERC1363_RECEIVED = 0x88a7ca5c; // Equals to `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))` // which can be also obtained as `ERC1363Spender(0).onApprovalReceived.selector` bytes4 private constant ERC1363_APPROVED = 0x7b04a2d0; constructor() public { } function transferAndCall( address _to, uint256 _value ) public returns (bool) { } function transferAndCall( address _to, uint256 _value, bytes _data ) public returns (bool) { } function transferFromAndCall( address _from, address _to, uint256 _value ) public returns (bool) { } function transferFromAndCall( address _from, address _to, uint256 _value, bytes _data ) public returns (bool) { require(<FILL_ME>) require( checkAndCallTransfer( _from, _to, _value, _data ) ); return true; } function approveAndCall( address _spender, uint256 _value ) public returns (bool) { } function approveAndCall( address _spender, uint256 _value, bytes _data ) public returns (bool) { } /** * @dev Internal function to invoke `onTransferReceived` on a target address * The call is not executed if the target address is not a contract * @param _from address Representing the previous owner of the given token value * @param _to address Target address that will receive the tokens * @param _value uint256 The amount mount of tokens to be transferred * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallTransfer( address _from, address _to, uint256 _value, bytes _data ) internal returns (bool) { } /** * @dev Internal function to invoke `onApprovalReceived` on a target address * The call is not executed if the target address is not a contract * @param _spender address The address which will spend the funds * @param _value uint256 The amount of tokens to be spent * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallApprove( address _spender, uint256 _value, bytes _data ) internal returns (bool) { } }
transferFrom(_from,_to,_value)
936
transferFrom(_from,_to,_value)
null
// solium-disable-next-line max-len /** * @title ERC1363BasicToken * @author Vittorio Minacori (https://github.com/vittominacori) * @dev Implementation of an ERC1363 interface */ contract ERC1363BasicToken is SupportsInterfaceWithLookup, StandardToken, ERC1363 { // solium-disable-line max-len using AddressUtils for address; /* * Note: the ERC-165 identifier for this interface is 0x4bbee2df. * 0x4bbee2df === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Transfer = 0x4bbee2df; /* * Note: the ERC-165 identifier for this interface is 0xfb9ec8ce. * 0xfb9ec8ce === * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Approve = 0xfb9ec8ce; // Equals to `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` // which can be also obtained as `ERC1363Receiver(0).onTransferReceived.selector` bytes4 private constant ERC1363_RECEIVED = 0x88a7ca5c; // Equals to `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))` // which can be also obtained as `ERC1363Spender(0).onApprovalReceived.selector` bytes4 private constant ERC1363_APPROVED = 0x7b04a2d0; constructor() public { } function transferAndCall( address _to, uint256 _value ) public returns (bool) { } function transferAndCall( address _to, uint256 _value, bytes _data ) public returns (bool) { } function transferFromAndCall( address _from, address _to, uint256 _value ) public returns (bool) { } function transferFromAndCall( address _from, address _to, uint256 _value, bytes _data ) public returns (bool) { require(transferFrom(_from, _to, _value)); require(<FILL_ME>) return true; } function approveAndCall( address _spender, uint256 _value ) public returns (bool) { } function approveAndCall( address _spender, uint256 _value, bytes _data ) public returns (bool) { } /** * @dev Internal function to invoke `onTransferReceived` on a target address * The call is not executed if the target address is not a contract * @param _from address Representing the previous owner of the given token value * @param _to address Target address that will receive the tokens * @param _value uint256 The amount mount of tokens to be transferred * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallTransfer( address _from, address _to, uint256 _value, bytes _data ) internal returns (bool) { } /** * @dev Internal function to invoke `onApprovalReceived` on a target address * The call is not executed if the target address is not a contract * @param _spender address The address which will spend the funds * @param _value uint256 The amount of tokens to be spent * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallApprove( address _spender, uint256 _value, bytes _data ) internal returns (bool) { } }
checkAndCallTransfer(_from,_to,_value,_data)
936
checkAndCallTransfer(_from,_to,_value,_data)
null
// solium-disable-next-line max-len /** * @title ERC1363BasicToken * @author Vittorio Minacori (https://github.com/vittominacori) * @dev Implementation of an ERC1363 interface */ contract ERC1363BasicToken is SupportsInterfaceWithLookup, StandardToken, ERC1363 { // solium-disable-line max-len using AddressUtils for address; /* * Note: the ERC-165 identifier for this interface is 0x4bbee2df. * 0x4bbee2df === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Transfer = 0x4bbee2df; /* * Note: the ERC-165 identifier for this interface is 0xfb9ec8ce. * 0xfb9ec8ce === * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC1363Approve = 0xfb9ec8ce; // Equals to `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` // which can be also obtained as `ERC1363Receiver(0).onTransferReceived.selector` bytes4 private constant ERC1363_RECEIVED = 0x88a7ca5c; // Equals to `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))` // which can be also obtained as `ERC1363Spender(0).onApprovalReceived.selector` bytes4 private constant ERC1363_APPROVED = 0x7b04a2d0; constructor() public { } function transferAndCall( address _to, uint256 _value ) public returns (bool) { } function transferAndCall( address _to, uint256 _value, bytes _data ) public returns (bool) { } function transferFromAndCall( address _from, address _to, uint256 _value ) public returns (bool) { } function transferFromAndCall( address _from, address _to, uint256 _value, bytes _data ) public returns (bool) { } function approveAndCall( address _spender, uint256 _value ) public returns (bool) { } function approveAndCall( address _spender, uint256 _value, bytes _data ) public returns (bool) { approve(_spender, _value); require(<FILL_ME>) return true; } /** * @dev Internal function to invoke `onTransferReceived` on a target address * The call is not executed if the target address is not a contract * @param _from address Representing the previous owner of the given token value * @param _to address Target address that will receive the tokens * @param _value uint256 The amount mount of tokens to be transferred * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallTransfer( address _from, address _to, uint256 _value, bytes _data ) internal returns (bool) { } /** * @dev Internal function to invoke `onApprovalReceived` on a target address * The call is not executed if the target address is not a contract * @param _spender address The address which will spend the funds * @param _value uint256 The amount of tokens to be spent * @param _data bytes Optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallApprove( address _spender, uint256 _value, bytes _data ) internal returns (bool) { } }
checkAndCallApprove(_spender,_value,_data)
936
checkAndCallApprove(_spender,_value,_data)
"No authority"
pragma solidity 0.6.0; 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) { } } // voting contract interface Nest_3_VoteFactory { // Check address function checkAddress(string calldata name) external view returns (address contractAddress); // check whether the administrator function checkOwners(address man) external view returns (bool); } /** * @title NToken contract * @dev Include standard erc20 method, mining method, and mining data */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Nest_NToken is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; // Balance ledger mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger uint256 private _totalSupply = 0 ether; // Total supply string public name; // Token name string public symbol; // Token symbol uint8 public decimals = 18; // Precision uint256 public _createBlock; // Create block number uint256 public _recentlyUsedBlock; // Recently used block number Nest_3_VoteFactory _voteFactory; // Voting factory contract address _bidder; // Owner /** * @dev Initialization method * @param _name Token name * @param _symbol Token symbol * @param voteFactory Voting factory contract address * @param bidder Successful bidder address */ constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public { } /** * @dev Reset voting contract method * @param voteFactory Voting contract address */ function changeMapping (address voteFactory) public onlyOwner { } /** * @dev Additional issuance * @param value Additional issuance amount */ function increaseTotal(uint256 value) public { address offerMain = address(_voteFactory.checkAddress("nest.nToken.offerMain")); require(<FILL_ME>) _balances[offerMain] = _balances[offerMain].add(value); _totalSupply = _totalSupply.add(value); _recentlyUsedBlock = block.number; } /** * @dev Check the total amount of tokens * @return Total supply */ function totalSupply() override public view returns (uint256) { } /** * @dev Check address balance * @param owner Address to be checked * @return Return the balance of the corresponding address */ function balanceOf(address owner) override public view returns (uint256) { } /** * @dev Check block information * @return createBlock Initial block number * @return recentlyUsedBlock Recently mined and issued block */ function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) { } /** * @dev Check owner's approved allowance to the spender * @param owner Approving address * @param spender Approved address * @return Approved amount */ function allowance(address owner, address spender) override public view returns (uint256) { } /** * @dev Transfer method * @param to Transfer target * @param value Transfer amount * @return Whether the transfer is successful */ function transfer(address to, uint256 value) override public returns (bool) { } /** * @dev Approval method * @param spender Approval target * @param value Approval amount * @return Whether the approval is successful */ function approve(address spender, uint256 value) override public returns (bool) { } /** * @dev Transfer tokens when approved * @param from Transfer-out account address * @param to Transfer-in account address * @param value Transfer amount * @return Whether approved transfer is successful */ function transferFrom(address from, address to, uint256 value) override public returns (bool) { } /** * @dev Increase the allowance * @param spender Approval target * @param addedValue Amount to increase * @return whether increase is successful */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } /** * @dev Decrease the allowance * @param spender Approval target * @param subtractedValue Amount to decrease * @return Whether decrease is successful */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } /** * @dev Transfer method * @param to Transfer target * @param value Transfer amount */ function _transfer(address from, address to, uint256 value) internal { } /** * @dev Check the creator * @return Creator address */ function checkBidder() public view returns(address) { } /** * @dev Transfer creator * @param bidder New creator address */ function changeBidder(address bidder) public { } // Administrator only modifier onlyOwner(){ } }
address(msg.sender)==offerMain,"No authority"
961
address(msg.sender)==offerMain
null
pragma solidity 0.6.0; 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) { } } // voting contract interface Nest_3_VoteFactory { // Check address function checkAddress(string calldata name) external view returns (address contractAddress); // check whether the administrator function checkOwners(address man) external view returns (bool); } /** * @title NToken contract * @dev Include standard erc20 method, mining method, and mining data */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Nest_NToken is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; // Balance ledger mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger uint256 private _totalSupply = 0 ether; // Total supply string public name; // Token name string public symbol; // Token symbol uint8 public decimals = 18; // Precision uint256 public _createBlock; // Create block number uint256 public _recentlyUsedBlock; // Recently used block number Nest_3_VoteFactory _voteFactory; // Voting factory contract address _bidder; // Owner /** * @dev Initialization method * @param _name Token name * @param _symbol Token symbol * @param voteFactory Voting factory contract address * @param bidder Successful bidder address */ constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public { } /** * @dev Reset voting contract method * @param voteFactory Voting contract address */ function changeMapping (address voteFactory) public onlyOwner { } /** * @dev Additional issuance * @param value Additional issuance amount */ function increaseTotal(uint256 value) public { } /** * @dev Check the total amount of tokens * @return Total supply */ function totalSupply() override public view returns (uint256) { } /** * @dev Check address balance * @param owner Address to be checked * @return Return the balance of the corresponding address */ function balanceOf(address owner) override public view returns (uint256) { } /** * @dev Check block information * @return createBlock Initial block number * @return recentlyUsedBlock Recently mined and issued block */ function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) { } /** * @dev Check owner's approved allowance to the spender * @param owner Approving address * @param spender Approved address * @return Approved amount */ function allowance(address owner, address spender) override public view returns (uint256) { } /** * @dev Transfer method * @param to Transfer target * @param value Transfer amount * @return Whether the transfer is successful */ function transfer(address to, uint256 value) override public returns (bool) { } /** * @dev Approval method * @param spender Approval target * @param value Approval amount * @return Whether the approval is successful */ function approve(address spender, uint256 value) override public returns (bool) { } /** * @dev Transfer tokens when approved * @param from Transfer-out account address * @param to Transfer-in account address * @param value Transfer amount * @return Whether approved transfer is successful */ function transferFrom(address from, address to, uint256 value) override public returns (bool) { } /** * @dev Increase the allowance * @param spender Approval target * @param addedValue Amount to increase * @return whether increase is successful */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } /** * @dev Decrease the allowance * @param spender Approval target * @param subtractedValue Amount to decrease * @return Whether decrease is successful */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } /** * @dev Transfer method * @param to Transfer target * @param value Transfer amount */ function _transfer(address from, address to, uint256 value) internal { } /** * @dev Check the creator * @return Creator address */ function checkBidder() public view returns(address) { } /** * @dev Transfer creator * @param bidder New creator address */ function changeBidder(address bidder) public { require(<FILL_ME>) _bidder = bidder; } // Administrator only modifier onlyOwner(){ } }
address(msg.sender)==_bidder
961
address(msg.sender)==_bidder
README.md exists but content is empty.
Downloads last month
42