comment
stringlengths 1
211
β | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Exceeded giveaway supply" | // contracts/Ethersparks.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// Inspired from BGANPUNKS V2 (bastardganpunks.club) & Chubbies
contract Ethersparks is ERC721, Ownable {
using SafeMath for uint256;
uint public constant MAX_ETHERSPARKS = 10200;
bool public hasSaleStarted = false;
// The IPFS hash for all Ethersparks concatenated *might* stored here once all Ethersparks are issued and if I figure it out
string public METADATA_PROVENANCE_HASH = "";
// Truth.
string public constant R =
"Those cute little Ethersparks are on a mission to the moon.";
constructor() ERC721("Ethersparks", "ETHERSPARKS") {
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function calculatePrice() public view returns (uint256) {
}
function calculatePriceForToken(uint _id) public view returns (uint256) {
}
function adoptEthersparks(uint256 numEthersparks) public payable {
}
// God Mode
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function reserveGiveaway(uint256 numEthersparks) public onlyOwner {
uint currentSupply = totalSupply();
require(<FILL_ME>)
require(hasSaleStarted == false, "Sale has already started");
uint256 index;
// Reserved for people who helped this project and giveaways
for (index = 0; index < numEthersparks; index++) {
_safeMint(owner(), currentSupply + index);
}
}
}
| totalSupply().add(numEthersparks)<=60,"Exceeded giveaway supply" | 49,519 | totalSupply().add(numEthersparks)<=60 |
"Manager has already been set" | pragma solidity 0.5.16;
/// @title GasToken Refund Module - Allows to execute transactions using Gas Tokens.
/// @author Emiliano Bonassi - <[email protected]>
contract GasTokenRefundModuleV1 is Module {
using SafeMath for uint256;
string public constant NAME = "GasToken Refund Module";
string public constant VERSION = "1.0.0";
/// @dev Setup function sets initial storage of contract.
/// @param _manager Address of the manager, the safe contract.
function setup(address payable _manager)
public
{
require(<FILL_ME>)
if (_manager == address(0)){
manager = ModuleManager(msg.sender);
}
else{
manager = ModuleManager(_manager);
}
}
/// @dev Returns if executed correctly.
/// @param to Recipient.
/// @param value Value.
/// @param data Data.
/// @return Returns if transaction can be executed.
function executeWithGasTokenRefund(address to, uint256 value, bytes memory data)
public
returns (bool)
{
}
}
| address(manager)==address(0),"Manager has already been set" | 49,541 | address(manager)==address(0) |
"Method can only be called by an owner" | pragma solidity 0.5.16;
/// @title GasToken Refund Module - Allows to execute transactions using Gas Tokens.
/// @author Emiliano Bonassi - <[email protected]>
contract GasTokenRefundModuleV1 is Module {
using SafeMath for uint256;
string public constant NAME = "GasToken Refund Module";
string public constant VERSION = "1.0.0";
/// @dev Setup function sets initial storage of contract.
/// @param _manager Address of the manager, the safe contract.
function setup(address payable _manager)
public
{
}
/// @dev Returns if executed correctly.
/// @param to Recipient.
/// @param value Value.
/// @param data Data.
/// @return Returns if transaction can be executed.
function executeWithGasTokenRefund(address to, uint256 value, bytes memory data)
public
returns (bool)
{
uint256 initialGas = gasleft();
// Only Safe owners are allowed to execute transactions.
require(<FILL_ME>)
require(manager.execTransactionFromModule(to, value, data, Enum.Operation.Call), "Could not execute transaction");
// Refund
uint256 MINT_BASE = 32254;
uint256 MINT_TOKEN = 36543;
uint256 FREE_BASE = 14154;
uint256 FREE_TOKEN = 6870;
uint256 REIMBURSE = 24000;
uint256 mintPrice = 1000000000;
uint256 tokens = initialGas.sub(gasleft()).add(FREE_BASE).div(REIMBURSE.mul(2).sub(FREE_TOKEN));
uint256 mintCost = MINT_BASE.add(tokens.mul(MINT_TOKEN));
uint256 freeCost = FREE_BASE.add(tokens.mul(FREE_TOKEN));
uint256 maxreimburse = tokens.mul(REIMBURSE);
uint256 efficiency = maxreimburse.mul(tx.gasprice).mul(100).div(
mintCost.mul(mintPrice).add(freeCost.mul(tx.gasprice))
);
if (efficiency > 100) {
uint256 tokensToFree = tokens;
uint256 safeNumTokens = 0;
uint256 gas = gasleft();
if (gas >= 27710) {
safeNumTokens = gas.sub(27710).div(1148 + 5722 + 150);
}
if (tokensToFree > safeNumTokens) {
tokensToFree = safeNumTokens;
}
IGST2 gasToken = IGST2(0x0000000000b3F879cb30FE243b4Dfee438691c04);
uint256 gasTokenBal = gasToken.balanceOf(address(manager));
if (tokensToFree > 0 && gasTokenBal >= tokensToFree) {
gasToken.freeFromUpTo(address(manager), tokensToFree);
}
}
return true;
}
}
| OwnerManager(address(manager)).isOwner(msg.sender),"Method can only be called by an owner" | 49,541 | OwnerManager(address(manager)).isOwner(msg.sender) |
"Could not execute transaction" | pragma solidity 0.5.16;
/// @title GasToken Refund Module - Allows to execute transactions using Gas Tokens.
/// @author Emiliano Bonassi - <[email protected]>
contract GasTokenRefundModuleV1 is Module {
using SafeMath for uint256;
string public constant NAME = "GasToken Refund Module";
string public constant VERSION = "1.0.0";
/// @dev Setup function sets initial storage of contract.
/// @param _manager Address of the manager, the safe contract.
function setup(address payable _manager)
public
{
}
/// @dev Returns if executed correctly.
/// @param to Recipient.
/// @param value Value.
/// @param data Data.
/// @return Returns if transaction can be executed.
function executeWithGasTokenRefund(address to, uint256 value, bytes memory data)
public
returns (bool)
{
uint256 initialGas = gasleft();
// Only Safe owners are allowed to execute transactions.
require(OwnerManager(address(manager)).isOwner(msg.sender), "Method can only be called by an owner");
require(<FILL_ME>)
// Refund
uint256 MINT_BASE = 32254;
uint256 MINT_TOKEN = 36543;
uint256 FREE_BASE = 14154;
uint256 FREE_TOKEN = 6870;
uint256 REIMBURSE = 24000;
uint256 mintPrice = 1000000000;
uint256 tokens = initialGas.sub(gasleft()).add(FREE_BASE).div(REIMBURSE.mul(2).sub(FREE_TOKEN));
uint256 mintCost = MINT_BASE.add(tokens.mul(MINT_TOKEN));
uint256 freeCost = FREE_BASE.add(tokens.mul(FREE_TOKEN));
uint256 maxreimburse = tokens.mul(REIMBURSE);
uint256 efficiency = maxreimburse.mul(tx.gasprice).mul(100).div(
mintCost.mul(mintPrice).add(freeCost.mul(tx.gasprice))
);
if (efficiency > 100) {
uint256 tokensToFree = tokens;
uint256 safeNumTokens = 0;
uint256 gas = gasleft();
if (gas >= 27710) {
safeNumTokens = gas.sub(27710).div(1148 + 5722 + 150);
}
if (tokensToFree > safeNumTokens) {
tokensToFree = safeNumTokens;
}
IGST2 gasToken = IGST2(0x0000000000b3F879cb30FE243b4Dfee438691c04);
uint256 gasTokenBal = gasToken.balanceOf(address(manager));
if (tokensToFree > 0 && gasTokenBal >= tokensToFree) {
gasToken.freeFromUpTo(address(manager), tokensToFree);
}
}
return true;
}
}
| manager.execTransactionFromModule(to,value,data,Enum.Operation.Call),"Could not execute transaction" | 49,541 | manager.execTransactionFromModule(to,value,data,Enum.Operation.Call) |
"!vault" | pragma solidity ^0.6.2;
contract Strategy {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public want;
address public governance;
address public vaultX;
address public vaultY;
uint256 public feexe18 = 5e15;
uint256 public feeye18 = 5e15;
uint256 public feepe18 = 5e16;
constructor(address _want) public {
}
function deposit(uint256 _amount) public virtual {}
function withdraw(address _to, uint256 _amount) public virtual {
}
function update(address _newStratrgy) public virtual {
}
function balanceOfY() public view virtual returns (uint256) {
}
function pika(IERC20 _asset, uint256 _amount) public {
}
function setGovernance(address _governance) public {
}
function setVaultX(address _vaultX) public {
require(msg.sender == governance, "!governance");
require(<FILL_ME>)
vaultX = _vaultX;
}
function setVaultY(address _vaultY) public {
}
function setFeeXE18(uint256 _fee) public {
}
function setFeeYE18(uint256 _fee) public {
}
function setFeePE18(uint256 _fee) public {
}
}
| IVaultX(_vaultX).token()==want,"!vault" | 49,618 | IVaultX(_vaultX).token()==want |
"!vault" | pragma solidity ^0.6.2;
contract Strategy {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public want;
address public governance;
address public vaultX;
address public vaultY;
uint256 public feexe18 = 5e15;
uint256 public feeye18 = 5e15;
uint256 public feepe18 = 5e16;
constructor(address _want) public {
}
function deposit(uint256 _amount) public virtual {}
function withdraw(address _to, uint256 _amount) public virtual {
}
function update(address _newStratrgy) public virtual {
}
function balanceOfY() public view virtual returns (uint256) {
}
function pika(IERC20 _asset, uint256 _amount) public {
}
function setGovernance(address _governance) public {
}
function setVaultX(address _vaultX) public {
}
function setVaultY(address _vaultY) public {
require(msg.sender == governance, "!governance");
require(<FILL_ME>)
vaultY = _vaultY;
}
function setFeeXE18(uint256 _fee) public {
}
function setFeeYE18(uint256 _fee) public {
}
function setFeePE18(uint256 _fee) public {
}
}
| IVaultY(_vaultY).token()==want,"!vault" | 49,618 | IVaultY(_vaultY).token()==want |
"not enough reserve" | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
require(numberOfTokens > 0, "mint more than zero");
require(to != address(0), "dont mint to zero address");
require(artist > 0 && artist <= 8, "invalid artist");
require(<FILL_ME>)
require(amountMintedPerArtist[artist] + numberOfTokens <= editionSize, "no more editions left");
_mint(to, artist, numberOfTokens, "");
reservePerArtist[artist] -= numberOfTokens;
amountMintedPerArtist[artist] += numberOfTokens;
}
function withdraw() public onlyOwner {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| (reservePerArtist[artist]-numberOfTokens)>=0,"not enough reserve" | 49,663 | (reservePerArtist[artist]-numberOfTokens)>=0 |
"no more editions left" | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
require(numberOfTokens > 0, "mint more than zero");
require(to != address(0), "dont mint to zero address");
require(artist > 0 && artist <= 8, "invalid artist");
require((reservePerArtist[artist] - numberOfTokens) >= 0, "not enough reserve");
require(<FILL_ME>)
_mint(to, artist, numberOfTokens, "");
reservePerArtist[artist] -= numberOfTokens;
amountMintedPerArtist[artist] += numberOfTokens;
}
function withdraw() public onlyOwner {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| amountMintedPerArtist[artist]+numberOfTokens<=editionSize,"no more editions left" | 49,663 | amountMintedPerArtist[artist]+numberOfTokens<=editionSize |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(<FILL_ME>)
require(payable(dev).send(devCut));
require(payable(artist1).send(artistCut));
require(payable(artist2).send(artistCut));
require(payable(artist3).send(artistCut));
require(payable(artist4).send(artistCut));
require(payable(artist5).send(artistCut));
require(payable(artist6).send(artistCut));
require(payable(artist7).send(artistCut));
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(fwb).send(fwbCut) | 49,663 | payable(fwb).send(fwbCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(<FILL_ME>)
require(payable(artist1).send(artistCut));
require(payable(artist2).send(artistCut));
require(payable(artist3).send(artistCut));
require(payable(artist4).send(artistCut));
require(payable(artist5).send(artistCut));
require(payable(artist6).send(artistCut));
require(payable(artist7).send(artistCut));
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(dev).send(devCut) | 49,663 | payable(dev).send(devCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(payable(dev).send(devCut));
require(<FILL_ME>)
require(payable(artist2).send(artistCut));
require(payable(artist3).send(artistCut));
require(payable(artist4).send(artistCut));
require(payable(artist5).send(artistCut));
require(payable(artist6).send(artistCut));
require(payable(artist7).send(artistCut));
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(artist1).send(artistCut) | 49,663 | payable(artist1).send(artistCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(payable(dev).send(devCut));
require(payable(artist1).send(artistCut));
require(<FILL_ME>)
require(payable(artist3).send(artistCut));
require(payable(artist4).send(artistCut));
require(payable(artist5).send(artistCut));
require(payable(artist6).send(artistCut));
require(payable(artist7).send(artistCut));
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(artist2).send(artistCut) | 49,663 | payable(artist2).send(artistCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(payable(dev).send(devCut));
require(payable(artist1).send(artistCut));
require(payable(artist2).send(artistCut));
require(<FILL_ME>)
require(payable(artist4).send(artistCut));
require(payable(artist5).send(artistCut));
require(payable(artist6).send(artistCut));
require(payable(artist7).send(artistCut));
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(artist3).send(artistCut) | 49,663 | payable(artist3).send(artistCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(payable(dev).send(devCut));
require(payable(artist1).send(artistCut));
require(payable(artist2).send(artistCut));
require(payable(artist3).send(artistCut));
require(<FILL_ME>)
require(payable(artist5).send(artistCut));
require(payable(artist6).send(artistCut));
require(payable(artist7).send(artistCut));
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(artist4).send(artistCut) | 49,663 | payable(artist4).send(artistCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(payable(dev).send(devCut));
require(payable(artist1).send(artistCut));
require(payable(artist2).send(artistCut));
require(payable(artist3).send(artistCut));
require(payable(artist4).send(artistCut));
require(<FILL_ME>)
require(payable(artist6).send(artistCut));
require(payable(artist7).send(artistCut));
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(artist5).send(artistCut) | 49,663 | payable(artist5).send(artistCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(payable(dev).send(devCut));
require(payable(artist1).send(artistCut));
require(payable(artist2).send(artistCut));
require(payable(artist3).send(artistCut));
require(payable(artist4).send(artistCut));
require(payable(artist5).send(artistCut));
require(<FILL_ME>)
require(payable(artist7).send(artistCut));
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(artist6).send(artistCut) | 49,663 | payable(artist6).send(artistCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(payable(dev).send(devCut));
require(payable(artist1).send(artistCut));
require(payable(artist2).send(artistCut));
require(payable(artist3).send(artistCut));
require(payable(artist4).send(artistCut));
require(payable(artist5).send(artistCut));
require(payable(artist6).send(artistCut));
require(<FILL_ME>)
require(payable(artist8).send(artistCut));
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(artist7).send(artistCut) | 49,663 | payable(artist7).send(artistCut) |
null | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
uint fwbCut = address(this).balance * 30/100;
uint devCut = address(this).balance * 10/100;
uint artistCut = address(this).balance * 75/1000;
address fwb = 0x33e626727B9Ecf64E09f600A1E0f5adDe266a0DF;
address dev = 0xEca3B7627DEef983A4D4EEE096B0B33A2D880429;
address artist1 = 0x7200eF22d5e2052F8336dcFf51dd08119aFAcE87;
address artist2 = 0x9011Eb570D1bE09eA4d10f38c119DCDF29725c41;
address artist3 = 0xea7Fb078acB618F2074b639Ba04f77161Da6Feea;
address artist4 = 0xD2b783513Ef6De2415C72c1899E6d0dE470787C6;
address artist5 = 0x518201899E316bf98c957C73e1326b77672Fe52b;
address artist6 = 0xD3f248C1004CaB5d51Eb50b05829b1614A277c8a;
address artist7 = 0x3F93dFd9a05027b26997ebCED1762FeE0E1058C0;
address artist8 = 0x3942c585Afe697394E40df0e4bfe75CB3C5D919e;
require(payable(fwb).send(fwbCut));
require(payable(dev).send(devCut));
require(payable(artist1).send(artistCut));
require(payable(artist2).send(artistCut));
require(payable(artist3).send(artistCut));
require(payable(artist4).send(artistCut));
require(payable(artist5).send(artistCut));
require(payable(artist6).send(artistCut));
require(payable(artist7).send(artistCut));
require(<FILL_ME>)
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
}
}
| payable(artist8).send(artistCut) | 49,663 | payable(artist8).send(artistCut) |
"no more mints left" | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
require(mintLimit > 0, "minting not active");
require(tx.origin == msg.sender && msg.sender != address(0), "no contracts pls");
require(artist > 0 && artist <= 8, "invalid artist");
require(numberOfTokens > 0 && numberOfTokens <= 2, "invalid token amount");
require(msg.value >= price.mul(numberOfTokens), "invalid eth amount");
require(<FILL_ME>)
require(amountMintedPerArtist[artist] + numberOfTokens <= editionSize, "no more editions left");
require(amountMintedPerWallet[msg.sender].mintsPerArtist[artist] < maxPerWallet, "wallet has minted too many");
_mint(msg.sender, artist, numberOfTokens, "");
amountMintedPerArtist[artist] += numberOfTokens;
amountMintedPerWallet[msg.sender].mintsPerArtist[artist] += numberOfTokens;
}
}
| amountMintedPerArtist[artist]+numberOfTokens<=(mintLimit-reservePerArtist[artist]),"no more mints left" | 49,663 | amountMintedPerArtist[artist]+numberOfTokens<=(mintLimit-reservePerArtist[artist]) |
"wallet has minted too many" | pragma solidity >=0.6.2 <0.8.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
:=-::--
+- .+=
#=---+= ==
.-==: .# #
=- :#: +. #
=: #: =- # ..
.:. := .+- =- #==:.*
+-.# * -+- =: :*. .=:
-= :+=: -+: *. .-:
=- .=- +-.==*. # :+---
=- .-#=+.=+ .:::: :* :: *:
.++.=: .=-::=+. .=-::-*= .==.
-- -= .* =- := *. -**
.+ =-- +. -: =. = :-..* =:
*. .:::+-#=%* .-.:------: :------:.-: *%=#-+:=:.
.-==---------=- **=. =+:-::. .=-=+. .::-:+= .=+# :=---------==-.
+- :--. = .-+- :+ :=:*. :*#: .*:=- +: :*-. = .--: -+
-- .=* .#. =-. -#%+-:-=- .*==- *:-* -==*. -=-:-+%#- .-= .#: +=. -:
-+. .=*.*- :===+.+=. :#-=. .*: :*: .=:#: .-+.+===: -*.*=. .+-
-=- .-+=*: : .. =*=- .+*-:-::-*+: -=*= . : :*=+-. -=-
.#=-: .:=+- :*-. :-=--::::::::--=-: .-*: -+=-. :-=#.
:= .-+--:-+=. +#=---. .---=#+ .=+-:--++. .+.
-= #. ..:---. =+. .:........ :. .+= ---:.. +: *:
-= = *- :--=. =: .......::=+ .=--: # +- *.
.+ -= +*+*: -= =- =+=#..#..*
+ =*::* =+ :* *: =.:* +=--:
+=.+:* * :* *: * :+*..=.
+*+:.+ -+ +- +::+==
**- # .# -**
#- *. .* -#
-+ .* *: +-
=- =+ += -=
:=: :==. .==: :=:
.---=-:.. ..:-----. .-----:.. ..:-=---.
=:..::::::...:= =: ..::::::..:+
+ =: := +
+ .::#==-----: :-----==#-:. =.
.:::=++=--::. ..:----:.. ..:----::. .::--=++=:::.
.:::: .:::.
:#############* +%%%####= =##- -#%%#+ +#########*+=.
-@@%++++++++++= *+++++%*. %@@. %@@%.#@. #@@*+++++*#@@@#.
-@@* -#- :@@% :: @* #@@: =@@%
-@@* *%. +@@= *% #@@: @@@
-@@* .%@. @@@. *# #@@: :#@@-
-@@@%%%%%%%%%%+ .@@- -@@# #= #@@@%%%%%@@@*-
-@@%==========- #@@ %@@+ .% #@@+======+*%@#=
-@@* :@@# +*@@- #. #@@: *@@+
-@@* =@@% -++@@= .*. #@@: -@@#
-@@* .@@@= ++ -@@%: .++ #@@: .=@@@-
-@@* -@@@%++**: +@@@%#*#%+. #@@@@@@@@@@@@@*:
.--: :=+=-. .: -=+==: :----------:.
.+%@-
-*%+ =##@%.
=#--@+ .+#- #%. . .
-%= *@. .*#: *@. **. +*.
*%. .@* :#*. =@- :-. -#-
:%# *@-**. -@+ .##. =%*-- *#. : -=: *#.
-@* :@@#: :@# .%+ -%= ++ .%= :*@@::++%@: %*
-@+ =#- :@% %= #+ :+@+ %--*-:@**- =@: %=
*+ :@% .= #%++--= +@*- .+: %: =
-@% . : .
:#+
*/
contract FWBArtMiami2021 is ERC1155, Ownable {
uint public price = 0.05 ether;
uint public maxPerWallet = 2;
uint public constant editionSize = 300;
uint public constant reserveSize = 23;
uint public mintLimit = 0;
mapping(uint => uint) public amountMintedPerArtist;
mapping(uint => uint) public reservePerArtist;
struct WalletMints {
mapping(uint => uint) mintsPerArtist;
}
mapping(address => WalletMints) private amountMintedPerWallet;
constructor() public ERC1155("https://gateway.pinata.cloud/ipfs/QmPuwLFsB7uWKvvxyEzcHpSGPFGyVy1eW83eNPASpqaMPr/{id}.json") {
}
function setBaseURI(string memory newUri) public onlyOwner {
}
function setMintLimit(uint limit) public onlyOwner {
}
function reserve(address to, uint artist, uint numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function mint(uint artist, uint numberOfTokens) public payable {
require(mintLimit > 0, "minting not active");
require(tx.origin == msg.sender && msg.sender != address(0), "no contracts pls");
require(artist > 0 && artist <= 8, "invalid artist");
require(numberOfTokens > 0 && numberOfTokens <= 2, "invalid token amount");
require(msg.value >= price.mul(numberOfTokens), "invalid eth amount");
require(amountMintedPerArtist[artist] + numberOfTokens <= (mintLimit - reservePerArtist[artist]), "no more mints left");
require(amountMintedPerArtist[artist] + numberOfTokens <= editionSize, "no more editions left");
require(<FILL_ME>)
_mint(msg.sender, artist, numberOfTokens, "");
amountMintedPerArtist[artist] += numberOfTokens;
amountMintedPerWallet[msg.sender].mintsPerArtist[artist] += numberOfTokens;
}
}
| amountMintedPerWallet[msg.sender].mintsPerArtist[artist]<maxPerWallet,"wallet has minted too many" | 49,663 | amountMintedPerWallet[msg.sender].mintsPerArtist[artist]<maxPerWallet |
null | pragma solidity ^0.4.24;
import "./SafeMath.sol";
import "./ERC20Interface.sol";
contract SLSToken is ERC20Interface{
using SafeMath for uint256;
using SafeMath for uint8;
event ListLog(address addr, uint8 indexed typeNo, bool active);
event Trans(address indexed fromAddr, address indexed toAddr, uint256 transAmount, uint64 time);
event OwnershipTransferred(address indexed _from, address indexed _to);
event Deposit(address indexed sender, uint value);
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
address public owner;
address private ownerContract = address(0x0);
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
mapping(address => bool) public blackList;
constructor() public {
}
function AssignOwner(address _ownerContract)
public
onlyOwner
notNull(_ownerContract)
{
}
function transfer(address _to, uint256 _value)
public
notNull(_to)
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
notNull(_to)
returns (bool success)
{
}
function _transfer(address _from, address _to, uint256 _value)
internal
notNull(_from)
notNull(_to)
returns (bool)
{
require(<FILL_ME>)
require(!blackList[_to]);
emit Transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function allowance(address _tokenOwner, address _spender)
public
view
returns (uint256 remaining)
{
}
function()
payable
{
}
function tokenFallback(address from_, uint256 value_, bytes data_)
external
{
}
// ------------------------------------------------------------------------
// Modifiers
// ------------------------------------------------------------------------
modifier onlyOwner {
}
modifier notNull(address _address) {
}
// ------------------------------------------------------------------------
// onlyOwner API
// ------------------------------------------------------------------------
function addBlacklist(address _addr) public notNull(_addr) onlyOwner {
}
function delBlackList(address _addr) public notNull(_addr) onlyOwner {
}
function transferAnyERC20Token(address _tokenAddress, uint256 _tokens)
public
onlyOwner
returns (bool success)
{
}
function mintToken(address _targetAddr, uint256 _mintedAmount)
public
onlyOwner
{
}
function burnToken(uint256 _burnedAmount)
public
onlyOwner
{
}
function increaseApproval(address _spender, uint256 _addedValue)
public
notNull(_spender)
onlyOwner returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
public
notNull(_spender)
onlyOwner returns (bool)
{
}
// ------------------------------------------------------------------------
// Public view API
// ------------------------------------------------------------------------
function balanceOf(address _tokenOwner)
public
view
returns (uint256 balance)
{
}
function totalSupply()
public
view
returns (uint256)
{
}
}
| !blackList[_from] | 49,760 | !blackList[_from] |
null | pragma solidity ^0.4.24;
import "./SafeMath.sol";
import "./ERC20Interface.sol";
contract SLSToken is ERC20Interface{
using SafeMath for uint256;
using SafeMath for uint8;
event ListLog(address addr, uint8 indexed typeNo, bool active);
event Trans(address indexed fromAddr, address indexed toAddr, uint256 transAmount, uint64 time);
event OwnershipTransferred(address indexed _from, address indexed _to);
event Deposit(address indexed sender, uint value);
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
address public owner;
address private ownerContract = address(0x0);
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
mapping(address => bool) public blackList;
constructor() public {
}
function AssignOwner(address _ownerContract)
public
onlyOwner
notNull(_ownerContract)
{
}
function transfer(address _to, uint256 _value)
public
notNull(_to)
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
notNull(_to)
returns (bool success)
{
}
function _transfer(address _from, address _to, uint256 _value)
internal
notNull(_from)
notNull(_to)
returns (bool)
{
require(!blackList[_from]);
require(<FILL_ME>)
emit Transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function allowance(address _tokenOwner, address _spender)
public
view
returns (uint256 remaining)
{
}
function()
payable
{
}
function tokenFallback(address from_, uint256 value_, bytes data_)
external
{
}
// ------------------------------------------------------------------------
// Modifiers
// ------------------------------------------------------------------------
modifier onlyOwner {
}
modifier notNull(address _address) {
}
// ------------------------------------------------------------------------
// onlyOwner API
// ------------------------------------------------------------------------
function addBlacklist(address _addr) public notNull(_addr) onlyOwner {
}
function delBlackList(address _addr) public notNull(_addr) onlyOwner {
}
function transferAnyERC20Token(address _tokenAddress, uint256 _tokens)
public
onlyOwner
returns (bool success)
{
}
function mintToken(address _targetAddr, uint256 _mintedAmount)
public
onlyOwner
{
}
function burnToken(uint256 _burnedAmount)
public
onlyOwner
{
}
function increaseApproval(address _spender, uint256 _addedValue)
public
notNull(_spender)
onlyOwner returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
public
notNull(_spender)
onlyOwner returns (bool)
{
}
// ------------------------------------------------------------------------
// Public view API
// ------------------------------------------------------------------------
function balanceOf(address _tokenOwner)
public
view
returns (uint256 balance)
{
}
function totalSupply()
public
view
returns (uint256)
{
}
}
| !blackList[_to] | 49,760 | !blackList[_to] |
null | pragma solidity ^0.4.24;
import "./SafeMath.sol";
import "./ERC20Interface.sol";
contract SLSToken is ERC20Interface{
using SafeMath for uint256;
using SafeMath for uint8;
event ListLog(address addr, uint8 indexed typeNo, bool active);
event Trans(address indexed fromAddr, address indexed toAddr, uint256 transAmount, uint64 time);
event OwnershipTransferred(address indexed _from, address indexed _to);
event Deposit(address indexed sender, uint value);
string public symbol;
string public name;
uint8 public decimals;
uint256 public _totalSupply;
address public owner;
address private ownerContract = address(0x0);
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
mapping(address => bool) public blackList;
constructor() public {
}
function AssignOwner(address _ownerContract)
public
onlyOwner
notNull(_ownerContract)
{
}
function transfer(address _to, uint256 _value)
public
notNull(_to)
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
notNull(_to)
returns (bool success)
{
}
function _transfer(address _from, address _to, uint256 _value)
internal
notNull(_from)
notNull(_to)
returns (bool)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function allowance(address _tokenOwner, address _spender)
public
view
returns (uint256 remaining)
{
}
function()
payable
{
}
function tokenFallback(address from_, uint256 value_, bytes data_)
external
{
}
// ------------------------------------------------------------------------
// Modifiers
// ------------------------------------------------------------------------
modifier onlyOwner {
}
modifier notNull(address _address) {
}
// ------------------------------------------------------------------------
// onlyOwner API
// ------------------------------------------------------------------------
function addBlacklist(address _addr) public notNull(_addr) onlyOwner {
}
function delBlackList(address _addr) public notNull(_addr) onlyOwner {
}
function transferAnyERC20Token(address _tokenAddress, uint256 _tokens)
public
onlyOwner
returns (bool success)
{
}
function mintToken(address _targetAddr, uint256 _mintedAmount)
public
onlyOwner
{
}
function burnToken(uint256 _burnedAmount)
public
onlyOwner
{
require(<FILL_ME>)
balances[owner] = balances[owner].sub(_burnedAmount);
_totalSupply = _totalSupply.sub(_burnedAmount);
emit Transfer(owner, address(0x0), _burnedAmount);
}
function increaseApproval(address _spender, uint256 _addedValue)
public
notNull(_spender)
onlyOwner returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
public
notNull(_spender)
onlyOwner returns (bool)
{
}
// ------------------------------------------------------------------------
// Public view API
// ------------------------------------------------------------------------
function balanceOf(address _tokenOwner)
public
view
returns (uint256 balance)
{
}
function totalSupply()
public
view
returns (uint256)
{
}
}
| balances[owner]>=_burnedAmount | 49,760 | balances[owner]>=_burnedAmount |
"onlyAllowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
contract Allowable is Context {
mapping(address => bool) allowed;
modifier onlyAllowed() {
require(<FILL_ME>)
_;
}
function manageAllowed(address _address, bool _bool) public onlyAllowed {
}
}
| allowed[_msgSender()]==true,"onlyAllowed" | 49,782 | allowed[_msgSender()]==true |
"Invalid amount" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
interface IERC20Token {
function totalSupply() external view returns (uint256 supply);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function balanceOf(address _owner) external view returns (uint256 balance);
function approve(address _spender, uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
function mint(address account, uint256 value) external returns (bool);
}
interface POLCProfits {
function addBankEarnings(uint256 _amount) external;
}
library Address {
function sendValue(address payable recipient, uint256 amount) internal {
}
}
contract Ownable {
address private owner;
event OwnerSet(address indexed oldOwner, address indexed newOwner);
modifier onlyOwner() {
}
constructor() {
}
function changeOwner(address newOwner) public onlyOwner {
}
function getOwner() external view returns (address) {
}
}
contract POLCBridgeTransfers is Ownable {
address payable public bankVault;
address public polcVault;
address public polcTokenAddress;
uint256 public bridgeFee;
uint256 public gasFee;
IERC20Token private polcToken;
POLCProfits public profitsContract;
uint256 public depositIndex;
struct Deposit {
address sender;
uint256 amount;
uint256 fee;
}
mapping (uint256 => Deposit) public deposits;
mapping (address => bool) public whitelisted;
uint256 maxTXAmount = 25000 ether;
constructor() {
}
function bridgeSend(uint256 _amount) public payable {
require(<FILL_ME>)
require(msg.value >= gasFee, "Invalid gas fee");
uint256 fee;
if (bridgeFee > 0) {
fee = (_amount * bridgeFee) /100; // bridge transaction fee
profitsContract.addBankEarnings((fee / 20)); //25% of the fees goes to bank hodlers, 5 banks = 5% each
}
Address.sendValue(bankVault, msg.value);
require(polcToken.transferFrom(msg.sender, polcVault, _amount), "ERC20 transfer error");
deposits[depositIndex].sender = msg.sender;
deposits[depositIndex].amount = _amount;
deposits[depositIndex].fee = fee;
depositIndex += 1;
}
function platformTransfer(uint256 _amount) public {
}
function setBankVault(address _vault) public onlyOwner {
}
function setPOLCVault(address _vault) public onlyOwner {
}
function setFee(uint256 _fee) public onlyOwner {
}
function setProfitsContract(address _contract) public onlyOwner {
}
function setGasFee(uint256 _fee) public onlyOwner {
}
function setMaxTXAmount(uint256 _amount) public onlyOwner {
}
function whitelistWallet(address _wallet, bool _whitelisted) public onlyOwner {
}
}
| (_amount>=(50ether)&&_amount<=(maxTXAmount)),"Invalid amount" | 49,798 | (_amount>=(50ether)&&_amount<=(maxTXAmount)) |
"ERC20 transfer error" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
interface IERC20Token {
function totalSupply() external view returns (uint256 supply);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function balanceOf(address _owner) external view returns (uint256 balance);
function approve(address _spender, uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
function mint(address account, uint256 value) external returns (bool);
}
interface POLCProfits {
function addBankEarnings(uint256 _amount) external;
}
library Address {
function sendValue(address payable recipient, uint256 amount) internal {
}
}
contract Ownable {
address private owner;
event OwnerSet(address indexed oldOwner, address indexed newOwner);
modifier onlyOwner() {
}
constructor() {
}
function changeOwner(address newOwner) public onlyOwner {
}
function getOwner() external view returns (address) {
}
}
contract POLCBridgeTransfers is Ownable {
address payable public bankVault;
address public polcVault;
address public polcTokenAddress;
uint256 public bridgeFee;
uint256 public gasFee;
IERC20Token private polcToken;
POLCProfits public profitsContract;
uint256 public depositIndex;
struct Deposit {
address sender;
uint256 amount;
uint256 fee;
}
mapping (uint256 => Deposit) public deposits;
mapping (address => bool) public whitelisted;
uint256 maxTXAmount = 25000 ether;
constructor() {
}
function bridgeSend(uint256 _amount) public payable {
require((_amount>=(50 ether) && _amount<=(maxTXAmount)), "Invalid amount");
require(msg.value >= gasFee, "Invalid gas fee");
uint256 fee;
if (bridgeFee > 0) {
fee = (_amount * bridgeFee) /100; // bridge transaction fee
profitsContract.addBankEarnings((fee / 20)); //25% of the fees goes to bank hodlers, 5 banks = 5% each
}
Address.sendValue(bankVault, msg.value);
require(<FILL_ME>)
deposits[depositIndex].sender = msg.sender;
deposits[depositIndex].amount = _amount;
deposits[depositIndex].fee = fee;
depositIndex += 1;
}
function platformTransfer(uint256 _amount) public {
}
function setBankVault(address _vault) public onlyOwner {
}
function setPOLCVault(address _vault) public onlyOwner {
}
function setFee(uint256 _fee) public onlyOwner {
}
function setProfitsContract(address _contract) public onlyOwner {
}
function setGasFee(uint256 _fee) public onlyOwner {
}
function setMaxTXAmount(uint256 _amount) public onlyOwner {
}
function whitelistWallet(address _wallet, bool _whitelisted) public onlyOwner {
}
}
| polcToken.transferFrom(msg.sender,polcVault,_amount),"ERC20 transfer error" | 49,798 | polcToken.transferFrom(msg.sender,polcVault,_amount) |
"Not allowed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
interface IERC20Token {
function totalSupply() external view returns (uint256 supply);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function balanceOf(address _owner) external view returns (uint256 balance);
function approve(address _spender, uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
function mint(address account, uint256 value) external returns (bool);
}
interface POLCProfits {
function addBankEarnings(uint256 _amount) external;
}
library Address {
function sendValue(address payable recipient, uint256 amount) internal {
}
}
contract Ownable {
address private owner;
event OwnerSet(address indexed oldOwner, address indexed newOwner);
modifier onlyOwner() {
}
constructor() {
}
function changeOwner(address newOwner) public onlyOwner {
}
function getOwner() external view returns (address) {
}
}
contract POLCBridgeTransfers is Ownable {
address payable public bankVault;
address public polcVault;
address public polcTokenAddress;
uint256 public bridgeFee;
uint256 public gasFee;
IERC20Token private polcToken;
POLCProfits public profitsContract;
uint256 public depositIndex;
struct Deposit {
address sender;
uint256 amount;
uint256 fee;
}
mapping (uint256 => Deposit) public deposits;
mapping (address => bool) public whitelisted;
uint256 maxTXAmount = 25000 ether;
constructor() {
}
function bridgeSend(uint256 _amount) public payable {
}
function platformTransfer(uint256 _amount) public {
require(<FILL_ME>)
require(polcToken.transferFrom(msg.sender, polcVault, _amount), "ERC20 transfer error");
deposits[depositIndex].sender = msg.sender;
deposits[depositIndex].amount = _amount;
deposits[depositIndex].fee = 0;
depositIndex += 1;
}
function setBankVault(address _vault) public onlyOwner {
}
function setPOLCVault(address _vault) public onlyOwner {
}
function setFee(uint256 _fee) public onlyOwner {
}
function setProfitsContract(address _contract) public onlyOwner {
}
function setGasFee(uint256 _fee) public onlyOwner {
}
function setMaxTXAmount(uint256 _amount) public onlyOwner {
}
function whitelistWallet(address _wallet, bool _whitelisted) public onlyOwner {
}
}
| whitelisted[msg.sender]==true,"Not allowed" | 49,798 | whitelisted[msg.sender]==true |
"Mint exceeds max supply" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.9;
/** ______ __ __ __ __ __ ______ ______ __ __ ______ __ __
* /\ ___\ /\ \ /\ \/\ \ /\_\_\_\ /\__ _\ /\ __ \ /\ \/ / /\ ___\ /\ "-.\ \
* \ \ __\ \ \ \____ \ \ \_\ \ \/_/\_\/_ \/_/\ \/ \ \ \/\ \ \ \ _"-. \ \ __\ \ \ \-. \
* \ \_\ \ \_____\ \ \_____\ /\_\/\_\ \ \_\ \ \_____\ \ \_\ \_\ \ \_____\ \ \_\\"\_\
* \/_/ \/_____/ \/_____/ \/_/\/_/ \/_/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/_/
**/
import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol";
contract FLX is ERC20PresetMinterPauser {
uint256 public constant MAX_SUPPLY = 1000000000e18; // 1 billion
uint256 public constant INITIAL_SUPPLY = 560413928e18; // 579.413928 million
constructor(address _dao, address _treasury) ERC20PresetMinterPauser("Flux Token", "FLX") {
}
// Override mint() to prevent exceeding MAX_SUPPLY
function mint(
address to,
uint256 amount
) public virtual override {
require(<FILL_ME>)
super.mint(to, amount); // checks for MINTER_ROLE
}
}
| amount+totalSupply()<=MAX_SUPPLY,"Mint exceeds max supply" | 49,903 | amount+totalSupply()<=MAX_SUPPLY |
null | contract BossWage {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
}
// only people with profits
modifier onlyStronghands() {
require(<FILL_ME>)
_;
}
// administrators can:
// -> change the name of the contract
// -> change the name of the token
// they CANNOT:
// -> take funds
// -> disable withdrawals
// -> kill the contract
// -> change the price of tokens
modifier onlyAdministrator(){
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
// ERC20
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "Boss Wage";
string public symbol = "BSW";
uint8 constant public decimals = 18;
uint8 constant internal dividendFee_ = 10;
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
P3D constant public p3d = P3D(0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe);
/*================================
= DATASETS =
================================*/
// amount of shares for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => bool) public disabled;
uint256 internal tokenSupply_ = 0;
uint256 internal profitPerShare_;
// administrator list (see above on what they can do)
mapping(bytes32 => bool) public administrators;
address public vault;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/*
* -- APPLICATION ENTRY POINTS --
*/
constructor() public {
}
/**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
*/
function buy(address _referredBy)
public
payable
returns(uint256)
{
}
/**
* Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/
function()
payable
public
{
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest()
onlyStronghands()
public
{
}
function reinvestFor(address _for)
public
{
}
/**
* Alias of sell() and withdraw().
*/
function exit()
public
{
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw()
onlyStronghands()
public
{
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens)
onlyBagholders()
public
{
}
/**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/
function transfer(address _toAddress, uint256 _amountOfTokens)
onlyBagholders()
public
returns(bool)
{
}
function cannibalize() public {
}
function toggle(bool _auto) public {
}
/*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/
/**
* In case one of us dies, we need to replace ourselves.
*/
function setAdministrator(bytes32 _identifier, bool _status)
onlyAdministrator()
public
{
}
/**
* If we want to rebrand, we can.
*/
function setName(string _name)
onlyAdministrator()
public
{
}
/**
* If we want to rebrand, we can.
*/
function setSymbol(string _symbol)
onlyAdministrator()
public
{
}
function setVault(address _vault)
onlyAdministrator()
public
{
}
/*---------- HELPERS AND CALCULATORS ----------*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function totalEthereumBalance()
public
view
returns(uint)
{
}
/**
* Retrieve the total token supply.
*/
function totalSupply()
public
view
returns(uint256)
{
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens()
public
view
returns(uint256)
{
}
/**
* Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them separate.
*/
function getDividends(address _customerAddress, bool _includeReferralBonus)
public
view
returns(uint256)
{
}
function contractDivs()
public
view
returns(uint256)
{
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice()
public
view
returns(uint256)
{
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice()
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/
function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/
function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(address _customerAddress, uint256 _incomingEthereum, address _referredBy)
internal
returns(uint256)
{
}
function check() external {}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
}
/**
* Calculate token sell value.
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
{
}
//This is where all your gas goes, sorry
//Not sorry, you probably only paid 1 gwei
function sqrt(uint x) internal pure returns (uint y) {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract P3D {
uint256 public stakingRequirement;
function buy(address _referredBy) public payable returns(uint256) {}
function balanceOf(address _customerAddress) view public returns(uint256) {}
function exit() public {}
function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) {}
function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { }
function myDividends(bool _includeReferralBonus) public view returns(uint256) {}
function withdraw() public {}
}
| getDividends(msg.sender,true)>0 | 49,937 | getDividends(msg.sender,true)>0 |
null | contract BossWage {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
}
// only people with profits
modifier onlyStronghands() {
}
// administrators can:
// -> change the name of the contract
// -> change the name of the token
// they CANNOT:
// -> take funds
// -> disable withdrawals
// -> kill the contract
// -> change the price of tokens
modifier onlyAdministrator(){
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
// ERC20
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "Boss Wage";
string public symbol = "BSW";
uint8 constant public decimals = 18;
uint8 constant internal dividendFee_ = 10;
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
P3D constant public p3d = P3D(0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe);
/*================================
= DATASETS =
================================*/
// amount of shares for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => bool) public disabled;
uint256 internal tokenSupply_ = 0;
uint256 internal profitPerShare_;
// administrator list (see above on what they can do)
mapping(bytes32 => bool) public administrators;
address public vault;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/*
* -- APPLICATION ENTRY POINTS --
*/
constructor() public {
}
/**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
*/
function buy(address _referredBy)
public
payable
returns(uint256)
{
}
/**
* Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/
function()
payable
public
{
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest()
onlyStronghands()
public
{
}
function reinvestFor(address _for)
public
{
// automatic reinvest is on by default
require(<FILL_ME>)
// fetch dividends
uint256 _dividends = dividendsOf(_for); // retrieve ref. bonus later in the code
uint256 _referrals = referralBalance_[_for];
// must have divs to reinvest
require((_dividends + _referrals) > 0);
// pay out the dividends virtually
payoutsTo_[_for] += (int256) (_dividends * magnitude);
// retrieve ref. bonus
_dividends += _referrals;
referralBalance_[_for] = 0;
// dispatch a buy order with the virtualized "withdrawn dividends"
uint256 _tokens = purchaseTokens(_for, _dividends, msg.sender);
// fire event
onReinvestment(_for, _dividends, _tokens);
}
/**
* Alias of sell() and withdraw().
*/
function exit()
public
{
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw()
onlyStronghands()
public
{
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens)
onlyBagholders()
public
{
}
/**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/
function transfer(address _toAddress, uint256 _amountOfTokens)
onlyBagholders()
public
returns(bool)
{
}
function cannibalize() public {
}
function toggle(bool _auto) public {
}
/*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/
/**
* In case one of us dies, we need to replace ourselves.
*/
function setAdministrator(bytes32 _identifier, bool _status)
onlyAdministrator()
public
{
}
/**
* If we want to rebrand, we can.
*/
function setName(string _name)
onlyAdministrator()
public
{
}
/**
* If we want to rebrand, we can.
*/
function setSymbol(string _symbol)
onlyAdministrator()
public
{
}
function setVault(address _vault)
onlyAdministrator()
public
{
}
/*---------- HELPERS AND CALCULATORS ----------*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function totalEthereumBalance()
public
view
returns(uint)
{
}
/**
* Retrieve the total token supply.
*/
function totalSupply()
public
view
returns(uint256)
{
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens()
public
view
returns(uint256)
{
}
/**
* Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them separate.
*/
function getDividends(address _customerAddress, bool _includeReferralBonus)
public
view
returns(uint256)
{
}
function contractDivs()
public
view
returns(uint256)
{
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice()
public
view
returns(uint256)
{
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice()
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/
function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/
function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(address _customerAddress, uint256 _incomingEthereum, address _referredBy)
internal
returns(uint256)
{
}
function check() external {}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
}
/**
* Calculate token sell value.
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
{
}
//This is where all your gas goes, sorry
//Not sorry, you probably only paid 1 gwei
function sqrt(uint x) internal pure returns (uint y) {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract P3D {
uint256 public stakingRequirement;
function buy(address _referredBy) public payable returns(uint256) {}
function balanceOf(address _customerAddress) view public returns(uint256) {}
function exit() public {}
function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) {}
function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { }
function myDividends(bool _includeReferralBonus) public view returns(uint256) {}
function withdraw() public {}
}
| disabled[_for]==false | 49,937 | disabled[_for]==false |
null | contract BossWage {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
}
// only people with profits
modifier onlyStronghands() {
}
// administrators can:
// -> change the name of the contract
// -> change the name of the token
// they CANNOT:
// -> take funds
// -> disable withdrawals
// -> kill the contract
// -> change the price of tokens
modifier onlyAdministrator(){
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
// ERC20
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "Boss Wage";
string public symbol = "BSW";
uint8 constant public decimals = 18;
uint8 constant internal dividendFee_ = 10;
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
P3D constant public p3d = P3D(0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe);
/*================================
= DATASETS =
================================*/
// amount of shares for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => bool) public disabled;
uint256 internal tokenSupply_ = 0;
uint256 internal profitPerShare_;
// administrator list (see above on what they can do)
mapping(bytes32 => bool) public administrators;
address public vault;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/*
* -- APPLICATION ENTRY POINTS --
*/
constructor() public {
}
/**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
*/
function buy(address _referredBy)
public
payable
returns(uint256)
{
}
/**
* Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/
function()
payable
public
{
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest()
onlyStronghands()
public
{
}
function reinvestFor(address _for)
public
{
// automatic reinvest is on by default
require(disabled[_for] == false);
// fetch dividends
uint256 _dividends = dividendsOf(_for); // retrieve ref. bonus later in the code
uint256 _referrals = referralBalance_[_for];
// must have divs to reinvest
require(<FILL_ME>)
// pay out the dividends virtually
payoutsTo_[_for] += (int256) (_dividends * magnitude);
// retrieve ref. bonus
_dividends += _referrals;
referralBalance_[_for] = 0;
// dispatch a buy order with the virtualized "withdrawn dividends"
uint256 _tokens = purchaseTokens(_for, _dividends, msg.sender);
// fire event
onReinvestment(_for, _dividends, _tokens);
}
/**
* Alias of sell() and withdraw().
*/
function exit()
public
{
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw()
onlyStronghands()
public
{
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens)
onlyBagholders()
public
{
}
/**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/
function transfer(address _toAddress, uint256 _amountOfTokens)
onlyBagholders()
public
returns(bool)
{
}
function cannibalize() public {
}
function toggle(bool _auto) public {
}
/*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/
/**
* In case one of us dies, we need to replace ourselves.
*/
function setAdministrator(bytes32 _identifier, bool _status)
onlyAdministrator()
public
{
}
/**
* If we want to rebrand, we can.
*/
function setName(string _name)
onlyAdministrator()
public
{
}
/**
* If we want to rebrand, we can.
*/
function setSymbol(string _symbol)
onlyAdministrator()
public
{
}
function setVault(address _vault)
onlyAdministrator()
public
{
}
/*---------- HELPERS AND CALCULATORS ----------*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function totalEthereumBalance()
public
view
returns(uint)
{
}
/**
* Retrieve the total token supply.
*/
function totalSupply()
public
view
returns(uint256)
{
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens()
public
view
returns(uint256)
{
}
/**
* Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them separate.
*/
function getDividends(address _customerAddress, bool _includeReferralBonus)
public
view
returns(uint256)
{
}
function contractDivs()
public
view
returns(uint256)
{
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice()
public
view
returns(uint256)
{
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice()
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/
function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
}
/**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/
function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(address _customerAddress, uint256 _incomingEthereum, address _referredBy)
internal
returns(uint256)
{
}
function check() external {}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
}
/**
* Calculate token sell value.
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
{
}
//This is where all your gas goes, sorry
//Not sorry, you probably only paid 1 gwei
function sqrt(uint x) internal pure returns (uint y) {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract P3D {
uint256 public stakingRequirement;
function buy(address _referredBy) public payable returns(uint256) {}
function balanceOf(address _customerAddress) view public returns(uint256) {}
function exit() public {}
function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) {}
function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { }
function myDividends(bool _includeReferralBonus) public view returns(uint256) {}
function withdraw() public {}
}
| (_dividends+_referrals)>0 | 49,937 | (_dividends+_referrals)>0 |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
//
/**
* @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 {
/**
* @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) {
}
}
//
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
//
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
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 {
}
}
//
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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.
*
* 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);
}
//
contract PublicSaleContract is Ownable {
using SafeMath for uint256;
event Whitelist(address indexed _address, bool _isStaking);
event Deposit(uint256 _timestamp, address indexed _address);
event Refund(uint256 _timestamp, address indexed _address);
event TokenReleased(uint256 _timestamp, address indexed _address, uint256 _amount);
// Token Contract
IERC20 tokenContract = IERC20(0x03042482d64577A7bdb282260e2eA4c8a89C064B);
uint256 public noStakeReleaseAmount = 166666.67 ether;
uint256 public stakeReleaseFirstBatchAmount = 83333.33 ether;
uint256 public stakeReleaseSecondBatchAmount = 87500 ether;
// Receiving Address
address payable receivingAddress = 0x6359EAdBB84C8f7683E26F392A1573Ab6a37B4b4;
// Contract status
ContractStatus public status;
enum ContractStatus {
INIT,
ACCEPT_DEPOSIT,
FIRST_BATCH_TOKEN_RELEASED,
SECOND_BATCH_TOKEN_RELEASED
}
// Whitelist
mapping(address => WhitelistDetail) whitelist;
struct WhitelistDetail {
// Check if address is whitelisted
bool isWhitelisted;
// Check if address is staking
bool isStaking;
// Check if address has deposited
bool hasDeposited;
}
// Total count of whitelisted address
uint256 public whitelistCount = 0;
// Addresses that deposited
address[] depositAddresses;
uint256 dIndex = 0;
// Addresses for second batch release
address[] secondBatchAddresses;
uint256 sIndex = 0;
// Total count of deposits
uint256 public depositCount = 0;
// Deposit ticket size
uint256 public ticketSize = 2.85 ether;
// Duration of stake
uint256 constant stakeDuration = 30 days;
// Time that staking starts
uint256 public stakeStart;
constructor() public {
}
function updateReceivingAddress(address payable _address) public onlyOwner {
}
/**
* @dev ContractStatus.INIT functions
*/
function whitelistAddresses(address[] memory _addresses, bool[] memory _isStaking) public onlyOwner {
}
function updateTicketSize(uint256 _amount) public onlyOwner {
}
function acceptDeposit() public onlyOwner {
}
/**
* @dev ContractStatus.ACCEPT_DEPOSIT functions
*/
receive() external payable {
}
function deposit() internal {
require(status == ContractStatus.ACCEPT_DEPOSIT);
require(<FILL_ME>)
require(msg.value >= ticketSize);
msg.sender.transfer(msg.value.sub(ticketSize));
whitelist[msg.sender].hasDeposited = true;
depositAddresses.push(msg.sender);
depositCount = depositCount.add(1);
emit Deposit(block.timestamp, msg.sender);
}
function refund(address payable _address) public onlyOwner {
}
function refundMultiple(address payable[] memory _addresses) public onlyOwner {
}
function releaseFirstBatchTokens(uint256 _count) public onlyOwner {
}
/**
* @dev ContractStatus.FIRST_BATCH_TOKEN_RELEASED functions
*/
function releaseSecondBatchTokens(uint256 _count) public onlyOwner {
}
/**
* @dev ContractStatus.SECOND_BATCH_TOKEN_RELEASED functions
*/
function withdrawTokens() public onlyOwner {
}
}
| whitelist[msg.sender].isWhitelisted&&!whitelist[msg.sender].hasDeposited | 50,102 | whitelist[msg.sender].isWhitelisted&&!whitelist[msg.sender].hasDeposited |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
//
/**
* @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 {
/**
* @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) {
}
}
//
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
//
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
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 {
}
}
//
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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.
*
* 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);
}
//
contract PublicSaleContract is Ownable {
using SafeMath for uint256;
event Whitelist(address indexed _address, bool _isStaking);
event Deposit(uint256 _timestamp, address indexed _address);
event Refund(uint256 _timestamp, address indexed _address);
event TokenReleased(uint256 _timestamp, address indexed _address, uint256 _amount);
// Token Contract
IERC20 tokenContract = IERC20(0x03042482d64577A7bdb282260e2eA4c8a89C064B);
uint256 public noStakeReleaseAmount = 166666.67 ether;
uint256 public stakeReleaseFirstBatchAmount = 83333.33 ether;
uint256 public stakeReleaseSecondBatchAmount = 87500 ether;
// Receiving Address
address payable receivingAddress = 0x6359EAdBB84C8f7683E26F392A1573Ab6a37B4b4;
// Contract status
ContractStatus public status;
enum ContractStatus {
INIT,
ACCEPT_DEPOSIT,
FIRST_BATCH_TOKEN_RELEASED,
SECOND_BATCH_TOKEN_RELEASED
}
// Whitelist
mapping(address => WhitelistDetail) whitelist;
struct WhitelistDetail {
// Check if address is whitelisted
bool isWhitelisted;
// Check if address is staking
bool isStaking;
// Check if address has deposited
bool hasDeposited;
}
// Total count of whitelisted address
uint256 public whitelistCount = 0;
// Addresses that deposited
address[] depositAddresses;
uint256 dIndex = 0;
// Addresses for second batch release
address[] secondBatchAddresses;
uint256 sIndex = 0;
// Total count of deposits
uint256 public depositCount = 0;
// Deposit ticket size
uint256 public ticketSize = 2.85 ether;
// Duration of stake
uint256 constant stakeDuration = 30 days;
// Time that staking starts
uint256 public stakeStart;
constructor() public {
}
function updateReceivingAddress(address payable _address) public onlyOwner {
}
/**
* @dev ContractStatus.INIT functions
*/
function whitelistAddresses(address[] memory _addresses, bool[] memory _isStaking) public onlyOwner {
}
function updateTicketSize(uint256 _amount) public onlyOwner {
}
function acceptDeposit() public onlyOwner {
}
/**
* @dev ContractStatus.ACCEPT_DEPOSIT functions
*/
receive() external payable {
}
function deposit() internal {
}
function refund(address payable _address) public onlyOwner {
require(<FILL_ME>)
delete whitelist[_address];
_address.transfer(ticketSize);
depositCount = depositCount.sub(1);
emit Refund(block.timestamp, _address);
}
function refundMultiple(address payable[] memory _addresses) public onlyOwner {
}
function releaseFirstBatchTokens(uint256 _count) public onlyOwner {
}
/**
* @dev ContractStatus.FIRST_BATCH_TOKEN_RELEASED functions
*/
function releaseSecondBatchTokens(uint256 _count) public onlyOwner {
}
/**
* @dev ContractStatus.SECOND_BATCH_TOKEN_RELEASED functions
*/
function withdrawTokens() public onlyOwner {
}
}
| whitelist[_address].hasDeposited | 50,102 | whitelist[_address].hasDeposited |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
//
/**
* @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 {
/**
* @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) {
}
}
//
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
//
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
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 {
}
}
//
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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.
*
* 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);
}
//
contract PublicSaleContract is Ownable {
using SafeMath for uint256;
event Whitelist(address indexed _address, bool _isStaking);
event Deposit(uint256 _timestamp, address indexed _address);
event Refund(uint256 _timestamp, address indexed _address);
event TokenReleased(uint256 _timestamp, address indexed _address, uint256 _amount);
// Token Contract
IERC20 tokenContract = IERC20(0x03042482d64577A7bdb282260e2eA4c8a89C064B);
uint256 public noStakeReleaseAmount = 166666.67 ether;
uint256 public stakeReleaseFirstBatchAmount = 83333.33 ether;
uint256 public stakeReleaseSecondBatchAmount = 87500 ether;
// Receiving Address
address payable receivingAddress = 0x6359EAdBB84C8f7683E26F392A1573Ab6a37B4b4;
// Contract status
ContractStatus public status;
enum ContractStatus {
INIT,
ACCEPT_DEPOSIT,
FIRST_BATCH_TOKEN_RELEASED,
SECOND_BATCH_TOKEN_RELEASED
}
// Whitelist
mapping(address => WhitelistDetail) whitelist;
struct WhitelistDetail {
// Check if address is whitelisted
bool isWhitelisted;
// Check if address is staking
bool isStaking;
// Check if address has deposited
bool hasDeposited;
}
// Total count of whitelisted address
uint256 public whitelistCount = 0;
// Addresses that deposited
address[] depositAddresses;
uint256 dIndex = 0;
// Addresses for second batch release
address[] secondBatchAddresses;
uint256 sIndex = 0;
// Total count of deposits
uint256 public depositCount = 0;
// Deposit ticket size
uint256 public ticketSize = 2.85 ether;
// Duration of stake
uint256 constant stakeDuration = 30 days;
// Time that staking starts
uint256 public stakeStart;
constructor() public {
}
function updateReceivingAddress(address payable _address) public onlyOwner {
}
/**
* @dev ContractStatus.INIT functions
*/
function whitelistAddresses(address[] memory _addresses, bool[] memory _isStaking) public onlyOwner {
}
function updateTicketSize(uint256 _amount) public onlyOwner {
}
function acceptDeposit() public onlyOwner {
}
/**
* @dev ContractStatus.ACCEPT_DEPOSIT functions
*/
receive() external payable {
}
function deposit() internal {
}
function refund(address payable _address) public onlyOwner {
}
function refundMultiple(address payable[] memory _addresses) public onlyOwner {
}
function releaseFirstBatchTokens(uint256 _count) public onlyOwner {
}
/**
* @dev ContractStatus.FIRST_BATCH_TOKEN_RELEASED functions
*/
function releaseSecondBatchTokens(uint256 _count) public onlyOwner {
require(status == ContractStatus.FIRST_BATCH_TOKEN_RELEASED);
require(<FILL_ME>)
for (uint256 i = 0; i < _count; i++) {
tokenContract.transfer(secondBatchAddresses[sIndex], stakeReleaseSecondBatchAmount);
emit TokenReleased(block.timestamp, secondBatchAddresses[sIndex], stakeReleaseSecondBatchAmount);
sIndex = sIndex.add(1);
if (sIndex == secondBatchAddresses.length) {
status = ContractStatus.SECOND_BATCH_TOKEN_RELEASED;
break;
}
}
}
/**
* @dev ContractStatus.SECOND_BATCH_TOKEN_RELEASED functions
*/
function withdrawTokens() public onlyOwner {
}
}
| block.timestamp>(stakeStart+stakeDuration) | 50,102 | block.timestamp>(stakeStart+stakeDuration) |
null | pragma solidity ^0.4.8;
/**
* @title KittyItemToken interface
*/
contract KittyItemToken {
function transfer(address, uint256) public pure returns (bool) {}
function transferAndApply(address, uint256) public pure returns (bool) {}
function balanceOf(address) public pure returns (uint256) {}
}
/**
* @title KittyItemMarket is a market contract for buying KittyItemTokens and
*/
contract KittyItemMarket {
struct Item {
address itemContract;
uint256 cost; // in wei
address artist;
uint128 split; // the percentage split the artist gets vs. KittyItemMarket.owner. A split of "6666" would mean the artist gets 66.66% of the funds
uint256 totalFunds;
}
address public owner;
mapping (string => Item) items;
bool public paused = false;
// events
event Buy(string itemName);
/**
* KittyItemMarket constructor
*/
function KittyItemMarket() public {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public {
}
/**
* @dev Pauses the market, not allowing any buyItem and buyItemAndApply
* @param _paused the paused state of the contract
*/
function setPaused(bool _paused) public {
}
/**
* @dev You cannot return structs, return each attribute in Item struct
* @param _itemName the KittyItemToken name in items
*/
function getItem(string _itemName) view public returns (address, uint256, address, uint256, uint256) {
}
/**
* @dev Add a KittyItemToken contract to be sold in the market
* @param _itemName Name for items mapping
* @param _itemContract contract address of KittyItemToken we're adding
* @param _cost cost of item in wei
* @param _artist artist addess to send funds to
* @param _split artist split. "6666" would be a 66.66% split.
*/
function addItem(string _itemName, address _itemContract, uint256 _cost, address _artist, uint128 _split) public {
require(msg.sender == owner);
require(<FILL_ME>) // item can't already exist
items[_itemName] = Item(_itemContract, _cost, _artist, _split, 0);
}
/**
* @dev Modify an item that is in the market
* @param _itemName Name of item to modify
* @param _itemContract modify KittyItemtoken contract address for item
* @param _cost modify cost of item
* @param _artist modify artist addess to send funds to
* @param _split modify artist split
*/
function modifyItem(string _itemName, address _itemContract, uint256 _cost, address _artist, uint128 _split) public {
}
/**
* @dev Buy item from the market
* @param _itemName Name of item to buy
* @param _amount amount of item to buy
*/
function buyItem(string _itemName, uint256 _amount) public payable {
}
/**
* @dev Buy item from the market and apply to kittyId
* @param _itemName Name of item to buy
* @param _kittyId KittyId to apply the item
*/
function buyItemAndApply(string _itemName, uint256 _kittyId) public payable {
}
/**
* @dev split funds from Item sales between contract owner and artist
* @param _itemName Item to split funds for
*/
function splitFunds(string _itemName) public {
}
/**
* @dev return all _itemName tokens help by contract to contract owner
* @param _itemName Item to return tokens to contract owner
* @return whether the transfer was successful or not
*/
function returnTokensToOwner(string _itemName) public returns (bool) {
}
}
| items[_itemName].itemContract==0x0 | 50,171 | items[_itemName].itemContract==0x0 |
null | pragma solidity ^0.4.8;
/**
* @title KittyItemToken interface
*/
contract KittyItemToken {
function transfer(address, uint256) public pure returns (bool) {}
function transferAndApply(address, uint256) public pure returns (bool) {}
function balanceOf(address) public pure returns (uint256) {}
}
/**
* @title KittyItemMarket is a market contract for buying KittyItemTokens and
*/
contract KittyItemMarket {
struct Item {
address itemContract;
uint256 cost; // in wei
address artist;
uint128 split; // the percentage split the artist gets vs. KittyItemMarket.owner. A split of "6666" would mean the artist gets 66.66% of the funds
uint256 totalFunds;
}
address public owner;
mapping (string => Item) items;
bool public paused = false;
// events
event Buy(string itemName);
/**
* KittyItemMarket constructor
*/
function KittyItemMarket() public {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public {
}
/**
* @dev Pauses the market, not allowing any buyItem and buyItemAndApply
* @param _paused the paused state of the contract
*/
function setPaused(bool _paused) public {
}
/**
* @dev You cannot return structs, return each attribute in Item struct
* @param _itemName the KittyItemToken name in items
*/
function getItem(string _itemName) view public returns (address, uint256, address, uint256, uint256) {
}
/**
* @dev Add a KittyItemToken contract to be sold in the market
* @param _itemName Name for items mapping
* @param _itemContract contract address of KittyItemToken we're adding
* @param _cost cost of item in wei
* @param _artist artist addess to send funds to
* @param _split artist split. "6666" would be a 66.66% split.
*/
function addItem(string _itemName, address _itemContract, uint256 _cost, address _artist, uint128 _split) public {
}
/**
* @dev Modify an item that is in the market
* @param _itemName Name of item to modify
* @param _itemContract modify KittyItemtoken contract address for item
* @param _cost modify cost of item
* @param _artist modify artist addess to send funds to
* @param _split modify artist split
*/
function modifyItem(string _itemName, address _itemContract, uint256 _cost, address _artist, uint128 _split) public {
require(msg.sender == owner);
require(<FILL_ME>) // item should already exist
Item storage item = items[_itemName];
item.itemContract = _itemContract;
item.cost = _cost;
item.artist = _artist;
item.split = _split;
}
/**
* @dev Buy item from the market
* @param _itemName Name of item to buy
* @param _amount amount of item to buy
*/
function buyItem(string _itemName, uint256 _amount) public payable {
}
/**
* @dev Buy item from the market and apply to kittyId
* @param _itemName Name of item to buy
* @param _kittyId KittyId to apply the item
*/
function buyItemAndApply(string _itemName, uint256 _kittyId) public payable {
}
/**
* @dev split funds from Item sales between contract owner and artist
* @param _itemName Item to split funds for
*/
function splitFunds(string _itemName) public {
}
/**
* @dev return all _itemName tokens help by contract to contract owner
* @param _itemName Item to return tokens to contract owner
* @return whether the transfer was successful or not
*/
function returnTokensToOwner(string _itemName) public returns (bool) {
}
}
| items[_itemName].itemContract!=0x0 | 50,171 | items[_itemName].itemContract!=0x0 |
"allowance" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ISouly.sol";
import "./IReverseRegistrar.sol";
contract SoulyCuratedMinting is Ownable {
using ECDSA for bytes32;
event MintingAllowanceUpdated(address indexed curator, uint256 mintingAllowance);
ISouly private _tokenContract;
mapping (address => uint256) private _mintingAllowance;
mapping (bytes32 => bool) private _minted;
struct EIP712DomainType {
string name;
string version;
uint256 chainId;
address verifyingContract;
}
struct MintType {
address creator;
bytes32 assetHash;
address curator;
address destination;
uint256 validUntil;
}
bytes32 private constant EIP712DomainTypeHash = keccak256(bytes("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"));
bytes32 private constant MintTypeHash = keccak256(bytes("Mint(address creator,bytes32 assetHash,address curator,address destination,uint256 validUntil)"));
bytes32 private _domainSeparator;
constructor(ISouly tokenContract) Ownable() {
}
function setDomainSeparator(string memory name, string memory version) public onlyOwner {
}
function updateMintingAllowance(address curator, uint256 mintingAllowance_) public onlyOwner {
}
function updateMintingAllowances(address[] memory curators, uint256[] memory mintingAllowances) public {
}
function hash(EIP712DomainType memory eip712Domain) internal pure returns (bytes32) {
}
function hash(MintType memory mint_) internal pure returns (bytes32) {
}
function mint(bytes32 assetHash, address curator, bytes memory signature, address destination, uint256 validUntil) external {
require(block.timestamp <= validUntil, "validUntil");
require(<FILL_ME>)
_mintingAllowance[curator] = _mintingAllowance[curator] - 1;
require(!_minted[assetHash], "minted");
_minted[assetHash] = true;
bytes32 msgHash = keccak256(abi.encodePacked(
"\x19\x01",
_domainSeparator,
hash(
MintType(msg.sender, assetHash, curator, destination, validUntil)
)
));
require(msgHash.recover(signature) == curator, "signature");
_tokenContract.mint(payable(msg.sender), destination, assetHash);
}
function mintingAllowance(address curator) public view returns(uint256) {
}
function setReversRegistry(IReverseRegistrar registrar, string memory name) external onlyOwner returns (bytes32) {
}
}
| _mintingAllowance[curator]>0,"allowance" | 50,172 | _mintingAllowance[curator]>0 |
"minted" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ISouly.sol";
import "./IReverseRegistrar.sol";
contract SoulyCuratedMinting is Ownable {
using ECDSA for bytes32;
event MintingAllowanceUpdated(address indexed curator, uint256 mintingAllowance);
ISouly private _tokenContract;
mapping (address => uint256) private _mintingAllowance;
mapping (bytes32 => bool) private _minted;
struct EIP712DomainType {
string name;
string version;
uint256 chainId;
address verifyingContract;
}
struct MintType {
address creator;
bytes32 assetHash;
address curator;
address destination;
uint256 validUntil;
}
bytes32 private constant EIP712DomainTypeHash = keccak256(bytes("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"));
bytes32 private constant MintTypeHash = keccak256(bytes("Mint(address creator,bytes32 assetHash,address curator,address destination,uint256 validUntil)"));
bytes32 private _domainSeparator;
constructor(ISouly tokenContract) Ownable() {
}
function setDomainSeparator(string memory name, string memory version) public onlyOwner {
}
function updateMintingAllowance(address curator, uint256 mintingAllowance_) public onlyOwner {
}
function updateMintingAllowances(address[] memory curators, uint256[] memory mintingAllowances) public {
}
function hash(EIP712DomainType memory eip712Domain) internal pure returns (bytes32) {
}
function hash(MintType memory mint_) internal pure returns (bytes32) {
}
function mint(bytes32 assetHash, address curator, bytes memory signature, address destination, uint256 validUntil) external {
require(block.timestamp <= validUntil, "validUntil");
require(_mintingAllowance[curator] > 0, "allowance");
_mintingAllowance[curator] = _mintingAllowance[curator] - 1;
require(<FILL_ME>)
_minted[assetHash] = true;
bytes32 msgHash = keccak256(abi.encodePacked(
"\x19\x01",
_domainSeparator,
hash(
MintType(msg.sender, assetHash, curator, destination, validUntil)
)
));
require(msgHash.recover(signature) == curator, "signature");
_tokenContract.mint(payable(msg.sender), destination, assetHash);
}
function mintingAllowance(address curator) public view returns(uint256) {
}
function setReversRegistry(IReverseRegistrar registrar, string memory name) external onlyOwner returns (bytes32) {
}
}
| !_minted[assetHash],"minted" | 50,172 | !_minted[assetHash] |
"signature" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ISouly.sol";
import "./IReverseRegistrar.sol";
contract SoulyCuratedMinting is Ownable {
using ECDSA for bytes32;
event MintingAllowanceUpdated(address indexed curator, uint256 mintingAllowance);
ISouly private _tokenContract;
mapping (address => uint256) private _mintingAllowance;
mapping (bytes32 => bool) private _minted;
struct EIP712DomainType {
string name;
string version;
uint256 chainId;
address verifyingContract;
}
struct MintType {
address creator;
bytes32 assetHash;
address curator;
address destination;
uint256 validUntil;
}
bytes32 private constant EIP712DomainTypeHash = keccak256(bytes("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"));
bytes32 private constant MintTypeHash = keccak256(bytes("Mint(address creator,bytes32 assetHash,address curator,address destination,uint256 validUntil)"));
bytes32 private _domainSeparator;
constructor(ISouly tokenContract) Ownable() {
}
function setDomainSeparator(string memory name, string memory version) public onlyOwner {
}
function updateMintingAllowance(address curator, uint256 mintingAllowance_) public onlyOwner {
}
function updateMintingAllowances(address[] memory curators, uint256[] memory mintingAllowances) public {
}
function hash(EIP712DomainType memory eip712Domain) internal pure returns (bytes32) {
}
function hash(MintType memory mint_) internal pure returns (bytes32) {
}
function mint(bytes32 assetHash, address curator, bytes memory signature, address destination, uint256 validUntil) external {
require(block.timestamp <= validUntil, "validUntil");
require(_mintingAllowance[curator] > 0, "allowance");
_mintingAllowance[curator] = _mintingAllowance[curator] - 1;
require(!_minted[assetHash], "minted");
_minted[assetHash] = true;
bytes32 msgHash = keccak256(abi.encodePacked(
"\x19\x01",
_domainSeparator,
hash(
MintType(msg.sender, assetHash, curator, destination, validUntil)
)
));
require(<FILL_ME>)
_tokenContract.mint(payable(msg.sender), destination, assetHash);
}
function mintingAllowance(address curator) public view returns(uint256) {
}
function setReversRegistry(IReverseRegistrar registrar, string memory name) external onlyOwner returns (bytes32) {
}
}
| msgHash.recover(signature)==curator,"signature" | 50,172 | msgHash.recover(signature)==curator |
null | pragma solidity 0.5.17;
contract Ownable {
// A list of owners which will be saved as a list here,
// and the values are the ownerβs names.
string [] ownerName;
address newOwner; // temp for confirm;
mapping (address=>bool) owners;
mapping (address=>uint256) ownerToProfile;
address owner;
// all events will be saved as log files
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event AddOwner(address newOwner,string name);
event RemoveOwner(address owner);
/**
* @dev Ownable constructor , initializes senderβs account and
* set as owner according to default value according to contract
*
*/
// this function will be executed during initial load and will keep the smart contract creator (msg.sender) as Owner
// and also saved in Owners. This smart contract creator/owner is
// Mr. Samret Wajanasathian CTO of Shuttle One Pte Ltd (https://www.shuttle.one)
constructor() public {
}
// // function to check whether the given address is either Wallet address or Contract Address
// function isContract(address _addr) internal view returns(bool){
// uint256 length;
// assembly{
// length := extcodesize(_addr)
// }
// if(length > 0){
// return true;
// }
// else {
// return false;
// }
// }
// function to check if the executor is the owner? This to ensure that only the person
// who has right to execute/call the function has the permission to do so.
modifier onlyOwner(){
}
// This function has only one Owner. The ownership can be transferrable and only
// the current Owner will only be able to execute this function.
// Onwer can be Contract address
function transferOwnership(address _newOwner, string memory newOwnerName) public onlyOwner{
}
// Function to confirm New Owner can execute
function newOwnerConfirm() public returns(bool){
}
// Function to check if the person is listed in a group of Owners and determine
// if the person has the any permissions in this smart contract such as Exec permission.
modifier onlyOwners(){
require(<FILL_ME>)
_;
}
// Function to add Owner into a list. The person who wanted to add a new owner into this list but be an existing
// member of the Owners list. The log will be saved and can be traced / monitor whoβs called this function.
function addOwner(address _newOwner,string memory newOwnerName) public onlyOwners{
}
// Function to remove the Owner from the Owners list. The person who wanted to remove any owner from Owners
// List must be an existing member of the Owners List. The owner cannot evict himself from the Owners
// List by his own, this is to ensure that there is at least one Owner of this ShuttleOne Smart Contract.
// This ShuttleOne Smart Contract will become useless if there is no owner at all.
function removeOwner(address _owner) public onlyOwners{
}
// this function is to check of the given address is allowed to call/execute the particular function
// return true if the given address has right to execute the function.
// for transparency purpose, anyone can use this to trace/monitor the behaviors of this ShuttleOne smart contract.
function isOwner(address _owner) public view returns(bool){
}
// Function to check whoβs executed the functions of smart contract. This returns the name of
// Owner and this give transparency of whose actions on this ShuttleOne Smart Contract.
function getOwnerName(address ownerAddr) public view returns(string memory){
}
}
contract SZO {
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
function totalSupply() public view returns (uint256);
function balanceOf(address tokenOwner) public view returns (uint256 balance);
function allowance(address tokenOwner, address spender) public view returns (uint256 remaining);
function transfer(address to, uint256 tokens) public returns (bool success);
function approve(address spender, uint256 tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
function createKYCData(bytes32 _KycData1, bytes32 _kycData2,address _wallet) public returns(uint256);
}
contract WSZO3ndShare is Ownable {
SZO wszoToken;
constructor() public {
}
function transferAllToShareHolder() public onlyOwners returns(bool){
}
function transferToken(address _to,uint256 _amount,address _token) public onlyOwners returns(bool){
}
function transfer(address _to,uint256 _amount) public onlyOwners returns(bool){
}
}
| owners[msg.sender]==true | 50,176 | owners[msg.sender]==true |
"SZO/ERROR-already-owner" | pragma solidity 0.5.17;
contract Ownable {
// A list of owners which will be saved as a list here,
// and the values are the ownerβs names.
string [] ownerName;
address newOwner; // temp for confirm;
mapping (address=>bool) owners;
mapping (address=>uint256) ownerToProfile;
address owner;
// all events will be saved as log files
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event AddOwner(address newOwner,string name);
event RemoveOwner(address owner);
/**
* @dev Ownable constructor , initializes senderβs account and
* set as owner according to default value according to contract
*
*/
// this function will be executed during initial load and will keep the smart contract creator (msg.sender) as Owner
// and also saved in Owners. This smart contract creator/owner is
// Mr. Samret Wajanasathian CTO of Shuttle One Pte Ltd (https://www.shuttle.one)
constructor() public {
}
// // function to check whether the given address is either Wallet address or Contract Address
// function isContract(address _addr) internal view returns(bool){
// uint256 length;
// assembly{
// length := extcodesize(_addr)
// }
// if(length > 0){
// return true;
// }
// else {
// return false;
// }
// }
// function to check if the executor is the owner? This to ensure that only the person
// who has right to execute/call the function has the permission to do so.
modifier onlyOwner(){
}
// This function has only one Owner. The ownership can be transferrable and only
// the current Owner will only be able to execute this function.
// Onwer can be Contract address
function transferOwnership(address _newOwner, string memory newOwnerName) public onlyOwner{
}
// Function to confirm New Owner can execute
function newOwnerConfirm() public returns(bool){
}
// Function to check if the person is listed in a group of Owners and determine
// if the person has the any permissions in this smart contract such as Exec permission.
modifier onlyOwners(){
}
// Function to add Owner into a list. The person who wanted to add a new owner into this list but be an existing
// member of the Owners list. The log will be saved and can be traced / monitor whoβs called this function.
function addOwner(address _newOwner,string memory newOwnerName) public onlyOwners{
require(<FILL_ME>)
require(newOwner != msg.sender,"SZO/ERROR-same-owner-add");
if(ownerToProfile[_newOwner] == 0)
{
uint256 idx = ownerName.push(newOwnerName);
ownerToProfile[_newOwner] = idx;
}
owners[_newOwner] = true;
emit AddOwner(_newOwner,newOwnerName);
}
// Function to remove the Owner from the Owners list. The person who wanted to remove any owner from Owners
// List must be an existing member of the Owners List. The owner cannot evict himself from the Owners
// List by his own, this is to ensure that there is at least one Owner of this ShuttleOne Smart Contract.
// This ShuttleOne Smart Contract will become useless if there is no owner at all.
function removeOwner(address _owner) public onlyOwners{
}
// this function is to check of the given address is allowed to call/execute the particular function
// return true if the given address has right to execute the function.
// for transparency purpose, anyone can use this to trace/monitor the behaviors of this ShuttleOne smart contract.
function isOwner(address _owner) public view returns(bool){
}
// Function to check whoβs executed the functions of smart contract. This returns the name of
// Owner and this give transparency of whose actions on this ShuttleOne Smart Contract.
function getOwnerName(address ownerAddr) public view returns(string memory){
}
}
contract SZO {
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
function totalSupply() public view returns (uint256);
function balanceOf(address tokenOwner) public view returns (uint256 balance);
function allowance(address tokenOwner, address spender) public view returns (uint256 remaining);
function transfer(address to, uint256 tokens) public returns (bool success);
function approve(address spender, uint256 tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
function createKYCData(bytes32 _KycData1, bytes32 _kycData2,address _wallet) public returns(uint256);
}
contract WSZO3ndShare is Ownable {
SZO wszoToken;
constructor() public {
}
function transferAllToShareHolder() public onlyOwners returns(bool){
}
function transferToken(address _to,uint256 _amount,address _token) public onlyOwners returns(bool){
}
function transfer(address _to,uint256 _amount) public onlyOwners returns(bool){
}
}
| owners[_newOwner]==false,"SZO/ERROR-already-owner" | 50,176 | owners[_newOwner]==false |
"SZO/ERROR-NOT-OWNER-ADDRESS" | pragma solidity 0.5.17;
contract Ownable {
// A list of owners which will be saved as a list here,
// and the values are the ownerβs names.
string [] ownerName;
address newOwner; // temp for confirm;
mapping (address=>bool) owners;
mapping (address=>uint256) ownerToProfile;
address owner;
// all events will be saved as log files
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event AddOwner(address newOwner,string name);
event RemoveOwner(address owner);
/**
* @dev Ownable constructor , initializes senderβs account and
* set as owner according to default value according to contract
*
*/
// this function will be executed during initial load and will keep the smart contract creator (msg.sender) as Owner
// and also saved in Owners. This smart contract creator/owner is
// Mr. Samret Wajanasathian CTO of Shuttle One Pte Ltd (https://www.shuttle.one)
constructor() public {
}
// // function to check whether the given address is either Wallet address or Contract Address
// function isContract(address _addr) internal view returns(bool){
// uint256 length;
// assembly{
// length := extcodesize(_addr)
// }
// if(length > 0){
// return true;
// }
// else {
// return false;
// }
// }
// function to check if the executor is the owner? This to ensure that only the person
// who has right to execute/call the function has the permission to do so.
modifier onlyOwner(){
}
// This function has only one Owner. The ownership can be transferrable and only
// the current Owner will only be able to execute this function.
// Onwer can be Contract address
function transferOwnership(address _newOwner, string memory newOwnerName) public onlyOwner{
}
// Function to confirm New Owner can execute
function newOwnerConfirm() public returns(bool){
}
// Function to check if the person is listed in a group of Owners and determine
// if the person has the any permissions in this smart contract such as Exec permission.
modifier onlyOwners(){
}
// Function to add Owner into a list. The person who wanted to add a new owner into this list but be an existing
// member of the Owners list. The log will be saved and can be traced / monitor whoβs called this function.
function addOwner(address _newOwner,string memory newOwnerName) public onlyOwners{
}
// Function to remove the Owner from the Owners list. The person who wanted to remove any owner from Owners
// List must be an existing member of the Owners List. The owner cannot evict himself from the Owners
// List by his own, this is to ensure that there is at least one Owner of this ShuttleOne Smart Contract.
// This ShuttleOne Smart Contract will become useless if there is no owner at all.
function removeOwner(address _owner) public onlyOwners{
}
// this function is to check of the given address is allowed to call/execute the particular function
// return true if the given address has right to execute the function.
// for transparency purpose, anyone can use this to trace/monitor the behaviors of this ShuttleOne smart contract.
function isOwner(address _owner) public view returns(bool){
}
// Function to check whoβs executed the functions of smart contract. This returns the name of
// Owner and this give transparency of whose actions on this ShuttleOne Smart Contract.
function getOwnerName(address ownerAddr) public view returns(string memory){
require(<FILL_ME>)
return ownerName[ownerToProfile[ownerAddr] - 1];
}
}
contract SZO {
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
function totalSupply() public view returns (uint256);
function balanceOf(address tokenOwner) public view returns (uint256 balance);
function allowance(address tokenOwner, address spender) public view returns (uint256 remaining);
function transfer(address to, uint256 tokens) public returns (bool success);
function approve(address spender, uint256 tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
function createKYCData(bytes32 _KycData1, bytes32 _kycData2,address _wallet) public returns(uint256);
}
contract WSZO3ndShare is Ownable {
SZO wszoToken;
constructor() public {
}
function transferAllToShareHolder() public onlyOwners returns(bool){
}
function transferToken(address _to,uint256 _amount,address _token) public onlyOwners returns(bool){
}
function transfer(address _to,uint256 _amount) public onlyOwners returns(bool){
}
}
| ownerToProfile[ownerAddr]>0,"SZO/ERROR-NOT-OWNER-ADDRESS" | 50,176 | ownerToProfile[ownerAddr]>0 |
"OrbsNFT: Has pending request" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./interfaces/IOrbsNFT.sol";
contract OrbsNFT is ERC721Enumerable, Ownable, VRFConsumerBase, IOrbsNFT {
using SafeERC20 for IERC20;
event MintRequested(
address indexed requester,
bytes32 requestId,
uint256 amount
);
event MinterChanged(address indexed minter);
event MinterRemoved(address indexed minter);
event BaseUriUpgradeableFreezed();
event BaseUriUpdated(string baseUri);
event VrfConfigUpdated(bytes32 vrfKeyHash, uint256 vrfFee);
struct MintRequest {
address beneficiary;
uint256 amount;
}
uint256 public constant MAX_SUPPLY = 3333;
bytes32 public vrfKeyHash;
uint256 public vrfFee;
mapping(bytes32 => MintRequest) public mintRequests;
uint256 public pending;
address public minter;
bool public canUpgradeBaseURI;
string private _baseURI_;
mapping(uint256 => uint256) private _randomForwarder;
constructor(
address _vrfCoordinator,
address _linkToken,
bytes32 _vrfKeyhash,
uint256 _vrfFee,
bool _canUpgradeBaseURI
) VRFConsumerBase(_vrfCoordinator, _linkToken) ERC721("The Orbs", "ORBS") {
}
function freezeBaseUriUpgradeable() external onlyOwner {
}
function setBaseURI(string memory newBaseUri) external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function requestMint(address beneficiary, uint256 amount)
external
override
returns (bytes32)
{
require(minter == msg.sender, "OrbsNFT: caller is not the minter");
require(amount > 0, "OrbsNFT: amount is zero");
bytes32 requestId = requestRandomness(vrfKeyHash, vrfFee);
require(<FILL_ME>)
pending += amount;
require(
MAX_SUPPLY - totalSupply() >= pending,
"OrbsNFT: Not enough NFTs"
);
mintRequests[requestId] = MintRequest(beneficiary, amount);
emit MintRequested(beneficiary, requestId, amount);
return requestId;
}
function fulfillRandomness(bytes32 requestId, uint256 randomNumber)
internal
override
{
}
function setMinter(address _minter) external onlyOwner {
}
function setVrfConfig(bytes32 _vrfKeyHash, uint256 _vrfFee)
external
onlyOwner
{
}
function recoverERC20(IERC20 _token, uint256 _amount) external onlyOwner {
}
}
| mintRequests[requestId].beneficiary==address(0),"OrbsNFT: Has pending request" | 50,231 | mintRequests[requestId].beneficiary==address(0) |
"OrbsNFT: Not enough NFTs" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./interfaces/IOrbsNFT.sol";
contract OrbsNFT is ERC721Enumerable, Ownable, VRFConsumerBase, IOrbsNFT {
using SafeERC20 for IERC20;
event MintRequested(
address indexed requester,
bytes32 requestId,
uint256 amount
);
event MinterChanged(address indexed minter);
event MinterRemoved(address indexed minter);
event BaseUriUpgradeableFreezed();
event BaseUriUpdated(string baseUri);
event VrfConfigUpdated(bytes32 vrfKeyHash, uint256 vrfFee);
struct MintRequest {
address beneficiary;
uint256 amount;
}
uint256 public constant MAX_SUPPLY = 3333;
bytes32 public vrfKeyHash;
uint256 public vrfFee;
mapping(bytes32 => MintRequest) public mintRequests;
uint256 public pending;
address public minter;
bool public canUpgradeBaseURI;
string private _baseURI_;
mapping(uint256 => uint256) private _randomForwarder;
constructor(
address _vrfCoordinator,
address _linkToken,
bytes32 _vrfKeyhash,
uint256 _vrfFee,
bool _canUpgradeBaseURI
) VRFConsumerBase(_vrfCoordinator, _linkToken) ERC721("The Orbs", "ORBS") {
}
function freezeBaseUriUpgradeable() external onlyOwner {
}
function setBaseURI(string memory newBaseUri) external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function requestMint(address beneficiary, uint256 amount)
external
override
returns (bytes32)
{
require(minter == msg.sender, "OrbsNFT: caller is not the minter");
require(amount > 0, "OrbsNFT: amount is zero");
bytes32 requestId = requestRandomness(vrfKeyHash, vrfFee);
require(
mintRequests[requestId].beneficiary == address(0),
"OrbsNFT: Has pending request"
);
pending += amount;
require(<FILL_ME>)
mintRequests[requestId] = MintRequest(beneficiary, amount);
emit MintRequested(beneficiary, requestId, amount);
return requestId;
}
function fulfillRandomness(bytes32 requestId, uint256 randomNumber)
internal
override
{
}
function setMinter(address _minter) external onlyOwner {
}
function setVrfConfig(bytes32 _vrfKeyHash, uint256 _vrfFee)
external
onlyOwner
{
}
function recoverERC20(IERC20 _token, uint256 _amount) external onlyOwner {
}
}
| MAX_SUPPLY-totalSupply()>=pending,"OrbsNFT: Not enough NFTs" | 50,231 | MAX_SUPPLY-totalSupply()>=pending |
null | pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping (address => uint256) public balances;
bool public endICO = false;
uint256 public dateEndIco;
event TransferStart();
modifier canTransfer() {
require(endICO);
require(<FILL_ME>)
_;
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public canTransfer returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
function finishICO() internal returns (bool) {
}
}
/** @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract TokenRecipient {
function receiveApproval(address _from, uint _value, address _tknAddress, bytes _extraData);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public canTransfer returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* 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
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public canTransfer returns (bool) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public
canTransfer returns (bool success) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public canTransfer constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval(address _spender, uint _addedValue) public canTransfer returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public canTransfer returns (bool success) {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() public onlyOwner returns (bool) {
}
}
/**
* @title SampleCrowdsaleToken
* @dev Very simple ERC20 Token that can be minted.
* It is meant to be used in a crowdsale contract.
*/
contract NOUSToken is MintableToken {
string public constant name = "NOUSTOKEN";
string public constant symbol = "NST";
uint32 public constant decimals = 18;
}
| dateEndIco+(3weeks)>now | 50,246 | dateEndIco+(3weeks)>now |
null | pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
contract Lottery {
// Public variables of the token
address public owner;
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
event Tickets(address indexed from, uint tickets);
event SelectWinner50(address indexed winner50);
event SelectWinner20(address indexed winner20);
event SelectWinner30(address indexed winner30);
event FullPool(uint amount);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function Lottery(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
function transferToWinner(address _to, uint256 _value) internal {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
}
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
address[] pust;
address[] internal pool;
uint internal ticketPrice;
uint internal seed;
uint internal stopFlag;
uint internal total;
uint internal ticketMax;
function setTicketMax (uint amount) public onlyOwner {
}
function setTicketPrice (uint amount) public onlyOwner {
}
function getPoolSize() public constant returns (uint amount) {
}
function takeAndPush(uint ticketsAmount) internal {
}
function random50(uint upper) internal returns (uint) {
}
function random30(uint upper) internal returns (uint) {
}
function random20(uint upper) internal returns (uint) {
}
function selectWinner50() public onlyOwner {
}
function selectWinner20() public onlyOwner {
}
function selectWinner30() public onlyOwner {
}
function buyTickets(uint ticketsAmount) public {
require(<FILL_ME>)
require(balanceOf[this] + (ticketPrice * ticketsAmount) >= balanceOf[this]);
require(stopFlag != 1);
require((ticketsAmount + pool.length) <= ticketMax);
takeAndPush(ticketsAmount);
if((pool.length + ticketsAmount) >= ticketMax) {
FullPool(ticketMax);
}
Tickets(msg.sender, ticketsAmount);
}
function stopFlagOn() public onlyOwner {
}
function stopFlagOff() public onlyOwner {
}
}
| balanceOf[msg.sender]>=ticketPrice*ticketsAmount | 50,303 | balanceOf[msg.sender]>=ticketPrice*ticketsAmount |
null | pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
contract Lottery {
// Public variables of the token
address public owner;
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
event Tickets(address indexed from, uint tickets);
event SelectWinner50(address indexed winner50);
event SelectWinner20(address indexed winner20);
event SelectWinner30(address indexed winner30);
event FullPool(uint amount);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function Lottery(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
function transferToWinner(address _to, uint256 _value) internal {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
}
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
address[] pust;
address[] internal pool;
uint internal ticketPrice;
uint internal seed;
uint internal stopFlag;
uint internal total;
uint internal ticketMax;
function setTicketMax (uint amount) public onlyOwner {
}
function setTicketPrice (uint amount) public onlyOwner {
}
function getPoolSize() public constant returns (uint amount) {
}
function takeAndPush(uint ticketsAmount) internal {
}
function random50(uint upper) internal returns (uint) {
}
function random30(uint upper) internal returns (uint) {
}
function random20(uint upper) internal returns (uint) {
}
function selectWinner50() public onlyOwner {
}
function selectWinner20() public onlyOwner {
}
function selectWinner30() public onlyOwner {
}
function buyTickets(uint ticketsAmount) public {
require(balanceOf[msg.sender] >= ticketPrice * ticketsAmount);
require(<FILL_ME>)
require(stopFlag != 1);
require((ticketsAmount + pool.length) <= ticketMax);
takeAndPush(ticketsAmount);
if((pool.length + ticketsAmount) >= ticketMax) {
FullPool(ticketMax);
}
Tickets(msg.sender, ticketsAmount);
}
function stopFlagOn() public onlyOwner {
}
function stopFlagOff() public onlyOwner {
}
}
| balanceOf[this]+(ticketPrice*ticketsAmount)>=balanceOf[this] | 50,303 | balanceOf[this]+(ticketPrice*ticketsAmount)>=balanceOf[this] |
null | pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
contract Lottery {
// Public variables of the token
address public owner;
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
event Tickets(address indexed from, uint tickets);
event SelectWinner50(address indexed winner50);
event SelectWinner20(address indexed winner20);
event SelectWinner30(address indexed winner30);
event FullPool(uint amount);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function Lottery(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
function transferToWinner(address _to, uint256 _value) internal {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
}
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
address[] pust;
address[] internal pool;
uint internal ticketPrice;
uint internal seed;
uint internal stopFlag;
uint internal total;
uint internal ticketMax;
function setTicketMax (uint amount) public onlyOwner {
}
function setTicketPrice (uint amount) public onlyOwner {
}
function getPoolSize() public constant returns (uint amount) {
}
function takeAndPush(uint ticketsAmount) internal {
}
function random50(uint upper) internal returns (uint) {
}
function random30(uint upper) internal returns (uint) {
}
function random20(uint upper) internal returns (uint) {
}
function selectWinner50() public onlyOwner {
}
function selectWinner20() public onlyOwner {
}
function selectWinner30() public onlyOwner {
}
function buyTickets(uint ticketsAmount) public {
require(balanceOf[msg.sender] >= ticketPrice * ticketsAmount);
require(balanceOf[this] + (ticketPrice * ticketsAmount) >= balanceOf[this]);
require(stopFlag != 1);
require(<FILL_ME>)
takeAndPush(ticketsAmount);
if((pool.length + ticketsAmount) >= ticketMax) {
FullPool(ticketMax);
}
Tickets(msg.sender, ticketsAmount);
}
function stopFlagOn() public onlyOwner {
}
function stopFlagOff() public onlyOwner {
}
}
| (ticketsAmount+pool.length)<=ticketMax | 50,303 | (ticketsAmount+pool.length)<=ticketMax |
'ERC721A: token already minted' | // Creator: Chiru Labs
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support burning tokens to address(0).
*
* Assumes that an owner cannot have more than the 2**128 (max value of uint128) of supply
*/
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 internal currentIndex = 1;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` cannot be larger than the max batch size.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
uint256 startTokenId = currentIndex;
require(to != address(0), 'ERC721A: mint to the zero address');
// We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
require(<FILL_ME>)
require(quantity > 0, 'ERC721A: quantity must be greater 0');
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
AddressData memory addressData = _addressData[to];
_addressData[to] = AddressData(
addressData.balance + uint128(quantity),
addressData.numberMinted + uint128(quantity)
);
_ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));
uint256 updatedIndex = startTokenId;
for (uint256 i = 0; i < quantity; i++) {
emit Transfer(address(0), to, updatedIndex);
require(
_checkOnERC721Received(address(0), to, updatedIndex, _data),
'ERC721A: transfer to non ERC721Receiver implementer'
);
updatedIndex++;
}
currentIndex = updatedIndex;
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} 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 ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
| !_exists(startTokenId),'ERC721A: token already minted' | 50,427 | !_exists(startTokenId) |
"RulerZap: _core is 0" | // SPDX-License-Identifier: No License
pragma solidity ^0.8.0;
import "./ERC20/IERC20.sol";
import "./ERC20/IERC20Permit.sol";
import "./ERC20/SafeERC20.sol";
import "./interfaces/IRERC20.sol";
import "./interfaces/IRulerCore.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IRulerZap.sol";
import "./utils/Ownable.sol";
/**
* @title Ruler Protocol Zap
* @author alan
* Main logic is in _depositAndAddLiquidity & _depositAndSwapToPaired
*/
contract RulerZap is Ownable, IRulerZap {
using SafeERC20 for IERC20;
IRulerCore public override core;
IRouter public override router;
constructor (IRulerCore _core, IRouter _router) {
require(<FILL_ME>)
require(address(_router) != address(0), "RulerZap: _router is 0");
core = _core;
router = _router;
initializeOwner();
}
/**
* @notice Deposit collateral `_col` to receive paired token `_paired` and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - rcTokens are swapped into paired token through router
* - paired token and rrTokens are sent to sender
*/
function depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) external override {
}
function depositWithPermitAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
/**
* @notice Deposit collateral `_col` to receive LP tokens and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - transfers paired token from sender
* - rcTokens and `_paired` tokens are added as liquidity to receive LP tokens
* - LP tokens and rrTokens are sent to sender
*/
function depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function depositWithColPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
function depositWithPairedPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
function depositWithBothPermitsAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit,
Permit calldata _pairedPermit
) external override {
}
function mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function mmDepositWithPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
/// @notice This contract should never hold any funds.
/// Any tokens sent here by accident can be retreived.
function collect(IERC20 _token) external override onlyOwner {
}
function updateCore(IRulerCore _core) external override onlyOwner {
}
function updateRouter(IRouter _router) external override onlyOwner {
}
/// @notice check received amount from swap, tokenOut is always the last in array
function getAmountOut(
uint256 _tokenInAmt,
address[] calldata _path
) external view override returns (uint256) {
}
function _depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) private {
}
function _depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _deposit(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt
) private returns (address rcTokenAddr, uint256 rcTokenReceived, uint256 rcTokenBalBefore) {
}
function _approve(IERC20 _token, address _spender, uint256 _amount) private {
}
function _permit(IERC20Permit _token, Permit calldata permit) private {
}
// transfer remaining amount (since the beginnning of action) back to sender
function _transferRem(IERC20 _token, uint256 _balBefore) private {
}
}
| address(_core)!=address(0),"RulerZap: _core is 0" | 50,587 | address(_core)!=address(0) |
"RulerZap: _router is 0" | // SPDX-License-Identifier: No License
pragma solidity ^0.8.0;
import "./ERC20/IERC20.sol";
import "./ERC20/IERC20Permit.sol";
import "./ERC20/SafeERC20.sol";
import "./interfaces/IRERC20.sol";
import "./interfaces/IRulerCore.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IRulerZap.sol";
import "./utils/Ownable.sol";
/**
* @title Ruler Protocol Zap
* @author alan
* Main logic is in _depositAndAddLiquidity & _depositAndSwapToPaired
*/
contract RulerZap is Ownable, IRulerZap {
using SafeERC20 for IERC20;
IRulerCore public override core;
IRouter public override router;
constructor (IRulerCore _core, IRouter _router) {
require(address(_core) != address(0), "RulerZap: _core is 0");
require(<FILL_ME>)
core = _core;
router = _router;
initializeOwner();
}
/**
* @notice Deposit collateral `_col` to receive paired token `_paired` and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - rcTokens are swapped into paired token through router
* - paired token and rrTokens are sent to sender
*/
function depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) external override {
}
function depositWithPermitAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
/**
* @notice Deposit collateral `_col` to receive LP tokens and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - transfers paired token from sender
* - rcTokens and `_paired` tokens are added as liquidity to receive LP tokens
* - LP tokens and rrTokens are sent to sender
*/
function depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function depositWithColPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
function depositWithPairedPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
function depositWithBothPermitsAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit,
Permit calldata _pairedPermit
) external override {
}
function mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function mmDepositWithPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
/// @notice This contract should never hold any funds.
/// Any tokens sent here by accident can be retreived.
function collect(IERC20 _token) external override onlyOwner {
}
function updateCore(IRulerCore _core) external override onlyOwner {
}
function updateRouter(IRouter _router) external override onlyOwner {
}
/// @notice check received amount from swap, tokenOut is always the last in array
function getAmountOut(
uint256 _tokenInAmt,
address[] calldata _path
) external view override returns (uint256) {
}
function _depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) private {
}
function _depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _deposit(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt
) private returns (address rcTokenAddr, uint256 rcTokenReceived, uint256 rcTokenBalBefore) {
}
function _approve(IERC20 _token, address _spender, uint256 _amount) private {
}
function _permit(IERC20Permit _token, Permit calldata permit) private {
}
// transfer remaining amount (since the beginnning of action) back to sender
function _transferRem(IERC20 _token, uint256 _balBefore) private {
}
}
| address(_router)!=address(0),"RulerZap: _router is 0" | 50,587 | address(_router)!=address(0) |
"RulerZap: output != _paired" | // SPDX-License-Identifier: No License
pragma solidity ^0.8.0;
import "./ERC20/IERC20.sol";
import "./ERC20/IERC20Permit.sol";
import "./ERC20/SafeERC20.sol";
import "./interfaces/IRERC20.sol";
import "./interfaces/IRulerCore.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IRulerZap.sol";
import "./utils/Ownable.sol";
/**
* @title Ruler Protocol Zap
* @author alan
* Main logic is in _depositAndAddLiquidity & _depositAndSwapToPaired
*/
contract RulerZap is Ownable, IRulerZap {
using SafeERC20 for IERC20;
IRulerCore public override core;
IRouter public override router;
constructor (IRulerCore _core, IRouter _router) {
}
/**
* @notice Deposit collateral `_col` to receive paired token `_paired` and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - rcTokens are swapped into paired token through router
* - paired token and rrTokens are sent to sender
*/
function depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) external override {
}
function depositWithPermitAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
/**
* @notice Deposit collateral `_col` to receive LP tokens and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - transfers paired token from sender
* - rcTokens and `_paired` tokens are added as liquidity to receive LP tokens
* - LP tokens and rrTokens are sent to sender
*/
function depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function depositWithColPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
function depositWithPairedPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
function depositWithBothPermitsAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit,
Permit calldata _pairedPermit
) external override {
}
function mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function mmDepositWithPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
/// @notice This contract should never hold any funds.
/// Any tokens sent here by accident can be retreived.
function collect(IERC20 _token) external override onlyOwner {
}
function updateCore(IRulerCore _core) external override onlyOwner {
}
function updateRouter(IRouter _router) external override onlyOwner {
}
/// @notice check received amount from swap, tokenOut is always the last in array
function getAmountOut(
uint256 _tokenInAmt,
address[] calldata _path
) external view override returns (uint256) {
}
function _depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) private {
require(_colAmt > 0, "RulerZap: _colAmt is 0");
require(_path.length >= 2, "RulerZap: _path length < 2");
require(<FILL_ME>)
require(_deadline >= block.timestamp, "RulerZap: _deadline in past");
(address _rcToken, uint256 _rcTokensReceived, ) = _deposit(_col, _paired, _expiry, _mintRatio, _colAmt);
require(_path[0] == _rcToken, "RulerZap: input != rcToken");
_approve(IERC20(_rcToken), address(router), _rcTokensReceived);
router.swapExactTokensForTokens(_rcTokensReceived, _minPairedOut, _path, msg.sender, _deadline);
}
function _depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _deposit(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt
) private returns (address rcTokenAddr, uint256 rcTokenReceived, uint256 rcTokenBalBefore) {
}
function _approve(IERC20 _token, address _spender, uint256 _amount) private {
}
function _permit(IERC20Permit _token, Permit calldata permit) private {
}
// transfer remaining amount (since the beginnning of action) back to sender
function _transferRem(IERC20 _token, uint256 _balBefore) private {
}
}
| _path[_path.length-1]==_paired,"RulerZap: output != _paired" | 50,587 | _path[_path.length-1]==_paired |
"RulerZap: input != rcToken" | // SPDX-License-Identifier: No License
pragma solidity ^0.8.0;
import "./ERC20/IERC20.sol";
import "./ERC20/IERC20Permit.sol";
import "./ERC20/SafeERC20.sol";
import "./interfaces/IRERC20.sol";
import "./interfaces/IRulerCore.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IRulerZap.sol";
import "./utils/Ownable.sol";
/**
* @title Ruler Protocol Zap
* @author alan
* Main logic is in _depositAndAddLiquidity & _depositAndSwapToPaired
*/
contract RulerZap is Ownable, IRulerZap {
using SafeERC20 for IERC20;
IRulerCore public override core;
IRouter public override router;
constructor (IRulerCore _core, IRouter _router) {
}
/**
* @notice Deposit collateral `_col` to receive paired token `_paired` and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - rcTokens are swapped into paired token through router
* - paired token and rrTokens are sent to sender
*/
function depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) external override {
}
function depositWithPermitAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
/**
* @notice Deposit collateral `_col` to receive LP tokens and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - transfers paired token from sender
* - rcTokens and `_paired` tokens are added as liquidity to receive LP tokens
* - LP tokens and rrTokens are sent to sender
*/
function depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function depositWithColPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
function depositWithPairedPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
function depositWithBothPermitsAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit,
Permit calldata _pairedPermit
) external override {
}
function mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function mmDepositWithPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
/// @notice This contract should never hold any funds.
/// Any tokens sent here by accident can be retreived.
function collect(IERC20 _token) external override onlyOwner {
}
function updateCore(IRulerCore _core) external override onlyOwner {
}
function updateRouter(IRouter _router) external override onlyOwner {
}
/// @notice check received amount from swap, tokenOut is always the last in array
function getAmountOut(
uint256 _tokenInAmt,
address[] calldata _path
) external view override returns (uint256) {
}
function _depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) private {
require(_colAmt > 0, "RulerZap: _colAmt is 0");
require(_path.length >= 2, "RulerZap: _path length < 2");
require(_path[_path.length - 1] == _paired, "RulerZap: output != _paired");
require(_deadline >= block.timestamp, "RulerZap: _deadline in past");
(address _rcToken, uint256 _rcTokensReceived, ) = _deposit(_col, _paired, _expiry, _mintRatio, _colAmt);
require(<FILL_ME>)
_approve(IERC20(_rcToken), address(router), _rcTokensReceived);
router.swapExactTokensForTokens(_rcTokensReceived, _minPairedOut, _path, msg.sender, _deadline);
}
function _depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _deposit(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt
) private returns (address rcTokenAddr, uint256 rcTokenReceived, uint256 rcTokenBalBefore) {
}
function _approve(IERC20 _token, address _spender, uint256 _amount) private {
}
function _permit(IERC20Permit _token, Permit calldata permit) private {
}
// transfer remaining amount (since the beginnning of action) back to sender
function _transferRem(IERC20 _token, uint256 _balBefore) private {
}
}
| _path[0]==_rcToken,"RulerZap: input != rcToken" | 50,587 | _path[0]==_rcToken |
"RulerZap: paired transfer failed" | // SPDX-License-Identifier: No License
pragma solidity ^0.8.0;
import "./ERC20/IERC20.sol";
import "./ERC20/IERC20Permit.sol";
import "./ERC20/SafeERC20.sol";
import "./interfaces/IRERC20.sol";
import "./interfaces/IRulerCore.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IRulerZap.sol";
import "./utils/Ownable.sol";
/**
* @title Ruler Protocol Zap
* @author alan
* Main logic is in _depositAndAddLiquidity & _depositAndSwapToPaired
*/
contract RulerZap is Ownable, IRulerZap {
using SafeERC20 for IERC20;
IRulerCore public override core;
IRouter public override router;
constructor (IRulerCore _core, IRouter _router) {
}
/**
* @notice Deposit collateral `_col` to receive paired token `_paired` and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - rcTokens are swapped into paired token through router
* - paired token and rrTokens are sent to sender
*/
function depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) external override {
}
function depositWithPermitAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
/**
* @notice Deposit collateral `_col` to receive LP tokens and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - transfers paired token from sender
* - rcTokens and `_paired` tokens are added as liquidity to receive LP tokens
* - LP tokens and rrTokens are sent to sender
*/
function depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function depositWithColPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
function depositWithPairedPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
function depositWithBothPermitsAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit,
Permit calldata _pairedPermit
) external override {
}
function mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function mmDepositWithPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
/// @notice This contract should never hold any funds.
/// Any tokens sent here by accident can be retreived.
function collect(IERC20 _token) external override onlyOwner {
}
function updateCore(IRulerCore _core) external override onlyOwner {
}
function updateRouter(IRouter _router) external override onlyOwner {
}
/// @notice check received amount from swap, tokenOut is always the last in array
function getAmountOut(
uint256 _tokenInAmt,
address[] calldata _path
) external view override returns (uint256) {
}
function _depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) private {
}
function _depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
require(_deadline >= block.timestamp, "RulerZap: _deadline in past");
require(_rcTokenDepositAmt > 0, "RulerZap: 0 rcTokenDepositAmt");
require(_rcTokenDepositAmt >= _rcTokenDepositMin, "RulerZap: rcToken Amt < min");
require(_pairedDepositAmt > 0, "RulerZap: 0 pairedDepositAmt");
require(_pairedDepositAmt >= _pairedDepositMin, "RulerZap: paired Amt < min");
// transfer all paired tokens from sender to this contract
IERC20 paired = IERC20(_paired);
uint256 pairedBalBefore = paired.balanceOf(address(this));
paired.safeTransferFrom(msg.sender, address(this), _rcTokenDepositAmt + _pairedDepositAmt);
require(<FILL_ME>)
// mmDeposit paired to Ruler to receive rcTokens
( , , , IRERC20 rcToken, , , , ) = core.pairs(_col, _paired, _expiry, _mintRatio);
require(address(rcToken) != address(0), "RulerZap: pair not exist");
uint256 rcTokenBalBefore = rcToken.balanceOf(address(this));
_approve(paired, address(core), _rcTokenDepositAmt);
core.mmDeposit(_col, _paired, _expiry, _mintRatio, _rcTokenDepositAmt);
uint256 rcTokenReceived = rcToken.balanceOf(address(this)) - rcTokenBalBefore;
require(_rcTokenDepositAmt <= rcTokenReceived, "RulerZap: rcToken Amt > minted");
// add liquidity for sender
_approve(rcToken, address(router), _rcTokenDepositAmt);
_approve(paired, address(router), _pairedDepositAmt);
router.addLiquidity(
address(rcToken),
_paired,
_rcTokenDepositAmt,
_pairedDepositAmt,
_rcTokenDepositMin,
_pairedDepositMin,
msg.sender,
_deadline
);
// sending leftover tokens (since the beginning of user call) back to sender
_transferRem(rcToken, rcTokenBalBefore);
_transferRem(paired, pairedBalBefore);
}
function _deposit(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt
) private returns (address rcTokenAddr, uint256 rcTokenReceived, uint256 rcTokenBalBefore) {
}
function _approve(IERC20 _token, address _spender, uint256 _amount) private {
}
function _permit(IERC20Permit _token, Permit calldata permit) private {
}
// transfer remaining amount (since the beginnning of action) back to sender
function _transferRem(IERC20 _token, uint256 _balBefore) private {
}
}
| paired.balanceOf(address(this))-pairedBalBefore>_rcTokenDepositAmt+_pairedDepositAmt,"RulerZap: paired transfer failed" | 50,587 | paired.balanceOf(address(this))-pairedBalBefore>_rcTokenDepositAmt+_pairedDepositAmt |
"RulerZap: pair not exist" | // SPDX-License-Identifier: No License
pragma solidity ^0.8.0;
import "./ERC20/IERC20.sol";
import "./ERC20/IERC20Permit.sol";
import "./ERC20/SafeERC20.sol";
import "./interfaces/IRERC20.sol";
import "./interfaces/IRulerCore.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IRulerZap.sol";
import "./utils/Ownable.sol";
/**
* @title Ruler Protocol Zap
* @author alan
* Main logic is in _depositAndAddLiquidity & _depositAndSwapToPaired
*/
contract RulerZap is Ownable, IRulerZap {
using SafeERC20 for IERC20;
IRulerCore public override core;
IRouter public override router;
constructor (IRulerCore _core, IRouter _router) {
}
/**
* @notice Deposit collateral `_col` to receive paired token `_paired` and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - rcTokens are swapped into paired token through router
* - paired token and rrTokens are sent to sender
*/
function depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) external override {
}
function depositWithPermitAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
/**
* @notice Deposit collateral `_col` to receive LP tokens and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - transfers paired token from sender
* - rcTokens and `_paired` tokens are added as liquidity to receive LP tokens
* - LP tokens and rrTokens are sent to sender
*/
function depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function depositWithColPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
function depositWithPairedPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
function depositWithBothPermitsAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit,
Permit calldata _pairedPermit
) external override {
}
function mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function mmDepositWithPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
/// @notice This contract should never hold any funds.
/// Any tokens sent here by accident can be retreived.
function collect(IERC20 _token) external override onlyOwner {
}
function updateCore(IRulerCore _core) external override onlyOwner {
}
function updateRouter(IRouter _router) external override onlyOwner {
}
/// @notice check received amount from swap, tokenOut is always the last in array
function getAmountOut(
uint256 _tokenInAmt,
address[] calldata _path
) external view override returns (uint256) {
}
function _depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) private {
}
function _depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
require(_deadline >= block.timestamp, "RulerZap: _deadline in past");
require(_rcTokenDepositAmt > 0, "RulerZap: 0 rcTokenDepositAmt");
require(_rcTokenDepositAmt >= _rcTokenDepositMin, "RulerZap: rcToken Amt < min");
require(_pairedDepositAmt > 0, "RulerZap: 0 pairedDepositAmt");
require(_pairedDepositAmt >= _pairedDepositMin, "RulerZap: paired Amt < min");
// transfer all paired tokens from sender to this contract
IERC20 paired = IERC20(_paired);
uint256 pairedBalBefore = paired.balanceOf(address(this));
paired.safeTransferFrom(msg.sender, address(this), _rcTokenDepositAmt + _pairedDepositAmt);
require(paired.balanceOf(address(this)) - pairedBalBefore > _rcTokenDepositAmt + _pairedDepositAmt, "RulerZap: paired transfer failed");
// mmDeposit paired to Ruler to receive rcTokens
( , , , IRERC20 rcToken, , , , ) = core.pairs(_col, _paired, _expiry, _mintRatio);
require(<FILL_ME>)
uint256 rcTokenBalBefore = rcToken.balanceOf(address(this));
_approve(paired, address(core), _rcTokenDepositAmt);
core.mmDeposit(_col, _paired, _expiry, _mintRatio, _rcTokenDepositAmt);
uint256 rcTokenReceived = rcToken.balanceOf(address(this)) - rcTokenBalBefore;
require(_rcTokenDepositAmt <= rcTokenReceived, "RulerZap: rcToken Amt > minted");
// add liquidity for sender
_approve(rcToken, address(router), _rcTokenDepositAmt);
_approve(paired, address(router), _pairedDepositAmt);
router.addLiquidity(
address(rcToken),
_paired,
_rcTokenDepositAmt,
_pairedDepositAmt,
_rcTokenDepositMin,
_pairedDepositMin,
msg.sender,
_deadline
);
// sending leftover tokens (since the beginning of user call) back to sender
_transferRem(rcToken, rcTokenBalBefore);
_transferRem(paired, pairedBalBefore);
}
function _deposit(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt
) private returns (address rcTokenAddr, uint256 rcTokenReceived, uint256 rcTokenBalBefore) {
}
function _approve(IERC20 _token, address _spender, uint256 _amount) private {
}
function _permit(IERC20Permit _token, Permit calldata permit) private {
}
// transfer remaining amount (since the beginnning of action) back to sender
function _transferRem(IERC20 _token, uint256 _balBefore) private {
}
}
| address(rcToken)!=address(0),"RulerZap: pair not exist" | 50,587 | address(rcToken)!=address(0) |
"RulerZap: pair not exist" | // SPDX-License-Identifier: No License
pragma solidity ^0.8.0;
import "./ERC20/IERC20.sol";
import "./ERC20/IERC20Permit.sol";
import "./ERC20/SafeERC20.sol";
import "./interfaces/IRERC20.sol";
import "./interfaces/IRulerCore.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IRulerZap.sol";
import "./utils/Ownable.sol";
/**
* @title Ruler Protocol Zap
* @author alan
* Main logic is in _depositAndAddLiquidity & _depositAndSwapToPaired
*/
contract RulerZap is Ownable, IRulerZap {
using SafeERC20 for IERC20;
IRulerCore public override core;
IRouter public override router;
constructor (IRulerCore _core, IRouter _router) {
}
/**
* @notice Deposit collateral `_col` to receive paired token `_paired` and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - rcTokens are swapped into paired token through router
* - paired token and rrTokens are sent to sender
*/
function depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) external override {
}
function depositWithPermitAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
/**
* @notice Deposit collateral `_col` to receive LP tokens and rrTokens
* - deposits collateral to receive rcTokens and rrTokens
* - transfers paired token from sender
* - rcTokens and `_paired` tokens are added as liquidity to receive LP tokens
* - LP tokens and rrTokens are sent to sender
*/
function depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function depositWithColPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit
) external override {
}
function depositWithPairedPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
function depositWithBothPermitsAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _colPermit,
Permit calldata _pairedPermit
) external override {
}
function mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) external override {
}
function mmDepositWithPermitAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline,
Permit calldata _pairedPermit
) external override {
}
/// @notice This contract should never hold any funds.
/// Any tokens sent here by accident can be retreived.
function collect(IERC20 _token) external override onlyOwner {
}
function updateCore(IRulerCore _core) external override onlyOwner {
}
function updateRouter(IRouter _router) external override onlyOwner {
}
/// @notice check received amount from swap, tokenOut is always the last in array
function getAmountOut(
uint256 _tokenInAmt,
address[] calldata _path
) external view override returns (uint256) {
}
function _depositAndSwapToPaired(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _minPairedOut,
address[] calldata _path,
uint256 _deadline
) private {
}
function _depositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _mmDepositAndAddLiquidity(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _rcTokenDepositAmt,
uint256 _pairedDepositAmt,
uint256 _rcTokenDepositMin,
uint256 _pairedDepositMin,
uint256 _deadline
) private {
}
function _deposit(
address _col,
address _paired,
uint48 _expiry,
uint256 _mintRatio,
uint256 _colAmt
) private returns (address rcTokenAddr, uint256 rcTokenReceived, uint256 rcTokenBalBefore) {
( , , , IRERC20 rcToken, IRERC20 rrToken, , , ) = core.pairs(_col, _paired, _expiry, _mintRatio);
require(<FILL_ME>)
// receive collateral from sender
IERC20 collateral = IERC20(_col);
uint256 colBalBefore = collateral.balanceOf(address(this));
collateral.safeTransferFrom(msg.sender, address(this), _colAmt);
uint256 received = collateral.balanceOf(address(this)) - colBalBefore;
require(received > 0, "RulerZap: col transfer failed");
// deposit collateral to Ruler
rcTokenBalBefore = rcToken.balanceOf(address(this));
uint256 rrTokenBalBefore = rrToken.balanceOf(address(this));
_approve(collateral, address(core), received);
core.deposit(_col, _paired, _expiry, _mintRatio, received);
// send rrToken back to sender, and record received rcTokens
_transferRem(rrToken, rrTokenBalBefore);
rcTokenReceived = rcToken.balanceOf(address(this)) - rcTokenBalBefore;
rcTokenAddr = address(rcToken);
}
function _approve(IERC20 _token, address _spender, uint256 _amount) private {
}
function _permit(IERC20Permit _token, Permit calldata permit) private {
}
// transfer remaining amount (since the beginnning of action) back to sender
function _transferRem(IERC20 _token, uint256 _balBefore) private {
}
}
| address(rcToken)!=address(0)&&address(rrToken)!=address(0),"RulerZap: pair not exist" | 50,587 | address(rcToken)!=address(0)&&address(rrToken)!=address(0) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
require(<FILL_ME>)
_;
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| isAdmin(msg.sender)||isOps(msg.sender) | 50,627 | isAdmin(msg.sender)||isOps(msg.sender) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
require(<FILL_ME>)
_;
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| isOwner(msg.sender)||isAdmin(msg.sender) | 50,627 | isOwner(msg.sender)||isAdmin(msg.sender) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
require(<FILL_ME>)
_;
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| isOps(msg.sender) | 50,627 | isOps(msg.sender) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
require(_adminAddress != owner);
require(_adminAddress != address(this));
require(<FILL_ME>)
adminAddress = _adminAddress;
AdminAddressChanged(_adminAddress);
return true;
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| !isOps(_adminAddress) | 50,627 | !isOps(_adminAddress) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
require(_opsAddress != owner);
require(_opsAddress != address(this));
require(<FILL_ME>)
opsAddress = _opsAddress;
OpsAddressChanged(_opsAddress);
return true;
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| !isAdmin(_opsAddress) | 50,627 | !isAdmin(_opsAddress) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
if (finalized) {
// Everybody should be ok to transfer once the token is finalized.
return;
}
// Owner and Ops are allowed to transfer tokens before the sale is finalized.
// This allows the tokens to move from the TokenSale contract to a beneficiary.
// We also allow someone to send tokens back to the owner. This is useful among other
// cases, for the Trustee to transfer unlocked tokens back to the owner (reclaimTokens).
require(<FILL_ME>)
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| isOwnerOrOps(_sender)||_to==owner | 50,627 | isOwnerOrOps(_sender)||_to==owner |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
require(<FILL_ME>)
tokenContract = _tokenContract;
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| address(_tokenContract)!=address(0) | 50,627 | address(_tokenContract)!=address(0) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
require(<FILL_ME>)
_;
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| isOwner(msg.sender)||isRevoke(msg.sender) | 50,627 | isOwner(msg.sender)||isRevoke(msg.sender) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
require(<FILL_ME>)
_;
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| isRevoke(msg.sender) | 50,627 | isRevoke(msg.sender) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
require(_revokeAddress != owner);
require(<FILL_ME>)
require(!isOps(_revokeAddress));
revokeAddress = _revokeAddress;
RevokeAddressChanged(_revokeAddress);
return true;
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| !isAdmin(_revokeAddress) | 50,627 | !isAdmin(_revokeAddress) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
require(_revokeAddress != owner);
require(!isAdmin(_revokeAddress));
require(<FILL_ME>)
revokeAddress = _revokeAddress;
RevokeAddressChanged(_revokeAddress);
return true;
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| !isOps(_revokeAddress) | 50,627 | !isOps(_revokeAddress) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
require(_account != address(0));
require(_account != address(this));
require(_amount > 0);
// Can't create an allocation if there is already one for this account.
require(<FILL_ME>)
if (isOps(msg.sender)) {
// Once the token contract is finalized, the ops key should not be able to grant allocations any longer.
// Before finalized, it is used by the TokenSale contract to allocate pre-sales.
require(!tokenContract.finalized());
}
totalLocked = totalLocked.add(_amount);
require(totalLocked <= tokenContract.balanceOf(address(this)));
allocations[_account] = Allocation({
amountGranted : _amount,
amountTransferred : 0,
revokable : _revokable
});
AllocationGranted(msg.sender, _account, _amount, _revokable);
return true;
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| allocations[_account].amountGranted==0 | 50,627 | allocations[_account].amountGranted==0 |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
require(_account != address(0));
require(_account != address(this));
require(_amount > 0);
// Can't create an allocation if there is already one for this account.
require(allocations[_account].amountGranted == 0);
if (isOps(msg.sender)) {
// Once the token contract is finalized, the ops key should not be able to grant allocations any longer.
// Before finalized, it is used by the TokenSale contract to allocate pre-sales.
require(<FILL_ME>)
}
totalLocked = totalLocked.add(_amount);
require(totalLocked <= tokenContract.balanceOf(address(this)));
allocations[_account] = Allocation({
amountGranted : _amount,
amountTransferred : 0,
revokable : _revokable
});
AllocationGranted(msg.sender, _account, _amount, _revokable);
return true;
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| !tokenContract.finalized() | 50,627 | !tokenContract.finalized() |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
require(_account != address(0));
Allocation memory allocation = allocations[_account];
require(<FILL_ME>)
uint256 ownerRefund = allocation.amountGranted.sub(allocation.amountTransferred);
delete allocations[_account];
totalLocked = totalLocked.sub(ownerRefund);
AllocationRevoked(msg.sender, _account, ownerRefund);
return true;
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| allocation.revokable | 50,627 | allocation.revokable |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
require(_account != address(0));
require(_amount > 0);
Allocation storage allocation = allocations[_account];
require(allocation.amountGranted > 0);
uint256 transferable = allocation.amountGranted.sub(allocation.amountTransferred);
if (transferable < _amount) {
return false;
}
allocation.amountTransferred = allocation.amountTransferred.add(_amount);
// Note that transfer will fail if the token contract has not been finalized yet.
require(<FILL_ME>)
totalLocked = totalLocked.sub(_amount);
AllocationProcessed(msg.sender, _account, _amount);
return true;
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
}
}
| tokenContract.transfer(_account,_amount) | 50,627 | tokenContract.transfer(_account,_amount) |
null | pragma solidity ^0.4.17;
// ----------------------------------------------------------------------------
// Token Trustee Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath Library Implementation
//
// Copyright (c) 2017 OpenST Ltd.
// https://simpletoken.org/
//
// The MIT Licence.
//
// Based on the SafeMath library by the OpenZeppelin team.
// Copyright (c) 2016 Smart Contract Solutions, Inc.
// https://github.com/OpenZeppelin/zeppelin-solidity
// The MIT License.
// ----------------------------------------------------------------------------
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//
// Implements basic ownership with 2-step transfers.
//
contract Owned {
address public owner;
address public proposedOwner;
event OwnershipTransferInitiated(address indexed _proposedOwner);
event OwnershipTransferCompleted(address indexed _newOwner);
function Owned() public {
}
modifier onlyOwner() {
}
function isOwner(address _address) internal view returns (bool) {
}
function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) {
}
function completeOwnershipTransfer() public returns (bool) {
}
}
//
// Implements a more advanced ownership and permission model based on owner,
// admin and ops per Simple Token key management specification.
//
contract OpsManaged is Owned {
address public opsAddress;
address public adminAddress;
event AdminAddressChanged(address indexed _newAddress);
event OpsAddressChanged(address indexed _newAddress);
function OpsManaged() public
Owned()
{
}
modifier onlyAdmin() {
}
modifier onlyAdminOrOps() {
}
modifier onlyOwnerOrAdmin() {
}
modifier onlyOps() {
}
function isAdmin(address _address) internal view returns (bool) {
}
function isOps(address _address) internal view returns (bool) {
}
function isOwnerOrOps(address _address) internal view returns (bool) {
}
// Owner and Admin can change the admin address. Address can also be set to 0 to 'disable' it.
function setAdminAddress(address _adminAddress) external onlyOwnerOrAdmin returns (bool) {
}
// Owner and Admin can change the operations address. Address can also be set to 0 to 'disable' it.
function setOpsAddress(address _opsAddress) external onlyOwnerOrAdmin returns (bool) {
}
}
contract SimpleTokenConfig {
string public constant TOKEN_SYMBOL = "ST";
string public constant TOKEN_NAME = "Simple Token";
uint8 public constant TOKEN_DECIMALS = 18;
uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS);
uint256 public constant TOKENS_MAX = 800000000 * DECIMALSFACTOR;
}
contract ERC20Interface {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function name() public view returns (string);
function symbol() public view returns (string);
function decimals() public view returns (uint8);
function totalSupply() public view returns (uint256);
function balanceOf(address _owner) public view returns (uint256 balance);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
//
// Standard ERC20 implementation, with ownership.
//
contract ERC20Token is ERC20Interface, Owned {
using SafeMath for uint256;
string private tokenName;
string private tokenSymbol;
uint8 private tokenDecimals;
uint256 internal tokenTotalSupply;
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) allowed;
function ERC20Token(string _symbol, string _name, uint8 _decimals, uint256 _totalSupply) public
Owned()
{
}
function name() public view returns (string) {
}
function symbol() public view returns (string) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
//
// SimpleToken is a standard ERC20 token with some additional functionality:
// - It has a concept of finalize
// - Before finalize, nobody can transfer tokens except:
// - Owner and operations can transfer tokens
// - Anybody can send back tokens to owner
// - After finalize, no restrictions on token transfers
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops
// transfer (before finalize) x x
// transferForm (before finalize) x x
// finalize x
//
contract SimpleToken is ERC20Token, OpsManaged, SimpleTokenConfig {
bool public finalized;
// Events
event Burnt(address indexed _from, uint256 _amount);
event Finalized();
function SimpleToken() public
ERC20Token(TOKEN_SYMBOL, TOKEN_NAME, TOKEN_DECIMALS, TOKENS_MAX)
OpsManaged()
{
}
// Implementation of the standard transfer method that takes into account the finalize flag.
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// Implementation of the standard transferFrom method that takes into account the finalize flag.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function checkTransferAllowed(address _sender, address _to) private view {
}
// Implement a burn function to permit msg.sender to reduce its balance
// which also reduces tokenTotalSupply
function burn(uint256 _value) public returns (bool success) {
}
// Finalize method marks the point where token transfers are finally allowed for everybody.
function finalize() external onlyAdmin returns (bool success) {
}
}
//
// Implements a simple trustee which can release tokens based on
// an explicit call from the owner.
//
//
// Permissions, according to the ST key management specification.
//
// Owner Admin Ops Revoke
// grantAllocation x x
// revokeAllocation x
// processAllocation x
// reclaimTokens x
// setRevokeAddress x x
//
contract Trustee is OpsManaged {
using SafeMath for uint256;
SimpleToken public tokenContract;
struct Allocation {
uint256 amountGranted;
uint256 amountTransferred;
bool revokable;
}
// The trustee has a special 'revoke' key which is allowed to revoke allocations.
address public revokeAddress;
// Total number of tokens that are currently allocated.
// This does not include tokens that have been processed (sent to an address) already or
// the ones in the trustee's account that have not been allocated yet.
uint256 public totalLocked;
mapping (address => Allocation) public allocations;
//
// Events
//
event AllocationGranted(address indexed _from, address indexed _account, uint256 _amount, bool _revokable);
event AllocationRevoked(address indexed _from, address indexed _account, uint256 _amountRevoked);
event AllocationProcessed(address indexed _from, address indexed _account, uint256 _amount);
event RevokeAddressChanged(address indexed _newAddress);
event TokensReclaimed(uint256 _amount);
function Trustee(SimpleToken _tokenContract) public
OpsManaged()
{
}
modifier onlyOwnerOrRevoke() {
}
modifier onlyRevoke() {
}
function isRevoke(address _address) private view returns (bool) {
}
// Owner and revoke can change the revoke address. Address can also be set to 0 to 'disable' it.
function setRevokeAddress(address _revokeAddress) external onlyOwnerOrRevoke returns (bool) {
}
// Allows admin or ops to create new allocations for a specific account.
function grantAllocation(address _account, uint256 _amount, bool _revokable) public onlyAdminOrOps returns (bool) {
}
// Allows the revoke key to revoke allocations, if revoke is allowed.
function revokeAllocation(address _account) external onlyRevoke returns (bool) {
}
// Push model which allows ops to transfer tokens to the beneficiary.
// The exact amount to transfer is calculated based on agreements with
// the beneficiaries. Here we only restrict that the total amount transfered cannot
// exceed what has been granted.
function processAllocation(address _account, uint256 _amount) external onlyOps returns (bool) {
}
// Allows the admin to claim back all tokens that are not currently allocated.
// Note that the trustee should be able to move tokens even before the token is
// finalized because SimpleToken allows sending back to owner specifically.
function reclaimTokens() external onlyAdmin returns (bool) {
uint256 ownBalance = tokenContract.balanceOf(address(this));
// If balance <= amount locked, there is nothing to reclaim.
require(ownBalance > totalLocked);
uint256 amountReclaimed = ownBalance.sub(totalLocked);
address tokenOwner = tokenContract.owner();
require(tokenOwner != address(0));
require(<FILL_ME>)
TokensReclaimed(amountReclaimed);
return true;
}
}
| tokenContract.transfer(tokenOwner,amountReclaimed) | 50,627 | tokenContract.transfer(tokenOwner,amountReclaimed) |
null | contract OwnerContract is Ownable {
event ContractControllerAdded(address contractAddress);
event ContractControllerRemoved(address contractAddress);
mapping (address => bool) internal contracts;
// New modifier to be used in place of OWNER ONLY activity
// Eventually this will be owned by a controller contract and not a private wallet
// (Voting needs to be implemented)
modifier justOwner() {
}
// Allow contracts to have ownership without taking full custody of the token
// (Until voting is fully implemented)
modifier onlyOwner() {
}
// Stops owner from gaining access to all functionality
modifier onlyContract() {
require(msg.sender != address(0));
require(<FILL_ME>)
_;
}
// new owner only activity.
// (Voting to be implemented for owner replacement)
function removeController(address controllerToRemove) public justOwner {
}
// new owner only activity.
// (Voting to be implemented for owner replacement)
function addController(address newController) public justOwner {
}
function isController(address _address) public view returns(bool) {
}
}
| contracts[msg.sender] | 50,712 | contracts[msg.sender] |
null | contract OwnerContract is Ownable {
event ContractControllerAdded(address contractAddress);
event ContractControllerRemoved(address contractAddress);
mapping (address => bool) internal contracts;
// New modifier to be used in place of OWNER ONLY activity
// Eventually this will be owned by a controller contract and not a private wallet
// (Voting needs to be implemented)
modifier justOwner() {
}
// Allow contracts to have ownership without taking full custody of the token
// (Until voting is fully implemented)
modifier onlyOwner() {
}
// Stops owner from gaining access to all functionality
modifier onlyContract() {
}
// new owner only activity.
// (Voting to be implemented for owner replacement)
function removeController(address controllerToRemove) public justOwner {
require(<FILL_ME>)
contracts[controllerToRemove] = false;
emit ContractControllerRemoved(controllerToRemove);
}
// new owner only activity.
// (Voting to be implemented for owner replacement)
function addController(address newController) public justOwner {
}
function isController(address _address) public view returns(bool) {
}
}
| contracts[controllerToRemove] | 50,712 | contracts[controllerToRemove] |
null | contract OwnerContract is Ownable {
event ContractControllerAdded(address contractAddress);
event ContractControllerRemoved(address contractAddress);
mapping (address => bool) internal contracts;
// New modifier to be used in place of OWNER ONLY activity
// Eventually this will be owned by a controller contract and not a private wallet
// (Voting needs to be implemented)
modifier justOwner() {
}
// Allow contracts to have ownership without taking full custody of the token
// (Until voting is fully implemented)
modifier onlyOwner() {
}
// Stops owner from gaining access to all functionality
modifier onlyContract() {
}
// new owner only activity.
// (Voting to be implemented for owner replacement)
function removeController(address controllerToRemove) public justOwner {
}
// new owner only activity.
// (Voting to be implemented for owner replacement)
function addController(address newController) public justOwner {
require(<FILL_ME>)
contracts[newController] = true;
emit ContractControllerAdded(newController);
}
function isController(address _address) public view returns(bool) {
}
}
| contracts[newController]!=true | 50,712 | contracts[newController]!=true |
null | pragma solidity ^0.5.0;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
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);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @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) {
}
/**
* @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) {
}
}
// This interface allows derivative contracts to pay Oracle fees for their use of the system.
interface StoreInterface {
// Pays Oracle fees in ETH to the store. To be used by contracts whose margin currency is ETH.
function payOracleFees() external payable;
// Pays Oracle fees in the margin currency, erc20Address, to the store. To be used if the margin currency is an
// ERC20 token rather than ETH. All approved tokens are transfered.
function payOracleFeesErc20(address erc20Address) external;
// Computes the Oracle fees that a contract should pay for a period. `pfc` is the "profit from corruption", or the
// maximum amount of margin currency that a token sponsor could extract from the contract through corrupting the
// price feed in their favor.
function computeOracleFees(uint startTime, uint endTime, uint pfc) external view returns (uint feeAmount);
}
contract Withdrawable is Ownable {
// Withdraws ETH from the contract.
function withdraw(uint amount) external onlyOwner {
}
// Withdraws ERC20 tokens from the contract.
function withdrawErc20(address erc20Address, uint amount) external onlyOwner {
IERC20 erc20 = IERC20(erc20Address);
require(<FILL_ME>)
}
}
// An implementation of StoreInterface that can accept Oracle fees in ETH or any arbitrary ERC20 token.
contract CentralizedStore is StoreInterface, Withdrawable {
using SafeMath for uint;
uint private fixedOracleFeePerSecond; // Percentage of 10^18. E.g., 1e18 is 100% Oracle fee.
uint private constant FP_SCALING_FACTOR = 10**18;
function payOracleFees() external payable {
}
function payOracleFeesErc20(address erc20Address) external {
}
// Sets a new Oracle fee per second.
function setFixedOracleFeePerSecond(uint newOracleFee) external onlyOwner {
}
function computeOracleFees(uint startTime, uint endTime, uint pfc) external view returns (uint oracleFeeAmount) {
}
event SetFixedOracleFeePerSecond(uint newOracleFee);
}
| erc20.transfer(msg.sender,amount) | 50,785 | erc20.transfer(msg.sender,amount) |
null | pragma solidity ^0.5.0;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
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);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @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) {
}
/**
* @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) {
}
}
// This interface allows derivative contracts to pay Oracle fees for their use of the system.
interface StoreInterface {
// Pays Oracle fees in ETH to the store. To be used by contracts whose margin currency is ETH.
function payOracleFees() external payable;
// Pays Oracle fees in the margin currency, erc20Address, to the store. To be used if the margin currency is an
// ERC20 token rather than ETH. All approved tokens are transfered.
function payOracleFeesErc20(address erc20Address) external;
// Computes the Oracle fees that a contract should pay for a period. `pfc` is the "profit from corruption", or the
// maximum amount of margin currency that a token sponsor could extract from the contract through corrupting the
// price feed in their favor.
function computeOracleFees(uint startTime, uint endTime, uint pfc) external view returns (uint feeAmount);
}
contract Withdrawable is Ownable {
// Withdraws ETH from the contract.
function withdraw(uint amount) external onlyOwner {
}
// Withdraws ERC20 tokens from the contract.
function withdrawErc20(address erc20Address, uint amount) external onlyOwner {
}
}
// An implementation of StoreInterface that can accept Oracle fees in ETH or any arbitrary ERC20 token.
contract CentralizedStore is StoreInterface, Withdrawable {
using SafeMath for uint;
uint private fixedOracleFeePerSecond; // Percentage of 10^18. E.g., 1e18 is 100% Oracle fee.
uint private constant FP_SCALING_FACTOR = 10**18;
function payOracleFees() external payable {
}
function payOracleFeesErc20(address erc20Address) external {
IERC20 erc20 = IERC20(erc20Address);
uint authorizedAmount = erc20.allowance(msg.sender, address(this));
require(authorizedAmount > 0);
require(<FILL_ME>)
}
// Sets a new Oracle fee per second.
function setFixedOracleFeePerSecond(uint newOracleFee) external onlyOwner {
}
function computeOracleFees(uint startTime, uint endTime, uint pfc) external view returns (uint oracleFeeAmount) {
}
event SetFixedOracleFeePerSecond(uint newOracleFee);
}
| erc20.transferFrom(msg.sender,address(this),authorizedAmount) | 50,785 | erc20.transferFrom(msg.sender,address(this),authorizedAmount) |
null | pragma solidity ^0.4.23;
contract UTU {
string public name = "Upgrade Token Utility";
uint8 public decimals = 18;
string public symbol = "UTU";
address public owner;
address public feesAddr;
address trancheAdmin;
uint256 public totalSupply = 50000000000000000000000000; // 50m e18
uint public trancheLevel = 1;
uint256 public circulatingSupply = 0;
uint maxTranche = 4;
uint loopCount = 0;
uint256 feePercent = 1500; // the calculation expects % * 100 (so 10% is 1000)
uint256 trancheOneSaleTime;
bool public receiveEth = true;
bool payFees = true;
bool addTranches = true;
bool public initialTranches = false;
bool trancheOne = true;
// Storage
mapping (address => uint256) public balances;
mapping (address => uint256) public trancheOneBalances;
mapping(address => mapping (address => uint256)) allowed;
// mining schedule
mapping(uint => uint256) public trancheTokens;
mapping(uint => uint256) public trancheRate;
// events (ERC20)
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
function UTU() {
}
function populateTrancheTokens() internal {
}
function populateTrancheRates() internal {
}
function () payable public {
require(<FILL_ME>)
allocateTokens(msg.value,0);
}
function allocateTokens(uint256 _submitted, uint256 _tokenCount) internal {
}
function transfer(address _to, uint256 _value) public {
}
function balanceOf(address _receiver) public constant returns (uint256) {
}
function trancheOneBalanceOf(address _receiver) public constant returns (uint256) {
}
function balanceInTranche() public constant returns (uint256) {
}
function balanceInSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function rateOfSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function changeFeesAddress(address _devFees) public {
}
function payFeesToggle() public {
}
// enables fee update - must be between 0 and 100 (%)
function updateFeeAmount(uint _newFee) public {
}
function changeOwner(address _recipient) public {
}
function changeTrancheAdmin(address _trancheAdmin) public {
}
function toggleReceiveEth() public {
}
function otcPurchase(uint256 _tokens, address _recipient) public {
}
function otcPurchaseAndEscrow(uint256 _tokens, address _recipient) public {
}
function safeWithdrawal(address _receiver, uint256 _value) public {
}
function addTrancheRateAndTokens(uint256 _level, uint256 _tokens, uint256 _rate) public {
}
function updateTrancheRate(uint256 _level, uint256 _rate) {
}
// when all tranches have been added to the contract
function closeTrancheAddition() public {
}
function trancheOneSaleOpenTime() returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint) {
}
function div(uint256 a, uint256 b) internal pure returns (uint) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint) {
}
function add(uint256 a, uint256 b) internal pure returns (uint) {
}
// ERC20 compliance
function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool success) {
}
function approve(address _spender, uint256 _tokens) public returns (bool success) {
}
function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) {
}
}
| (msg.value>0)&&(receiveEth) | 50,817 | (msg.value>0)&&(receiveEth) |
null | pragma solidity ^0.4.23;
contract UTU {
string public name = "Upgrade Token Utility";
uint8 public decimals = 18;
string public symbol = "UTU";
address public owner;
address public feesAddr;
address trancheAdmin;
uint256 public totalSupply = 50000000000000000000000000; // 50m e18
uint public trancheLevel = 1;
uint256 public circulatingSupply = 0;
uint maxTranche = 4;
uint loopCount = 0;
uint256 feePercent = 1500; // the calculation expects % * 100 (so 10% is 1000)
uint256 trancheOneSaleTime;
bool public receiveEth = true;
bool payFees = true;
bool addTranches = true;
bool public initialTranches = false;
bool trancheOne = true;
// Storage
mapping (address => uint256) public balances;
mapping (address => uint256) public trancheOneBalances;
mapping(address => mapping (address => uint256)) allowed;
// mining schedule
mapping(uint => uint256) public trancheTokens;
mapping(uint => uint256) public trancheRate;
// events (ERC20)
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
function UTU() {
}
function populateTrancheTokens() internal {
}
function populateTrancheRates() internal {
}
function () payable public {
}
function allocateTokens(uint256 _submitted, uint256 _tokenCount) internal {
}
function transfer(address _to, uint256 _value) public {
}
function balanceOf(address _receiver) public constant returns (uint256) {
}
function trancheOneBalanceOf(address _receiver) public constant returns (uint256) {
}
function balanceInTranche() public constant returns (uint256) {
}
function balanceInSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function rateOfSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function changeFeesAddress(address _devFees) public {
}
function payFeesToggle() public {
}
// enables fee update - must be between 0 and 100 (%)
function updateFeeAmount(uint _newFee) public {
require(msg.sender == owner);
require(<FILL_ME>)
feePercent = _newFee * 100;
}
function changeOwner(address _recipient) public {
}
function changeTrancheAdmin(address _trancheAdmin) public {
}
function toggleReceiveEth() public {
}
function otcPurchase(uint256 _tokens, address _recipient) public {
}
function otcPurchaseAndEscrow(uint256 _tokens, address _recipient) public {
}
function safeWithdrawal(address _receiver, uint256 _value) public {
}
function addTrancheRateAndTokens(uint256 _level, uint256 _tokens, uint256 _rate) public {
}
function updateTrancheRate(uint256 _level, uint256 _rate) {
}
// when all tranches have been added to the contract
function closeTrancheAddition() public {
}
function trancheOneSaleOpenTime() returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint) {
}
function div(uint256 a, uint256 b) internal pure returns (uint) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint) {
}
function add(uint256 a, uint256 b) internal pure returns (uint) {
}
// ERC20 compliance
function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool success) {
}
function approve(address _spender, uint256 _tokens) public returns (bool success) {
}
function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) {
}
}
| (_newFee>=0)&&(_newFee<=100) | 50,817 | (_newFee>=0)&&(_newFee<=100) |
null | pragma solidity ^0.4.23;
contract UTU {
string public name = "Upgrade Token Utility";
uint8 public decimals = 18;
string public symbol = "UTU";
address public owner;
address public feesAddr;
address trancheAdmin;
uint256 public totalSupply = 50000000000000000000000000; // 50m e18
uint public trancheLevel = 1;
uint256 public circulatingSupply = 0;
uint maxTranche = 4;
uint loopCount = 0;
uint256 feePercent = 1500; // the calculation expects % * 100 (so 10% is 1000)
uint256 trancheOneSaleTime;
bool public receiveEth = true;
bool payFees = true;
bool addTranches = true;
bool public initialTranches = false;
bool trancheOne = true;
// Storage
mapping (address => uint256) public balances;
mapping (address => uint256) public trancheOneBalances;
mapping(address => mapping (address => uint256)) allowed;
// mining schedule
mapping(uint => uint256) public trancheTokens;
mapping(uint => uint256) public trancheRate;
// events (ERC20)
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
function UTU() {
}
function populateTrancheTokens() internal {
}
function populateTrancheRates() internal {
}
function () payable public {
}
function allocateTokens(uint256 _submitted, uint256 _tokenCount) internal {
}
function transfer(address _to, uint256 _value) public {
}
function balanceOf(address _receiver) public constant returns (uint256) {
}
function trancheOneBalanceOf(address _receiver) public constant returns (uint256) {
}
function balanceInTranche() public constant returns (uint256) {
}
function balanceInSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function rateOfSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function changeFeesAddress(address _devFees) public {
}
function payFeesToggle() public {
}
// enables fee update - must be between 0 and 100 (%)
function updateFeeAmount(uint _newFee) public {
}
function changeOwner(address _recipient) public {
}
function changeTrancheAdmin(address _trancheAdmin) public {
require(<FILL_ME>)
trancheAdmin = _trancheAdmin;
}
function toggleReceiveEth() public {
}
function otcPurchase(uint256 _tokens, address _recipient) public {
}
function otcPurchaseAndEscrow(uint256 _tokens, address _recipient) public {
}
function safeWithdrawal(address _receiver, uint256 _value) public {
}
function addTrancheRateAndTokens(uint256 _level, uint256 _tokens, uint256 _rate) public {
}
function updateTrancheRate(uint256 _level, uint256 _rate) {
}
// when all tranches have been added to the contract
function closeTrancheAddition() public {
}
function trancheOneSaleOpenTime() returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint) {
}
function div(uint256 a, uint256 b) internal pure returns (uint) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint) {
}
function add(uint256 a, uint256 b) internal pure returns (uint) {
}
// ERC20 compliance
function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool success) {
}
function approve(address _spender, uint256 _tokens) public returns (bool success) {
}
function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) {
}
}
| (msg.sender==owner)||(msg.sender==trancheAdmin) | 50,817 | (msg.sender==owner)||(msg.sender==trancheAdmin) |
null | pragma solidity ^0.4.23;
contract UTU {
string public name = "Upgrade Token Utility";
uint8 public decimals = 18;
string public symbol = "UTU";
address public owner;
address public feesAddr;
address trancheAdmin;
uint256 public totalSupply = 50000000000000000000000000; // 50m e18
uint public trancheLevel = 1;
uint256 public circulatingSupply = 0;
uint maxTranche = 4;
uint loopCount = 0;
uint256 feePercent = 1500; // the calculation expects % * 100 (so 10% is 1000)
uint256 trancheOneSaleTime;
bool public receiveEth = true;
bool payFees = true;
bool addTranches = true;
bool public initialTranches = false;
bool trancheOne = true;
// Storage
mapping (address => uint256) public balances;
mapping (address => uint256) public trancheOneBalances;
mapping(address => mapping (address => uint256)) allowed;
// mining schedule
mapping(uint => uint256) public trancheTokens;
mapping(uint => uint256) public trancheRate;
// events (ERC20)
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
function UTU() {
}
function populateTrancheTokens() internal {
}
function populateTrancheRates() internal {
}
function () payable public {
}
function allocateTokens(uint256 _submitted, uint256 _tokenCount) internal {
}
function transfer(address _to, uint256 _value) public {
}
function balanceOf(address _receiver) public constant returns (uint256) {
}
function trancheOneBalanceOf(address _receiver) public constant returns (uint256) {
}
function balanceInTranche() public constant returns (uint256) {
}
function balanceInSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function rateOfSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function changeFeesAddress(address _devFees) public {
}
function payFeesToggle() public {
}
// enables fee update - must be between 0 and 100 (%)
function updateFeeAmount(uint _newFee) public {
}
function changeOwner(address _recipient) public {
}
function changeTrancheAdmin(address _trancheAdmin) public {
}
function toggleReceiveEth() public {
}
function otcPurchase(uint256 _tokens, address _recipient) public {
}
function otcPurchaseAndEscrow(uint256 _tokens, address _recipient) public {
}
function safeWithdrawal(address _receiver, uint256 _value) public {
}
function addTrancheRateAndTokens(uint256 _level, uint256 _tokens, uint256 _rate) public {
require(<FILL_ME>)
require(add(_tokens, circulatingSupply) <= totalSupply);
trancheTokens[_level] = _tokens;
trancheRate[_level] = _rate;
maxTranche++;
}
function updateTrancheRate(uint256 _level, uint256 _rate) {
}
// when all tranches have been added to the contract
function closeTrancheAddition() public {
}
function trancheOneSaleOpenTime() returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint) {
}
function div(uint256 a, uint256 b) internal pure returns (uint) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint) {
}
function add(uint256 a, uint256 b) internal pure returns (uint) {
}
// ERC20 compliance
function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool success) {
}
function approve(address _spender, uint256 _tokens) public returns (bool success) {
}
function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) {
}
}
| ((msg.sender==owner)||(msg.sender==trancheAdmin))&&(addTranches==true) | 50,817 | ((msg.sender==owner)||(msg.sender==trancheAdmin))&&(addTranches==true) |
null | pragma solidity ^0.4.23;
contract UTU {
string public name = "Upgrade Token Utility";
uint8 public decimals = 18;
string public symbol = "UTU";
address public owner;
address public feesAddr;
address trancheAdmin;
uint256 public totalSupply = 50000000000000000000000000; // 50m e18
uint public trancheLevel = 1;
uint256 public circulatingSupply = 0;
uint maxTranche = 4;
uint loopCount = 0;
uint256 feePercent = 1500; // the calculation expects % * 100 (so 10% is 1000)
uint256 trancheOneSaleTime;
bool public receiveEth = true;
bool payFees = true;
bool addTranches = true;
bool public initialTranches = false;
bool trancheOne = true;
// Storage
mapping (address => uint256) public balances;
mapping (address => uint256) public trancheOneBalances;
mapping(address => mapping (address => uint256)) allowed;
// mining schedule
mapping(uint => uint256) public trancheTokens;
mapping(uint => uint256) public trancheRate;
// events (ERC20)
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
function UTU() {
}
function populateTrancheTokens() internal {
}
function populateTrancheRates() internal {
}
function () payable public {
}
function allocateTokens(uint256 _submitted, uint256 _tokenCount) internal {
}
function transfer(address _to, uint256 _value) public {
}
function balanceOf(address _receiver) public constant returns (uint256) {
}
function trancheOneBalanceOf(address _receiver) public constant returns (uint256) {
}
function balanceInTranche() public constant returns (uint256) {
}
function balanceInSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function rateOfSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function changeFeesAddress(address _devFees) public {
}
function payFeesToggle() public {
}
// enables fee update - must be between 0 and 100 (%)
function updateFeeAmount(uint _newFee) public {
}
function changeOwner(address _recipient) public {
}
function changeTrancheAdmin(address _trancheAdmin) public {
}
function toggleReceiveEth() public {
}
function otcPurchase(uint256 _tokens, address _recipient) public {
}
function otcPurchaseAndEscrow(uint256 _tokens, address _recipient) public {
}
function safeWithdrawal(address _receiver, uint256 _value) public {
}
function addTrancheRateAndTokens(uint256 _level, uint256 _tokens, uint256 _rate) public {
require(((msg.sender == owner) || (msg.sender == trancheAdmin)) && (addTranches == true));
require(<FILL_ME>)
trancheTokens[_level] = _tokens;
trancheRate[_level] = _rate;
maxTranche++;
}
function updateTrancheRate(uint256 _level, uint256 _rate) {
}
// when all tranches have been added to the contract
function closeTrancheAddition() public {
}
function trancheOneSaleOpenTime() returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint) {
}
function div(uint256 a, uint256 b) internal pure returns (uint) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint) {
}
function add(uint256 a, uint256 b) internal pure returns (uint) {
}
// ERC20 compliance
function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool success) {
}
function approve(address _spender, uint256 _tokens) public returns (bool success) {
}
function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) {
}
}
| add(_tokens,circulatingSupply)<=totalSupply | 50,817 | add(_tokens,circulatingSupply)<=totalSupply |
null | pragma solidity ^0.4.23;
contract UTU {
string public name = "Upgrade Token Utility";
uint8 public decimals = 18;
string public symbol = "UTU";
address public owner;
address public feesAddr;
address trancheAdmin;
uint256 public totalSupply = 50000000000000000000000000; // 50m e18
uint public trancheLevel = 1;
uint256 public circulatingSupply = 0;
uint maxTranche = 4;
uint loopCount = 0;
uint256 feePercent = 1500; // the calculation expects % * 100 (so 10% is 1000)
uint256 trancheOneSaleTime;
bool public receiveEth = true;
bool payFees = true;
bool addTranches = true;
bool public initialTranches = false;
bool trancheOne = true;
// Storage
mapping (address => uint256) public balances;
mapping (address => uint256) public trancheOneBalances;
mapping(address => mapping (address => uint256)) allowed;
// mining schedule
mapping(uint => uint256) public trancheTokens;
mapping(uint => uint256) public trancheRate;
// events (ERC20)
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
function UTU() {
}
function populateTrancheTokens() internal {
}
function populateTrancheRates() internal {
}
function () payable public {
}
function allocateTokens(uint256 _submitted, uint256 _tokenCount) internal {
}
function transfer(address _to, uint256 _value) public {
}
function balanceOf(address _receiver) public constant returns (uint256) {
}
function trancheOneBalanceOf(address _receiver) public constant returns (uint256) {
}
function balanceInTranche() public constant returns (uint256) {
}
function balanceInSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function rateOfSpecificTranche(uint256 _tranche) public constant returns (uint256) {
}
function changeFeesAddress(address _devFees) public {
}
function payFeesToggle() public {
}
// enables fee update - must be between 0 and 100 (%)
function updateFeeAmount(uint _newFee) public {
}
function changeOwner(address _recipient) public {
}
function changeTrancheAdmin(address _trancheAdmin) public {
}
function toggleReceiveEth() public {
}
function otcPurchase(uint256 _tokens, address _recipient) public {
}
function otcPurchaseAndEscrow(uint256 _tokens, address _recipient) public {
}
function safeWithdrawal(address _receiver, uint256 _value) public {
}
function addTrancheRateAndTokens(uint256 _level, uint256 _tokens, uint256 _rate) public {
}
function updateTrancheRate(uint256 _level, uint256 _rate) {
}
// when all tranches have been added to the contract
function closeTrancheAddition() public {
}
function trancheOneSaleOpenTime() returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint) {
}
function div(uint256 a, uint256 b) internal pure returns (uint) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint) {
}
function add(uint256 a, uint256 b) internal pure returns (uint) {
}
// ERC20 compliance
function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool success) {
require(<FILL_ME>)
balances[_from] = sub(balances[_from],_tokens);
allowed[_from][msg.sender] = sub(allowed[_from][msg.sender],_tokens);
balances[_to] = add(balances[_to],_tokens);
Transfer(_from, _to, _tokens);
return true;
}
function approve(address _spender, uint256 _tokens) public returns (bool success) {
}
function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) {
}
}
| balances[_from]>=_tokens | 50,817 | balances[_from]>=_tokens |
"BaseToken: transfer is not enabled or from does not have the OPERATOR role" | pragma solidity ^0.6.0;
/**
* @title BaseToken
* @author Vittorio Minacori (https://github.com/vittominacori)
* @dev Implementation of the BaseToken
*/
contract BaseToken is ERC20Capped, ERC20Burnable, ERC1363, Roles, TokenRecover {
// indicates if minting is finished
bool private _mintingFinished = false;
// indicates if transfer is enabled
bool private _transferEnabled = false;
string public constant BUILT_ON = "https://vittominacori.github.io/erc20-generator";
/**
* @dev Emitted during finish minting
*/
event MintFinished();
/**
* @dev Emitted during transfer enabling
*/
event TransferEnabled();
/**
* @dev Tokens can be minted only before minting finished.
*/
modifier canMint() {
}
/**
* @dev Tokens can be moved only after if transfer enabled or if you are an approved operator.
*/
modifier canTransfer(address from) {
require(<FILL_ME>)
_;
}
/**
* @param name Name of the token
* @param symbol A symbol to be used as ticker
* @param decimals Number of decimals. All the operations are done using the smallest and indivisible token unit
* @param cap Maximum number of tokens mintable
* @param initialSupply Initial token supply
* @param transferEnabled If transfer is enabled on token creation
* @param mintingFinished If minting is finished after token creation
*/
constructor(
string memory name,
string memory symbol,
uint8 decimals,
uint256 cap,
uint256 initialSupply,
bool transferEnabled,
bool mintingFinished
)
public
ERC20Capped(cap)
ERC1363(name, symbol)
{
}
/**
* @return if minting is finished or not.
*/
function mintingFinished() public view returns (bool) {
}
/**
* @return if transfer is enabled or not.
*/
function transferEnabled() public view returns (bool) {
}
/**
* @dev Function to mint tokens.
* @param to The address that will receive the minted tokens
* @param value The amount of tokens to mint
*/
function mint(address to, uint256 value) public canMint onlyMinter {
}
/**
* @dev Transfer tokens to a specified address.
* @param to The address to transfer to
* @param value The amount to be transferred
* @return A boolean that indicates if the operation was successful.
*/
function transfer(address to, uint256 value) public virtual override(ERC20) canTransfer(_msgSender()) returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* @param from The address which you want to send tokens from
* @param to The address which you want to transfer to
* @param value the amount of tokens to be transferred
* @return A boolean that indicates if the operation was successful.
*/
function transferFrom(address from, address to, uint256 value) public virtual override(ERC20) canTransfer(from) returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() public canMint onlyOwner {
}
/**
* @dev Function to enable transfers.
*/
function enableTransfer() public onlyOwner {
}
/**
* @dev See {ERC20-_beforeTokenTransfer}.
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Capped) {
}
}
pragma solidity ^0.6.0;
contract CreateToken is BaseToken {
constructor (
string memory name,
string memory symbol,
uint8 decimals,
uint256 cap,
uint256 initialSupply,
bool transferEnabled,
bool mintingFinished
) public payable BaseToken(name, symbol, decimals, cap, initialSupply, transferEnabled, mintingFinished) {}
// your stuff
}
| _transferEnabled||hasRole(OPERATOR_ROLE,from),"BaseToken: transfer is not enabled or from does not have the OPERATOR role" | 50,903 | _transferEnabled||hasRole(OPERATOR_ROLE,from) |
"the round is end" | /*
@author [email protected]
*/
pragma solidity ^0.4.24;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
library NameFilter {
/**
* @dev filters name strings
* -converts uppercase to lower case.
* -makes sure it does not start/end with a space
* -makes sure it does not contain multiple spaces in a row
* -cannot be only numbers
* -cannot start with 0x
* -restricts characters to A-Z, a-z, 0-9, and space.
* @return reprocessed string in bytes32 format
*/
function nameFilter(string _input) internal pure returns (bytes32){
}
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PlayerBook is Owned {
using SafeMath for uint;
using NameFilter for string;
bool public actived = false;
uint public registrationFee_ = 1 finney; // price to register a name
uint public pID_; // total number of players
mapping(address => uint) public pIDxAddr_; // (addr => pID) returns player id by address
mapping(uint => Player) public plyr_; // (pID => data) player data
mapping(bytes32 => uint) public pIDxName_; // (name => pID) returns player id by name
mapping(uint => mapping(bytes32 => bool)) public plyrNames_; // (pID => name => bool) list of names a player owns. (used so you can change your display name amoungst any name you own)
mapping(uint => mapping(uint => bytes32)) public plyrNameList_; // (pID => nameNum => name) list of names a player owns
struct Player {
address addr;
bytes32 name;
uint laff;
uint names;
}
/**
* @dev prevents contracts from interacting with playerBook
*/
modifier isHuman {
}
modifier isActive {
}
modifier isRegistered {
}
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
constructor() public {
}
function checkIfNameValid(string _nameStr) public view returns (bool){
}
function determinePID(address _addr) private returns (bool){
}
function registerNameXID(string _nameString, uint _affCode) public isActive isHuman payable {
}
function registerNameCore(uint _pID, bytes32 _name) private {
}
function getPlayerLaffCount(address _addr) internal view returns (uint){
}
function getPlayerID(address _addr) external view returns (uint) {
}
function getPlayerCount() external view returns (uint){
}
function getPlayerName(uint _pID) external view returns (bytes32){
}
function getPlayerLAff(uint _pID) external view returns (uint){
}
function getPlayerAddr(uint _pID) external view returns (address){
}
function getNameFee() external view returns (uint){
}
function setRegistrationFee(uint _fee) public onlyOwner {
}
function active() public onlyOwner {
}
}
// ----------------------------------------------------------------------------
contract Treasure is PlayerBook {
uint private seed = 18; //random seed
/* bool private canSet = true; */
//module 0,1,2
uint[3] public gameRound = [1, 1, 1]; //rounds index by module
uint[3] public maxKeys = [1200, 12000, 60000]; //index by module
uint[3] public keyLimits = [100, 1000, 5000]; //index by module
uint public keyPrice = 10 finney;
uint public devFee = 10;
uint public laffFee1 = 10;
uint public laffFee2 = 1;
address public devWallet = 0xB4D4709C2D537047683294c4040aBB9d616e23B5;
mapping(uint => mapping(uint => RoundInfo)) public gameInfo; //module => round => info
mapping(uint => mapping(uint => mapping(uint => uint))) public userAff; //module => round => pid => affCount
struct RoundInfo {
uint module; //module 0,1,2
uint rd; // rounds
uint count; // player number and id
uint keys; // purchased keys
uint maxKeys; // end keys
uint keyLimits;
uint award; //award of the round
address winner; //winner
bool isEnd;
mapping(uint => uint) userKeys; // pid => keys
mapping(uint => uint) userId; // count => pid
}
modifier validModule(uint _module){
}
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
constructor() public {
}
//only be called once
/* function setSeed(uint _seed) public onlyOwner {
require(canSet);
canSet = false;
seed = _seed;
} */
/**
random int
*/
function randInt(uint256 _start, uint256 _end, uint256 _nonce)
private
view
returns (uint256)
{
}
function initRoundInfo(uint _mode, uint _rd) private validModule(_mode) {
}
//user detail of one round
function getUserDetail(uint _mode, uint _rd) public validModule(_mode) view returns (uint _eth, uint _award, uint _affEth){
}
function getAllLaffAwards(address _addr) private view returns (uint){
}
function getPlayerAllDetail() external view returns (uint[] modes, uint[] rounds, uint[] eths, uint[] awards, uint _laffAwards, uint _laffCount){
}
function buyKeys(uint _mode, uint _rd) public isHuman isActive validModule(_mode) payable {
address _addr = msg.sender;
uint _pid = pIDxAddr_[_addr];
require(_pid != 0, " you need register the address");
uint _eth = msg.value;
require(_eth >= keyPrice, "you need buy one or more keys");
require(_rd == gameRound[_mode], "error round");
RoundInfo storage ri = gameInfo[_mode][_rd];
require(<FILL_ME>)
require(ri.keys < ri.maxKeys, "the round maxKeys");
uint _keys = _eth.div(keyPrice);
require(ri.userKeys[_pid] < ri.keyLimits);
if (ri.userKeys[_pid] == 0) {
ri.count ++;
ri.userId[ri.count] = _pid;
}
if (_keys.add(ri.keys) > ri.maxKeys) {
_keys = ri.maxKeys.sub(ri.keys);
}
if (_keys.add(ri.userKeys[_pid]) > ri.keyLimits) {
_keys = ri.keyLimits - ri.userKeys[_pid];
}
require(_keys > 0);
uint rand = randInt(0, 100, seed+_keys);
seed = seed.add(rand);
_eth = _keys.mul(keyPrice);
ri.userKeys[_pid] = ri.userKeys[_pid].add(_keys);
ri.keys = ri.keys.add(_keys);
//back
if(msg.value - _eth > 10 szabo )
msg.sender.transfer(msg.value - _eth);
checkAff(_mode, _rd, _pid, _eth);
if (ri.keys >= ri.maxKeys) {
endRound(_mode, _rd);
}
}
function getUserInfo(address _addr) public view returns (uint _pID, bytes32 _name, uint _laff, uint[] _keys){
}
function endRound(uint _mode, uint _rd) private {
}
function calWinner(uint _mode, uint _rd) private returns (uint){
}
function checkAff(uint _mode, uint _rd, uint _pid, uint _eth) private {
}
function getRoundInfo(uint _mode) external validModule(_mode) view returns (uint _cr, uint _ck, uint _mk, uint _award){
}
function getRoundIsEnd(uint _mode, uint _rd) external validModule(_mode) view returns (bool){
}
function getAwardHistorhy(uint _mode) external validModule(_mode) view returns (address[] dh, uint[] ah){
}
/* ****************************************************
********* *********
********* *********
********* thanks a lot *********
********* *********
********* *********
********* *********
********* *********
******************
**************
**********
*****
*
*********************************************************/
}
| !ri.isEnd,"the round is end" | 50,990 | !ri.isEnd |
null | /*
@author [email protected]
*/
pragma solidity ^0.4.24;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
library NameFilter {
/**
* @dev filters name strings
* -converts uppercase to lower case.
* -makes sure it does not start/end with a space
* -makes sure it does not contain multiple spaces in a row
* -cannot be only numbers
* -cannot start with 0x
* -restricts characters to A-Z, a-z, 0-9, and space.
* @return reprocessed string in bytes32 format
*/
function nameFilter(string _input) internal pure returns (bytes32){
}
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PlayerBook is Owned {
using SafeMath for uint;
using NameFilter for string;
bool public actived = false;
uint public registrationFee_ = 1 finney; // price to register a name
uint public pID_; // total number of players
mapping(address => uint) public pIDxAddr_; // (addr => pID) returns player id by address
mapping(uint => Player) public plyr_; // (pID => data) player data
mapping(bytes32 => uint) public pIDxName_; // (name => pID) returns player id by name
mapping(uint => mapping(bytes32 => bool)) public plyrNames_; // (pID => name => bool) list of names a player owns. (used so you can change your display name amoungst any name you own)
mapping(uint => mapping(uint => bytes32)) public plyrNameList_; // (pID => nameNum => name) list of names a player owns
struct Player {
address addr;
bytes32 name;
uint laff;
uint names;
}
/**
* @dev prevents contracts from interacting with playerBook
*/
modifier isHuman {
}
modifier isActive {
}
modifier isRegistered {
}
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
constructor() public {
}
function checkIfNameValid(string _nameStr) public view returns (bool){
}
function determinePID(address _addr) private returns (bool){
}
function registerNameXID(string _nameString, uint _affCode) public isActive isHuman payable {
}
function registerNameCore(uint _pID, bytes32 _name) private {
}
function getPlayerLaffCount(address _addr) internal view returns (uint){
}
function getPlayerID(address _addr) external view returns (uint) {
}
function getPlayerCount() external view returns (uint){
}
function getPlayerName(uint _pID) external view returns (bytes32){
}
function getPlayerLAff(uint _pID) external view returns (uint){
}
function getPlayerAddr(uint _pID) external view returns (address){
}
function getNameFee() external view returns (uint){
}
function setRegistrationFee(uint _fee) public onlyOwner {
}
function active() public onlyOwner {
}
}
// ----------------------------------------------------------------------------
contract Treasure is PlayerBook {
uint private seed = 18; //random seed
/* bool private canSet = true; */
//module 0,1,2
uint[3] public gameRound = [1, 1, 1]; //rounds index by module
uint[3] public maxKeys = [1200, 12000, 60000]; //index by module
uint[3] public keyLimits = [100, 1000, 5000]; //index by module
uint public keyPrice = 10 finney;
uint public devFee = 10;
uint public laffFee1 = 10;
uint public laffFee2 = 1;
address public devWallet = 0xB4D4709C2D537047683294c4040aBB9d616e23B5;
mapping(uint => mapping(uint => RoundInfo)) public gameInfo; //module => round => info
mapping(uint => mapping(uint => mapping(uint => uint))) public userAff; //module => round => pid => affCount
struct RoundInfo {
uint module; //module 0,1,2
uint rd; // rounds
uint count; // player number and id
uint keys; // purchased keys
uint maxKeys; // end keys
uint keyLimits;
uint award; //award of the round
address winner; //winner
bool isEnd;
mapping(uint => uint) userKeys; // pid => keys
mapping(uint => uint) userId; // count => pid
}
modifier validModule(uint _module){
}
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
constructor() public {
}
//only be called once
/* function setSeed(uint _seed) public onlyOwner {
require(canSet);
canSet = false;
seed = _seed;
} */
/**
random int
*/
function randInt(uint256 _start, uint256 _end, uint256 _nonce)
private
view
returns (uint256)
{
}
function initRoundInfo(uint _mode, uint _rd) private validModule(_mode) {
}
//user detail of one round
function getUserDetail(uint _mode, uint _rd) public validModule(_mode) view returns (uint _eth, uint _award, uint _affEth){
}
function getAllLaffAwards(address _addr) private view returns (uint){
}
function getPlayerAllDetail() external view returns (uint[] modes, uint[] rounds, uint[] eths, uint[] awards, uint _laffAwards, uint _laffCount){
}
function buyKeys(uint _mode, uint _rd) public isHuman isActive validModule(_mode) payable {
address _addr = msg.sender;
uint _pid = pIDxAddr_[_addr];
require(_pid != 0, " you need register the address");
uint _eth = msg.value;
require(_eth >= keyPrice, "you need buy one or more keys");
require(_rd == gameRound[_mode], "error round");
RoundInfo storage ri = gameInfo[_mode][_rd];
require(!ri.isEnd, "the round is end");
require(ri.keys < ri.maxKeys, "the round maxKeys");
uint _keys = _eth.div(keyPrice);
require(<FILL_ME>)
if (ri.userKeys[_pid] == 0) {
ri.count ++;
ri.userId[ri.count] = _pid;
}
if (_keys.add(ri.keys) > ri.maxKeys) {
_keys = ri.maxKeys.sub(ri.keys);
}
if (_keys.add(ri.userKeys[_pid]) > ri.keyLimits) {
_keys = ri.keyLimits - ri.userKeys[_pid];
}
require(_keys > 0);
uint rand = randInt(0, 100, seed+_keys);
seed = seed.add(rand);
_eth = _keys.mul(keyPrice);
ri.userKeys[_pid] = ri.userKeys[_pid].add(_keys);
ri.keys = ri.keys.add(_keys);
//back
if(msg.value - _eth > 10 szabo )
msg.sender.transfer(msg.value - _eth);
checkAff(_mode, _rd, _pid, _eth);
if (ri.keys >= ri.maxKeys) {
endRound(_mode, _rd);
}
}
function getUserInfo(address _addr) public view returns (uint _pID, bytes32 _name, uint _laff, uint[] _keys){
}
function endRound(uint _mode, uint _rd) private {
}
function calWinner(uint _mode, uint _rd) private returns (uint){
}
function checkAff(uint _mode, uint _rd, uint _pid, uint _eth) private {
}
function getRoundInfo(uint _mode) external validModule(_mode) view returns (uint _cr, uint _ck, uint _mk, uint _award){
}
function getRoundIsEnd(uint _mode, uint _rd) external validModule(_mode) view returns (bool){
}
function getAwardHistorhy(uint _mode) external validModule(_mode) view returns (address[] dh, uint[] ah){
}
/* ****************************************************
********* *********
********* *********
********* thanks a lot *********
********* *********
********* *********
********* *********
********* *********
******************
**************
**********
*****
*
*********************************************************/
}
| ri.userKeys[_pid]<ri.keyLimits | 50,990 | ri.userKeys[_pid]<ri.keyLimits |
"Insufficient Tokens" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.23 <0.7.0;
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
);
}
pragma solidity >=0.4.23 <0.7.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
}
}
pragma solidity >=0.4.23 <0.7.0;
/*
--------------------------------------------------------------------------
- Distribution Contract for the Analys-X (XYS) Token -
- Written by: Admirral -
- ~~~~~~~~~~~~~~~~ -
- This contract will track XYS stakers and distribute payments -
- received from users who purchase Analys-X products. All payments -
- will be received in XYS tokens. -
- -
- Only 100 stakers will be allowed at any one time. -
- When a new user stakes, the oldest on the list is removed and -
- they receive their stake back. The price to stake -
- increases by 1% after each new stake. -
- -
- When product fees are collected, 90% of that fee is redistributed -
- to the 100 addresses on the list. -
--------------------------------------------------------------------------
*/
contract Distribute is IERC20 {
using SafeMath for uint256;
// EVENTS
event Stake(address indexed user);
event Purchase(address indexed user, uint256 amount);
event Withdraw(address indexed user);
//basic identifiers - ERC20 Standard
string public name = "ANALYSX";
string public symbol = "XYS";
uint256 public decimals = 6;
//total Supply - currently 40'000'000
uint256 private _totalSupply = 40000000 * (10 ** decimals);
// balances and allowance - ERC20 Standard
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
// Staked Token Tracking
mapping (address => uint256) public _staked;
// Users earnings from staking
mapping (address => uint256) private _earned;
// Is user on staking list?
mapping (address => bool) public _isStaked;
// Stake List
address[100] private _stakeList;
// initial staking fee
uint256 public _initialFee = 100000 * (10 ** decimals);
// Current Staking Fee
uint256 public _stakeFee;
// Total Amount Staked;
uint256 public _totalStaked;
// Time of Previous Staker
uint256 public _lastStakerTime;
// Contract owner Address
address payable _owner;
// Constructor
constructor(address payable owner) public {
}
// ---------------------------------
// -- ERC20 Functions --
// -- Open Zeppelin --
// ---------------------------------
function totalSupply() override public view returns (uint256) {
}
function balanceOf(address account) public override view returns (uint256) {
}
function transfer(address recipient, uint256 amount) override public returns (bool) {
}
function allowance(address owner, address spender) override public view returns (uint256) {
}
function approve(address spender, uint256 value) override public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) override public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
// --------------------------------------
// -- Custom Functions --
// --------------------------------------
// Owner modifier. Functions with this modifier can only be called by contract owner
modifier onlyOwner() {
}
// checks if the sending user is owner. Returns true or false
function isOwner() public view returns (bool) {
}
// change owner
function changeOwner(address payable newOwner) public onlyOwner {
}
// Returns users stake earnings
function checkReward() public view returns (uint256) {
}
// returns staker list
function showStakers() public view returns (address[100] memory) {
}
// Stake Function
function stake() public {
require(msg.sender != _owner, "Owner cannot stake");
require(<FILL_ME>)
require(_isStaked[msg.sender] == false, "You are already staking");
require(_staked[msg.sender] == 0, "You have stake"); // Maybe redundant?
// updates new stakers balances and records stake
_balances[msg.sender] = _balances[msg.sender].sub(_stakeFee);
_staked[msg.sender] = _stakeFee;
_totalStaked = _totalStaked.add(_stakeFee);
// updates staking fee
uint256 stakeIncrease = _stakeFee.div(100);
_stakeFee = _stakeFee.add(stakeIncrease);
_lastStakerTime = block.timestamp;
// updates stake list
updateStaking();
emit Stake(msg.sender);
}
// Remove a user from staking, and replace slot with _owner address
function exitStake() public returns(bool) {
}
//Adds new user to staking list, removes oldest user, returns their stake
function updateStaking() internal {
}
// Function to purchase service (any price is possible, product is offerred off-chain)
function purchaseService(uint256 price, address purchaser) public {
}
// Stakers can call this function to claim their funds without leaving the pool.
function withdraw() public {
}
// Resets staking price. Can only be usable if no new staker has entered the pool in 1 month (2592000 seconds)
function stakeReset() public onlyOwner {
}
}
| _balances[msg.sender]>=_stakeFee,"Insufficient Tokens" | 51,033 | _balances[msg.sender]>=_stakeFee |
"You are already staking" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.23 <0.7.0;
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
);
}
pragma solidity >=0.4.23 <0.7.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
}
}
pragma solidity >=0.4.23 <0.7.0;
/*
--------------------------------------------------------------------------
- Distribution Contract for the Analys-X (XYS) Token -
- Written by: Admirral -
- ~~~~~~~~~~~~~~~~ -
- This contract will track XYS stakers and distribute payments -
- received from users who purchase Analys-X products. All payments -
- will be received in XYS tokens. -
- -
- Only 100 stakers will be allowed at any one time. -
- When a new user stakes, the oldest on the list is removed and -
- they receive their stake back. The price to stake -
- increases by 1% after each new stake. -
- -
- When product fees are collected, 90% of that fee is redistributed -
- to the 100 addresses on the list. -
--------------------------------------------------------------------------
*/
contract Distribute is IERC20 {
using SafeMath for uint256;
// EVENTS
event Stake(address indexed user);
event Purchase(address indexed user, uint256 amount);
event Withdraw(address indexed user);
//basic identifiers - ERC20 Standard
string public name = "ANALYSX";
string public symbol = "XYS";
uint256 public decimals = 6;
//total Supply - currently 40'000'000
uint256 private _totalSupply = 40000000 * (10 ** decimals);
// balances and allowance - ERC20 Standard
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
// Staked Token Tracking
mapping (address => uint256) public _staked;
// Users earnings from staking
mapping (address => uint256) private _earned;
// Is user on staking list?
mapping (address => bool) public _isStaked;
// Stake List
address[100] private _stakeList;
// initial staking fee
uint256 public _initialFee = 100000 * (10 ** decimals);
// Current Staking Fee
uint256 public _stakeFee;
// Total Amount Staked;
uint256 public _totalStaked;
// Time of Previous Staker
uint256 public _lastStakerTime;
// Contract owner Address
address payable _owner;
// Constructor
constructor(address payable owner) public {
}
// ---------------------------------
// -- ERC20 Functions --
// -- Open Zeppelin --
// ---------------------------------
function totalSupply() override public view returns (uint256) {
}
function balanceOf(address account) public override view returns (uint256) {
}
function transfer(address recipient, uint256 amount) override public returns (bool) {
}
function allowance(address owner, address spender) override public view returns (uint256) {
}
function approve(address spender, uint256 value) override public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) override public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
// --------------------------------------
// -- Custom Functions --
// --------------------------------------
// Owner modifier. Functions with this modifier can only be called by contract owner
modifier onlyOwner() {
}
// checks if the sending user is owner. Returns true or false
function isOwner() public view returns (bool) {
}
// change owner
function changeOwner(address payable newOwner) public onlyOwner {
}
// Returns users stake earnings
function checkReward() public view returns (uint256) {
}
// returns staker list
function showStakers() public view returns (address[100] memory) {
}
// Stake Function
function stake() public {
require(msg.sender != _owner, "Owner cannot stake");
require(_balances[msg.sender] >= _stakeFee, "Insufficient Tokens");
require(<FILL_ME>)
require(_staked[msg.sender] == 0, "You have stake"); // Maybe redundant?
// updates new stakers balances and records stake
_balances[msg.sender] = _balances[msg.sender].sub(_stakeFee);
_staked[msg.sender] = _stakeFee;
_totalStaked = _totalStaked.add(_stakeFee);
// updates staking fee
uint256 stakeIncrease = _stakeFee.div(100);
_stakeFee = _stakeFee.add(stakeIncrease);
_lastStakerTime = block.timestamp;
// updates stake list
updateStaking();
emit Stake(msg.sender);
}
// Remove a user from staking, and replace slot with _owner address
function exitStake() public returns(bool) {
}
//Adds new user to staking list, removes oldest user, returns their stake
function updateStaking() internal {
}
// Function to purchase service (any price is possible, product is offerred off-chain)
function purchaseService(uint256 price, address purchaser) public {
}
// Stakers can call this function to claim their funds without leaving the pool.
function withdraw() public {
}
// Resets staking price. Can only be usable if no new staker has entered the pool in 1 month (2592000 seconds)
function stakeReset() public onlyOwner {
}
}
| _isStaked[msg.sender]==false,"You are already staking" | 51,033 | _isStaked[msg.sender]==false |
"You have stake" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.23 <0.7.0;
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
);
}
pragma solidity >=0.4.23 <0.7.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
}
}
pragma solidity >=0.4.23 <0.7.0;
/*
--------------------------------------------------------------------------
- Distribution Contract for the Analys-X (XYS) Token -
- Written by: Admirral -
- ~~~~~~~~~~~~~~~~ -
- This contract will track XYS stakers and distribute payments -
- received from users who purchase Analys-X products. All payments -
- will be received in XYS tokens. -
- -
- Only 100 stakers will be allowed at any one time. -
- When a new user stakes, the oldest on the list is removed and -
- they receive their stake back. The price to stake -
- increases by 1% after each new stake. -
- -
- When product fees are collected, 90% of that fee is redistributed -
- to the 100 addresses on the list. -
--------------------------------------------------------------------------
*/
contract Distribute is IERC20 {
using SafeMath for uint256;
// EVENTS
event Stake(address indexed user);
event Purchase(address indexed user, uint256 amount);
event Withdraw(address indexed user);
//basic identifiers - ERC20 Standard
string public name = "ANALYSX";
string public symbol = "XYS";
uint256 public decimals = 6;
//total Supply - currently 40'000'000
uint256 private _totalSupply = 40000000 * (10 ** decimals);
// balances and allowance - ERC20 Standard
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
// Staked Token Tracking
mapping (address => uint256) public _staked;
// Users earnings from staking
mapping (address => uint256) private _earned;
// Is user on staking list?
mapping (address => bool) public _isStaked;
// Stake List
address[100] private _stakeList;
// initial staking fee
uint256 public _initialFee = 100000 * (10 ** decimals);
// Current Staking Fee
uint256 public _stakeFee;
// Total Amount Staked;
uint256 public _totalStaked;
// Time of Previous Staker
uint256 public _lastStakerTime;
// Contract owner Address
address payable _owner;
// Constructor
constructor(address payable owner) public {
}
// ---------------------------------
// -- ERC20 Functions --
// -- Open Zeppelin --
// ---------------------------------
function totalSupply() override public view returns (uint256) {
}
function balanceOf(address account) public override view returns (uint256) {
}
function transfer(address recipient, uint256 amount) override public returns (bool) {
}
function allowance(address owner, address spender) override public view returns (uint256) {
}
function approve(address spender, uint256 value) override public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) override public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
// --------------------------------------
// -- Custom Functions --
// --------------------------------------
// Owner modifier. Functions with this modifier can only be called by contract owner
modifier onlyOwner() {
}
// checks if the sending user is owner. Returns true or false
function isOwner() public view returns (bool) {
}
// change owner
function changeOwner(address payable newOwner) public onlyOwner {
}
// Returns users stake earnings
function checkReward() public view returns (uint256) {
}
// returns staker list
function showStakers() public view returns (address[100] memory) {
}
// Stake Function
function stake() public {
require(msg.sender != _owner, "Owner cannot stake");
require(_balances[msg.sender] >= _stakeFee, "Insufficient Tokens");
require(_isStaked[msg.sender] == false, "You are already staking");
require(<FILL_ME>) // Maybe redundant?
// updates new stakers balances and records stake
_balances[msg.sender] = _balances[msg.sender].sub(_stakeFee);
_staked[msg.sender] = _stakeFee;
_totalStaked = _totalStaked.add(_stakeFee);
// updates staking fee
uint256 stakeIncrease = _stakeFee.div(100);
_stakeFee = _stakeFee.add(stakeIncrease);
_lastStakerTime = block.timestamp;
// updates stake list
updateStaking();
emit Stake(msg.sender);
}
// Remove a user from staking, and replace slot with _owner address
function exitStake() public returns(bool) {
}
//Adds new user to staking list, removes oldest user, returns their stake
function updateStaking() internal {
}
// Function to purchase service (any price is possible, product is offerred off-chain)
function purchaseService(uint256 price, address purchaser) public {
}
// Stakers can call this function to claim their funds without leaving the pool.
function withdraw() public {
}
// Resets staking price. Can only be usable if no new staker has entered the pool in 1 month (2592000 seconds)
function stakeReset() public onlyOwner {
}
}
| _staked[msg.sender]==0,"You have stake" | 51,033 | _staked[msg.sender]==0 |
"You are not staking" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.23 <0.7.0;
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
);
}
pragma solidity >=0.4.23 <0.7.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
}
}
pragma solidity >=0.4.23 <0.7.0;
/*
--------------------------------------------------------------------------
- Distribution Contract for the Analys-X (XYS) Token -
- Written by: Admirral -
- ~~~~~~~~~~~~~~~~ -
- This contract will track XYS stakers and distribute payments -
- received from users who purchase Analys-X products. All payments -
- will be received in XYS tokens. -
- -
- Only 100 stakers will be allowed at any one time. -
- When a new user stakes, the oldest on the list is removed and -
- they receive their stake back. The price to stake -
- increases by 1% after each new stake. -
- -
- When product fees are collected, 90% of that fee is redistributed -
- to the 100 addresses on the list. -
--------------------------------------------------------------------------
*/
contract Distribute is IERC20 {
using SafeMath for uint256;
// EVENTS
event Stake(address indexed user);
event Purchase(address indexed user, uint256 amount);
event Withdraw(address indexed user);
//basic identifiers - ERC20 Standard
string public name = "ANALYSX";
string public symbol = "XYS";
uint256 public decimals = 6;
//total Supply - currently 40'000'000
uint256 private _totalSupply = 40000000 * (10 ** decimals);
// balances and allowance - ERC20 Standard
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
// Staked Token Tracking
mapping (address => uint256) public _staked;
// Users earnings from staking
mapping (address => uint256) private _earned;
// Is user on staking list?
mapping (address => bool) public _isStaked;
// Stake List
address[100] private _stakeList;
// initial staking fee
uint256 public _initialFee = 100000 * (10 ** decimals);
// Current Staking Fee
uint256 public _stakeFee;
// Total Amount Staked;
uint256 public _totalStaked;
// Time of Previous Staker
uint256 public _lastStakerTime;
// Contract owner Address
address payable _owner;
// Constructor
constructor(address payable owner) public {
}
// ---------------------------------
// -- ERC20 Functions --
// -- Open Zeppelin --
// ---------------------------------
function totalSupply() override public view returns (uint256) {
}
function balanceOf(address account) public override view returns (uint256) {
}
function transfer(address recipient, uint256 amount) override public returns (bool) {
}
function allowance(address owner, address spender) override public view returns (uint256) {
}
function approve(address spender, uint256 value) override public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) override public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
// --------------------------------------
// -- Custom Functions --
// --------------------------------------
// Owner modifier. Functions with this modifier can only be called by contract owner
modifier onlyOwner() {
}
// checks if the sending user is owner. Returns true or false
function isOwner() public view returns (bool) {
}
// change owner
function changeOwner(address payable newOwner) public onlyOwner {
}
// Returns users stake earnings
function checkReward() public view returns (uint256) {
}
// returns staker list
function showStakers() public view returns (address[100] memory) {
}
// Stake Function
function stake() public {
}
// Remove a user from staking, and replace slot with _owner address
function exitStake() public returns(bool) {
require(msg.sender != _owner, "owner cannot exit");
require(<FILL_ME>)
require(_staked[msg.sender] != 0, "You don't have stake"); // Maybe redundant?
for (uint i = 0; i < 99; i++) {
if (_stakeList[i] == msg.sender) {
_balances[msg.sender] = _balances[msg.sender].add(_earned[msg.sender]).add(_staked[msg.sender]);
_staked[msg.sender] = 0;
_earned[msg.sender] = 0;
_stakeList[i] = _owner;
_isStaked[msg.sender] = false;
return true;
}
}
return false;
}
//Adds new user to staking list, removes oldest user, returns their stake
function updateStaking() internal {
}
// Function to purchase service (any price is possible, product is offerred off-chain)
function purchaseService(uint256 price, address purchaser) public {
}
// Stakers can call this function to claim their funds without leaving the pool.
function withdraw() public {
}
// Resets staking price. Can only be usable if no new staker has entered the pool in 1 month (2592000 seconds)
function stakeReset() public onlyOwner {
}
}
| _isStaked[msg.sender]==true,"You are not staking" | 51,033 | _isStaked[msg.sender]==true |
"You don't have stake" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.23 <0.7.0;
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
);
}
pragma solidity >=0.4.23 <0.7.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
}
}
pragma solidity >=0.4.23 <0.7.0;
/*
--------------------------------------------------------------------------
- Distribution Contract for the Analys-X (XYS) Token -
- Written by: Admirral -
- ~~~~~~~~~~~~~~~~ -
- This contract will track XYS stakers and distribute payments -
- received from users who purchase Analys-X products. All payments -
- will be received in XYS tokens. -
- -
- Only 100 stakers will be allowed at any one time. -
- When a new user stakes, the oldest on the list is removed and -
- they receive their stake back. The price to stake -
- increases by 1% after each new stake. -
- -
- When product fees are collected, 90% of that fee is redistributed -
- to the 100 addresses on the list. -
--------------------------------------------------------------------------
*/
contract Distribute is IERC20 {
using SafeMath for uint256;
// EVENTS
event Stake(address indexed user);
event Purchase(address indexed user, uint256 amount);
event Withdraw(address indexed user);
//basic identifiers - ERC20 Standard
string public name = "ANALYSX";
string public symbol = "XYS";
uint256 public decimals = 6;
//total Supply - currently 40'000'000
uint256 private _totalSupply = 40000000 * (10 ** decimals);
// balances and allowance - ERC20 Standard
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
// Staked Token Tracking
mapping (address => uint256) public _staked;
// Users earnings from staking
mapping (address => uint256) private _earned;
// Is user on staking list?
mapping (address => bool) public _isStaked;
// Stake List
address[100] private _stakeList;
// initial staking fee
uint256 public _initialFee = 100000 * (10 ** decimals);
// Current Staking Fee
uint256 public _stakeFee;
// Total Amount Staked;
uint256 public _totalStaked;
// Time of Previous Staker
uint256 public _lastStakerTime;
// Contract owner Address
address payable _owner;
// Constructor
constructor(address payable owner) public {
}
// ---------------------------------
// -- ERC20 Functions --
// -- Open Zeppelin --
// ---------------------------------
function totalSupply() override public view returns (uint256) {
}
function balanceOf(address account) public override view returns (uint256) {
}
function transfer(address recipient, uint256 amount) override public returns (bool) {
}
function allowance(address owner, address spender) override public view returns (uint256) {
}
function approve(address spender, uint256 value) override public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) override public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
// --------------------------------------
// -- Custom Functions --
// --------------------------------------
// Owner modifier. Functions with this modifier can only be called by contract owner
modifier onlyOwner() {
}
// checks if the sending user is owner. Returns true or false
function isOwner() public view returns (bool) {
}
// change owner
function changeOwner(address payable newOwner) public onlyOwner {
}
// Returns users stake earnings
function checkReward() public view returns (uint256) {
}
// returns staker list
function showStakers() public view returns (address[100] memory) {
}
// Stake Function
function stake() public {
}
// Remove a user from staking, and replace slot with _owner address
function exitStake() public returns(bool) {
require(msg.sender != _owner, "owner cannot exit");
require(_isStaked[msg.sender] == true, "You are not staking");
require(<FILL_ME>) // Maybe redundant?
for (uint i = 0; i < 99; i++) {
if (_stakeList[i] == msg.sender) {
_balances[msg.sender] = _balances[msg.sender].add(_earned[msg.sender]).add(_staked[msg.sender]);
_staked[msg.sender] = 0;
_earned[msg.sender] = 0;
_stakeList[i] = _owner;
_isStaked[msg.sender] = false;
return true;
}
}
return false;
}
//Adds new user to staking list, removes oldest user, returns their stake
function updateStaking() internal {
}
// Function to purchase service (any price is possible, product is offerred off-chain)
function purchaseService(uint256 price, address purchaser) public {
}
// Stakers can call this function to claim their funds without leaving the pool.
function withdraw() public {
}
// Resets staking price. Can only be usable if no new staker has entered the pool in 1 month (2592000 seconds)
function stakeReset() public onlyOwner {
}
}
| _staked[msg.sender]!=0,"You don't have stake" | 51,033 | _staked[msg.sender]!=0 |
"Insufficient funds" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.23 <0.7.0;
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
);
}
pragma solidity >=0.4.23 <0.7.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
}
}
pragma solidity >=0.4.23 <0.7.0;
/*
--------------------------------------------------------------------------
- Distribution Contract for the Analys-X (XYS) Token -
- Written by: Admirral -
- ~~~~~~~~~~~~~~~~ -
- This contract will track XYS stakers and distribute payments -
- received from users who purchase Analys-X products. All payments -
- will be received in XYS tokens. -
- -
- Only 100 stakers will be allowed at any one time. -
- When a new user stakes, the oldest on the list is removed and -
- they receive their stake back. The price to stake -
- increases by 1% after each new stake. -
- -
- When product fees are collected, 90% of that fee is redistributed -
- to the 100 addresses on the list. -
--------------------------------------------------------------------------
*/
contract Distribute is IERC20 {
using SafeMath for uint256;
// EVENTS
event Stake(address indexed user);
event Purchase(address indexed user, uint256 amount);
event Withdraw(address indexed user);
//basic identifiers - ERC20 Standard
string public name = "ANALYSX";
string public symbol = "XYS";
uint256 public decimals = 6;
//total Supply - currently 40'000'000
uint256 private _totalSupply = 40000000 * (10 ** decimals);
// balances and allowance - ERC20 Standard
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
// Staked Token Tracking
mapping (address => uint256) public _staked;
// Users earnings from staking
mapping (address => uint256) private _earned;
// Is user on staking list?
mapping (address => bool) public _isStaked;
// Stake List
address[100] private _stakeList;
// initial staking fee
uint256 public _initialFee = 100000 * (10 ** decimals);
// Current Staking Fee
uint256 public _stakeFee;
// Total Amount Staked;
uint256 public _totalStaked;
// Time of Previous Staker
uint256 public _lastStakerTime;
// Contract owner Address
address payable _owner;
// Constructor
constructor(address payable owner) public {
}
// ---------------------------------
// -- ERC20 Functions --
// -- Open Zeppelin --
// ---------------------------------
function totalSupply() override public view returns (uint256) {
}
function balanceOf(address account) public override view returns (uint256) {
}
function transfer(address recipient, uint256 amount) override public returns (bool) {
}
function allowance(address owner, address spender) override public view returns (uint256) {
}
function approve(address spender, uint256 value) override public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) override public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
// --------------------------------------
// -- Custom Functions --
// --------------------------------------
// Owner modifier. Functions with this modifier can only be called by contract owner
modifier onlyOwner() {
}
// checks if the sending user is owner. Returns true or false
function isOwner() public view returns (bool) {
}
// change owner
function changeOwner(address payable newOwner) public onlyOwner {
}
// Returns users stake earnings
function checkReward() public view returns (uint256) {
}
// returns staker list
function showStakers() public view returns (address[100] memory) {
}
// Stake Function
function stake() public {
}
// Remove a user from staking, and replace slot with _owner address
function exitStake() public returns(bool) {
}
//Adds new user to staking list, removes oldest user, returns their stake
function updateStaking() internal {
}
// Function to purchase service (any price is possible, product is offerred off-chain)
function purchaseService(uint256 price, address purchaser) public {
// Check if user has required balance
require(<FILL_ME>)
// token value must be > 0.001 to avoid computation errors)
require (price > 1000, "Value too Small");
// 10% goes to owner (this can be adjusted)
uint256 ownerShare = price.div(10);
uint256 toSplit = price.sub(ownerShare);
uint256 stakeShare = toSplit.div(100);
_earned[_owner] = _earned[_owner].add(ownerShare);
// distributes funds to each staker, except the last one.
for (uint i = 0; i < 99; i++) {
// adds stakeShare to each user
_earned[_stakeList[i]] = _earned[_stakeList[i]].add(stakeShare);
// We subtract from toSplit to produce a final amount for the final staker
toSplit = toSplit.sub(stakeShare);
}
// toSplit should be equal or slightly higher than stakeShare. This is to avoid accidental burning.
_earned[_stakeList[99]] = _earned[_stakeList[99]].add(toSplit);
// Remove the price from sender.
_balances[purchaser] = _balances[purchaser].sub(price);
emit Purchase(purchaser, price);
}
// Stakers can call this function to claim their funds without leaving the pool.
function withdraw() public {
}
// Resets staking price. Can only be usable if no new staker has entered the pool in 1 month (2592000 seconds)
function stakeReset() public onlyOwner {
}
}
| _balances[purchaser]>=price,"Insufficient funds" | 51,033 | _balances[purchaser]>=price |
"Stake some more" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.23 <0.7.0;
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
);
}
pragma solidity >=0.4.23 <0.7.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
}
}
pragma solidity >=0.4.23 <0.7.0;
/*
--------------------------------------------------------------------------
- Distribution Contract for the Analys-X (XYS) Token -
- Written by: Admirral -
- ~~~~~~~~~~~~~~~~ -
- This contract will track XYS stakers and distribute payments -
- received from users who purchase Analys-X products. All payments -
- will be received in XYS tokens. -
- -
- Only 100 stakers will be allowed at any one time. -
- When a new user stakes, the oldest on the list is removed and -
- they receive their stake back. The price to stake -
- increases by 1% after each new stake. -
- -
- When product fees are collected, 90% of that fee is redistributed -
- to the 100 addresses on the list. -
--------------------------------------------------------------------------
*/
contract Distribute is IERC20 {
using SafeMath for uint256;
// EVENTS
event Stake(address indexed user);
event Purchase(address indexed user, uint256 amount);
event Withdraw(address indexed user);
//basic identifiers - ERC20 Standard
string public name = "ANALYSX";
string public symbol = "XYS";
uint256 public decimals = 6;
//total Supply - currently 40'000'000
uint256 private _totalSupply = 40000000 * (10 ** decimals);
// balances and allowance - ERC20 Standard
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
// Staked Token Tracking
mapping (address => uint256) public _staked;
// Users earnings from staking
mapping (address => uint256) private _earned;
// Is user on staking list?
mapping (address => bool) public _isStaked;
// Stake List
address[100] private _stakeList;
// initial staking fee
uint256 public _initialFee = 100000 * (10 ** decimals);
// Current Staking Fee
uint256 public _stakeFee;
// Total Amount Staked;
uint256 public _totalStaked;
// Time of Previous Staker
uint256 public _lastStakerTime;
// Contract owner Address
address payable _owner;
// Constructor
constructor(address payable owner) public {
}
// ---------------------------------
// -- ERC20 Functions --
// -- Open Zeppelin --
// ---------------------------------
function totalSupply() override public view returns (uint256) {
}
function balanceOf(address account) public override view returns (uint256) {
}
function transfer(address recipient, uint256 amount) override public returns (bool) {
}
function allowance(address owner, address spender) override public view returns (uint256) {
}
function approve(address spender, uint256 value) override public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) override public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
// --------------------------------------
// -- Custom Functions --
// --------------------------------------
// Owner modifier. Functions with this modifier can only be called by contract owner
modifier onlyOwner() {
}
// checks if the sending user is owner. Returns true or false
function isOwner() public view returns (bool) {
}
// change owner
function changeOwner(address payable newOwner) public onlyOwner {
}
// Returns users stake earnings
function checkReward() public view returns (uint256) {
}
// returns staker list
function showStakers() public view returns (address[100] memory) {
}
// Stake Function
function stake() public {
}
// Remove a user from staking, and replace slot with _owner address
function exitStake() public returns(bool) {
}
//Adds new user to staking list, removes oldest user, returns their stake
function updateStaking() internal {
}
// Function to purchase service (any price is possible, product is offerred off-chain)
function purchaseService(uint256 price, address purchaser) public {
}
// Stakers can call this function to claim their funds without leaving the pool.
function withdraw() public {
require(<FILL_ME>)
_balances[msg.sender] = _balances[msg.sender].add(_earned[msg.sender]);
_earned[msg.sender] = 0;
emit Withdraw(msg.sender);
}
// Resets staking price. Can only be usable if no new staker has entered the pool in 1 month (2592000 seconds)
function stakeReset() public onlyOwner {
}
}
| _earned[msg.sender]>0,"Stake some more" | 51,033 | _earned[msg.sender]>0 |
"not enough time has passed" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.23 <0.7.0;
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
);
}
pragma solidity >=0.4.23 <0.7.0;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
}
}
pragma solidity >=0.4.23 <0.7.0;
/*
--------------------------------------------------------------------------
- Distribution Contract for the Analys-X (XYS) Token -
- Written by: Admirral -
- ~~~~~~~~~~~~~~~~ -
- This contract will track XYS stakers and distribute payments -
- received from users who purchase Analys-X products. All payments -
- will be received in XYS tokens. -
- -
- Only 100 stakers will be allowed at any one time. -
- When a new user stakes, the oldest on the list is removed and -
- they receive their stake back. The price to stake -
- increases by 1% after each new stake. -
- -
- When product fees are collected, 90% of that fee is redistributed -
- to the 100 addresses on the list. -
--------------------------------------------------------------------------
*/
contract Distribute is IERC20 {
using SafeMath for uint256;
// EVENTS
event Stake(address indexed user);
event Purchase(address indexed user, uint256 amount);
event Withdraw(address indexed user);
//basic identifiers - ERC20 Standard
string public name = "ANALYSX";
string public symbol = "XYS";
uint256 public decimals = 6;
//total Supply - currently 40'000'000
uint256 private _totalSupply = 40000000 * (10 ** decimals);
// balances and allowance - ERC20 Standard
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
// Staked Token Tracking
mapping (address => uint256) public _staked;
// Users earnings from staking
mapping (address => uint256) private _earned;
// Is user on staking list?
mapping (address => bool) public _isStaked;
// Stake List
address[100] private _stakeList;
// initial staking fee
uint256 public _initialFee = 100000 * (10 ** decimals);
// Current Staking Fee
uint256 public _stakeFee;
// Total Amount Staked;
uint256 public _totalStaked;
// Time of Previous Staker
uint256 public _lastStakerTime;
// Contract owner Address
address payable _owner;
// Constructor
constructor(address payable owner) public {
}
// ---------------------------------
// -- ERC20 Functions --
// -- Open Zeppelin --
// ---------------------------------
function totalSupply() override public view returns (uint256) {
}
function balanceOf(address account) public override view returns (uint256) {
}
function transfer(address recipient, uint256 amount) override public returns (bool) {
}
function allowance(address owner, address spender) override public view returns (uint256) {
}
function approve(address spender, uint256 value) override public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) override public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
// --------------------------------------
// -- Custom Functions --
// --------------------------------------
// Owner modifier. Functions with this modifier can only be called by contract owner
modifier onlyOwner() {
}
// checks if the sending user is owner. Returns true or false
function isOwner() public view returns (bool) {
}
// change owner
function changeOwner(address payable newOwner) public onlyOwner {
}
// Returns users stake earnings
function checkReward() public view returns (uint256) {
}
// returns staker list
function showStakers() public view returns (address[100] memory) {
}
// Stake Function
function stake() public {
}
// Remove a user from staking, and replace slot with _owner address
function exitStake() public returns(bool) {
}
//Adds new user to staking list, removes oldest user, returns their stake
function updateStaking() internal {
}
// Function to purchase service (any price is possible, product is offerred off-chain)
function purchaseService(uint256 price, address purchaser) public {
}
// Stakers can call this function to claim their funds without leaving the pool.
function withdraw() public {
}
// Resets staking price. Can only be usable if no new staker has entered the pool in 1 month (2592000 seconds)
function stakeReset() public onlyOwner {
require(<FILL_ME>)
_stakeFee = _initialFee;
}
}
| block.timestamp.sub(_lastStakerTime)>=2592000,"not enough time has passed" | 51,033 | block.timestamp.sub(_lastStakerTime)>=2592000 |
"Purchase would exceed max supply of NFTs" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
contract DogePirates is ERC721("DOGE Pirates", "DOPE"), ERC721Enumerable, Ownable, Pausable {
using SafeMath for uint256;
using Strings for uint256;
string[7] private baseURI;
string private blindURI;
uint256 public BUY_LIMIT_PER_TX = 20;
uint256 public MAX_NFT = 3333;
uint256 public NFTPrice = 42000000000000000; // 0.042 ETH
constructor() {}
/*
* Function to withdraw collected amount during minting
*/
function withdraw(address _to) public onlyOwner {
}
/*
* Function to mint new NFTs
* It is payable. Amount is calculated as per (NFTPrice*_numOfTokens)
*/
function mintNFT(uint256 _numOfTokens) public payable whenNotPaused {
require(_numOfTokens <= BUY_LIMIT_PER_TX, "Can't mint above limit");
require(<FILL_ME>)
require(NFTPrice.mul(_numOfTokens) == msg.value, "Ether value sent is not correct");
for(uint i=0; i < _numOfTokens; i++) {
_safeMint(msg.sender, totalSupply());
}
}
/*
* Function to get token URI of given token ID
* URI will be blank untill totalSupply reaches MAX_NFT
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/*
* Function to set Base and Blind URI
*/
function setURIs(string memory _blindURI, string[7] memory _URIs) external onlyOwner {
}
/*
* Function to pause
*/
function pause() external onlyOwner {
}
/*
* Function to unpause
*/
function unpause() external onlyOwner {
}
// Standard functions to be overridden
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721,
ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| totalSupply().add(_numOfTokens)<=MAX_NFT,"Purchase would exceed max supply of NFTs" | 51,062 | totalSupply().add(_numOfTokens)<=MAX_NFT |
"Ether value sent is not correct" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
contract DogePirates is ERC721("DOGE Pirates", "DOPE"), ERC721Enumerable, Ownable, Pausable {
using SafeMath for uint256;
using Strings for uint256;
string[7] private baseURI;
string private blindURI;
uint256 public BUY_LIMIT_PER_TX = 20;
uint256 public MAX_NFT = 3333;
uint256 public NFTPrice = 42000000000000000; // 0.042 ETH
constructor() {}
/*
* Function to withdraw collected amount during minting
*/
function withdraw(address _to) public onlyOwner {
}
/*
* Function to mint new NFTs
* It is payable. Amount is calculated as per (NFTPrice*_numOfTokens)
*/
function mintNFT(uint256 _numOfTokens) public payable whenNotPaused {
require(_numOfTokens <= BUY_LIMIT_PER_TX, "Can't mint above limit");
require(totalSupply().add(_numOfTokens) <= MAX_NFT, "Purchase would exceed max supply of NFTs");
require(<FILL_ME>)
for(uint i=0; i < _numOfTokens; i++) {
_safeMint(msg.sender, totalSupply());
}
}
/*
* Function to get token URI of given token ID
* URI will be blank untill totalSupply reaches MAX_NFT
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/*
* Function to set Base and Blind URI
*/
function setURIs(string memory _blindURI, string[7] memory _URIs) external onlyOwner {
}
/*
* Function to pause
*/
function pause() external onlyOwner {
}
/*
* Function to unpause
*/
function unpause() external onlyOwner {
}
// Standard functions to be overridden
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721,
ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| NFTPrice.mul(_numOfTokens)==msg.value,"Ether value sent is not correct" | 51,062 | NFTPrice.mul(_numOfTokens)==msg.value |
'Genesis Mint Event is not over' | // SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.7.0;
import './Trib.sol';
import './Genesis.sol';
import './interfaces/IVault.sol';
import './utils/MathUtils.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';
import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
/// @title Contribute
/// @notice A capital coordination tool.
/// @author Kento Sadim
contract Contribute is ReentrancyGuard {
using SafeMath for uint256;
using MathUtils for uint256;
using SafeERC20 for IERC20;
event TokensBought(address indexed from, uint256 amountInvested, uint256 tokensMinted);
event TokensSold(address indexed from, uint256 tokensSold, uint256 amountReceived);
event MintAndBurn(uint256 reserveAmount, uint256 tokensBurned);
event InterestClaimed(address indexed from, uint256 initerestAmount);
/// @notice A 10% tax is applied to every purchase or sale of tokens.
uint256 public constant TAX = 10;
/// @notice The slope of the bonding curve.
uint256 public constant DIVIDER = 1000000; // 1 / multiplier 0.000001 (so that we don't deal with decimals)
/// @notice Address in which tokens are sent to be burned.
/// These tokens can't be redeemed by the reserve.
address constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
/// @notice Trib token instance.
Trib public token;
/// @notice Genesis Mint Event contract instance.
Genesis public genesis;
/// @notice Token price at the Genesis Mint Event.
uint256 public genesisAveragePrice;
/// @notice Total funds invested in the Genesis Mint Event.
uint256 public genesisReserve;
/// @notice Total interests earned since the contract deployment.
uint256 public totalInterestClaimed;
/// @notice Total reserve value that backs all tokens in circulation.
/// @dev Area below the bonding curve.
uint256 public totalReserve;
/// @notice mUSD reserve instance.
/// ropsten - 0x4E1000616990D83e56f4b5fC6CC8602DcfD20459
/// mainnet - 0xe2f2a5C287993345a840Db3B0845fbC70f5935a5
address public reserve;
/// @notice Interface for integration with lending platform.
address public vault;
/// @notice Current state of the application.
/// GME is either open (true) or finished (false).
bool public GME = true;
modifier onlyGenesis() {
}
modifier GMEOpen() {
}
modifier GMEOver() {
require(<FILL_ME>)
_;
}
constructor(address _vault, uint256 _endTime) public {
}
/// @notice Invests funds contributed in the Genesis Mint Event.
/// @dev Updates average price on each investment.
/// @param contributedAmount Total value in reserve to exchange for tokens.
function genesisInvest(uint256 contributedAmount) external onlyGenesis GMEOpen {
}
/// @notice Concludes the Genesis Mint Event.
/// @dev Can only be called by the Genesis Contract after the GME is over.
function concludeGME() external onlyGenesis GMEOpen {
}
/// @notice Exchanges reserve to tokens according to the bonding curve formula.
/// @dev Amount to be invested needs to be approved first.
/// @param reserveAmount Value in wei that will be exchanged to tokens.
function invest(uint256 reserveAmount) external GMEOver {
}
/// @notice Exchanges token for reserve according to the bonding curve formula.
/// @param tokenAmount Token value in wei that will be exchanged to reserve
function sell(uint256 tokenAmount) external GMEOver {
}
/// @notice Sells the maximum amount of tokens required to claim the most interest.
function claimInterest() external GMEOver {
}
/// @notice Calculates the amount of tokens required to claim the outstanding interest.
/// @return Amount of tokens required to claim all the outstanding interest.
function totalClaimRequired() public view returns (uint256) {
}
/// @notice Calculates the amount of tokens required to claim a specific interest amount.
/// @param amountToClaim Interest amount to be claimed.
/// @return Amount of tokens required to claim all specified interest.
function claimRequired(uint256 amountToClaim) public view returns (uint256) {
}
/// @notice Total amount that has been paid in Taxes
/// and is now forever locked in the protocol.
function totalContributed() external view returns (uint256) {
}
/// @notice Total outstanding interest accumulated.
/// @return Interest in reserve accumulated in lending protocol.
function getInterest() public view returns (uint256) {
}
/// @notice Total supply of tokens. This includes burned tokens.
/// @return Total supply of token in wei.
function getTotalSupply() public view returns (uint256) {
}
/// @notice Total tokens that have been burned.
/// @dev These tokens are still in circulation therefore they
/// are still considered on the bonding curve formula.
/// @return Total burned token amount in wei.
function getBurnedTokensAmount() public view returns (uint256) {
}
/// @notice Token's price in wei according to the bonding curve formula.
/// @return Current token price in wei.
function getCurrentTokenPrice() external view returns (uint256) {
}
/// @notice Calculates the amount of tokens in exchange for reserve after applying the 10% tax.
/// @param reserveAmount Reserve value in wei to use in the conversion.
/// @return Token amount in wei after the 10% tax has been applied.
function getReserveToTokensTaxed(uint256 reserveAmount) external view returns (uint256) {
}
/// @notice Calculates the amount of reserve in exchange for tokens after applying the 10% tax.
/// @param tokenAmount Token value in wei to use in the conversion.
/// @return Reserve amount in wei after the 10% tax has been applied.
function getTokensToReserveTaxed(uint256 tokenAmount) external view returns (uint256) {
}
/// @notice Calculates the amount of tokens in exchange for reserve.
/// @param reserveAmount Reserve value in wei to use in the conversion.
/// @return Token amount in wei.
function getReserveToTokens(uint256 reserveAmount) public view returns (uint256) {
}
/// @notice Calculates the amount of reserve in exchange for tokens.
/// @param tokenAmount Token value in wei to use in the conversion.
/// @return Reserve amount in wei.
function getTokensToReserve(uint256 tokenAmount) public view returns (uint256) {
}
/// @notice Worker function that exchanges reserve to tokens.
/// Extracts 10% fee from the reserve supplied and exchanges the rest to tokens.
/// Total amount is then sent to the lending protocol so it can start earning interest.
/// @dev User must approve the reserve to be spent before investing.
/// @param _reserveAmount Total reserve value in wei to be exchanged to tokens.
function _invest(uint256 _reserveAmount) internal nonReentrant {
}
/// @notice Worker function that exchanges token for reserve.
/// Tokens are decreased from the total supply according to the bonding curve formula.
/// A 10% tax is applied to the reserve amount. 90% is retrieved
/// from the lending protocol and sent to the user and 10% is used to mint and burn tokens.
/// @param _tokenAmount Token value in wei that will be exchanged to reserve.
function _sell(uint256 _tokenAmount) internal nonReentrant {
}
function _approveMax(address tkn, address spender) internal {
}
/// @notice Calculates the tokens required to claim a specific amount of interest.
/// @param _amount The interest to be claimed.
/// @return The amount of tokens in wei that are required to claim the interest.
function _calculateClaimRequired(uint256 _amount) internal view returns (uint256) {
}
/// @notice Calculates the maximum amount of interest that can be claimed
/// given a certain value.
/// @param _amount Value to be used in the calculation.
/// @return The interest amount in wei that can be claimed for the given value.
function _calculateClaimableAmount(uint256 _amount) internal view returns (uint256) {
}
/**
* Supply (s), reserve (r) and token price (p) are in a relationship defined by the bonding curve:
* p = m * s
* The reserve equals to the area below the bonding curve
* r = s^2 / 2
* The formula for the supply becomes
* s = sqrt(2 * r / m)
*
* In solidity computations, we are using divider instead of multiplier (because its an integer).
* All values are decimals with 18 decimals (represented as uints), which needs to be compensated for in
* multiplications and divisions
*/
/// @notice Computes the increased supply given an amount of reserve.
/// @param _reserveDelta The amount of reserve in wei to be used in the calculation.
/// @param _totalReserve The current reserve state to be used in the calculation.
/// @param _supply The current supply state to be used in the calculation.
/// @return token amount in wei.
function _calculateReserveToTokens(
uint256 _reserveDelta,
uint256 _totalReserve,
uint256 _supply
) internal pure returns (uint256) {
}
/// @notice Computes the decrease in reserve given an amount of tokens.
/// @param _supplyDelta The amount of tokens in wei to be used in the calculation.
/// @param _supply The current supply state to be used in the calculation.
/// @param _totalReserve The current reserve state to be used in the calculation.
/// @return Reserve amount in wei.
function _calculateTokensToReserve(
uint256 _supplyDelta,
uint256 _supply,
uint256 _totalReserve
) internal pure returns (uint256) {
}
/// @notice Calculates reserve given a specific supply.
/// @param _supply The token supply in wei to be used in the calculation.
/// @return Reserve amount in wei.
function _calculateReserveFromSupply(uint256 _supply) internal pure returns (uint256) {
}
}
| !GME,'Genesis Mint Event is not over' | 51,089 | !GME |
"Only authorized addresses can call this function" | pragma solidity ^0.5.15;
interface ERC20CompatibleToken {
function balanceOf(address tokenOwner) external view returns (uint balance);
function allowance(address tokenOwner, address spender) external view returns (uint remaining);
function transfer (address to, uint tokens) external returns (bool success);
function transferFrom (address from, address to, uint tokens) external returns (bool success);
}
/**
* This token factory creates customizable TokenReserve smart contracts which are used for time-based locking of any ERC20 and ERC20-compatible tokens.
* The information regarding the locking smart contract itself is provided below.
* Made with β₯ by DreamTeam. Find more info about this smart contract and others here: https://github.com/dreamteam-gg/smart-contracts
* Anyone is free to create TokenReserve contracts using this factory.
*/
contract TokenReserveFactory {
event ContractCreated(address tokenReserveContract);
/**
* Creates TokenReserve smart contracts.
*/
function deployNewTokenReserveContract(
address tokenContractAddress, address[] memory authorizedWithdrawalAddresses, uint lockPeriod, uint bracketSize
) public returns (address) {
}
}
/**
* Math operations with safety checks that throw on overflows.
*/
library SafeMath {
function mul (uint256 a, uint256 b) internal pure returns (uint256 c) {
}
function div (uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub (uint256 a, uint256 b) internal pure returns (uint256) {
}
function add (uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* Token reserve contract makes it possible to time-lock ERC20 {tokenContractAddress} tokens for {lockPeriod}, specified in the constructor.
*
* The time-lock is bracketed by ~30 days by default (not a calendar month). E.g. if {lockPeriod=5 years} and you lock 10 tokens multiple times during the month bracket,
* you will get all tokens unlocked at a single moment after 5 years. If you lock more tokens in the next month bracket, you get them unlocked after 5 years
* and 30 days via a single transaction.
*
* Example:
* {lockPeriod = 1 year (365 days)}
*
* Year 0 β You locked 10 tokens in a single month bracket Year 1 β Those 10 tokens are unlocked here
* | :X :XXX : : : : : : : : : | :X :X : : : : :
* βββ You locked 50 tokens 3 times in a month bracket β Those 50 tokens are unlocked here just once
*/
contract TokenReserve {
using SafeMath for uint256;
uint public constant bracketingStartDate = 1546300800; // Tue, 01 Jan 2019 00:00:00 GMT - the beginning of a new year/month/day/hour/minute
// = 5 years, can be reassigned in constructor (see the exact number in blockchain explorer)
uint public lockPeriod = 5 * (365 days + 6 hours);
uint public bracketSize = 30 days + 10 hours; // Pretends to be the best approximation of a calendar month. Reassigned in constructor.
address public tokenContractAddress; // Assigned in constructor
mapping(address => bool) public authorizedWithdrawalAddress; // Assigned in constructor
// Linked list of unlock records bracketed by {bracketSize}
struct BracketRecord {
uint nextBracket;
uint value;
}
mapping(uint => BracketRecord) brackets;
uint firstUnlockBracket;
uint lastUnlockBracket;
uint totalValueLocked;
event TokensLocked(uint value, uint unlockTimestamp);
event TokensUnlocked(uint value, uint unlockTimestamp); // Does not include tokens accidentally sent to this smart contract
event AccountAuthorized(address account, address authorizedBy);
event AccountDeauthorized(address account);
modifier authorizedAccessOnly() {
require(<FILL_ME>)
_;
}
constructor(address _tokenContractAddress, uint _lockPeriod, address[] memory authorizedWithdrawalAddresses, uint _bracketSize) public {
}
/**
* This function takes {value} tokens from the {msg.sender} and locks them on a smart contract within the right computed bracket.
* Anyone can lock their tokens on this smart contract, but only an admin can unlock them.
* Tokens have to be approved in the token smart contract before the smart contract can take them as specified.
*/
function lockTokens(uint value) public {
}
function lockTokensInternal(address from, uint value) internal {
}
/**
* Unlocks tokens available at the moment and sends them to message sender. Callable only by an authorized address.
* Throws an error if no tokens are available.
*/
function unlockTokens() public authorizedAccessOnly {
}
function unlockTokensInternal(address receiver) internal {
}
/**
* Any authorized address can authorize more addresses.
*/
function authorizeWithdrawalAddress(address _authorizedWithdrawalAddress) public authorizedAccessOnly {
}
/**
* Only the withdrawal address itself can deauthorize. This prevents possible deadlock in case one of the authorized private keys leak.
*/
function deauthorizeWithdrawalAddress() public authorizedAccessOnly {
}
/**
* Public getter for blockchain explorer to show how many tokens are unlocked at the moment.
*/
function getUnlockedValue() public view returns (uint) {
}
/**
* Public getter for blockchain explorer to show when is the next unlock possible.
* Returns unix timestamp either in the past (if unlock is already available) or in the future (if not yet available)
*/
function getNextUnlockTimestamp() public view returns (uint) {
}
function getBracketByTimestamp(uint timestamp) internal view returns (uint) {
}
function getTimestampByBracket(uint bracket) internal view returns (uint) {
}
/**
* This function enables locking and unlocking of tokens via a single call from the token smart contract (incl. delegated calls).
* If {value} == 0, receiveApproval will try to unlock tokens.
* If {value} > 0, receiveApproval will try to lock {value} tokens.
*/
function receiveApproval(address from, uint256 value, address, bytes calldata) external {
}
}
| authorizedWithdrawalAddress[msg.sender],"Only authorized addresses can call this function" | 51,126 | authorizedWithdrawalAddress[msg.sender] |
"Account is already authorized" | pragma solidity ^0.5.15;
interface ERC20CompatibleToken {
function balanceOf(address tokenOwner) external view returns (uint balance);
function allowance(address tokenOwner, address spender) external view returns (uint remaining);
function transfer (address to, uint tokens) external returns (bool success);
function transferFrom (address from, address to, uint tokens) external returns (bool success);
}
/**
* This token factory creates customizable TokenReserve smart contracts which are used for time-based locking of any ERC20 and ERC20-compatible tokens.
* The information regarding the locking smart contract itself is provided below.
* Made with β₯ by DreamTeam. Find more info about this smart contract and others here: https://github.com/dreamteam-gg/smart-contracts
* Anyone is free to create TokenReserve contracts using this factory.
*/
contract TokenReserveFactory {
event ContractCreated(address tokenReserveContract);
/**
* Creates TokenReserve smart contracts.
*/
function deployNewTokenReserveContract(
address tokenContractAddress, address[] memory authorizedWithdrawalAddresses, uint lockPeriod, uint bracketSize
) public returns (address) {
}
}
/**
* Math operations with safety checks that throw on overflows.
*/
library SafeMath {
function mul (uint256 a, uint256 b) internal pure returns (uint256 c) {
}
function div (uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub (uint256 a, uint256 b) internal pure returns (uint256) {
}
function add (uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* Token reserve contract makes it possible to time-lock ERC20 {tokenContractAddress} tokens for {lockPeriod}, specified in the constructor.
*
* The time-lock is bracketed by ~30 days by default (not a calendar month). E.g. if {lockPeriod=5 years} and you lock 10 tokens multiple times during the month bracket,
* you will get all tokens unlocked at a single moment after 5 years. If you lock more tokens in the next month bracket, you get them unlocked after 5 years
* and 30 days via a single transaction.
*
* Example:
* {lockPeriod = 1 year (365 days)}
*
* Year 0 β You locked 10 tokens in a single month bracket Year 1 β Those 10 tokens are unlocked here
* | :X :XXX : : : : : : : : : | :X :X : : : : :
* βββ You locked 50 tokens 3 times in a month bracket β Those 50 tokens are unlocked here just once
*/
contract TokenReserve {
using SafeMath for uint256;
uint public constant bracketingStartDate = 1546300800; // Tue, 01 Jan 2019 00:00:00 GMT - the beginning of a new year/month/day/hour/minute
// = 5 years, can be reassigned in constructor (see the exact number in blockchain explorer)
uint public lockPeriod = 5 * (365 days + 6 hours);
uint public bracketSize = 30 days + 10 hours; // Pretends to be the best approximation of a calendar month. Reassigned in constructor.
address public tokenContractAddress; // Assigned in constructor
mapping(address => bool) public authorizedWithdrawalAddress; // Assigned in constructor
// Linked list of unlock records bracketed by {bracketSize}
struct BracketRecord {
uint nextBracket;
uint value;
}
mapping(uint => BracketRecord) brackets;
uint firstUnlockBracket;
uint lastUnlockBracket;
uint totalValueLocked;
event TokensLocked(uint value, uint unlockTimestamp);
event TokensUnlocked(uint value, uint unlockTimestamp); // Does not include tokens accidentally sent to this smart contract
event AccountAuthorized(address account, address authorizedBy);
event AccountDeauthorized(address account);
modifier authorizedAccessOnly() {
}
constructor(address _tokenContractAddress, uint _lockPeriod, address[] memory authorizedWithdrawalAddresses, uint _bracketSize) public {
}
/**
* This function takes {value} tokens from the {msg.sender} and locks them on a smart contract within the right computed bracket.
* Anyone can lock their tokens on this smart contract, but only an admin can unlock them.
* Tokens have to be approved in the token smart contract before the smart contract can take them as specified.
*/
function lockTokens(uint value) public {
}
function lockTokensInternal(address from, uint value) internal {
}
/**
* Unlocks tokens available at the moment and sends them to message sender. Callable only by an authorized address.
* Throws an error if no tokens are available.
*/
function unlockTokens() public authorizedAccessOnly {
}
function unlockTokensInternal(address receiver) internal {
}
/**
* Any authorized address can authorize more addresses.
*/
function authorizeWithdrawalAddress(address _authorizedWithdrawalAddress) public authorizedAccessOnly {
require(<FILL_ME>)
authorizedWithdrawalAddress[_authorizedWithdrawalAddress] = true;
emit AccountAuthorized(_authorizedWithdrawalAddress, msg.sender);
}
/**
* Only the withdrawal address itself can deauthorize. This prevents possible deadlock in case one of the authorized private keys leak.
*/
function deauthorizeWithdrawalAddress() public authorizedAccessOnly {
}
/**
* Public getter for blockchain explorer to show how many tokens are unlocked at the moment.
*/
function getUnlockedValue() public view returns (uint) {
}
/**
* Public getter for blockchain explorer to show when is the next unlock possible.
* Returns unix timestamp either in the past (if unlock is already available) or in the future (if not yet available)
*/
function getNextUnlockTimestamp() public view returns (uint) {
}
function getBracketByTimestamp(uint timestamp) internal view returns (uint) {
}
function getTimestampByBracket(uint bracket) internal view returns (uint) {
}
/**
* This function enables locking and unlocking of tokens via a single call from the token smart contract (incl. delegated calls).
* If {value} == 0, receiveApproval will try to unlock tokens.
* If {value} > 0, receiveApproval will try to lock {value} tokens.
*/
function receiveApproval(address from, uint256 value, address, bytes calldata) external {
}
}
| !authorizedWithdrawalAddress[_authorizedWithdrawalAddress],"Account is already authorized" | 51,126 | !authorizedWithdrawalAddress[_authorizedWithdrawalAddress] |
"Only authorized addresses can unlock tokens" | pragma solidity ^0.5.15;
interface ERC20CompatibleToken {
function balanceOf(address tokenOwner) external view returns (uint balance);
function allowance(address tokenOwner, address spender) external view returns (uint remaining);
function transfer (address to, uint tokens) external returns (bool success);
function transferFrom (address from, address to, uint tokens) external returns (bool success);
}
/**
* This token factory creates customizable TokenReserve smart contracts which are used for time-based locking of any ERC20 and ERC20-compatible tokens.
* The information regarding the locking smart contract itself is provided below.
* Made with β₯ by DreamTeam. Find more info about this smart contract and others here: https://github.com/dreamteam-gg/smart-contracts
* Anyone is free to create TokenReserve contracts using this factory.
*/
contract TokenReserveFactory {
event ContractCreated(address tokenReserveContract);
/**
* Creates TokenReserve smart contracts.
*/
function deployNewTokenReserveContract(
address tokenContractAddress, address[] memory authorizedWithdrawalAddresses, uint lockPeriod, uint bracketSize
) public returns (address) {
}
}
/**
* Math operations with safety checks that throw on overflows.
*/
library SafeMath {
function mul (uint256 a, uint256 b) internal pure returns (uint256 c) {
}
function div (uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub (uint256 a, uint256 b) internal pure returns (uint256) {
}
function add (uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* Token reserve contract makes it possible to time-lock ERC20 {tokenContractAddress} tokens for {lockPeriod}, specified in the constructor.
*
* The time-lock is bracketed by ~30 days by default (not a calendar month). E.g. if {lockPeriod=5 years} and you lock 10 tokens multiple times during the month bracket,
* you will get all tokens unlocked at a single moment after 5 years. If you lock more tokens in the next month bracket, you get them unlocked after 5 years
* and 30 days via a single transaction.
*
* Example:
* {lockPeriod = 1 year (365 days)}
*
* Year 0 β You locked 10 tokens in a single month bracket Year 1 β Those 10 tokens are unlocked here
* | :X :XXX : : : : : : : : : | :X :X : : : : :
* βββ You locked 50 tokens 3 times in a month bracket β Those 50 tokens are unlocked here just once
*/
contract TokenReserve {
using SafeMath for uint256;
uint public constant bracketingStartDate = 1546300800; // Tue, 01 Jan 2019 00:00:00 GMT - the beginning of a new year/month/day/hour/minute
// = 5 years, can be reassigned in constructor (see the exact number in blockchain explorer)
uint public lockPeriod = 5 * (365 days + 6 hours);
uint public bracketSize = 30 days + 10 hours; // Pretends to be the best approximation of a calendar month. Reassigned in constructor.
address public tokenContractAddress; // Assigned in constructor
mapping(address => bool) public authorizedWithdrawalAddress; // Assigned in constructor
// Linked list of unlock records bracketed by {bracketSize}
struct BracketRecord {
uint nextBracket;
uint value;
}
mapping(uint => BracketRecord) brackets;
uint firstUnlockBracket;
uint lastUnlockBracket;
uint totalValueLocked;
event TokensLocked(uint value, uint unlockTimestamp);
event TokensUnlocked(uint value, uint unlockTimestamp); // Does not include tokens accidentally sent to this smart contract
event AccountAuthorized(address account, address authorizedBy);
event AccountDeauthorized(address account);
modifier authorizedAccessOnly() {
}
constructor(address _tokenContractAddress, uint _lockPeriod, address[] memory authorizedWithdrawalAddresses, uint _bracketSize) public {
}
/**
* This function takes {value} tokens from the {msg.sender} and locks them on a smart contract within the right computed bracket.
* Anyone can lock their tokens on this smart contract, but only an admin can unlock them.
* Tokens have to be approved in the token smart contract before the smart contract can take them as specified.
*/
function lockTokens(uint value) public {
}
function lockTokensInternal(address from, uint value) internal {
}
/**
* Unlocks tokens available at the moment and sends them to message sender. Callable only by an authorized address.
* Throws an error if no tokens are available.
*/
function unlockTokens() public authorizedAccessOnly {
}
function unlockTokensInternal(address receiver) internal {
}
/**
* Any authorized address can authorize more addresses.
*/
function authorizeWithdrawalAddress(address _authorizedWithdrawalAddress) public authorizedAccessOnly {
}
/**
* Only the withdrawal address itself can deauthorize. This prevents possible deadlock in case one of the authorized private keys leak.
*/
function deauthorizeWithdrawalAddress() public authorizedAccessOnly {
}
/**
* Public getter for blockchain explorer to show how many tokens are unlocked at the moment.
*/
function getUnlockedValue() public view returns (uint) {
}
/**
* Public getter for blockchain explorer to show when is the next unlock possible.
* Returns unix timestamp either in the past (if unlock is already available) or in the future (if not yet available)
*/
function getNextUnlockTimestamp() public view returns (uint) {
}
function getBracketByTimestamp(uint timestamp) internal view returns (uint) {
}
function getTimestampByBracket(uint bracket) internal view returns (uint) {
}
/**
* This function enables locking and unlocking of tokens via a single call from the token smart contract (incl. delegated calls).
* If {value} == 0, receiveApproval will try to unlock tokens.
* If {value} > 0, receiveApproval will try to lock {value} tokens.
*/
function receiveApproval(address from, uint256 value, address, bytes calldata) external {
require(msg.sender == tokenContractAddress, "Sender must be a token contract address");
if (value == 0) {
require(<FILL_ME>)
unlockTokensInternal(from);
} else {
lockTokensInternal(from, value);
}
}
}
| authorizedWithdrawalAddress[from],"Only authorized addresses can unlock tokens" | 51,126 | authorizedWithdrawalAddress[from] |
Subsets and Splits