comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Invalid LSP address" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;
import "./LongShortPairFinancialProductLibrary.sol";
import "../../../../common/implementation/Lockable.sol";
/**
* @title Success Token Long Short Pair Financial Product Library.
* @notice Adds settlement logic to create success token LSPs. A success token pays out a fixed amount of
* collateral as a floor, with the remaining amount functioning like an embedded option. The embedded
* option in this case uses payout logic that resembles a covered call. I.e., the token expires to be worth
* basePercentage + (1 - basePercentage) * (expiryPrice - strikePrice).
*/
contract SuccessTokenLongShortPairFinancialProductLibrary is LongShortPairFinancialProductLibrary, Lockable {
using FixedPoint for FixedPoint.Unsigned;
struct SuccessTokenLongShortPairParameters {
uint256 strikePrice;
uint256 basePercentage;
}
mapping(address => SuccessTokenLongShortPairParameters) public longShortPairParameters;
/**
* @notice Enables any address to set the strike price for an associated LSP.
* @param longShortPair address of the LSP.
* @param strikePrice the strike price for the covered call for the associated LSP.
* @param basePercentage the base percentage of collateral per pair paid out to long tokens, expressed
* with 1e18 decimals. E.g., a 50% base percentage should be expressed 500000000000000000, or 0.5 with
* 1e18 decimals. The base percentage cannot be set to 0.
* @dev Note: a) Any address can set the initial strike price b) A strike price cannot be 0.
* c) A strike price can only be set once to prevent the deployer from changing the strike after the fact.
* d) For safety, a strike price should be set before depositing any synthetic tokens in a liquidity pool.
* e) longShortPair must expose an expirationTimestamp method to validate it is correctly deployed.
*/
function setLongShortPairParameters(
address longShortPair,
uint256 strikePrice,
uint256 basePercentage
) public nonReentrant() {
require(<FILL_ME>)
SuccessTokenLongShortPairParameters memory params = longShortPairParameters[longShortPair];
require(params.strikePrice == 0 && params.basePercentage == 0, "Parameters already set");
require(strikePrice != 0 && basePercentage != 0, "Base percentage and strike price cannot be set to 0");
longShortPairParameters[longShortPair] = SuccessTokenLongShortPairParameters({
strikePrice: strikePrice,
basePercentage: basePercentage
});
}
/**
* @notice Returns a number between 0 and 1e18 to indicate how much collateral each long and short token are entitled
* to per collateralPerPair.
* @param expiryPrice price from the optimistic oracle for the LSP price identifier.
* @return expiryPercentLong to indicate how much collateral should be sent between long and short tokens.
*/
function percentageLongCollateralAtExpiry(int256 expiryPrice)
public
view
override
nonReentrantView()
returns (uint256)
{
}
}
| ExpiringContractInterface(longShortPair).expirationTimestamp()!=0,"Invalid LSP address" | 374,026 | ExpiringContractInterface(longShortPair).expirationTimestamp()!=0 |
"Early access not open" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./core/ChainRunnersTypes.sol";
import "./interfaces/IChainRunnersRenderer.sol";
/*
:::: :::#%=
@*==+- ++==*=.
#+=#=++.. ..=*=*+-#:
:=+++++++=====================================: .===============================================. .=========================================++++++++=
.%-+%##+=--==================================+=..=+-=============================================-+*+======================================---+##+=#-.
-+++@@%++++@@@%+++++++++++++++++++++++++++%#++++++%#+++#@@@#+++++++++@@%++++++++++++++++++++@#+.=+*@*+*@@@@*+++++++++++++++++++++++%@@@#+++#@@+++=
-*-#%@@%%%=*%@%*++=++=+==+=++=++=+=++=++==#@%#%#+++=+=*@%*+=+==+=+++%*++==+=++=+==+=++=+=++@%%#%#++++*@%#++=++=++=++=+=++=++=+=+*%%*==*%@@@*:%=
:@:+@@@@@@*+++%@@*+===========+*=========#@@========+#%==========*@========##*#*+=======*@##*======#@#+=======*#*============+#%++#@@%#@@#++=.
.*+=%@%*%@%##++@@%#=-==-=--==*%=========*%==--=--=-====--=--=-=##=--=-=--%%%%%+=-=--=-=*%=--=--=-=#%=--=----=#%=--=-=--=-+%#+==#%@@*#%@=++.
+%.#@@###%@@@@@%*---------#@%########@%*---------------------##---------------------##---------%%*--------@@#---------+#@=#@@#+==@@%*++-
.:*+*%@#+=*%@@@*=-------=#%#=-------=%*---------=*#*--------#+=--------===--------=#%*-------=#%*-------==@%#--------=%@@%#*+=-+#%*+*:.
====================%*.@@%#==+##%@*=----------------+@#+---------@@*-------=*@+---------@@*--------=@+--------+@=--------*@@+-------+#@@%#==---+#@.*%====================
:*=--==================-:=#@@%*===+*@%+=============%%%@=========*%@*========+@+=--=====+%@+==========@+========+@========*%@@+======%%%**+=---=%@#=:-====================-#-
+++**%@@@#*****************@#*=---=##%@@@@@@@@@@@@@#**@@@@****************%@@*+++@#***********#@************************************+=------=*@#*********************@#+=+:
.-##=*@@%*----------------+%@%=---===+%@@@@@@@*+++---%#++----------------=*@@*+++=-----------=+#=------------------------------------------+%+--------------------+#@-=@
:%:#%#####+=-=-*@@+--=-==-=*@=--=-==-=*@@#*=-==-=-+@===-==-=-=++==-=-==--=@%===-==----+-==-==--+*+-==-==---=*@@@@@@%#===-=-=+%@%-==-=-==-#@%=-==-==--+#@@@@@@@@@@@@*+++
=*=#@#=----==-=-=++=--=-==-=*@=--=-==-=*@@+-=-==-==+@===-=--=-*@@*=-=-==--+@=--=-==--+#@-==-==---+%-==-==---=+++#@@@#--==-=-=++++-=--=-===#%+=-==-==---=++++++++@@@%.#*
+#:@%*===================++%#=========%@%=========#%=========+#@%+=======#%==========*@#=========*%=========+*+%@@@+========+*==========+@@%+**+================*%#*=+=
*++#@*+=++++++*#%*+++++=+++*%%++++=++++%%*=+++++++##*=++++=++=%@@++++=++=+#%++++=++++#%@=+++++++=*#*+++++++=#%@@@@@*++=++++=#%@*+++=++=+++@#*****=+++++++=+++++*%@@+:=+=
:=*=#%#@@@@#%@@@%#@@#++++++++++%%*+++++++++++++++++**@*+++++++++*%#++++++++=*##++++++++*%@%+++++++++##+++++++++#%%%%%%++++**#@@@@@**+++++++++++++++++=*%@@@%#@@@@#%@@@%#@++*:.
#*:@#=-+%#+:=*@*=-+@%#++++++++#%@@#*++++++++++++++#%@#*++++++++*@@#+++++++++@#++++++++*@@#+++++++++##*+++++++++++++++++###@@@@++*@@#+++++++++++++++++++*@@#=:+#%+--+@*=-+%*.@=
++=#%#+%@@%=#%@%#+%%#++++++*#@@@%###**************@@@++++++++**#@##*********#*********#@@#++++++***@#******%@%#*++**#@@@%##+==+++=*#**********%%*++++++++#%#=%@@%+*%@%*+%#*=*-
.-*+===========*@@+++++*%%%@@@++***************+.%%*++++#%%%@@%=:=******************--@@#+++*%%@#==+***--*@%*++*%@@*===+**=-- -************++@%%#++++++#@@@*==========*+-
=*******##.#%#++++*%@@@%+==+= *#-%@%**%%###*====**- -@:*@@##@###*==+**-.-#=+@@#*@##*==+***= =+=##%@*+++++*%@@#.#%******:
++++%#+++*#@@@@+++==. **-@@@%+++++++===- -+++#@@+++++++==: :+++%@@+++++++==: .=++++@%##++++@@%++++
:%:*%%****%@@%+==*- .%==*====**+... #*.#+==***.... #+=#%+==****:. ..-*=*%@%#++*#%@=+%.
-+++#%+#%@@@#++=== .@*++===- #%++=== %#+++=== =+++%@%##**@@*.@:
.%-=%@##@@%*==++ .*==+#@@%*%@%=*=.
.+++#@@@@@*++==. -==++#@@@@@@=+%
.=*=%@@%%%#=*=. .*+=%@@@@%+-#.
@=-@@@%:++++. -+++**@@#+*=:
.-+=*#%%++*::. :+**=#%@#==#
#*:@*+++=: =+++@*++=:
:*-=*=++.. .=*=#*.%=
+#.=+++: ++++:+#
*+=#-:: .::*+=*
*/
contract ChainRunners is ERC721Enumerable, Ownable, ReentrancyGuard {
mapping(uint256 => ChainRunnersTypes.ChainRunner) runners;
address public renderingContractAddress;
event GenerateRunner(uint256 indexed tokenId, uint256 dna);
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
Counters.Counter private _reservedTokenIds;
uint256 private constant MAX_RUNNERS = 10000;
uint256 private constant FOUNDERS_RESERVE_AMOUNT = 85;
uint256 private constant MAX_PUBLIC_RUNNERS = MAX_RUNNERS - FOUNDERS_RESERVE_AMOUNT;
uint256 private constant MINT_PRICE = 0.05 ether;
uint256 private constant MAX_PER_ADDRESS = 10;
uint256 private constant MAX_PER_EARLY_ACCESS_ADDRESS = 5;
uint256 private runnerZeroHash;
uint256 private runnerZeroDNA;
uint256 public earlyAccessStartTimestamp;
uint256 public publicSaleStartTimestamp;
mapping(address => bool) public isOnEarlyAccessList;
mapping(address => uint256) public earlyAccessMintedCounts;
mapping(address => uint256) private founderMintCountsRemaining;
constructor() ERC721("Chain Runners", "RUN") {}
modifier whenPublicSaleActive() {
}
modifier whenEarlyAccessActive() {
require(<FILL_ME>)
_;
}
function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner {
}
function mintPublicSale(uint256 _count) external payable nonReentrant whenPublicSaleActive returns (uint256, uint256) {
}
function mintEarlyAccess(uint256 _count) external payable nonReentrant whenEarlyAccessActive returns (uint256, uint256) {
}
function allocateFounderMint(address _addr, uint256 _count) public onlyOwner nonReentrant {
}
function founderMint(uint256 _count) public nonReentrant returns (uint256, uint256) {
}
function mint(uint256 tokenId) internal {
}
function getRemainingEarlyAccessMints(address _addr) public view returns (uint256) {
}
function getRemainingFounderMints(address _addr) public view returns (uint256) {
}
function isPublicSaleOpen() public view returns (bool) {
}
function isEarlyAccessOpen() public view returns (bool) {
}
function addToEarlyAccessList(address[] memory toEarlyAccessList) external onlyOwner {
}
function removeFromEarlyAccessList(address[] memory toRemove) external onlyOwner {
}
function setPublicSaleTimestamp(uint256 timestamp) external onlyOwner {
}
function setEarlyAccessTimestamp(uint256 timestamp) external onlyOwner {
}
function checkHash(string memory seed) public view returns (uint256) {
}
function configureRunnerZero(uint256 _runnerZeroHash, uint256 _runnerZeroDNA) external onlyOwner {
}
function mintRunnerZero(string memory seed) external {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function tokenURIForSeed(uint256 _tokenId, uint256 seed) public view virtual returns (string memory) {
}
function getDna(uint256 _tokenId) public view returns (uint256) {
}
receive() external payable {}
function withdraw() public onlyOwner {
}
}
| isEarlyAccessOpen(),"Early access not open" | 374,043 | isEarlyAccessOpen() |
"All Runners have been minted" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./core/ChainRunnersTypes.sol";
import "./interfaces/IChainRunnersRenderer.sol";
/*
:::: :::#%=
@*==+- ++==*=.
#+=#=++.. ..=*=*+-#:
:=+++++++=====================================: .===============================================. .=========================================++++++++=
.%-+%##+=--==================================+=..=+-=============================================-+*+======================================---+##+=#-.
-+++@@%++++@@@%+++++++++++++++++++++++++++%#++++++%#+++#@@@#+++++++++@@%++++++++++++++++++++@#+.=+*@*+*@@@@*+++++++++++++++++++++++%@@@#+++#@@+++=
-*-#%@@%%%=*%@%*++=++=+==+=++=++=+=++=++==#@%#%#+++=+=*@%*+=+==+=+++%*++==+=++=+==+=++=+=++@%%#%#++++*@%#++=++=++=++=+=++=++=+=+*%%*==*%@@@*:%=
:@:+@@@@@@*+++%@@*+===========+*=========#@@========+#%==========*@========##*#*+=======*@##*======#@#+=======*#*============+#%++#@@%#@@#++=.
.*+=%@%*%@%##++@@%#=-==-=--==*%=========*%==--=--=-====--=--=-=##=--=-=--%%%%%+=-=--=-=*%=--=--=-=#%=--=----=#%=--=-=--=-+%#+==#%@@*#%@=++.
+%.#@@###%@@@@@%*---------#@%########@%*---------------------##---------------------##---------%%*--------@@#---------+#@=#@@#+==@@%*++-
.:*+*%@#+=*%@@@*=-------=#%#=-------=%*---------=*#*--------#+=--------===--------=#%*-------=#%*-------==@%#--------=%@@%#*+=-+#%*+*:.
====================%*.@@%#==+##%@*=----------------+@#+---------@@*-------=*@+---------@@*--------=@+--------+@=--------*@@+-------+#@@%#==---+#@.*%====================
:*=--==================-:=#@@%*===+*@%+=============%%%@=========*%@*========+@+=--=====+%@+==========@+========+@========*%@@+======%%%**+=---=%@#=:-====================-#-
+++**%@@@#*****************@#*=---=##%@@@@@@@@@@@@@#**@@@@****************%@@*+++@#***********#@************************************+=------=*@#*********************@#+=+:
.-##=*@@%*----------------+%@%=---===+%@@@@@@@*+++---%#++----------------=*@@*+++=-----------=+#=------------------------------------------+%+--------------------+#@-=@
:%:#%#####+=-=-*@@+--=-==-=*@=--=-==-=*@@#*=-==-=-+@===-==-=-=++==-=-==--=@%===-==----+-==-==--+*+-==-==---=*@@@@@@%#===-=-=+%@%-==-=-==-#@%=-==-==--+#@@@@@@@@@@@@*+++
=*=#@#=----==-=-=++=--=-==-=*@=--=-==-=*@@+-=-==-==+@===-=--=-*@@*=-=-==--+@=--=-==--+#@-==-==---+%-==-==---=+++#@@@#--==-=-=++++-=--=-===#%+=-==-==---=++++++++@@@%.#*
+#:@%*===================++%#=========%@%=========#%=========+#@%+=======#%==========*@#=========*%=========+*+%@@@+========+*==========+@@%+**+================*%#*=+=
*++#@*+=++++++*#%*+++++=+++*%%++++=++++%%*=+++++++##*=++++=++=%@@++++=++=+#%++++=++++#%@=+++++++=*#*+++++++=#%@@@@@*++=++++=#%@*+++=++=+++@#*****=+++++++=+++++*%@@+:=+=
:=*=#%#@@@@#%@@@%#@@#++++++++++%%*+++++++++++++++++**@*+++++++++*%#++++++++=*##++++++++*%@%+++++++++##+++++++++#%%%%%%++++**#@@@@@**+++++++++++++++++=*%@@@%#@@@@#%@@@%#@++*:.
#*:@#=-+%#+:=*@*=-+@%#++++++++#%@@#*++++++++++++++#%@#*++++++++*@@#+++++++++@#++++++++*@@#+++++++++##*+++++++++++++++++###@@@@++*@@#+++++++++++++++++++*@@#=:+#%+--+@*=-+%*.@=
++=#%#+%@@%=#%@%#+%%#++++++*#@@@%###**************@@@++++++++**#@##*********#*********#@@#++++++***@#******%@%#*++**#@@@%##+==+++=*#**********%%*++++++++#%#=%@@%+*%@%*+%#*=*-
.-*+===========*@@+++++*%%%@@@++***************+.%%*++++#%%%@@%=:=******************--@@#+++*%%@#==+***--*@%*++*%@@*===+**=-- -************++@%%#++++++#@@@*==========*+-
=*******##.#%#++++*%@@@%+==+= *#-%@%**%%###*====**- -@:*@@##@###*==+**-.-#=+@@#*@##*==+***= =+=##%@*+++++*%@@#.#%******:
++++%#+++*#@@@@+++==. **-@@@%+++++++===- -+++#@@+++++++==: :+++%@@+++++++==: .=++++@%##++++@@%++++
:%:*%%****%@@%+==*- .%==*====**+... #*.#+==***.... #+=#%+==****:. ..-*=*%@%#++*#%@=+%.
-+++#%+#%@@@#++=== .@*++===- #%++=== %#+++=== =+++%@%##**@@*.@:
.%-=%@##@@%*==++ .*==+#@@%*%@%=*=.
.+++#@@@@@*++==. -==++#@@@@@@=+%
.=*=%@@%%%#=*=. .*+=%@@@@%+-#.
@=-@@@%:++++. -+++**@@#+*=:
.-+=*#%%++*::. :+**=#%@#==#
#*:@*+++=: =+++@*++=:
:*-=*=++.. .=*=#*.%=
+#.=+++: ++++:+#
*+=#-:: .::*+=*
*/
contract ChainRunners is ERC721Enumerable, Ownable, ReentrancyGuard {
mapping(uint256 => ChainRunnersTypes.ChainRunner) runners;
address public renderingContractAddress;
event GenerateRunner(uint256 indexed tokenId, uint256 dna);
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
Counters.Counter private _reservedTokenIds;
uint256 private constant MAX_RUNNERS = 10000;
uint256 private constant FOUNDERS_RESERVE_AMOUNT = 85;
uint256 private constant MAX_PUBLIC_RUNNERS = MAX_RUNNERS - FOUNDERS_RESERVE_AMOUNT;
uint256 private constant MINT_PRICE = 0.05 ether;
uint256 private constant MAX_PER_ADDRESS = 10;
uint256 private constant MAX_PER_EARLY_ACCESS_ADDRESS = 5;
uint256 private runnerZeroHash;
uint256 private runnerZeroDNA;
uint256 public earlyAccessStartTimestamp;
uint256 public publicSaleStartTimestamp;
mapping(address => bool) public isOnEarlyAccessList;
mapping(address => uint256) public earlyAccessMintedCounts;
mapping(address => uint256) private founderMintCountsRemaining;
constructor() ERC721("Chain Runners", "RUN") {}
modifier whenPublicSaleActive() {
}
modifier whenEarlyAccessActive() {
}
function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner {
}
function mintPublicSale(uint256 _count) external payable nonReentrant whenPublicSaleActive returns (uint256, uint256) {
require(_count > 0 && _count <= MAX_PER_ADDRESS, "Invalid Runner count");
require(<FILL_ME>)
require(_count * MINT_PRICE == msg.value, "Incorrect amount of ether sent");
uint256 firstMintedId = _tokenIds.current() + 1;
for (uint256 i = 0; i < _count; i++) {
_tokenIds.increment();
mint(_tokenIds.current());
}
return (firstMintedId, _count);
}
function mintEarlyAccess(uint256 _count) external payable nonReentrant whenEarlyAccessActive returns (uint256, uint256) {
}
function allocateFounderMint(address _addr, uint256 _count) public onlyOwner nonReentrant {
}
function founderMint(uint256 _count) public nonReentrant returns (uint256, uint256) {
}
function mint(uint256 tokenId) internal {
}
function getRemainingEarlyAccessMints(address _addr) public view returns (uint256) {
}
function getRemainingFounderMints(address _addr) public view returns (uint256) {
}
function isPublicSaleOpen() public view returns (bool) {
}
function isEarlyAccessOpen() public view returns (bool) {
}
function addToEarlyAccessList(address[] memory toEarlyAccessList) external onlyOwner {
}
function removeFromEarlyAccessList(address[] memory toRemove) external onlyOwner {
}
function setPublicSaleTimestamp(uint256 timestamp) external onlyOwner {
}
function setEarlyAccessTimestamp(uint256 timestamp) external onlyOwner {
}
function checkHash(string memory seed) public view returns (uint256) {
}
function configureRunnerZero(uint256 _runnerZeroHash, uint256 _runnerZeroDNA) external onlyOwner {
}
function mintRunnerZero(string memory seed) external {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function tokenURIForSeed(uint256 _tokenId, uint256 seed) public view virtual returns (string memory) {
}
function getDna(uint256 _tokenId) public view returns (uint256) {
}
receive() external payable {}
function withdraw() public onlyOwner {
}
}
| _tokenIds.current()+_count<=MAX_PUBLIC_RUNNERS,"All Runners have been minted" | 374,043 | _tokenIds.current()+_count<=MAX_PUBLIC_RUNNERS |
"Address not on Early Access list" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./core/ChainRunnersTypes.sol";
import "./interfaces/IChainRunnersRenderer.sol";
/*
:::: :::#%=
@*==+- ++==*=.
#+=#=++.. ..=*=*+-#:
:=+++++++=====================================: .===============================================. .=========================================++++++++=
.%-+%##+=--==================================+=..=+-=============================================-+*+======================================---+##+=#-.
-+++@@%++++@@@%+++++++++++++++++++++++++++%#++++++%#+++#@@@#+++++++++@@%++++++++++++++++++++@#+.=+*@*+*@@@@*+++++++++++++++++++++++%@@@#+++#@@+++=
-*-#%@@%%%=*%@%*++=++=+==+=++=++=+=++=++==#@%#%#+++=+=*@%*+=+==+=+++%*++==+=++=+==+=++=+=++@%%#%#++++*@%#++=++=++=++=+=++=++=+=+*%%*==*%@@@*:%=
:@:+@@@@@@*+++%@@*+===========+*=========#@@========+#%==========*@========##*#*+=======*@##*======#@#+=======*#*============+#%++#@@%#@@#++=.
.*+=%@%*%@%##++@@%#=-==-=--==*%=========*%==--=--=-====--=--=-=##=--=-=--%%%%%+=-=--=-=*%=--=--=-=#%=--=----=#%=--=-=--=-+%#+==#%@@*#%@=++.
+%.#@@###%@@@@@%*---------#@%########@%*---------------------##---------------------##---------%%*--------@@#---------+#@=#@@#+==@@%*++-
.:*+*%@#+=*%@@@*=-------=#%#=-------=%*---------=*#*--------#+=--------===--------=#%*-------=#%*-------==@%#--------=%@@%#*+=-+#%*+*:.
====================%*.@@%#==+##%@*=----------------+@#+---------@@*-------=*@+---------@@*--------=@+--------+@=--------*@@+-------+#@@%#==---+#@.*%====================
:*=--==================-:=#@@%*===+*@%+=============%%%@=========*%@*========+@+=--=====+%@+==========@+========+@========*%@@+======%%%**+=---=%@#=:-====================-#-
+++**%@@@#*****************@#*=---=##%@@@@@@@@@@@@@#**@@@@****************%@@*+++@#***********#@************************************+=------=*@#*********************@#+=+:
.-##=*@@%*----------------+%@%=---===+%@@@@@@@*+++---%#++----------------=*@@*+++=-----------=+#=------------------------------------------+%+--------------------+#@-=@
:%:#%#####+=-=-*@@+--=-==-=*@=--=-==-=*@@#*=-==-=-+@===-==-=-=++==-=-==--=@%===-==----+-==-==--+*+-==-==---=*@@@@@@%#===-=-=+%@%-==-=-==-#@%=-==-==--+#@@@@@@@@@@@@*+++
=*=#@#=----==-=-=++=--=-==-=*@=--=-==-=*@@+-=-==-==+@===-=--=-*@@*=-=-==--+@=--=-==--+#@-==-==---+%-==-==---=+++#@@@#--==-=-=++++-=--=-===#%+=-==-==---=++++++++@@@%.#*
+#:@%*===================++%#=========%@%=========#%=========+#@%+=======#%==========*@#=========*%=========+*+%@@@+========+*==========+@@%+**+================*%#*=+=
*++#@*+=++++++*#%*+++++=+++*%%++++=++++%%*=+++++++##*=++++=++=%@@++++=++=+#%++++=++++#%@=+++++++=*#*+++++++=#%@@@@@*++=++++=#%@*+++=++=+++@#*****=+++++++=+++++*%@@+:=+=
:=*=#%#@@@@#%@@@%#@@#++++++++++%%*+++++++++++++++++**@*+++++++++*%#++++++++=*##++++++++*%@%+++++++++##+++++++++#%%%%%%++++**#@@@@@**+++++++++++++++++=*%@@@%#@@@@#%@@@%#@++*:.
#*:@#=-+%#+:=*@*=-+@%#++++++++#%@@#*++++++++++++++#%@#*++++++++*@@#+++++++++@#++++++++*@@#+++++++++##*+++++++++++++++++###@@@@++*@@#+++++++++++++++++++*@@#=:+#%+--+@*=-+%*.@=
++=#%#+%@@%=#%@%#+%%#++++++*#@@@%###**************@@@++++++++**#@##*********#*********#@@#++++++***@#******%@%#*++**#@@@%##+==+++=*#**********%%*++++++++#%#=%@@%+*%@%*+%#*=*-
.-*+===========*@@+++++*%%%@@@++***************+.%%*++++#%%%@@%=:=******************--@@#+++*%%@#==+***--*@%*++*%@@*===+**=-- -************++@%%#++++++#@@@*==========*+-
=*******##.#%#++++*%@@@%+==+= *#-%@%**%%###*====**- -@:*@@##@###*==+**-.-#=+@@#*@##*==+***= =+=##%@*+++++*%@@#.#%******:
++++%#+++*#@@@@+++==. **-@@@%+++++++===- -+++#@@+++++++==: :+++%@@+++++++==: .=++++@%##++++@@%++++
:%:*%%****%@@%+==*- .%==*====**+... #*.#+==***.... #+=#%+==****:. ..-*=*%@%#++*#%@=+%.
-+++#%+#%@@@#++=== .@*++===- #%++=== %#+++=== =+++%@%##**@@*.@:
.%-=%@##@@%*==++ .*==+#@@%*%@%=*=.
.+++#@@@@@*++==. -==++#@@@@@@=+%
.=*=%@@%%%#=*=. .*+=%@@@@%+-#.
@=-@@@%:++++. -+++**@@#+*=:
.-+=*#%%++*::. :+**=#%@#==#
#*:@*+++=: =+++@*++=:
:*-=*=++.. .=*=#*.%=
+#.=+++: ++++:+#
*+=#-:: .::*+=*
*/
contract ChainRunners is ERC721Enumerable, Ownable, ReentrancyGuard {
mapping(uint256 => ChainRunnersTypes.ChainRunner) runners;
address public renderingContractAddress;
event GenerateRunner(uint256 indexed tokenId, uint256 dna);
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
Counters.Counter private _reservedTokenIds;
uint256 private constant MAX_RUNNERS = 10000;
uint256 private constant FOUNDERS_RESERVE_AMOUNT = 85;
uint256 private constant MAX_PUBLIC_RUNNERS = MAX_RUNNERS - FOUNDERS_RESERVE_AMOUNT;
uint256 private constant MINT_PRICE = 0.05 ether;
uint256 private constant MAX_PER_ADDRESS = 10;
uint256 private constant MAX_PER_EARLY_ACCESS_ADDRESS = 5;
uint256 private runnerZeroHash;
uint256 private runnerZeroDNA;
uint256 public earlyAccessStartTimestamp;
uint256 public publicSaleStartTimestamp;
mapping(address => bool) public isOnEarlyAccessList;
mapping(address => uint256) public earlyAccessMintedCounts;
mapping(address => uint256) private founderMintCountsRemaining;
constructor() ERC721("Chain Runners", "RUN") {}
modifier whenPublicSaleActive() {
}
modifier whenEarlyAccessActive() {
}
function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner {
}
function mintPublicSale(uint256 _count) external payable nonReentrant whenPublicSaleActive returns (uint256, uint256) {
}
function mintEarlyAccess(uint256 _count) external payable nonReentrant whenEarlyAccessActive returns (uint256, uint256) {
require(_count != 0, "Invalid Runner count");
require(<FILL_ME>)
require(_tokenIds.current() + _count <= MAX_PUBLIC_RUNNERS, "All Runners have been minted");
require(_count * MINT_PRICE == msg.value, "Incorrect amount of ether sent");
uint256 userMintedAmount = earlyAccessMintedCounts[msg.sender] + _count;
require(userMintedAmount <= MAX_PER_EARLY_ACCESS_ADDRESS, "Max Early Access count per address exceeded");
uint256 firstMintedId = _tokenIds.current() + 1;
for (uint256 i = 0; i < _count; i++) {
_tokenIds.increment();
mint(_tokenIds.current());
}
earlyAccessMintedCounts[msg.sender] = userMintedAmount;
return (firstMintedId, _count);
}
function allocateFounderMint(address _addr, uint256 _count) public onlyOwner nonReentrant {
}
function founderMint(uint256 _count) public nonReentrant returns (uint256, uint256) {
}
function mint(uint256 tokenId) internal {
}
function getRemainingEarlyAccessMints(address _addr) public view returns (uint256) {
}
function getRemainingFounderMints(address _addr) public view returns (uint256) {
}
function isPublicSaleOpen() public view returns (bool) {
}
function isEarlyAccessOpen() public view returns (bool) {
}
function addToEarlyAccessList(address[] memory toEarlyAccessList) external onlyOwner {
}
function removeFromEarlyAccessList(address[] memory toRemove) external onlyOwner {
}
function setPublicSaleTimestamp(uint256 timestamp) external onlyOwner {
}
function setEarlyAccessTimestamp(uint256 timestamp) external onlyOwner {
}
function checkHash(string memory seed) public view returns (uint256) {
}
function configureRunnerZero(uint256 _runnerZeroHash, uint256 _runnerZeroDNA) external onlyOwner {
}
function mintRunnerZero(string memory seed) external {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function tokenURIForSeed(uint256 _tokenId, uint256 seed) public view virtual returns (string memory) {
}
function getDna(uint256 _tokenId) public view returns (uint256) {
}
receive() external payable {}
function withdraw() public onlyOwner {
}
}
| isOnEarlyAccessList[msg.sender],"Address not on Early Access list" | 374,043 | isOnEarlyAccessList[msg.sender] |
"Runner Zero has already been minted" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./core/ChainRunnersTypes.sol";
import "./interfaces/IChainRunnersRenderer.sol";
/*
:::: :::#%=
@*==+- ++==*=.
#+=#=++.. ..=*=*+-#:
:=+++++++=====================================: .===============================================. .=========================================++++++++=
.%-+%##+=--==================================+=..=+-=============================================-+*+======================================---+##+=#-.
-+++@@%++++@@@%+++++++++++++++++++++++++++%#++++++%#+++#@@@#+++++++++@@%++++++++++++++++++++@#+.=+*@*+*@@@@*+++++++++++++++++++++++%@@@#+++#@@+++=
-*-#%@@%%%=*%@%*++=++=+==+=++=++=+=++=++==#@%#%#+++=+=*@%*+=+==+=+++%*++==+=++=+==+=++=+=++@%%#%#++++*@%#++=++=++=++=+=++=++=+=+*%%*==*%@@@*:%=
:@:+@@@@@@*+++%@@*+===========+*=========#@@========+#%==========*@========##*#*+=======*@##*======#@#+=======*#*============+#%++#@@%#@@#++=.
.*+=%@%*%@%##++@@%#=-==-=--==*%=========*%==--=--=-====--=--=-=##=--=-=--%%%%%+=-=--=-=*%=--=--=-=#%=--=----=#%=--=-=--=-+%#+==#%@@*#%@=++.
+%.#@@###%@@@@@%*---------#@%########@%*---------------------##---------------------##---------%%*--------@@#---------+#@=#@@#+==@@%*++-
.:*+*%@#+=*%@@@*=-------=#%#=-------=%*---------=*#*--------#+=--------===--------=#%*-------=#%*-------==@%#--------=%@@%#*+=-+#%*+*:.
====================%*.@@%#==+##%@*=----------------+@#+---------@@*-------=*@+---------@@*--------=@+--------+@=--------*@@+-------+#@@%#==---+#@.*%====================
:*=--==================-:=#@@%*===+*@%+=============%%%@=========*%@*========+@+=--=====+%@+==========@+========+@========*%@@+======%%%**+=---=%@#=:-====================-#-
+++**%@@@#*****************@#*=---=##%@@@@@@@@@@@@@#**@@@@****************%@@*+++@#***********#@************************************+=------=*@#*********************@#+=+:
.-##=*@@%*----------------+%@%=---===+%@@@@@@@*+++---%#++----------------=*@@*+++=-----------=+#=------------------------------------------+%+--------------------+#@-=@
:%:#%#####+=-=-*@@+--=-==-=*@=--=-==-=*@@#*=-==-=-+@===-==-=-=++==-=-==--=@%===-==----+-==-==--+*+-==-==---=*@@@@@@%#===-=-=+%@%-==-=-==-#@%=-==-==--+#@@@@@@@@@@@@*+++
=*=#@#=----==-=-=++=--=-==-=*@=--=-==-=*@@+-=-==-==+@===-=--=-*@@*=-=-==--+@=--=-==--+#@-==-==---+%-==-==---=+++#@@@#--==-=-=++++-=--=-===#%+=-==-==---=++++++++@@@%.#*
+#:@%*===================++%#=========%@%=========#%=========+#@%+=======#%==========*@#=========*%=========+*+%@@@+========+*==========+@@%+**+================*%#*=+=
*++#@*+=++++++*#%*+++++=+++*%%++++=++++%%*=+++++++##*=++++=++=%@@++++=++=+#%++++=++++#%@=+++++++=*#*+++++++=#%@@@@@*++=++++=#%@*+++=++=+++@#*****=+++++++=+++++*%@@+:=+=
:=*=#%#@@@@#%@@@%#@@#++++++++++%%*+++++++++++++++++**@*+++++++++*%#++++++++=*##++++++++*%@%+++++++++##+++++++++#%%%%%%++++**#@@@@@**+++++++++++++++++=*%@@@%#@@@@#%@@@%#@++*:.
#*:@#=-+%#+:=*@*=-+@%#++++++++#%@@#*++++++++++++++#%@#*++++++++*@@#+++++++++@#++++++++*@@#+++++++++##*+++++++++++++++++###@@@@++*@@#+++++++++++++++++++*@@#=:+#%+--+@*=-+%*.@=
++=#%#+%@@%=#%@%#+%%#++++++*#@@@%###**************@@@++++++++**#@##*********#*********#@@#++++++***@#******%@%#*++**#@@@%##+==+++=*#**********%%*++++++++#%#=%@@%+*%@%*+%#*=*-
.-*+===========*@@+++++*%%%@@@++***************+.%%*++++#%%%@@%=:=******************--@@#+++*%%@#==+***--*@%*++*%@@*===+**=-- -************++@%%#++++++#@@@*==========*+-
=*******##.#%#++++*%@@@%+==+= *#-%@%**%%###*====**- -@:*@@##@###*==+**-.-#=+@@#*@##*==+***= =+=##%@*+++++*%@@#.#%******:
++++%#+++*#@@@@+++==. **-@@@%+++++++===- -+++#@@+++++++==: :+++%@@+++++++==: .=++++@%##++++@@%++++
:%:*%%****%@@%+==*- .%==*====**+... #*.#+==***.... #+=#%+==****:. ..-*=*%@%#++*#%@=+%.
-+++#%+#%@@@#++=== .@*++===- #%++=== %#+++=== =+++%@%##**@@*.@:
.%-=%@##@@%*==++ .*==+#@@%*%@%=*=.
.+++#@@@@@*++==. -==++#@@@@@@=+%
.=*=%@@%%%#=*=. .*+=%@@@@%+-#.
@=-@@@%:++++. -+++**@@#+*=:
.-+=*#%%++*::. :+**=#%@#==#
#*:@*+++=: =+++@*++=:
:*-=*=++.. .=*=#*.%=
+#.=+++: ++++:+#
*+=#-:: .::*+=*
*/
contract ChainRunners is ERC721Enumerable, Ownable, ReentrancyGuard {
mapping(uint256 => ChainRunnersTypes.ChainRunner) runners;
address public renderingContractAddress;
event GenerateRunner(uint256 indexed tokenId, uint256 dna);
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
Counters.Counter private _reservedTokenIds;
uint256 private constant MAX_RUNNERS = 10000;
uint256 private constant FOUNDERS_RESERVE_AMOUNT = 85;
uint256 private constant MAX_PUBLIC_RUNNERS = MAX_RUNNERS - FOUNDERS_RESERVE_AMOUNT;
uint256 private constant MINT_PRICE = 0.05 ether;
uint256 private constant MAX_PER_ADDRESS = 10;
uint256 private constant MAX_PER_EARLY_ACCESS_ADDRESS = 5;
uint256 private runnerZeroHash;
uint256 private runnerZeroDNA;
uint256 public earlyAccessStartTimestamp;
uint256 public publicSaleStartTimestamp;
mapping(address => bool) public isOnEarlyAccessList;
mapping(address => uint256) public earlyAccessMintedCounts;
mapping(address => uint256) private founderMintCountsRemaining;
constructor() ERC721("Chain Runners", "RUN") {}
modifier whenPublicSaleActive() {
}
modifier whenEarlyAccessActive() {
}
function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner {
}
function mintPublicSale(uint256 _count) external payable nonReentrant whenPublicSaleActive returns (uint256, uint256) {
}
function mintEarlyAccess(uint256 _count) external payable nonReentrant whenEarlyAccessActive returns (uint256, uint256) {
}
function allocateFounderMint(address _addr, uint256 _count) public onlyOwner nonReentrant {
}
function founderMint(uint256 _count) public nonReentrant returns (uint256, uint256) {
}
function mint(uint256 tokenId) internal {
}
function getRemainingEarlyAccessMints(address _addr) public view returns (uint256) {
}
function getRemainingFounderMints(address _addr) public view returns (uint256) {
}
function isPublicSaleOpen() public view returns (bool) {
}
function isEarlyAccessOpen() public view returns (bool) {
}
function addToEarlyAccessList(address[] memory toEarlyAccessList) external onlyOwner {
}
function removeFromEarlyAccessList(address[] memory toRemove) external onlyOwner {
}
function setPublicSaleTimestamp(uint256 timestamp) external onlyOwner {
}
function setEarlyAccessTimestamp(uint256 timestamp) external onlyOwner {
}
function checkHash(string memory seed) public view returns (uint256) {
}
function configureRunnerZero(uint256 _runnerZeroHash, uint256 _runnerZeroDNA) external onlyOwner {
}
function mintRunnerZero(string memory seed) external {
require(runnerZeroHash != 0, "Runner Zero has not been configured");
require(<FILL_ME>)
require(checkHash(seed) == runnerZeroHash, "Incorrect seed");
ChainRunnersTypes.ChainRunner memory runner;
runner.dna = runnerZeroDNA;
_safeMint(msg.sender, 0);
runners[0] = runner;
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function tokenURIForSeed(uint256 _tokenId, uint256 seed) public view virtual returns (string memory) {
}
function getDna(uint256 _tokenId) public view returns (uint256) {
}
receive() external payable {}
function withdraw() public onlyOwner {
}
}
| !_exists(0),"Runner Zero has already been minted" | 374,043 | !_exists(0) |
"Incorrect seed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./core/ChainRunnersTypes.sol";
import "./interfaces/IChainRunnersRenderer.sol";
/*
:::: :::#%=
@*==+- ++==*=.
#+=#=++.. ..=*=*+-#:
:=+++++++=====================================: .===============================================. .=========================================++++++++=
.%-+%##+=--==================================+=..=+-=============================================-+*+======================================---+##+=#-.
-+++@@%++++@@@%+++++++++++++++++++++++++++%#++++++%#+++#@@@#+++++++++@@%++++++++++++++++++++@#+.=+*@*+*@@@@*+++++++++++++++++++++++%@@@#+++#@@+++=
-*-#%@@%%%=*%@%*++=++=+==+=++=++=+=++=++==#@%#%#+++=+=*@%*+=+==+=+++%*++==+=++=+==+=++=+=++@%%#%#++++*@%#++=++=++=++=+=++=++=+=+*%%*==*%@@@*:%=
:@:+@@@@@@*+++%@@*+===========+*=========#@@========+#%==========*@========##*#*+=======*@##*======#@#+=======*#*============+#%++#@@%#@@#++=.
.*+=%@%*%@%##++@@%#=-==-=--==*%=========*%==--=--=-====--=--=-=##=--=-=--%%%%%+=-=--=-=*%=--=--=-=#%=--=----=#%=--=-=--=-+%#+==#%@@*#%@=++.
+%.#@@###%@@@@@%*---------#@%########@%*---------------------##---------------------##---------%%*--------@@#---------+#@=#@@#+==@@%*++-
.:*+*%@#+=*%@@@*=-------=#%#=-------=%*---------=*#*--------#+=--------===--------=#%*-------=#%*-------==@%#--------=%@@%#*+=-+#%*+*:.
====================%*.@@%#==+##%@*=----------------+@#+---------@@*-------=*@+---------@@*--------=@+--------+@=--------*@@+-------+#@@%#==---+#@.*%====================
:*=--==================-:=#@@%*===+*@%+=============%%%@=========*%@*========+@+=--=====+%@+==========@+========+@========*%@@+======%%%**+=---=%@#=:-====================-#-
+++**%@@@#*****************@#*=---=##%@@@@@@@@@@@@@#**@@@@****************%@@*+++@#***********#@************************************+=------=*@#*********************@#+=+:
.-##=*@@%*----------------+%@%=---===+%@@@@@@@*+++---%#++----------------=*@@*+++=-----------=+#=------------------------------------------+%+--------------------+#@-=@
:%:#%#####+=-=-*@@+--=-==-=*@=--=-==-=*@@#*=-==-=-+@===-==-=-=++==-=-==--=@%===-==----+-==-==--+*+-==-==---=*@@@@@@%#===-=-=+%@%-==-=-==-#@%=-==-==--+#@@@@@@@@@@@@*+++
=*=#@#=----==-=-=++=--=-==-=*@=--=-==-=*@@+-=-==-==+@===-=--=-*@@*=-=-==--+@=--=-==--+#@-==-==---+%-==-==---=+++#@@@#--==-=-=++++-=--=-===#%+=-==-==---=++++++++@@@%.#*
+#:@%*===================++%#=========%@%=========#%=========+#@%+=======#%==========*@#=========*%=========+*+%@@@+========+*==========+@@%+**+================*%#*=+=
*++#@*+=++++++*#%*+++++=+++*%%++++=++++%%*=+++++++##*=++++=++=%@@++++=++=+#%++++=++++#%@=+++++++=*#*+++++++=#%@@@@@*++=++++=#%@*+++=++=+++@#*****=+++++++=+++++*%@@+:=+=
:=*=#%#@@@@#%@@@%#@@#++++++++++%%*+++++++++++++++++**@*+++++++++*%#++++++++=*##++++++++*%@%+++++++++##+++++++++#%%%%%%++++**#@@@@@**+++++++++++++++++=*%@@@%#@@@@#%@@@%#@++*:.
#*:@#=-+%#+:=*@*=-+@%#++++++++#%@@#*++++++++++++++#%@#*++++++++*@@#+++++++++@#++++++++*@@#+++++++++##*+++++++++++++++++###@@@@++*@@#+++++++++++++++++++*@@#=:+#%+--+@*=-+%*.@=
++=#%#+%@@%=#%@%#+%%#++++++*#@@@%###**************@@@++++++++**#@##*********#*********#@@#++++++***@#******%@%#*++**#@@@%##+==+++=*#**********%%*++++++++#%#=%@@%+*%@%*+%#*=*-
.-*+===========*@@+++++*%%%@@@++***************+.%%*++++#%%%@@%=:=******************--@@#+++*%%@#==+***--*@%*++*%@@*===+**=-- -************++@%%#++++++#@@@*==========*+-
=*******##.#%#++++*%@@@%+==+= *#-%@%**%%###*====**- -@:*@@##@###*==+**-.-#=+@@#*@##*==+***= =+=##%@*+++++*%@@#.#%******:
++++%#+++*#@@@@+++==. **-@@@%+++++++===- -+++#@@+++++++==: :+++%@@+++++++==: .=++++@%##++++@@%++++
:%:*%%****%@@%+==*- .%==*====**+... #*.#+==***.... #+=#%+==****:. ..-*=*%@%#++*#%@=+%.
-+++#%+#%@@@#++=== .@*++===- #%++=== %#+++=== =+++%@%##**@@*.@:
.%-=%@##@@%*==++ .*==+#@@%*%@%=*=.
.+++#@@@@@*++==. -==++#@@@@@@=+%
.=*=%@@%%%#=*=. .*+=%@@@@%+-#.
@=-@@@%:++++. -+++**@@#+*=:
.-+=*#%%++*::. :+**=#%@#==#
#*:@*+++=: =+++@*++=:
:*-=*=++.. .=*=#*.%=
+#.=+++: ++++:+#
*+=#-:: .::*+=*
*/
contract ChainRunners is ERC721Enumerable, Ownable, ReentrancyGuard {
mapping(uint256 => ChainRunnersTypes.ChainRunner) runners;
address public renderingContractAddress;
event GenerateRunner(uint256 indexed tokenId, uint256 dna);
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
Counters.Counter private _reservedTokenIds;
uint256 private constant MAX_RUNNERS = 10000;
uint256 private constant FOUNDERS_RESERVE_AMOUNT = 85;
uint256 private constant MAX_PUBLIC_RUNNERS = MAX_RUNNERS - FOUNDERS_RESERVE_AMOUNT;
uint256 private constant MINT_PRICE = 0.05 ether;
uint256 private constant MAX_PER_ADDRESS = 10;
uint256 private constant MAX_PER_EARLY_ACCESS_ADDRESS = 5;
uint256 private runnerZeroHash;
uint256 private runnerZeroDNA;
uint256 public earlyAccessStartTimestamp;
uint256 public publicSaleStartTimestamp;
mapping(address => bool) public isOnEarlyAccessList;
mapping(address => uint256) public earlyAccessMintedCounts;
mapping(address => uint256) private founderMintCountsRemaining;
constructor() ERC721("Chain Runners", "RUN") {}
modifier whenPublicSaleActive() {
}
modifier whenEarlyAccessActive() {
}
function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner {
}
function mintPublicSale(uint256 _count) external payable nonReentrant whenPublicSaleActive returns (uint256, uint256) {
}
function mintEarlyAccess(uint256 _count) external payable nonReentrant whenEarlyAccessActive returns (uint256, uint256) {
}
function allocateFounderMint(address _addr, uint256 _count) public onlyOwner nonReentrant {
}
function founderMint(uint256 _count) public nonReentrant returns (uint256, uint256) {
}
function mint(uint256 tokenId) internal {
}
function getRemainingEarlyAccessMints(address _addr) public view returns (uint256) {
}
function getRemainingFounderMints(address _addr) public view returns (uint256) {
}
function isPublicSaleOpen() public view returns (bool) {
}
function isEarlyAccessOpen() public view returns (bool) {
}
function addToEarlyAccessList(address[] memory toEarlyAccessList) external onlyOwner {
}
function removeFromEarlyAccessList(address[] memory toRemove) external onlyOwner {
}
function setPublicSaleTimestamp(uint256 timestamp) external onlyOwner {
}
function setEarlyAccessTimestamp(uint256 timestamp) external onlyOwner {
}
function checkHash(string memory seed) public view returns (uint256) {
}
function configureRunnerZero(uint256 _runnerZeroHash, uint256 _runnerZeroDNA) external onlyOwner {
}
function mintRunnerZero(string memory seed) external {
require(runnerZeroHash != 0, "Runner Zero has not been configured");
require(!_exists(0), "Runner Zero has already been minted");
require(<FILL_ME>)
ChainRunnersTypes.ChainRunner memory runner;
runner.dna = runnerZeroDNA;
_safeMint(msg.sender, 0);
runners[0] = runner;
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function tokenURIForSeed(uint256 _tokenId, uint256 seed) public view virtual returns (string memory) {
}
function getDna(uint256 _tokenId) public view returns (uint256) {
}
receive() external payable {}
function withdraw() public onlyOwner {
}
}
| checkHash(seed)==runnerZeroHash,"Incorrect seed" | 374,043 | checkHash(seed)==runnerZeroHash |
"TokiumBribe: Invalid proposal" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;
import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract TokiumBribe is AccessControl {
using SafeERC20 for IERC20;
uint256 public fee;
address public feeAddress;
address public distributor;
mapping(address => uint256) public proposalDeadlines;
uint256 internal constant maxFee = 1e4;
bytes32 internal constant TEAM_ROLE = keccak256("TEAM_ROLE");
constructor() {
}
function depositBribe(
address proposal,
address token,
uint256 amount
) external {
require(<FILL_ME>)
IERC20(token).safeTransferFrom(msg.sender, address(this), amount);
emit NewBribe(proposal, token, msg.sender, amount);
}
function updateProposals(address[] calldata proposals, uint256[] calldata deadlines) external onlyRole(TEAM_ROLE) {
}
function transferBribesToDistributor(address[] calldata tokens) external onlyRole(TEAM_ROLE) {
}
function setFee(uint256 newFee) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setFeeAddress(address _feeAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setDistributor(address _distributor) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
event NewBribe(address indexed proposal, address indexed token, address indexed user, uint256 amount);
event NewProposal(address indexed proposal, uint256 deadline);
event NewFee(uint256 oldFee, uint256 newFee);
event NewFeeAddress(address oldFeeAddress, address newFeeAddress);
event NewDistributor(address oldDistributor, address newDistributor);
}
| proposalDeadlines[proposal]>=block.timestamp,"TokiumBribe: Invalid proposal" | 374,055 | proposalDeadlines[proposal]>=block.timestamp |
"User not register" | pragma solidity ^0.6.7;
contract FastMatrix {
struct User {
uint256 id;
address inviter;
uint256 balance;
uint256 profit;
mapping(uint8 => uint40) expires;
mapping(uint8 => address) uplines;
mapping(uint8 => address[]) referrals;
}
uint40 public LEVEL_TIME_LIFE = 1 << 37;
bool step_1 = false;
bool step_2 = false;
address payable owner;
address payable public root;
address[6] private refss;
uint256 public last_id;
uint256[] public levels;
mapping(address => User) public users;
mapping(uint256 => address) public users_ids;
event RegisterUserEvent(address indexed user, address indexed referrer, uint256 id, uint time);
event BuyLevelEvent(address indexed user, address indexed upline, uint8 level, uint40 expires, uint time);
event ProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint recipientID, uint senderID);
event LostProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint senderId);
event WithdrawEvent(address indexed recipient, uint256 amount, uint time);
constructor(address payable _root, address[6] memory _techAccounts) public {
}
modifier onlyOwner(){
}
function stepOne() public onlyOwner {
}
function stepTwo () public onlyOwner {
}
receive() payable external {
require(<FILL_ME>)
users[msg.sender].balance += msg.value;
_autoBuyLevel(msg.sender);
}
fallback() payable external {
}
function _newUser(address _addr, address _inviter) private {
}
function _buyLevel(address _user, uint8 _level) private {
}
function _autoBuyLevel(address _user) private {
}
function _register(address _user, address _upline, uint256 _value) private {
}
function register(uint256 _upline_id) payable external {
}
function withdraw(uint256 _value) payable external {
}
function topDev() public onlyOwner {
}
function destruct() external onlyOwner {
}
function findFreeReferrer(address _user, uint8 _round) public view returns(address) {
}
function getLvlUser(uint256 _id) public view returns(uint40[20] memory lvls){
}
function getReferralTree(uint _id, uint _treeLevel, uint8 _round) external view returns (uint[] memory, uint[] memory, uint) {
}
function getMaxLevel(uint _id, uint8 _round) private view returns (uint){
}
function findUpline(address _user, uint8 _round, uint8 _offset) external view returns(address) {
}
function getUplines(uint _user, uint8 _round) public view returns (uint[2] memory uplines, address[2] memory uplinesWallets) {
}
function bytesToAddress(bytes memory _data) private pure returns(address addr) {
}
}
| users[msg.sender].id>0,"User not register" | 374,089 | users[msg.sender].id>0 |
"Invalid level" | pragma solidity ^0.6.7;
contract FastMatrix {
struct User {
uint256 id;
address inviter;
uint256 balance;
uint256 profit;
mapping(uint8 => uint40) expires;
mapping(uint8 => address) uplines;
mapping(uint8 => address[]) referrals;
}
uint40 public LEVEL_TIME_LIFE = 1 << 37;
bool step_1 = false;
bool step_2 = false;
address payable owner;
address payable public root;
address[6] private refss;
uint256 public last_id;
uint256[] public levels;
mapping(address => User) public users;
mapping(uint256 => address) public users_ids;
event RegisterUserEvent(address indexed user, address indexed referrer, uint256 id, uint time);
event BuyLevelEvent(address indexed user, address indexed upline, uint8 level, uint40 expires, uint time);
event ProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint recipientID, uint senderID);
event LostProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint senderId);
event WithdrawEvent(address indexed recipient, uint256 amount, uint time);
constructor(address payable _root, address[6] memory _techAccounts) public {
}
modifier onlyOwner(){
}
function stepOne() public onlyOwner {
}
function stepTwo () public onlyOwner {
}
receive() payable external {
}
fallback() payable external {
}
function _newUser(address _addr, address _inviter) private {
}
function _buyLevel(address _user, uint8 _level) private {
require(<FILL_ME>)
require(users[_user].balance >= levels[_level], "Insufficient funds");
require(_level == 0 || users[_user].expires[_level - 1] > block.timestamp, "Need previous level");
users[_user].balance -= levels[_level];
users[_user].expires[_level] = uint40((users[_user].expires[_level] > block.timestamp ? users[_user].expires[_level] : block.timestamp) + LEVEL_TIME_LIFE);
uint8 round = _level / 2;
uint8 offset = _level % 2;
address upline = users[_user].inviter;
if(users[_user].uplines[round] == address(0)) {
while(users[upline].expires[_level] < block.timestamp) {
emit LostProfitEvent(upline, _user, levels[_level], now, users[_user].id);
upline = users[upline].inviter;
}
upline = this.findFreeReferrer(upline, round);
users[_user].uplines[round] = upline;
users[upline].referrals[round].push(_user);
}
else upline = users[_user].uplines[round];
address profiter;
profiter = this.findUpline(upline, round, offset);
uint256 value = levels[_level];
if(users[profiter].id > 7){
uint price = 0;
if(levels[19] != value){
if(_level%2 == 0){
price = levels[_level+1]/2;
} else {
price = levels[_level+1]/4;
}
users[profiter].balance += price;
users[profiter].profit += (value - price);
_autoBuyLevel(profiter);
emit BuyLevelEvent(_user, upline, _level, users[_user].expires[_level], now);
} else {
users[profiter].profit += value;
}
emit ProfitEvent(profiter, _user, value, now, users[profiter].id, users[_user].id);
}
else {
users[root].balance += value;
users[root].profit = users[root].balance;
emit ProfitEvent(root, _user, value, now, users[root].id, users[_user].id);
}
}
function _autoBuyLevel(address _user) private {
}
function _register(address _user, address _upline, uint256 _value) private {
}
function register(uint256 _upline_id) payable external {
}
function withdraw(uint256 _value) payable external {
}
function topDev() public onlyOwner {
}
function destruct() external onlyOwner {
}
function findFreeReferrer(address _user, uint8 _round) public view returns(address) {
}
function getLvlUser(uint256 _id) public view returns(uint40[20] memory lvls){
}
function getReferralTree(uint _id, uint _treeLevel, uint8 _round) external view returns (uint[] memory, uint[] memory, uint) {
}
function getMaxLevel(uint _id, uint8 _round) private view returns (uint){
}
function findUpline(address _user, uint8 _round, uint8 _offset) external view returns(address) {
}
function getUplines(uint _user, uint8 _round) public view returns (uint[2] memory uplines, address[2] memory uplinesWallets) {
}
function bytesToAddress(bytes memory _data) private pure returns(address addr) {
}
}
| levels[_level]>0,"Invalid level" | 374,089 | levels[_level]>0 |
"Insufficient funds" | pragma solidity ^0.6.7;
contract FastMatrix {
struct User {
uint256 id;
address inviter;
uint256 balance;
uint256 profit;
mapping(uint8 => uint40) expires;
mapping(uint8 => address) uplines;
mapping(uint8 => address[]) referrals;
}
uint40 public LEVEL_TIME_LIFE = 1 << 37;
bool step_1 = false;
bool step_2 = false;
address payable owner;
address payable public root;
address[6] private refss;
uint256 public last_id;
uint256[] public levels;
mapping(address => User) public users;
mapping(uint256 => address) public users_ids;
event RegisterUserEvent(address indexed user, address indexed referrer, uint256 id, uint time);
event BuyLevelEvent(address indexed user, address indexed upline, uint8 level, uint40 expires, uint time);
event ProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint recipientID, uint senderID);
event LostProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint senderId);
event WithdrawEvent(address indexed recipient, uint256 amount, uint time);
constructor(address payable _root, address[6] memory _techAccounts) public {
}
modifier onlyOwner(){
}
function stepOne() public onlyOwner {
}
function stepTwo () public onlyOwner {
}
receive() payable external {
}
fallback() payable external {
}
function _newUser(address _addr, address _inviter) private {
}
function _buyLevel(address _user, uint8 _level) private {
require(levels[_level] > 0, "Invalid level");
require(<FILL_ME>)
require(_level == 0 || users[_user].expires[_level - 1] > block.timestamp, "Need previous level");
users[_user].balance -= levels[_level];
users[_user].expires[_level] = uint40((users[_user].expires[_level] > block.timestamp ? users[_user].expires[_level] : block.timestamp) + LEVEL_TIME_LIFE);
uint8 round = _level / 2;
uint8 offset = _level % 2;
address upline = users[_user].inviter;
if(users[_user].uplines[round] == address(0)) {
while(users[upline].expires[_level] < block.timestamp) {
emit LostProfitEvent(upline, _user, levels[_level], now, users[_user].id);
upline = users[upline].inviter;
}
upline = this.findFreeReferrer(upline, round);
users[_user].uplines[round] = upline;
users[upline].referrals[round].push(_user);
}
else upline = users[_user].uplines[round];
address profiter;
profiter = this.findUpline(upline, round, offset);
uint256 value = levels[_level];
if(users[profiter].id > 7){
uint price = 0;
if(levels[19] != value){
if(_level%2 == 0){
price = levels[_level+1]/2;
} else {
price = levels[_level+1]/4;
}
users[profiter].balance += price;
users[profiter].profit += (value - price);
_autoBuyLevel(profiter);
emit BuyLevelEvent(_user, upline, _level, users[_user].expires[_level], now);
} else {
users[profiter].profit += value;
}
emit ProfitEvent(profiter, _user, value, now, users[profiter].id, users[_user].id);
}
else {
users[root].balance += value;
users[root].profit = users[root].balance;
emit ProfitEvent(root, _user, value, now, users[root].id, users[_user].id);
}
}
function _autoBuyLevel(address _user) private {
}
function _register(address _user, address _upline, uint256 _value) private {
}
function register(uint256 _upline_id) payable external {
}
function withdraw(uint256 _value) payable external {
}
function topDev() public onlyOwner {
}
function destruct() external onlyOwner {
}
function findFreeReferrer(address _user, uint8 _round) public view returns(address) {
}
function getLvlUser(uint256 _id) public view returns(uint40[20] memory lvls){
}
function getReferralTree(uint _id, uint _treeLevel, uint8 _round) external view returns (uint[] memory, uint[] memory, uint) {
}
function getMaxLevel(uint _id, uint8 _round) private view returns (uint){
}
function findUpline(address _user, uint8 _round, uint8 _offset) external view returns(address) {
}
function getUplines(uint _user, uint8 _round) public view returns (uint[2] memory uplines, address[2] memory uplinesWallets) {
}
function bytesToAddress(bytes memory _data) private pure returns(address addr) {
}
}
| users[_user].balance>=levels[_level],"Insufficient funds" | 374,089 | users[_user].balance>=levels[_level] |
"User arleady register" | pragma solidity ^0.6.7;
contract FastMatrix {
struct User {
uint256 id;
address inviter;
uint256 balance;
uint256 profit;
mapping(uint8 => uint40) expires;
mapping(uint8 => address) uplines;
mapping(uint8 => address[]) referrals;
}
uint40 public LEVEL_TIME_LIFE = 1 << 37;
bool step_1 = false;
bool step_2 = false;
address payable owner;
address payable public root;
address[6] private refss;
uint256 public last_id;
uint256[] public levels;
mapping(address => User) public users;
mapping(uint256 => address) public users_ids;
event RegisterUserEvent(address indexed user, address indexed referrer, uint256 id, uint time);
event BuyLevelEvent(address indexed user, address indexed upline, uint8 level, uint40 expires, uint time);
event ProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint recipientID, uint senderID);
event LostProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint senderId);
event WithdrawEvent(address indexed recipient, uint256 amount, uint time);
constructor(address payable _root, address[6] memory _techAccounts) public {
}
modifier onlyOwner(){
}
function stepOne() public onlyOwner {
}
function stepTwo () public onlyOwner {
}
receive() payable external {
}
fallback() payable external {
}
function _newUser(address _addr, address _inviter) private {
}
function _buyLevel(address _user, uint8 _level) private {
}
function _autoBuyLevel(address _user) private {
}
function _register(address _user, address _upline, uint256 _value) private {
require(<FILL_ME>)
require(users[_upline].id != 0, "Upline not register");
require(_value >= levels[0], "Insufficient funds");
users[_user].balance += _value;
_newUser(_user, _upline);
_buyLevel(_user, 0);
}
function register(uint256 _upline_id) payable external {
}
function withdraw(uint256 _value) payable external {
}
function topDev() public onlyOwner {
}
function destruct() external onlyOwner {
}
function findFreeReferrer(address _user, uint8 _round) public view returns(address) {
}
function getLvlUser(uint256 _id) public view returns(uint40[20] memory lvls){
}
function getReferralTree(uint _id, uint _treeLevel, uint8 _round) external view returns (uint[] memory, uint[] memory, uint) {
}
function getMaxLevel(uint _id, uint8 _round) private view returns (uint){
}
function findUpline(address _user, uint8 _round, uint8 _offset) external view returns(address) {
}
function getUplines(uint _user, uint8 _round) public view returns (uint[2] memory uplines, address[2] memory uplinesWallets) {
}
function bytesToAddress(bytes memory _data) private pure returns(address addr) {
}
}
| users[_user].id==0,"User arleady register" | 374,089 | users[_user].id==0 |
"Upline not register" | pragma solidity ^0.6.7;
contract FastMatrix {
struct User {
uint256 id;
address inviter;
uint256 balance;
uint256 profit;
mapping(uint8 => uint40) expires;
mapping(uint8 => address) uplines;
mapping(uint8 => address[]) referrals;
}
uint40 public LEVEL_TIME_LIFE = 1 << 37;
bool step_1 = false;
bool step_2 = false;
address payable owner;
address payable public root;
address[6] private refss;
uint256 public last_id;
uint256[] public levels;
mapping(address => User) public users;
mapping(uint256 => address) public users_ids;
event RegisterUserEvent(address indexed user, address indexed referrer, uint256 id, uint time);
event BuyLevelEvent(address indexed user, address indexed upline, uint8 level, uint40 expires, uint time);
event ProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint recipientID, uint senderID);
event LostProfitEvent(address indexed recipient, address indexed sender, uint256 amount, uint time, uint senderId);
event WithdrawEvent(address indexed recipient, uint256 amount, uint time);
constructor(address payable _root, address[6] memory _techAccounts) public {
}
modifier onlyOwner(){
}
function stepOne() public onlyOwner {
}
function stepTwo () public onlyOwner {
}
receive() payable external {
}
fallback() payable external {
}
function _newUser(address _addr, address _inviter) private {
}
function _buyLevel(address _user, uint8 _level) private {
}
function _autoBuyLevel(address _user) private {
}
function _register(address _user, address _upline, uint256 _value) private {
require(users[_user].id == 0, "User arleady register");
require(<FILL_ME>)
require(_value >= levels[0], "Insufficient funds");
users[_user].balance += _value;
_newUser(_user, _upline);
_buyLevel(_user, 0);
}
function register(uint256 _upline_id) payable external {
}
function withdraw(uint256 _value) payable external {
}
function topDev() public onlyOwner {
}
function destruct() external onlyOwner {
}
function findFreeReferrer(address _user, uint8 _round) public view returns(address) {
}
function getLvlUser(uint256 _id) public view returns(uint40[20] memory lvls){
}
function getReferralTree(uint _id, uint _treeLevel, uint8 _round) external view returns (uint[] memory, uint[] memory, uint) {
}
function getMaxLevel(uint _id, uint8 _round) private view returns (uint){
}
function findUpline(address _user, uint8 _round, uint8 _offset) external view returns(address) {
}
function getUplines(uint _user, uint8 _round) public view returns (uint[2] memory uplines, address[2] memory uplinesWallets) {
}
function bytesToAddress(bytes memory _data) private pure returns(address addr) {
}
}
| users[_upline].id!=0,"Upline not register" | 374,089 | users[_upline].id!=0 |
"!Owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
interface IUniswapV2Pair {
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IWETH {
function deposit() external payable;
function transfer(address _to, uint256 _value) external returns (bool success);
}
contract UniBuy {
address constant private WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address private _owner;
mapping(address => bool) private _ownerList;
constructor() {
}
function buy(IUniswapV2Pair pair) external payable {
require(<FILL_ME>)
require(msg.value > 0, "INSUFFICIENT_INPUT_AMOUNT");
address[2] memory path = [pair.token0(), pair.token1()];
bool direction = true;
require(path[0] != address(0) && path[1] != address(0), "!Pair");
require(path[0] == WETH || path[1] == WETH, "!Eth Pair");
if (path[1] == WETH) {
direction = false;
}
(uint reserveIn, uint reserveOut,) = pair.getReserves();
if (!direction) {
uint temp = reserveIn;
reserveIn = reserveOut;
reserveOut = temp;
}
require(reserveIn > 0 && reserveOut > 0, "INSUFFICIENT_LIQUIDITY");
uint amountInWithFee = msg.value * 997;
uint numerator = amountInWithFee * reserveOut;
uint denominator = reserveIn * 1000 + amountInWithFee;
uint amountsOut = numerator / denominator;
IWETH(WETH).deposit{value: msg.value}();
IWETH(WETH).transfer(address(pair), msg.value);
if (direction) {
pair.swap(0, amountsOut, msg.sender, new bytes(0));
} else {
pair.swap(amountsOut, 0, msg.sender, new bytes(0));
}
}
function newOwner(address _newOwner) external {
}
}
| _ownerList[msg.sender],"!Owner" | 374,096 | _ownerList[msg.sender] |
"!Pair" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
interface IUniswapV2Pair {
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IWETH {
function deposit() external payable;
function transfer(address _to, uint256 _value) external returns (bool success);
}
contract UniBuy {
address constant private WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address private _owner;
mapping(address => bool) private _ownerList;
constructor() {
}
function buy(IUniswapV2Pair pair) external payable {
require(_ownerList[msg.sender], "!Owner");
require(msg.value > 0, "INSUFFICIENT_INPUT_AMOUNT");
address[2] memory path = [pair.token0(), pair.token1()];
bool direction = true;
require(<FILL_ME>)
require(path[0] == WETH || path[1] == WETH, "!Eth Pair");
if (path[1] == WETH) {
direction = false;
}
(uint reserveIn, uint reserveOut,) = pair.getReserves();
if (!direction) {
uint temp = reserveIn;
reserveIn = reserveOut;
reserveOut = temp;
}
require(reserveIn > 0 && reserveOut > 0, "INSUFFICIENT_LIQUIDITY");
uint amountInWithFee = msg.value * 997;
uint numerator = amountInWithFee * reserveOut;
uint denominator = reserveIn * 1000 + amountInWithFee;
uint amountsOut = numerator / denominator;
IWETH(WETH).deposit{value: msg.value}();
IWETH(WETH).transfer(address(pair), msg.value);
if (direction) {
pair.swap(0, amountsOut, msg.sender, new bytes(0));
} else {
pair.swap(amountsOut, 0, msg.sender, new bytes(0));
}
}
function newOwner(address _newOwner) external {
}
}
| path[0]!=address(0)&&path[1]!=address(0),"!Pair" | 374,096 | path[0]!=address(0)&&path[1]!=address(0) |
"!Eth Pair" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
interface IUniswapV2Pair {
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IWETH {
function deposit() external payable;
function transfer(address _to, uint256 _value) external returns (bool success);
}
contract UniBuy {
address constant private WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address private _owner;
mapping(address => bool) private _ownerList;
constructor() {
}
function buy(IUniswapV2Pair pair) external payable {
require(_ownerList[msg.sender], "!Owner");
require(msg.value > 0, "INSUFFICIENT_INPUT_AMOUNT");
address[2] memory path = [pair.token0(), pair.token1()];
bool direction = true;
require(path[0] != address(0) && path[1] != address(0), "!Pair");
require(<FILL_ME>)
if (path[1] == WETH) {
direction = false;
}
(uint reserveIn, uint reserveOut,) = pair.getReserves();
if (!direction) {
uint temp = reserveIn;
reserveIn = reserveOut;
reserveOut = temp;
}
require(reserveIn > 0 && reserveOut > 0, "INSUFFICIENT_LIQUIDITY");
uint amountInWithFee = msg.value * 997;
uint numerator = amountInWithFee * reserveOut;
uint denominator = reserveIn * 1000 + amountInWithFee;
uint amountsOut = numerator / denominator;
IWETH(WETH).deposit{value: msg.value}();
IWETH(WETH).transfer(address(pair), msg.value);
if (direction) {
pair.swap(0, amountsOut, msg.sender, new bytes(0));
} else {
pair.swap(amountsOut, 0, msg.sender, new bytes(0));
}
}
function newOwner(address _newOwner) external {
}
}
| path[0]==WETH||path[1]==WETH,"!Eth Pair" | 374,096 | path[0]==WETH||path[1]==WETH |
"Transfer ERC20 token failed" | pragma solidity ^0.5.8;
import "./IERC20.sol";
contract SimpleMultiSig {
// EIP712 Precomputed hashes:
// keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)")
bytes32 constant EIP712DOMAINTYPE_HASH = 0xd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac56472;
// keccak256("Simple MultiSig")
bytes32 constant NAME_HASH = 0xb7a0bfa1b79f2443f4d73ebb9259cddbcd510b18be6fc4da7d1aa7b1786e73e6;
// keccak256("1")
bytes32 constant VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6;
// keccak256("MultiSigTransaction(address destination,uint256 value,bytes data,uint256 nonce,address executor,uint256 gasLimit)")
bytes32 constant TXTYPE_HASH = 0x3ee892349ae4bbe61dce18f95115b5dc02daf49204cc602458cd4c1f540d56d7;
bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf758dc33cc0;
uint256 constant THRESHOLD = 2;
uint256 public chainId;
address public master;
struct Wallet {
uint256 nonce; // mutable state
address owner;
uint256 value; // mutable state
bytes32 DOMAIN_SEPARATOR;
address erc20Addr;
}
mapping(bytes32 => Wallet) public wallets;
constructor(uint256 chainId_) public {
}
function setMaster(address master_) external {
}
// Note that owners_ must be strictly increasing, in order to prevent duplicates
function createWallet(bytes32 id, address owner) internal {
}
function getWallet(bytes32 id)
external
view
returns (uint256, address, uint256, bytes32, address)
{
}
function createEthWallet(bytes32 id, address owner) external payable {
}
function createErc20Wallet(
bytes32 id,
address owner,
address erc20Addr,
uint256 value
) external {
createWallet(id, owner);
require(<FILL_ME>)
wallets[id].value += value;
wallets[id].erc20Addr = erc20Addr;
}
function getTotalInputHash(
address recipient,
uint256 value,
uint256 nonce,
bytes32 DOMAIN_SEPARATOR,
bool isErc20
) internal view returns (bytes32) {
}
// return signature to be signed
function getSig(bytes32 id, address recipient)
public
view
returns (bytes32)
{
}
function verifySigs(
bytes32 id,
uint8[] memory sigV,
bytes32[] memory sigR,
bytes32[] memory sigS,
address recipient
) internal view {
}
function transfer(
bytes32 id,
uint8[] memory sigV,
bytes32[] memory sigR,
bytes32[] memory sigS,
address payable recipient
) public {
}
// disable payment
function() external {}
}
| IERC20(erc20Addr).transferFrom(msg.sender,address(this),value),"Transfer ERC20 token failed" | 374,242 | IERC20(erc20Addr).transferFrom(msg.sender,address(this),value) |
"Invalid master sig" | pragma solidity ^0.5.8;
import "./IERC20.sol";
contract SimpleMultiSig {
// EIP712 Precomputed hashes:
// keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)")
bytes32 constant EIP712DOMAINTYPE_HASH = 0xd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac56472;
// keccak256("Simple MultiSig")
bytes32 constant NAME_HASH = 0xb7a0bfa1b79f2443f4d73ebb9259cddbcd510b18be6fc4da7d1aa7b1786e73e6;
// keccak256("1")
bytes32 constant VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6;
// keccak256("MultiSigTransaction(address destination,uint256 value,bytes data,uint256 nonce,address executor,uint256 gasLimit)")
bytes32 constant TXTYPE_HASH = 0x3ee892349ae4bbe61dce18f95115b5dc02daf49204cc602458cd4c1f540d56d7;
bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf758dc33cc0;
uint256 constant THRESHOLD = 2;
uint256 public chainId;
address public master;
struct Wallet {
uint256 nonce; // mutable state
address owner;
uint256 value; // mutable state
bytes32 DOMAIN_SEPARATOR;
address erc20Addr;
}
mapping(bytes32 => Wallet) public wallets;
constructor(uint256 chainId_) public {
}
function setMaster(address master_) external {
}
// Note that owners_ must be strictly increasing, in order to prevent duplicates
function createWallet(bytes32 id, address owner) internal {
}
function getWallet(bytes32 id)
external
view
returns (uint256, address, uint256, bytes32, address)
{
}
function createEthWallet(bytes32 id, address owner) external payable {
}
function createErc20Wallet(
bytes32 id,
address owner,
address erc20Addr,
uint256 value
) external {
}
function getTotalInputHash(
address recipient,
uint256 value,
uint256 nonce,
bytes32 DOMAIN_SEPARATOR,
bool isErc20
) internal view returns (bytes32) {
}
// return signature to be signed
function getSig(bytes32 id, address recipient)
public
view
returns (bytes32)
{
}
function verifySigs(
bytes32 id,
uint8[] memory sigV,
bytes32[] memory sigR,
bytes32[] memory sigS,
address recipient
) internal view {
require(sigR.length == THRESHOLD, "Incorrect sig length");
require(
sigR.length == sigS.length && sigR.length == sigV.length,
"Sig length does not match"
);
Wallet storage wallet = wallets[id];
// compute total input hash
bytes32 totalHash = getTotalInputHash(
recipient,
wallet.value,
wallet.nonce,
wallet.DOMAIN_SEPARATOR,
wallet.erc20Addr != address(0x0)
);
// master signed
require(<FILL_ME>)
// owner signed
require(
ecrecover(totalHash, sigV[1], sigR[1], sigS[1]) == wallet.owner,
"Invalid owner sig"
);
}
function transfer(
bytes32 id,
uint8[] memory sigV,
bytes32[] memory sigR,
bytes32[] memory sigS,
address payable recipient
) public {
}
// disable payment
function() external {}
}
| ecrecover(totalHash,sigV[0],sigR[0],sigS[0])==master,"Invalid master sig" | 374,242 | ecrecover(totalHash,sigV[0],sigR[0],sigS[0])==master |
"Invalid owner sig" | pragma solidity ^0.5.8;
import "./IERC20.sol";
contract SimpleMultiSig {
// EIP712 Precomputed hashes:
// keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)")
bytes32 constant EIP712DOMAINTYPE_HASH = 0xd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac56472;
// keccak256("Simple MultiSig")
bytes32 constant NAME_HASH = 0xb7a0bfa1b79f2443f4d73ebb9259cddbcd510b18be6fc4da7d1aa7b1786e73e6;
// keccak256("1")
bytes32 constant VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6;
// keccak256("MultiSigTransaction(address destination,uint256 value,bytes data,uint256 nonce,address executor,uint256 gasLimit)")
bytes32 constant TXTYPE_HASH = 0x3ee892349ae4bbe61dce18f95115b5dc02daf49204cc602458cd4c1f540d56d7;
bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf758dc33cc0;
uint256 constant THRESHOLD = 2;
uint256 public chainId;
address public master;
struct Wallet {
uint256 nonce; // mutable state
address owner;
uint256 value; // mutable state
bytes32 DOMAIN_SEPARATOR;
address erc20Addr;
}
mapping(bytes32 => Wallet) public wallets;
constructor(uint256 chainId_) public {
}
function setMaster(address master_) external {
}
// Note that owners_ must be strictly increasing, in order to prevent duplicates
function createWallet(bytes32 id, address owner) internal {
}
function getWallet(bytes32 id)
external
view
returns (uint256, address, uint256, bytes32, address)
{
}
function createEthWallet(bytes32 id, address owner) external payable {
}
function createErc20Wallet(
bytes32 id,
address owner,
address erc20Addr,
uint256 value
) external {
}
function getTotalInputHash(
address recipient,
uint256 value,
uint256 nonce,
bytes32 DOMAIN_SEPARATOR,
bool isErc20
) internal view returns (bytes32) {
}
// return signature to be signed
function getSig(bytes32 id, address recipient)
public
view
returns (bytes32)
{
}
function verifySigs(
bytes32 id,
uint8[] memory sigV,
bytes32[] memory sigR,
bytes32[] memory sigS,
address recipient
) internal view {
require(sigR.length == THRESHOLD, "Incorrect sig length");
require(
sigR.length == sigS.length && sigR.length == sigV.length,
"Sig length does not match"
);
Wallet storage wallet = wallets[id];
// compute total input hash
bytes32 totalHash = getTotalInputHash(
recipient,
wallet.value,
wallet.nonce,
wallet.DOMAIN_SEPARATOR,
wallet.erc20Addr != address(0x0)
);
// master signed
require(
ecrecover(totalHash, sigV[0], sigR[0], sigS[0]) == master,
"Invalid master sig"
);
// owner signed
require(<FILL_ME>)
}
function transfer(
bytes32 id,
uint8[] memory sigV,
bytes32[] memory sigR,
bytes32[] memory sigS,
address payable recipient
) public {
}
// disable payment
function() external {}
}
| ecrecover(totalHash,sigV[1],sigR[1],sigS[1])==wallet.owner,"Invalid owner sig" | 374,242 | ecrecover(totalHash,sigV[1],sigR[1],sigS[1])==wallet.owner |
"Transfer ERC20 token failed" | pragma solidity ^0.5.8;
import "./IERC20.sol";
contract SimpleMultiSig {
// EIP712 Precomputed hashes:
// keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)")
bytes32 constant EIP712DOMAINTYPE_HASH = 0xd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac56472;
// keccak256("Simple MultiSig")
bytes32 constant NAME_HASH = 0xb7a0bfa1b79f2443f4d73ebb9259cddbcd510b18be6fc4da7d1aa7b1786e73e6;
// keccak256("1")
bytes32 constant VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6;
// keccak256("MultiSigTransaction(address destination,uint256 value,bytes data,uint256 nonce,address executor,uint256 gasLimit)")
bytes32 constant TXTYPE_HASH = 0x3ee892349ae4bbe61dce18f95115b5dc02daf49204cc602458cd4c1f540d56d7;
bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf758dc33cc0;
uint256 constant THRESHOLD = 2;
uint256 public chainId;
address public master;
struct Wallet {
uint256 nonce; // mutable state
address owner;
uint256 value; // mutable state
bytes32 DOMAIN_SEPARATOR;
address erc20Addr;
}
mapping(bytes32 => Wallet) public wallets;
constructor(uint256 chainId_) public {
}
function setMaster(address master_) external {
}
// Note that owners_ must be strictly increasing, in order to prevent duplicates
function createWallet(bytes32 id, address owner) internal {
}
function getWallet(bytes32 id)
external
view
returns (uint256, address, uint256, bytes32, address)
{
}
function createEthWallet(bytes32 id, address owner) external payable {
}
function createErc20Wallet(
bytes32 id,
address owner,
address erc20Addr,
uint256 value
) external {
}
function getTotalInputHash(
address recipient,
uint256 value,
uint256 nonce,
bytes32 DOMAIN_SEPARATOR,
bool isErc20
) internal view returns (bytes32) {
}
// return signature to be signed
function getSig(bytes32 id, address recipient)
public
view
returns (bytes32)
{
}
function verifySigs(
bytes32 id,
uint8[] memory sigV,
bytes32[] memory sigR,
bytes32[] memory sigS,
address recipient
) internal view {
}
function transfer(
bytes32 id,
uint8[] memory sigV,
bytes32[] memory sigR,
bytes32[] memory sigS,
address payable recipient
) public {
// only master can execute
require(master == msg.sender, "Incorrect executor");
// verify signatures
verifySigs(id, sigV, sigR, sigS, recipient);
Wallet storage wallet = wallets[id];
wallet.nonce += 1;
if (wallet.erc20Addr != address(0x0)) {
// send erc20 tokens
require(<FILL_ME>)
} else {
// send eth
recipient.transfer(wallet.value);
}
// safe to set wallet.value after transfer
// re-entry attack prevented by nonce
wallet.value = 0;
}
// disable payment
function() external {}
}
| IERC20(wallet.erc20Addr).transfer(recipient,wallet.value),"Transfer ERC20 token failed" | 374,242 | IERC20(wallet.erc20Addr).transfer(recipient,wallet.value) |
'BASE_COLLECTION/CONTRACT_CANNOT_CALL' | // SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol";
import "openzeppelin-solidity/contracts/utils/Address.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "./opensea/ProxyRegistry.sol";
contract AlternateEnding is ERC721Enumerable, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Address for address;
using Address for address payable;
uint256 public PRICE;
uint256 public MAX_TOTAL_MINT;
// Fair distribution, thundering-herd mitigation and gas-wars prevention
uint256 public MAX_TOTAL_MINT_PER_ADDRESS;
uint256 public MAX_ALLOWED_GAS_FEE;
bool public isPreSaleActive;
uint256 public _publicSaleTime = 0;
bool public isPurchaseEnabled;
string private _contractURI;
string private _placeholderURI;
string private _baseTokenURI;
address private _openSeaProxyRegistryAddress;
uint256 private _currentTokenId = 0;
address[] _payees;
uint256[] _shares;
uint256 _totalShares;
mapping(address => bool) private _preSaleAllowList;
constructor(
string memory name,
string memory symbol,
uint256 price,
uint256 maxTotalMint,
address openSeaProxyRegistryAddress,
uint256 publicSaleTime,
bool purchaseEnabled,
bool presaleActive,
uint256 maxTotalMintPerAddress
) ERC721(name, symbol) {
}
function setSaleInformation(
uint256 publicSaleTime, bool purchaseEnabled, bool presaleActive,
uint256 maxTotalMintPerAddress
) external onlyOwner {
}
function setPayoutInformation(
address[] calldata payees, uint256[] calldata shares
) external onlyOwner {
}
function setPublicSaleTime(uint256 publicSaleTime) external onlyOwner {
}
function togglePreSale(bool isActive) external onlyOwner {
}
function togglePurchaseEnabled(bool isActive) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setMaxAllowedGasFee(uint256 maxFeeGwei) external onlyOwner {
}
function setOpenSeaProxyRegistryAddress(address addr) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override
public
view
returns (bool)
{
}
function addToPreSaleAllowList(address[] calldata addresses) external onlyOwner {
}
function onPreSaleAllowList(address addr) external view returns (bool) {
}
function mint(address to, uint256 count) external nonReentrant onlyOwner {
}
/**
* Accepts required payment and mints a specified number of tokens to an address.
* This method also checks if direct purchase is enabled.
*/
function purchase(uint256 count) public payable nonReentrant {
require(<FILL_ME>)
requireMintingConditions(msg.sender, count);
require(isPurchaseEnabled, 'BASE_COLLECTION/PURCHASE_DISABLED');
require(
(_publicSaleTime != 0 && _publicSaleTime < block.timestamp) || (isPreSaleActive && _preSaleAllowList[msg.sender]),
"BASE_COLLECTION/CANNOT_MINT"
);
// Sent value matches required ETH amount
require(PRICE * count <= msg.value, 'BASE_COLLECTION/INSUFFICIENT_ETH_AMOUNT');
for (uint256 i = 0; i < count; i++) {
uint256 newTokenId = _getNextTokenId();
_safeMint(msg.sender, newTokenId);
_incrementTokenId();
}
}
function transferFromBulk(
address from,
address to,
uint256[] memory tokenIds
) public virtual {
}
function requireMintingConditions(address to, uint256 count) internal view {
}
function _getNextTokenId() private view returns (uint256) {
}
function _incrementTokenId() private {
}
}
| !msg.sender.isContract(),'BASE_COLLECTION/CONTRACT_CANNOT_CALL' | 374,353 | !msg.sender.isContract() |
"BASE_COLLECTION/CANNOT_MINT" | // SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol";
import "openzeppelin-solidity/contracts/utils/Address.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "./opensea/ProxyRegistry.sol";
contract AlternateEnding is ERC721Enumerable, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Address for address;
using Address for address payable;
uint256 public PRICE;
uint256 public MAX_TOTAL_MINT;
// Fair distribution, thundering-herd mitigation and gas-wars prevention
uint256 public MAX_TOTAL_MINT_PER_ADDRESS;
uint256 public MAX_ALLOWED_GAS_FEE;
bool public isPreSaleActive;
uint256 public _publicSaleTime = 0;
bool public isPurchaseEnabled;
string private _contractURI;
string private _placeholderURI;
string private _baseTokenURI;
address private _openSeaProxyRegistryAddress;
uint256 private _currentTokenId = 0;
address[] _payees;
uint256[] _shares;
uint256 _totalShares;
mapping(address => bool) private _preSaleAllowList;
constructor(
string memory name,
string memory symbol,
uint256 price,
uint256 maxTotalMint,
address openSeaProxyRegistryAddress,
uint256 publicSaleTime,
bool purchaseEnabled,
bool presaleActive,
uint256 maxTotalMintPerAddress
) ERC721(name, symbol) {
}
function setSaleInformation(
uint256 publicSaleTime, bool purchaseEnabled, bool presaleActive,
uint256 maxTotalMintPerAddress
) external onlyOwner {
}
function setPayoutInformation(
address[] calldata payees, uint256[] calldata shares
) external onlyOwner {
}
function setPublicSaleTime(uint256 publicSaleTime) external onlyOwner {
}
function togglePreSale(bool isActive) external onlyOwner {
}
function togglePurchaseEnabled(bool isActive) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setMaxAllowedGasFee(uint256 maxFeeGwei) external onlyOwner {
}
function setOpenSeaProxyRegistryAddress(address addr) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override
public
view
returns (bool)
{
}
function addToPreSaleAllowList(address[] calldata addresses) external onlyOwner {
}
function onPreSaleAllowList(address addr) external view returns (bool) {
}
function mint(address to, uint256 count) external nonReentrant onlyOwner {
}
/**
* Accepts required payment and mints a specified number of tokens to an address.
* This method also checks if direct purchase is enabled.
*/
function purchase(uint256 count) public payable nonReentrant {
require(!msg.sender.isContract(), 'BASE_COLLECTION/CONTRACT_CANNOT_CALL');
requireMintingConditions(msg.sender, count);
require(isPurchaseEnabled, 'BASE_COLLECTION/PURCHASE_DISABLED');
require(<FILL_ME>)
// Sent value matches required ETH amount
require(PRICE * count <= msg.value, 'BASE_COLLECTION/INSUFFICIENT_ETH_AMOUNT');
for (uint256 i = 0; i < count; i++) {
uint256 newTokenId = _getNextTokenId();
_safeMint(msg.sender, newTokenId);
_incrementTokenId();
}
}
function transferFromBulk(
address from,
address to,
uint256[] memory tokenIds
) public virtual {
}
function requireMintingConditions(address to, uint256 count) internal view {
}
function _getNextTokenId() private view returns (uint256) {
}
function _incrementTokenId() private {
}
}
| (_publicSaleTime!=0&&_publicSaleTime<block.timestamp)||(isPreSaleActive&&_preSaleAllowList[msg.sender]),"BASE_COLLECTION/CANNOT_MINT" | 374,353 | (_publicSaleTime!=0&&_publicSaleTime<block.timestamp)||(isPreSaleActive&&_preSaleAllowList[msg.sender]) |
'BASE_COLLECTION/INSUFFICIENT_ETH_AMOUNT' | // SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol";
import "openzeppelin-solidity/contracts/utils/Address.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "./opensea/ProxyRegistry.sol";
contract AlternateEnding is ERC721Enumerable, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Address for address;
using Address for address payable;
uint256 public PRICE;
uint256 public MAX_TOTAL_MINT;
// Fair distribution, thundering-herd mitigation and gas-wars prevention
uint256 public MAX_TOTAL_MINT_PER_ADDRESS;
uint256 public MAX_ALLOWED_GAS_FEE;
bool public isPreSaleActive;
uint256 public _publicSaleTime = 0;
bool public isPurchaseEnabled;
string private _contractURI;
string private _placeholderURI;
string private _baseTokenURI;
address private _openSeaProxyRegistryAddress;
uint256 private _currentTokenId = 0;
address[] _payees;
uint256[] _shares;
uint256 _totalShares;
mapping(address => bool) private _preSaleAllowList;
constructor(
string memory name,
string memory symbol,
uint256 price,
uint256 maxTotalMint,
address openSeaProxyRegistryAddress,
uint256 publicSaleTime,
bool purchaseEnabled,
bool presaleActive,
uint256 maxTotalMintPerAddress
) ERC721(name, symbol) {
}
function setSaleInformation(
uint256 publicSaleTime, bool purchaseEnabled, bool presaleActive,
uint256 maxTotalMintPerAddress
) external onlyOwner {
}
function setPayoutInformation(
address[] calldata payees, uint256[] calldata shares
) external onlyOwner {
}
function setPublicSaleTime(uint256 publicSaleTime) external onlyOwner {
}
function togglePreSale(bool isActive) external onlyOwner {
}
function togglePurchaseEnabled(bool isActive) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setMaxAllowedGasFee(uint256 maxFeeGwei) external onlyOwner {
}
function setOpenSeaProxyRegistryAddress(address addr) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override
public
view
returns (bool)
{
}
function addToPreSaleAllowList(address[] calldata addresses) external onlyOwner {
}
function onPreSaleAllowList(address addr) external view returns (bool) {
}
function mint(address to, uint256 count) external nonReentrant onlyOwner {
}
/**
* Accepts required payment and mints a specified number of tokens to an address.
* This method also checks if direct purchase is enabled.
*/
function purchase(uint256 count) public payable nonReentrant {
require(!msg.sender.isContract(), 'BASE_COLLECTION/CONTRACT_CANNOT_CALL');
requireMintingConditions(msg.sender, count);
require(isPurchaseEnabled, 'BASE_COLLECTION/PURCHASE_DISABLED');
require(
(_publicSaleTime != 0 && _publicSaleTime < block.timestamp) || (isPreSaleActive && _preSaleAllowList[msg.sender]),
"BASE_COLLECTION/CANNOT_MINT"
);
// Sent value matches required ETH amount
require(<FILL_ME>)
for (uint256 i = 0; i < count; i++) {
uint256 newTokenId = _getNextTokenId();
_safeMint(msg.sender, newTokenId);
_incrementTokenId();
}
}
function transferFromBulk(
address from,
address to,
uint256[] memory tokenIds
) public virtual {
}
function requireMintingConditions(address to, uint256 count) internal view {
}
function _getNextTokenId() private view returns (uint256) {
}
function _incrementTokenId() private {
}
}
| PRICE*count<=msg.value,'BASE_COLLECTION/INSUFFICIENT_ETH_AMOUNT' | 374,353 | PRICE*count<=msg.value |
"ERC721: transfer caller is not owner nor approved" | // SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol";
import "openzeppelin-solidity/contracts/utils/Address.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "./opensea/ProxyRegistry.sol";
contract AlternateEnding is ERC721Enumerable, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Address for address;
using Address for address payable;
uint256 public PRICE;
uint256 public MAX_TOTAL_MINT;
// Fair distribution, thundering-herd mitigation and gas-wars prevention
uint256 public MAX_TOTAL_MINT_PER_ADDRESS;
uint256 public MAX_ALLOWED_GAS_FEE;
bool public isPreSaleActive;
uint256 public _publicSaleTime = 0;
bool public isPurchaseEnabled;
string private _contractURI;
string private _placeholderURI;
string private _baseTokenURI;
address private _openSeaProxyRegistryAddress;
uint256 private _currentTokenId = 0;
address[] _payees;
uint256[] _shares;
uint256 _totalShares;
mapping(address => bool) private _preSaleAllowList;
constructor(
string memory name,
string memory symbol,
uint256 price,
uint256 maxTotalMint,
address openSeaProxyRegistryAddress,
uint256 publicSaleTime,
bool purchaseEnabled,
bool presaleActive,
uint256 maxTotalMintPerAddress
) ERC721(name, symbol) {
}
function setSaleInformation(
uint256 publicSaleTime, bool purchaseEnabled, bool presaleActive,
uint256 maxTotalMintPerAddress
) external onlyOwner {
}
function setPayoutInformation(
address[] calldata payees, uint256[] calldata shares
) external onlyOwner {
}
function setPublicSaleTime(uint256 publicSaleTime) external onlyOwner {
}
function togglePreSale(bool isActive) external onlyOwner {
}
function togglePurchaseEnabled(bool isActive) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setMaxAllowedGasFee(uint256 maxFeeGwei) external onlyOwner {
}
function setOpenSeaProxyRegistryAddress(address addr) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override
public
view
returns (bool)
{
}
function addToPreSaleAllowList(address[] calldata addresses) external onlyOwner {
}
function onPreSaleAllowList(address addr) external view returns (bool) {
}
function mint(address to, uint256 count) external nonReentrant onlyOwner {
}
/**
* Accepts required payment and mints a specified number of tokens to an address.
* This method also checks if direct purchase is enabled.
*/
function purchase(uint256 count) public payable nonReentrant {
}
function transferFromBulk(
address from,
address to,
uint256[] memory tokenIds
) public virtual {
for (uint256 i = 0; i < tokenIds.length; i++) {
//solhint-disable-next-line max-line-length
require(<FILL_ME>)
_transfer(from, to, tokenIds[i]);
}
}
function requireMintingConditions(address to, uint256 count) internal view {
}
function _getNextTokenId() private view returns (uint256) {
}
function _incrementTokenId() private {
}
}
| _isApprovedOrOwner(_msgSender(),tokenIds[i]),"ERC721: transfer caller is not owner nor approved" | 374,353 | _isApprovedOrOwner(_msgSender(),tokenIds[i]) |
"BASE_COLLECTION/EXCEEDS_MAX_SUPPLY" | // SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol";
import "openzeppelin-solidity/contracts/utils/Address.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "./opensea/ProxyRegistry.sol";
contract AlternateEnding is ERC721Enumerable, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Address for address;
using Address for address payable;
uint256 public PRICE;
uint256 public MAX_TOTAL_MINT;
// Fair distribution, thundering-herd mitigation and gas-wars prevention
uint256 public MAX_TOTAL_MINT_PER_ADDRESS;
uint256 public MAX_ALLOWED_GAS_FEE;
bool public isPreSaleActive;
uint256 public _publicSaleTime = 0;
bool public isPurchaseEnabled;
string private _contractURI;
string private _placeholderURI;
string private _baseTokenURI;
address private _openSeaProxyRegistryAddress;
uint256 private _currentTokenId = 0;
address[] _payees;
uint256[] _shares;
uint256 _totalShares;
mapping(address => bool) private _preSaleAllowList;
constructor(
string memory name,
string memory symbol,
uint256 price,
uint256 maxTotalMint,
address openSeaProxyRegistryAddress,
uint256 publicSaleTime,
bool purchaseEnabled,
bool presaleActive,
uint256 maxTotalMintPerAddress
) ERC721(name, symbol) {
}
function setSaleInformation(
uint256 publicSaleTime, bool purchaseEnabled, bool presaleActive,
uint256 maxTotalMintPerAddress
) external onlyOwner {
}
function setPayoutInformation(
address[] calldata payees, uint256[] calldata shares
) external onlyOwner {
}
function setPublicSaleTime(uint256 publicSaleTime) external onlyOwner {
}
function togglePreSale(bool isActive) external onlyOwner {
}
function togglePurchaseEnabled(bool isActive) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setMaxAllowedGasFee(uint256 maxFeeGwei) external onlyOwner {
}
function setOpenSeaProxyRegistryAddress(address addr) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override
public
view
returns (bool)
{
}
function addToPreSaleAllowList(address[] calldata addresses) external onlyOwner {
}
function onPreSaleAllowList(address addr) external view returns (bool) {
}
function mint(address to, uint256 count) external nonReentrant onlyOwner {
}
/**
* Accepts required payment and mints a specified number of tokens to an address.
* This method also checks if direct purchase is enabled.
*/
function purchase(uint256 count) public payable nonReentrant {
}
function transferFromBulk(
address from,
address to,
uint256[] memory tokenIds
) public virtual {
}
function requireMintingConditions(address to, uint256 count) internal view {
require(<FILL_ME>)
uint totalMintFromAddress = balanceOf(to) + count;
require (totalMintFromAddress <= MAX_TOTAL_MINT_PER_ADDRESS, "BASE_COLLECTION/EXCEEDS_INDIVIDUAL_SUPPLY");
if (MAX_ALLOWED_GAS_FEE > 0)
require(tx.gasprice < MAX_ALLOWED_GAS_FEE * 1000000000, "BASE_COLLECTION/GAS_FEE_NOT_ALLOWED");
}
function _getNextTokenId() private view returns (uint256) {
}
function _incrementTokenId() private {
}
}
| totalSupply()+count<=MAX_TOTAL_MINT,"BASE_COLLECTION/EXCEEDS_MAX_SUPPLY" | 374,353 | totalSupply()+count<=MAX_TOTAL_MINT |
"Contract is already in the list." | // SPDX-License-Identifier: MIT License
pragma solidity 0.8.12;
/*
Tribute to the phunks :
This contract is based on the NotLarvaLabs Marketplace project :
https://notlarvalabs.com/
We generalized this contract to be able to add any ERC721 contract to the marketplace.
Have fun ;)
0xdev
*/
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
contract UnitedMarket is ReentrancyGuard, Pausable, Ownable {
mapping(address => bool) addressToSupportedContracts;
mapping(uint256 => Collection) idToCollection;
uint256 nbCollections;
struct Collection {
uint256 id;
string name;
bool activated;
string openseaCollectionName;
address contractAddress;
address contractOwner;
uint16 royalties; // 4.50% -> 450 -> OS allows 2 digits after comma
string imageUrl;
string twitterId;
}
struct Offer {
bool isForSale;
uint256 collectionId;
uint256 tokenId;
address seller;
uint256 minValue;
address onlySellTo;
}
struct Bid {
bool hasBid;
uint256 collectionId;
uint256 tokenId;
address bidder;
uint256 value;
}
mapping(string => Offer) public tokenOfferedForSale;
mapping(string => Bid) public tokenBids;
mapping(address => uint256) public pendingWithdrawals;
event TokenOffered(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 minValue,
address indexed toAddress
);
event TokenBidEntered(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress
);
event TokenBidWithdrawn(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress
);
event TokenBought(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress,
address toAddress
);
event TokenNoLongerForSale(
uint256 indexed collectionId,
uint256 indexed tokenId
);
constructor() {
}
function pause() public whenNotPaused onlyOwner {
}
function unpause() public whenPaused onlyOwner {
}
/* Returns the CryptoTokens contract address currently being used */
function getCollections() public view returns (Collection[] memory) {
}
function updateColection(
uint256 collectionId,
string memory name,
string memory openseaCollectionName,
address newTokensAddress,
uint16 royalties,
string memory imageUrl,
string memory twitterId
) public onlyOwner {
}
function toggleAtivatedCollection(uint256 collectionId) public onlyOwner {
}
function addCollection(
string memory name,
string memory openseaCollectionName,
address newTokensAddress,
uint16 royalties,
string memory imageUrl,
string memory twitterId
) public onlyOwner {
require(<FILL_ME>)
nbCollections++;
address contractOwner = Ownable(newTokensAddress).owner();
idToCollection[nbCollections] = Collection(
nbCollections,
name,
true,
openseaCollectionName,
newTokensAddress,
contractOwner,
royalties,
imageUrl,
twitterId
);
addressToSupportedContracts[newTokensAddress] = true;
}
/* Allows a CryptoToken owner to offer it for sale */
function offerTokenForSale(
uint256 collectionId,
uint256 tokenId,
uint256 minSalePriceInWei
) public whenNotPaused nonReentrant {
}
function tokenNoLongerForSale(uint256 collectionId, uint256 tokenId)
public
nonReentrant
{
}
/* Allows a CryptoToken owner to offer it for sale to a specific address */
function offerTokenForSaleToAddress(
uint256 collectionId,
uint256 tokenId,
uint256 minSalePriceInWei,
address toAddress
) public whenNotPaused nonReentrant {
}
/* Allows users to buy a CryptoToken offered for sale */
function buyToken(uint256 collectionId, uint256 tokenId)
public
payable
whenNotPaused
nonReentrant
{
}
/* Allows users to retrieve ETH from sales */
function withdraw() public nonReentrant {
}
/* The owner can send money to another address. This is EMERGENCY only, in case a contract owner is lost, money could not be withdrawn */
function withdrawTo(address from, address to)
public
nonReentrant
onlyOwner
{
}
/* Allows users to enter bids for any CryptoToken */
function enterBidForToken(uint256 collectionId, uint256 tokenId)
public
payable
whenNotPaused
nonReentrant
{
}
/* Allows CryptoToken owners to accept bids for their Tokens */
function acceptBidForToken(
uint256 collectionId,
uint256 tokenId,
uint256 minPrice
) public whenNotPaused nonReentrant {
}
/* Allows bidders to withdraw their bids */
function withdrawBidForToken(uint256 collectionId, uint256 tokenId)
public
nonReentrant
{
}
function uint2str(uint256 _i)
internal
pure
returns (string memory _uintAsString)
{
}
function append(
string memory a,
string memory b,
string memory c
) internal pure returns (string memory) {
}
}
| !addressToSupportedContracts[newTokensAddress],"Contract is already in the list." | 374,428 | !addressToSupportedContracts[newTokensAddress] |
"This collection is not supported." | // SPDX-License-Identifier: MIT License
pragma solidity 0.8.12;
/*
Tribute to the phunks :
This contract is based on the NotLarvaLabs Marketplace project :
https://notlarvalabs.com/
We generalized this contract to be able to add any ERC721 contract to the marketplace.
Have fun ;)
0xdev
*/
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
contract UnitedMarket is ReentrancyGuard, Pausable, Ownable {
mapping(address => bool) addressToSupportedContracts;
mapping(uint256 => Collection) idToCollection;
uint256 nbCollections;
struct Collection {
uint256 id;
string name;
bool activated;
string openseaCollectionName;
address contractAddress;
address contractOwner;
uint16 royalties; // 4.50% -> 450 -> OS allows 2 digits after comma
string imageUrl;
string twitterId;
}
struct Offer {
bool isForSale;
uint256 collectionId;
uint256 tokenId;
address seller;
uint256 minValue;
address onlySellTo;
}
struct Bid {
bool hasBid;
uint256 collectionId;
uint256 tokenId;
address bidder;
uint256 value;
}
mapping(string => Offer) public tokenOfferedForSale;
mapping(string => Bid) public tokenBids;
mapping(address => uint256) public pendingWithdrawals;
event TokenOffered(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 minValue,
address indexed toAddress
);
event TokenBidEntered(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress
);
event TokenBidWithdrawn(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress
);
event TokenBought(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress,
address toAddress
);
event TokenNoLongerForSale(
uint256 indexed collectionId,
uint256 indexed tokenId
);
constructor() {
}
function pause() public whenNotPaused onlyOwner {
}
function unpause() public whenPaused onlyOwner {
}
/* Returns the CryptoTokens contract address currently being used */
function getCollections() public view returns (Collection[] memory) {
}
function updateColection(
uint256 collectionId,
string memory name,
string memory openseaCollectionName,
address newTokensAddress,
uint16 royalties,
string memory imageUrl,
string memory twitterId
) public onlyOwner {
}
function toggleAtivatedCollection(uint256 collectionId) public onlyOwner {
}
function addCollection(
string memory name,
string memory openseaCollectionName,
address newTokensAddress,
uint16 royalties,
string memory imageUrl,
string memory twitterId
) public onlyOwner {
}
/* Allows a CryptoToken owner to offer it for sale */
function offerTokenForSale(
uint256 collectionId,
uint256 tokenId,
uint256 minSalePriceInWei
) public whenNotPaused nonReentrant {
require(<FILL_ME>)
require(minSalePriceInWei > 0, "Cannot sell with negative price");
require(
tokenId <
IERC721Enumerable(idToCollection[collectionId].contractAddress)
.totalSupply(),
"token index not valid"
);
require(
IERC721(idToCollection[collectionId].contractAddress).ownerOf(
tokenId
) == msg.sender,
"you are not the owner of this token"
);
tokenOfferedForSale[
append(uint2str(collectionId), "_", uint2str(tokenId))
] = Offer(
true,
collectionId,
tokenId,
msg.sender,
minSalePriceInWei,
address(0x0)
);
emit TokenOffered(
collectionId,
tokenId,
minSalePriceInWei,
address(0x0)
);
}
function tokenNoLongerForSale(uint256 collectionId, uint256 tokenId)
public
nonReentrant
{
}
/* Allows a CryptoToken owner to offer it for sale to a specific address */
function offerTokenForSaleToAddress(
uint256 collectionId,
uint256 tokenId,
uint256 minSalePriceInWei,
address toAddress
) public whenNotPaused nonReentrant {
}
/* Allows users to buy a CryptoToken offered for sale */
function buyToken(uint256 collectionId, uint256 tokenId)
public
payable
whenNotPaused
nonReentrant
{
}
/* Allows users to retrieve ETH from sales */
function withdraw() public nonReentrant {
}
/* The owner can send money to another address. This is EMERGENCY only, in case a contract owner is lost, money could not be withdrawn */
function withdrawTo(address from, address to)
public
nonReentrant
onlyOwner
{
}
/* Allows users to enter bids for any CryptoToken */
function enterBidForToken(uint256 collectionId, uint256 tokenId)
public
payable
whenNotPaused
nonReentrant
{
}
/* Allows CryptoToken owners to accept bids for their Tokens */
function acceptBidForToken(
uint256 collectionId,
uint256 tokenId,
uint256 minPrice
) public whenNotPaused nonReentrant {
}
/* Allows bidders to withdraw their bids */
function withdrawBidForToken(uint256 collectionId, uint256 tokenId)
public
nonReentrant
{
}
function uint2str(uint256 _i)
internal
pure
returns (string memory _uintAsString)
{
}
function append(
string memory a,
string memory b,
string memory c
) internal pure returns (string memory) {
}
}
| idToCollection[collectionId].activated,"This collection is not supported." | 374,428 | idToCollection[collectionId].activated |
"you are not the owner of this token" | // SPDX-License-Identifier: MIT License
pragma solidity 0.8.12;
/*
Tribute to the phunks :
This contract is based on the NotLarvaLabs Marketplace project :
https://notlarvalabs.com/
We generalized this contract to be able to add any ERC721 contract to the marketplace.
Have fun ;)
0xdev
*/
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
contract UnitedMarket is ReentrancyGuard, Pausable, Ownable {
mapping(address => bool) addressToSupportedContracts;
mapping(uint256 => Collection) idToCollection;
uint256 nbCollections;
struct Collection {
uint256 id;
string name;
bool activated;
string openseaCollectionName;
address contractAddress;
address contractOwner;
uint16 royalties; // 4.50% -> 450 -> OS allows 2 digits after comma
string imageUrl;
string twitterId;
}
struct Offer {
bool isForSale;
uint256 collectionId;
uint256 tokenId;
address seller;
uint256 minValue;
address onlySellTo;
}
struct Bid {
bool hasBid;
uint256 collectionId;
uint256 tokenId;
address bidder;
uint256 value;
}
mapping(string => Offer) public tokenOfferedForSale;
mapping(string => Bid) public tokenBids;
mapping(address => uint256) public pendingWithdrawals;
event TokenOffered(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 minValue,
address indexed toAddress
);
event TokenBidEntered(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress
);
event TokenBidWithdrawn(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress
);
event TokenBought(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress,
address toAddress
);
event TokenNoLongerForSale(
uint256 indexed collectionId,
uint256 indexed tokenId
);
constructor() {
}
function pause() public whenNotPaused onlyOwner {
}
function unpause() public whenPaused onlyOwner {
}
/* Returns the CryptoTokens contract address currently being used */
function getCollections() public view returns (Collection[] memory) {
}
function updateColection(
uint256 collectionId,
string memory name,
string memory openseaCollectionName,
address newTokensAddress,
uint16 royalties,
string memory imageUrl,
string memory twitterId
) public onlyOwner {
}
function toggleAtivatedCollection(uint256 collectionId) public onlyOwner {
}
function addCollection(
string memory name,
string memory openseaCollectionName,
address newTokensAddress,
uint16 royalties,
string memory imageUrl,
string memory twitterId
) public onlyOwner {
}
/* Allows a CryptoToken owner to offer it for sale */
function offerTokenForSale(
uint256 collectionId,
uint256 tokenId,
uint256 minSalePriceInWei
) public whenNotPaused nonReentrant {
require(
idToCollection[collectionId].activated,
"This collection is not supported."
);
require(minSalePriceInWei > 0, "Cannot sell with negative price");
require(
tokenId <
IERC721Enumerable(idToCollection[collectionId].contractAddress)
.totalSupply(),
"token index not valid"
);
require(<FILL_ME>)
tokenOfferedForSale[
append(uint2str(collectionId), "_", uint2str(tokenId))
] = Offer(
true,
collectionId,
tokenId,
msg.sender,
minSalePriceInWei,
address(0x0)
);
emit TokenOffered(
collectionId,
tokenId,
minSalePriceInWei,
address(0x0)
);
}
function tokenNoLongerForSale(uint256 collectionId, uint256 tokenId)
public
nonReentrant
{
}
/* Allows a CryptoToken owner to offer it for sale to a specific address */
function offerTokenForSaleToAddress(
uint256 collectionId,
uint256 tokenId,
uint256 minSalePriceInWei,
address toAddress
) public whenNotPaused nonReentrant {
}
/* Allows users to buy a CryptoToken offered for sale */
function buyToken(uint256 collectionId, uint256 tokenId)
public
payable
whenNotPaused
nonReentrant
{
}
/* Allows users to retrieve ETH from sales */
function withdraw() public nonReentrant {
}
/* The owner can send money to another address. This is EMERGENCY only, in case a contract owner is lost, money could not be withdrawn */
function withdrawTo(address from, address to)
public
nonReentrant
onlyOwner
{
}
/* Allows users to enter bids for any CryptoToken */
function enterBidForToken(uint256 collectionId, uint256 tokenId)
public
payable
whenNotPaused
nonReentrant
{
}
/* Allows CryptoToken owners to accept bids for their Tokens */
function acceptBidForToken(
uint256 collectionId,
uint256 tokenId,
uint256 minPrice
) public whenNotPaused nonReentrant {
}
/* Allows bidders to withdraw their bids */
function withdrawBidForToken(uint256 collectionId, uint256 tokenId)
public
nonReentrant
{
}
function uint2str(uint256 _i)
internal
pure
returns (string memory _uintAsString)
{
}
function append(
string memory a,
string memory b,
string memory c
) internal pure returns (string memory) {
}
}
| IERC721(idToCollection[collectionId].contractAddress).ownerOf(tokenId)==msg.sender,"you are not the owner of this token" | 374,428 | IERC721(idToCollection[collectionId].contractAddress).ownerOf(tokenId)==msg.sender |
"No amount to be withdrawn ..." | // SPDX-License-Identifier: MIT License
pragma solidity 0.8.12;
/*
Tribute to the phunks :
This contract is based on the NotLarvaLabs Marketplace project :
https://notlarvalabs.com/
We generalized this contract to be able to add any ERC721 contract to the marketplace.
Have fun ;)
0xdev
*/
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
contract UnitedMarket is ReentrancyGuard, Pausable, Ownable {
mapping(address => bool) addressToSupportedContracts;
mapping(uint256 => Collection) idToCollection;
uint256 nbCollections;
struct Collection {
uint256 id;
string name;
bool activated;
string openseaCollectionName;
address contractAddress;
address contractOwner;
uint16 royalties; // 4.50% -> 450 -> OS allows 2 digits after comma
string imageUrl;
string twitterId;
}
struct Offer {
bool isForSale;
uint256 collectionId;
uint256 tokenId;
address seller;
uint256 minValue;
address onlySellTo;
}
struct Bid {
bool hasBid;
uint256 collectionId;
uint256 tokenId;
address bidder;
uint256 value;
}
mapping(string => Offer) public tokenOfferedForSale;
mapping(string => Bid) public tokenBids;
mapping(address => uint256) public pendingWithdrawals;
event TokenOffered(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 minValue,
address indexed toAddress
);
event TokenBidEntered(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress
);
event TokenBidWithdrawn(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress
);
event TokenBought(
uint256 indexed collectionId,
uint256 indexed tokenId,
uint256 value,
address indexed fromAddress,
address toAddress
);
event TokenNoLongerForSale(
uint256 indexed collectionId,
uint256 indexed tokenId
);
constructor() {
}
function pause() public whenNotPaused onlyOwner {
}
function unpause() public whenPaused onlyOwner {
}
/* Returns the CryptoTokens contract address currently being used */
function getCollections() public view returns (Collection[] memory) {
}
function updateColection(
uint256 collectionId,
string memory name,
string memory openseaCollectionName,
address newTokensAddress,
uint16 royalties,
string memory imageUrl,
string memory twitterId
) public onlyOwner {
}
function toggleAtivatedCollection(uint256 collectionId) public onlyOwner {
}
function addCollection(
string memory name,
string memory openseaCollectionName,
address newTokensAddress,
uint16 royalties,
string memory imageUrl,
string memory twitterId
) public onlyOwner {
}
/* Allows a CryptoToken owner to offer it for sale */
function offerTokenForSale(
uint256 collectionId,
uint256 tokenId,
uint256 minSalePriceInWei
) public whenNotPaused nonReentrant {
}
function tokenNoLongerForSale(uint256 collectionId, uint256 tokenId)
public
nonReentrant
{
}
/* Allows a CryptoToken owner to offer it for sale to a specific address */
function offerTokenForSaleToAddress(
uint256 collectionId,
uint256 tokenId,
uint256 minSalePriceInWei,
address toAddress
) public whenNotPaused nonReentrant {
}
/* Allows users to buy a CryptoToken offered for sale */
function buyToken(uint256 collectionId, uint256 tokenId)
public
payable
whenNotPaused
nonReentrant
{
}
/* Allows users to retrieve ETH from sales */
function withdraw() public nonReentrant {
}
/* The owner can send money to another address. This is EMERGENCY only, in case a contract owner is lost, money could not be withdrawn */
function withdrawTo(address from, address to)
public
nonReentrant
onlyOwner
{
require(<FILL_ME>)
uint256 amount = pendingWithdrawals[from];
// Remember to zero the pending refund before
// sending to prevent re-entrancy attacks
pendingWithdrawals[from] = 0;
payable(to).transfer(amount);
}
/* Allows users to enter bids for any CryptoToken */
function enterBidForToken(uint256 collectionId, uint256 tokenId)
public
payable
whenNotPaused
nonReentrant
{
}
/* Allows CryptoToken owners to accept bids for their Tokens */
function acceptBidForToken(
uint256 collectionId,
uint256 tokenId,
uint256 minPrice
) public whenNotPaused nonReentrant {
}
/* Allows bidders to withdraw their bids */
function withdrawBidForToken(uint256 collectionId, uint256 tokenId)
public
nonReentrant
{
}
function uint2str(uint256 _i)
internal
pure
returns (string memory _uintAsString)
{
}
function append(
string memory a,
string memory b,
string memory c
) internal pure returns (string memory) {
}
}
| pendingWithdrawals[from]>0,"No amount to be withdrawn ..." | 374,428 | pendingWithdrawals[from]>0 |
'Allowlist minting in progress' | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.9 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
/**
* @dev The OpenSea interface system that allows for approval fee skipping.
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GentlemenClub is ERC721, Ownable, ReentrancyGuard {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
string public provenanceHash = '';
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 10;
uint256 public maxAllowlistMintAmount = 3;
bytes32 public allowlistMerkleRoot;
bool public isPaused = true;
bool public isRevealed = false;
bool public isAllowlistEnabled = true;
address public proxyRegistryAddr;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressMintedBalance;
mapping(address => bool) public addressToRegistryDisabled;
constructor(address _proxyRegistryAddr) ERC721('Gentlemen Club', 'GNTLMN') {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
modifier mintPauseCompliance() {
}
modifier mintPublic() {
require(<FILL_ME>)
_;
}
modifier allowlistMintCompliance(uint256 _mintAmount, bytes32[] calldata _merkleProof) {
}
// ============ PUBLIC FUNCTIONS ============
function totalSupply() external view returns (uint256) {
}
function mint(uint256 _mintAmount)
external
payable
mintPauseCompliance
mintPublic
mintCompliance(_mintAmount)
mintPriceCompliance(_mintAmount)
nonReentrant
{
}
function allowlistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof)
external
payable
mintPauseCompliance
mintCompliance(_mintAmount)
mintPriceCompliance(_mintAmount)
allowlistMintCompliance(_mintAmount, _merkleProof)
nonReentrant
{
}
function flipProjectProxyState(address _proxyAddress) public onlyOwner {
}
function isAllowlisted(bytes32[] calldata _merkleProof) public view returns (bool) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/**
* @notice Allow a user to disable the pre-approval if they believe OS to not be secure.
*/
function toggleRegistryAccess() public virtual {
}
// ============ OWNER-ONLY ADMIN FUNCTIONS ============
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount)
onlyOwner
nonReentrant
{
}
function setIsRevealed(bool _state) external onlyOwner {
}
function setMaxAllowlistMintAmount(uint256 _limit) external onlyOwner {
}
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setCost(uint256 _cost) external onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) external onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) external onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) external onlyOwner {
}
function setProvenanceHash(string memory _provenanceHash) external onlyOwner {
}
function setIsPaused(bool _state) external onlyOwner {
}
function setIsAllowlistEnabled(bool _state) external onlyOwner {
}
function setProxyRegistryAddr(address _proxyRegistryAddr) external onlyOwner {
}
/**
* @notice Allow user's OpenSea proxy accounts to enable gas-less listings
* @notice Eenable extendibility for the project
* @param _owner The active owner of the token
* @param _operator The origin of the action being called
*/
function isApprovedForAll(address _owner, address _operator)
public
view
override
returns (bool)
{
}
function withdraw() external onlyOwner {
}
// ============ INTERNAL FUNCTIONS ============
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !isAllowlistEnabled,'Allowlist minting in progress' | 374,463 | !isAllowlistEnabled |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.9 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
/**
* @dev The OpenSea interface system that allows for approval fee skipping.
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GentlemenClub is ERC721, Ownable, ReentrancyGuard {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
string public provenanceHash = '';
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 10;
uint256 public maxAllowlistMintAmount = 3;
bytes32 public allowlistMerkleRoot;
bool public isPaused = true;
bool public isRevealed = false;
bool public isAllowlistEnabled = true;
address public proxyRegistryAddr;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressMintedBalance;
mapping(address => bool) public addressToRegistryDisabled;
constructor(address _proxyRegistryAddr) ERC721('Gentlemen Club', 'GNTLMN') {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
modifier mintPauseCompliance() {
}
modifier mintPublic() {
}
modifier allowlistMintCompliance(uint256 _mintAmount, bytes32[] calldata _merkleProof) {
require(<FILL_ME>)
uint256 ownerMintedCount = addressMintedBalance[_msgSender()];
require(
ownerMintedCount + _mintAmount <= maxAllowlistMintAmount,
'max NFT per address exceeded'
);
_;
}
// ============ PUBLIC FUNCTIONS ============
function totalSupply() external view returns (uint256) {
}
function mint(uint256 _mintAmount)
external
payable
mintPauseCompliance
mintPublic
mintCompliance(_mintAmount)
mintPriceCompliance(_mintAmount)
nonReentrant
{
}
function allowlistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof)
external
payable
mintPauseCompliance
mintCompliance(_mintAmount)
mintPriceCompliance(_mintAmount)
allowlistMintCompliance(_mintAmount, _merkleProof)
nonReentrant
{
}
function flipProjectProxyState(address _proxyAddress) public onlyOwner {
}
function isAllowlisted(bytes32[] calldata _merkleProof) public view returns (bool) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/**
* @notice Allow a user to disable the pre-approval if they believe OS to not be secure.
*/
function toggleRegistryAccess() public virtual {
}
// ============ OWNER-ONLY ADMIN FUNCTIONS ============
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount)
onlyOwner
nonReentrant
{
}
function setIsRevealed(bool _state) external onlyOwner {
}
function setMaxAllowlistMintAmount(uint256 _limit) external onlyOwner {
}
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setCost(uint256 _cost) external onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) external onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) external onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) external onlyOwner {
}
function setProvenanceHash(string memory _provenanceHash) external onlyOwner {
}
function setIsPaused(bool _state) external onlyOwner {
}
function setIsAllowlistEnabled(bool _state) external onlyOwner {
}
function setProxyRegistryAddr(address _proxyRegistryAddr) external onlyOwner {
}
/**
* @notice Allow user's OpenSea proxy accounts to enable gas-less listings
* @notice Eenable extendibility for the project
* @param _owner The active owner of the token
* @param _operator The origin of the action being called
*/
function isApprovedForAll(address _owner, address _operator)
public
view
override
returns (bool)
{
}
function withdraw() external onlyOwner {
}
// ============ INTERNAL FUNCTIONS ============
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| isAllowlistEnabled&&isAllowlisted(_merkleProof) | 374,463 | isAllowlistEnabled&&isAllowlisted(_merkleProof) |
'max NFT per address exceeded' | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.9 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
/**
* @dev The OpenSea interface system that allows for approval fee skipping.
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GentlemenClub is ERC721, Ownable, ReentrancyGuard {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
string public provenanceHash = '';
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 10;
uint256 public maxAllowlistMintAmount = 3;
bytes32 public allowlistMerkleRoot;
bool public isPaused = true;
bool public isRevealed = false;
bool public isAllowlistEnabled = true;
address public proxyRegistryAddr;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressMintedBalance;
mapping(address => bool) public addressToRegistryDisabled;
constructor(address _proxyRegistryAddr) ERC721('Gentlemen Club', 'GNTLMN') {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
modifier mintPauseCompliance() {
}
modifier mintPublic() {
}
modifier allowlistMintCompliance(uint256 _mintAmount, bytes32[] calldata _merkleProof) {
require(isAllowlistEnabled && isAllowlisted(_merkleProof));
uint256 ownerMintedCount = addressMintedBalance[_msgSender()];
require(<FILL_ME>)
_;
}
// ============ PUBLIC FUNCTIONS ============
function totalSupply() external view returns (uint256) {
}
function mint(uint256 _mintAmount)
external
payable
mintPauseCompliance
mintPublic
mintCompliance(_mintAmount)
mintPriceCompliance(_mintAmount)
nonReentrant
{
}
function allowlistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof)
external
payable
mintPauseCompliance
mintCompliance(_mintAmount)
mintPriceCompliance(_mintAmount)
allowlistMintCompliance(_mintAmount, _merkleProof)
nonReentrant
{
}
function flipProjectProxyState(address _proxyAddress) public onlyOwner {
}
function isAllowlisted(bytes32[] calldata _merkleProof) public view returns (bool) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/**
* @notice Allow a user to disable the pre-approval if they believe OS to not be secure.
*/
function toggleRegistryAccess() public virtual {
}
// ============ OWNER-ONLY ADMIN FUNCTIONS ============
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount)
onlyOwner
nonReentrant
{
}
function setIsRevealed(bool _state) external onlyOwner {
}
function setMaxAllowlistMintAmount(uint256 _limit) external onlyOwner {
}
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setCost(uint256 _cost) external onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) external onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) external onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) external onlyOwner {
}
function setProvenanceHash(string memory _provenanceHash) external onlyOwner {
}
function setIsPaused(bool _state) external onlyOwner {
}
function setIsAllowlistEnabled(bool _state) external onlyOwner {
}
function setProxyRegistryAddr(address _proxyRegistryAddr) external onlyOwner {
}
/**
* @notice Allow user's OpenSea proxy accounts to enable gas-less listings
* @notice Eenable extendibility for the project
* @param _owner The active owner of the token
* @param _operator The origin of the action being called
*/
function isApprovedForAll(address _owner, address _operator)
public
view
override
returns (bool)
{
}
function withdraw() external onlyOwner {
}
// ============ INTERNAL FUNCTIONS ============
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| ownerMintedCount+_mintAmount<=maxAllowlistMintAmount,'max NFT per address exceeded' | 374,463 | ownerMintedCount+_mintAmount<=maxAllowlistMintAmount |
'Address is not allowlisted' | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.9 <0.9.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
/**
* @dev The OpenSea interface system that allows for approval fee skipping.
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GentlemenClub is ERC721, Ownable, ReentrancyGuard {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
string public provenanceHash = '';
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 10;
uint256 public maxAllowlistMintAmount = 3;
bytes32 public allowlistMerkleRoot;
bool public isPaused = true;
bool public isRevealed = false;
bool public isAllowlistEnabled = true;
address public proxyRegistryAddr;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressMintedBalance;
mapping(address => bool) public addressToRegistryDisabled;
constructor(address _proxyRegistryAddr) ERC721('Gentlemen Club', 'GNTLMN') {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
modifier mintPauseCompliance() {
}
modifier mintPublic() {
}
modifier allowlistMintCompliance(uint256 _mintAmount, bytes32[] calldata _merkleProof) {
}
// ============ PUBLIC FUNCTIONS ============
function totalSupply() external view returns (uint256) {
}
function mint(uint256 _mintAmount)
external
payable
mintPauseCompliance
mintPublic
mintCompliance(_mintAmount)
mintPriceCompliance(_mintAmount)
nonReentrant
{
}
function allowlistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof)
external
payable
mintPauseCompliance
mintCompliance(_mintAmount)
mintPriceCompliance(_mintAmount)
allowlistMintCompliance(_mintAmount, _merkleProof)
nonReentrant
{
}
function flipProjectProxyState(address _proxyAddress) public onlyOwner {
}
function isAllowlisted(bytes32[] calldata _merkleProof) public view returns (bool) {
require(<FILL_ME>)
return true;
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/**
* @notice Allow a user to disable the pre-approval if they believe OS to not be secure.
*/
function toggleRegistryAccess() public virtual {
}
// ============ OWNER-ONLY ADMIN FUNCTIONS ============
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount)
onlyOwner
nonReentrant
{
}
function setIsRevealed(bool _state) external onlyOwner {
}
function setMaxAllowlistMintAmount(uint256 _limit) external onlyOwner {
}
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setCost(uint256 _cost) external onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) external onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) external onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) external onlyOwner {
}
function setProvenanceHash(string memory _provenanceHash) external onlyOwner {
}
function setIsPaused(bool _state) external onlyOwner {
}
function setIsAllowlistEnabled(bool _state) external onlyOwner {
}
function setProxyRegistryAddr(address _proxyRegistryAddr) external onlyOwner {
}
/**
* @notice Allow user's OpenSea proxy accounts to enable gas-less listings
* @notice Eenable extendibility for the project
* @param _owner The active owner of the token
* @param _operator The origin of the action being called
*/
function isApprovedForAll(address _owner, address _operator)
public
view
override
returns (bool)
{
}
function withdraw() external onlyOwner {
}
// ============ INTERNAL FUNCTIONS ============
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| MerkleProof.verify(_merkleProof,allowlistMerkleRoot,keccak256(abi.encodePacked(_msgSender()))),'Address is not allowlisted' | 374,463 | MerkleProof.verify(_merkleProof,allowlistMerkleRoot,keccak256(abi.encodePacked(_msgSender()))) |
"Sender max claim amount already met" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
contract AstraKey is ERC721, Ownable, ERC721Burnable, ERC721Pausable {
uint256 private _tokenIdTracker;
string public baseTokenURI;
uint256 public constant MAX_ELEMENTS = 500;
mapping(address => uint256) public keysClaimed;
event CreateItem(uint256 indexed id);
constructor()
ERC721("AstraKey", "ALK")
{
}
modifier saleIsOpen {
}
modifier noContract() {
}
function totalSupply() public view returns (uint256) {
}
function claim(uint256 _count) public saleIsOpen noContract {
uint256 total = totalSupply();
require(total + _count <= MAX_ELEMENTS, "Max limit");
require(<FILL_ME>)
for (uint256 i = 0; i < _count; i++) {
keysClaimed[msg.sender] += 1;
_mintAnElement(msg.sender);
}
}
function ownerClaim(uint256 _count) public onlyOwner {
}
function _mintAnElement(address _to) private {
}
function canMintAmount(uint256 _count) public view returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function pause(bool val) public onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) {
}
}
| canMintAmount(_count),"Sender max claim amount already met" | 374,527 | canMintAmount(_count) |
null | /**
* @title FiatToken V2
* @notice ERC20 Token backed by fiat reserves, version 2
*/
contract FiatTokenV2 is FiatTokenV1_1, EIP3009, EIP2612 {
uint8 internal _initializedVersion;
/**
* @notice Initialize v2
* @param newName New token name
*/
function initializeV2(string calldata newName) external {
// solhint-disable-next-line reason-string
require(<FILL_ME>)
name = newName;
DOMAIN_SEPARATOR = EIP712.makeDomainSeparator(newName, "2");
_initializedVersion = 1;
}
/**
* @notice Increase the allowance by a given increment
* @param spender Spender's address
* @param increment Amount of increase in allowance
* @return True if successful
*/
function increaseAllowance(address spender, uint256 increment)
external
whenNotPaused
notBlacklisted(msg.sender)
notBlacklisted(spender)
returns (bool)
{
}
/**
* @notice Decrease the allowance by a given decrement
* @param spender Spender's address
* @param decrement Amount of decrease in allowance
* @return True if successful
*/
function decreaseAllowance(address spender, uint256 decrement)
external
whenNotPaused
notBlacklisted(msg.sender)
notBlacklisted(spender)
returns (bool)
{
}
/**
* @notice Execute a transfer with a signed authorization
* @param from Payer's address (Authorizer)
* @param to Payee's address
* @param value Amount to be transferred
* @param validAfter The time after which this is valid (unix time)
* @param validBefore The time before which this is valid (unix time)
* @param nonce Unique nonce
* @param v v of the signature
* @param r r of the signature
* @param s s of the signature
*/
function transferWithAuthorization(
address from,
address to,
uint256 value,
uint256 validAfter,
uint256 validBefore,
bytes32 nonce,
uint8 v,
bytes32 r,
bytes32 s
) external whenNotPaused notBlacklisted(from) notBlacklisted(to) {
}
/**
* @notice Receive a transfer with a signed authorization from the payer
* @dev This has an additional check to ensure that the payee's address
* matches the caller of this function to prevent front-running attacks.
* @param from Payer's address (Authorizer)
* @param to Payee's address
* @param value Amount to be transferred
* @param validAfter The time after which this is valid (unix time)
* @param validBefore The time before which this is valid (unix time)
* @param nonce Unique nonce
* @param v v of the signature
* @param r r of the signature
* @param s s of the signature
*/
function receiveWithAuthorization(
address from,
address to,
uint256 value,
uint256 validAfter,
uint256 validBefore,
bytes32 nonce,
uint8 v,
bytes32 r,
bytes32 s
) external whenNotPaused notBlacklisted(from) notBlacklisted(to) {
}
/**
* @notice Attempt to cancel an authorization
* @dev Works only if the authorization is not yet used.
* @param authorizer Authorizer's address
* @param nonce Nonce of the authorization
* @param v v of the signature
* @param r r of the signature
* @param s s of the signature
*/
function cancelAuthorization(
address authorizer,
bytes32 nonce,
uint8 v,
bytes32 r,
bytes32 s
) external whenNotPaused {
}
/**
* @notice Update allowance with a signed permit
* @param owner Token owner's address (Authorizer)
* @param spender Spender's address
* @param value Amount of allowance
* @param deadline Expiration time, seconds since the epoch
* @param v v of the signature
* @param r r of the signature
* @param s s of the signature
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external whenNotPaused notBlacklisted(owner) notBlacklisted(spender) {
}
/**
* @notice Internal function to increase the allowance by a given increment
* @param owner Token owner's address
* @param spender Spender's address
* @param increment Amount of increase
*/
function _increaseAllowance(
address owner,
address spender,
uint256 increment
) internal override {
}
/**
* @notice Internal function to decrease the allowance by a given decrement
* @param owner Token owner's address
* @param spender Spender's address
* @param decrement Amount of decrease
*/
function _decreaseAllowance(
address owner,
address spender,
uint256 decrement
) internal override {
}
}
| initialized&&_initializedVersion==0 | 374,578 | initialized&&_initializedVersion==0 |
"Source not found" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.6;
import "@yield-protocol/utils-v2/contracts/access/AccessControl.sol";
import "@yield-protocol/utils-v2/contracts/cast/CastBytes32Bytes6.sol";
import "@yield-protocol/vault-interfaces/IOracle.sol";
/**
* @title CompositeMultiOracle
*/
contract CompositeMultiOracle is IOracle, AccessControl {
using CastBytes32Bytes6 for bytes32;
event SourceSet(bytes6 indexed baseId, bytes6 indexed quoteId, IOracle indexed source);
event PathSet(bytes6 indexed baseId, bytes6 indexed quoteId, bytes6[] indexed path);
mapping(bytes6 => mapping(bytes6 => IOracle)) public sources;
mapping(bytes6 => mapping(bytes6 => bytes6[])) public paths;
/// @dev Set or reset an oracle source
function setSource(bytes6 baseId, bytes6 quoteId, IOracle source)
external auth
{
}
/// @dev Set or reset an price path
function setPath(bytes6 base, bytes6 quote, bytes6[] memory path)
external auth
{
bytes6[] memory reverse = new bytes6[](path.length);
bytes6 base_ = base;
for (uint256 p = 0; p < path.length; p++) {
require(<FILL_ME>)
base_ = path[p];
reverse[path.length - (p + 1)] = base_;
}
paths[base][quote] = path;
paths[quote][base] = reverse;
emit PathSet(base, quote, path);
emit PathSet(quote, base, path);
}
/// @dev Convert amountBase base into quote at the latest oracle price, through a path is exists.
function peek(bytes32 base, bytes32 quote, uint256 amountBase)
external view virtual override
returns (uint256 amountQuote, uint256 updateTime)
{
}
/// @dev Convert amountBase base into quote at the latest oracle price, through a path is exists, updating state if necessary.
function get(bytes32 base, bytes32 quote, uint256 amountBase)
external virtual override
returns (uint256 amountQuote, uint256 updateTime)
{
}
/// @dev Convert amountBase base into quote at the latest oracle price, using only direct sources.
function _peek(bytes6 base, bytes6 quote, uint256 amountBase, uint256 updateTimeIn)
private view
returns (uint amountQuote, uint updateTimeOut)
{
}
/// @dev Convert amountBase base into quote at the latest oracle price, using only direct sources, updating state if necessary.
function _get(bytes6 base, bytes6 quote, uint256 amountBase, uint256 updateTimeIn)
private
returns (uint amountQuote, uint updateTimeOut)
{
}
}
| sources[base_][path[p]]!=IOracle(address(0)),"Source not found" | 374,745 | sources[base_][path[p]]!=IOracle(address(0)) |
"Source not found" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.6;
import "@yield-protocol/utils-v2/contracts/access/AccessControl.sol";
import "@yield-protocol/utils-v2/contracts/cast/CastBytes32Bytes6.sol";
import "@yield-protocol/vault-interfaces/IOracle.sol";
/**
* @title CompositeMultiOracle
*/
contract CompositeMultiOracle is IOracle, AccessControl {
using CastBytes32Bytes6 for bytes32;
event SourceSet(bytes6 indexed baseId, bytes6 indexed quoteId, IOracle indexed source);
event PathSet(bytes6 indexed baseId, bytes6 indexed quoteId, bytes6[] indexed path);
mapping(bytes6 => mapping(bytes6 => IOracle)) public sources;
mapping(bytes6 => mapping(bytes6 => bytes6[])) public paths;
/// @dev Set or reset an oracle source
function setSource(bytes6 baseId, bytes6 quoteId, IOracle source)
external auth
{
}
/// @dev Set or reset an price path
function setPath(bytes6 base, bytes6 quote, bytes6[] memory path)
external auth
{
}
/// @dev Convert amountBase base into quote at the latest oracle price, through a path is exists.
function peek(bytes32 base, bytes32 quote, uint256 amountBase)
external view virtual override
returns (uint256 amountQuote, uint256 updateTime)
{
}
/// @dev Convert amountBase base into quote at the latest oracle price, through a path is exists, updating state if necessary.
function get(bytes32 base, bytes32 quote, uint256 amountBase)
external virtual override
returns (uint256 amountQuote, uint256 updateTime)
{
}
/// @dev Convert amountBase base into quote at the latest oracle price, using only direct sources.
function _peek(bytes6 base, bytes6 quote, uint256 amountBase, uint256 updateTimeIn)
private view
returns (uint amountQuote, uint updateTimeOut)
{
IOracle source = sources[base][quote];
require(<FILL_ME>)
(amountQuote, updateTimeOut) = source.peek(base, quote, amountBase);
updateTimeOut = (updateTimeOut < updateTimeIn) ? updateTimeOut : updateTimeIn; // Take the oldest update time
}
/// @dev Convert amountBase base into quote at the latest oracle price, using only direct sources, updating state if necessary.
function _get(bytes6 base, bytes6 quote, uint256 amountBase, uint256 updateTimeIn)
private
returns (uint amountQuote, uint updateTimeOut)
{
}
}
| address(source)!=address(0),"Source not found" | 374,745 | address(source)!=address(0) |
'Deposit: Has deposited' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './ITokenStaked.sol';
contract Presale is Ownable, ReentrancyGuard, ITokenStaked {
using SafeERC20 for IERC20;
enum SalePhase {
Sale,
SaleOver,
Staking
}
struct UserInfo {
uint256 tokensClaimed;
uint256 rewardDebt;
bool hasShare;
}
uint256 public immutable safetyBufferInBlocks;
IERC20 public immutable x2y2Token; // x2y2
IERC20 public immutable rewardToken; // weth
// staking period in blocks
uint256 public immutable STAKING_PERIOD_IN_BLOCKS;
uint256 public immutable stakingStartBlock;
uint256 public immutable stakingEndBlock;
uint256 public immutable TOTAL_TOKEN_AMOUNT;
uint256 public immutable TOTAL_RAISING_AMOUNT;
uint256 public immutable MAX_SHARES;
uint256 public immutable PRICE_PER_SHARE;
uint256 public immutable TOKENS_PER_SHARE;
SalePhase public currentPhase;
// total shares sold (length of userInfo)
uint256 public totalShareSold;
// share * TOKENS_PER_SHARE
uint256 public totalTokensSold;
// weth harvested by user
uint256 public totalRewardDistributed;
// withdrawn reward token
uint256 public tokenRewardTreasuryWithdrawn;
mapping(address => bool) public signers;
mapping(address => UserInfo) public userInfo;
event SignerUpdate(address signer, bool isRemoval);
event Deposit(address indexed user);
event Harvest(address indexed user, uint256 amount);
event NewPhase(SalePhase newSalePhase);
event Withdraw(address indexed user, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 amount);
event TreasuryWithdraw(uint256 amount);
constructor(
IERC20 _x2y2Token,
IERC20 _rewardToken,
uint256 _stakingStartBlock,
uint256 _stakingEndBlock,
address[] memory _signers
) {
}
function getTotalStaked() external view override returns (uint256) {
}
function updateSigners(address[] memory toAdd, address[] memory toRemove) public onlyOwner {
}
function deposit(
uint8 v,
bytes32 r,
bytes32 s
) external payable nonReentrant {
require(currentPhase == SalePhase.Sale, 'Deposit: Phase must be Sale');
require(<FILL_ME>)
require(msg.value == PRICE_PER_SHARE, 'Deposit: Wrong amount');
require(totalShareSold < MAX_SHARES, 'Deposit: Not raising anymore');
address signer = ECDSA.recover(keccak256(abi.encode(msg.sender)), v, r, s);
require(signers[signer], 'Deposit: Signature error');
userInfo[msg.sender].hasShare = true;
totalShareSold += 1;
totalTokensSold += TOKENS_PER_SHARE;
emit Deposit(msg.sender);
}
function _totalReward() internal view returns (uint256) {
}
function _pendingReward(address user) internal view returns (uint256, uint256) {
}
function pendingRewards(address[] memory users) external view returns (uint256) {
}
function pendingReward(address user) external view returns (uint256) {
}
function _pendingTokens(address user) internal view returns (uint256) {
}
function pendingTokens(address user) external view returns (uint256) {
}
function _harvest(address user) internal returns (uint256) {
}
function harvest() external nonReentrant {
}
function withdraw() external nonReentrant {
}
function emergencyWithdraw() external nonReentrant {
}
// withdraw presale ETH & remaining token, update to saleover
function withdrawPresale() external onlyOwner nonReentrant {
}
function updatePhaseToStaking() external onlyOwner nonReentrant {
}
function treasuryWithdraw(uint256 amount) external onlyOwner nonReentrant {
}
}
| !userInfo[msg.sender].hasShare,'Deposit: Has deposited' | 374,829 | !userInfo[msg.sender].hasShare |
'Deposit: Signature error' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './ITokenStaked.sol';
contract Presale is Ownable, ReentrancyGuard, ITokenStaked {
using SafeERC20 for IERC20;
enum SalePhase {
Sale,
SaleOver,
Staking
}
struct UserInfo {
uint256 tokensClaimed;
uint256 rewardDebt;
bool hasShare;
}
uint256 public immutable safetyBufferInBlocks;
IERC20 public immutable x2y2Token; // x2y2
IERC20 public immutable rewardToken; // weth
// staking period in blocks
uint256 public immutable STAKING_PERIOD_IN_BLOCKS;
uint256 public immutable stakingStartBlock;
uint256 public immutable stakingEndBlock;
uint256 public immutable TOTAL_TOKEN_AMOUNT;
uint256 public immutable TOTAL_RAISING_AMOUNT;
uint256 public immutable MAX_SHARES;
uint256 public immutable PRICE_PER_SHARE;
uint256 public immutable TOKENS_PER_SHARE;
SalePhase public currentPhase;
// total shares sold (length of userInfo)
uint256 public totalShareSold;
// share * TOKENS_PER_SHARE
uint256 public totalTokensSold;
// weth harvested by user
uint256 public totalRewardDistributed;
// withdrawn reward token
uint256 public tokenRewardTreasuryWithdrawn;
mapping(address => bool) public signers;
mapping(address => UserInfo) public userInfo;
event SignerUpdate(address signer, bool isRemoval);
event Deposit(address indexed user);
event Harvest(address indexed user, uint256 amount);
event NewPhase(SalePhase newSalePhase);
event Withdraw(address indexed user, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 amount);
event TreasuryWithdraw(uint256 amount);
constructor(
IERC20 _x2y2Token,
IERC20 _rewardToken,
uint256 _stakingStartBlock,
uint256 _stakingEndBlock,
address[] memory _signers
) {
}
function getTotalStaked() external view override returns (uint256) {
}
function updateSigners(address[] memory toAdd, address[] memory toRemove) public onlyOwner {
}
function deposit(
uint8 v,
bytes32 r,
bytes32 s
) external payable nonReentrant {
require(currentPhase == SalePhase.Sale, 'Deposit: Phase must be Sale');
require(!userInfo[msg.sender].hasShare, 'Deposit: Has deposited');
require(msg.value == PRICE_PER_SHARE, 'Deposit: Wrong amount');
require(totalShareSold < MAX_SHARES, 'Deposit: Not raising anymore');
address signer = ECDSA.recover(keccak256(abi.encode(msg.sender)), v, r, s);
require(<FILL_ME>)
userInfo[msg.sender].hasShare = true;
totalShareSold += 1;
totalTokensSold += TOKENS_PER_SHARE;
emit Deposit(msg.sender);
}
function _totalReward() internal view returns (uint256) {
}
function _pendingReward(address user) internal view returns (uint256, uint256) {
}
function pendingRewards(address[] memory users) external view returns (uint256) {
}
function pendingReward(address user) external view returns (uint256) {
}
function _pendingTokens(address user) internal view returns (uint256) {
}
function pendingTokens(address user) external view returns (uint256) {
}
function _harvest(address user) internal returns (uint256) {
}
function harvest() external nonReentrant {
}
function withdraw() external nonReentrant {
}
function emergencyWithdraw() external nonReentrant {
}
// withdraw presale ETH & remaining token, update to saleover
function withdrawPresale() external onlyOwner nonReentrant {
}
function updatePhaseToStaking() external onlyOwner nonReentrant {
}
function treasuryWithdraw(uint256 amount) external onlyOwner nonReentrant {
}
}
| signers[signer],'Deposit: Signature error' | 374,829 | signers[signer] |
'Harvest: User not eligible' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './ITokenStaked.sol';
contract Presale is Ownable, ReentrancyGuard, ITokenStaked {
using SafeERC20 for IERC20;
enum SalePhase {
Sale,
SaleOver,
Staking
}
struct UserInfo {
uint256 tokensClaimed;
uint256 rewardDebt;
bool hasShare;
}
uint256 public immutable safetyBufferInBlocks;
IERC20 public immutable x2y2Token; // x2y2
IERC20 public immutable rewardToken; // weth
// staking period in blocks
uint256 public immutable STAKING_PERIOD_IN_BLOCKS;
uint256 public immutable stakingStartBlock;
uint256 public immutable stakingEndBlock;
uint256 public immutable TOTAL_TOKEN_AMOUNT;
uint256 public immutable TOTAL_RAISING_AMOUNT;
uint256 public immutable MAX_SHARES;
uint256 public immutable PRICE_PER_SHARE;
uint256 public immutable TOKENS_PER_SHARE;
SalePhase public currentPhase;
// total shares sold (length of userInfo)
uint256 public totalShareSold;
// share * TOKENS_PER_SHARE
uint256 public totalTokensSold;
// weth harvested by user
uint256 public totalRewardDistributed;
// withdrawn reward token
uint256 public tokenRewardTreasuryWithdrawn;
mapping(address => bool) public signers;
mapping(address => UserInfo) public userInfo;
event SignerUpdate(address signer, bool isRemoval);
event Deposit(address indexed user);
event Harvest(address indexed user, uint256 amount);
event NewPhase(SalePhase newSalePhase);
event Withdraw(address indexed user, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 amount);
event TreasuryWithdraw(uint256 amount);
constructor(
IERC20 _x2y2Token,
IERC20 _rewardToken,
uint256 _stakingStartBlock,
uint256 _stakingEndBlock,
address[] memory _signers
) {
}
function getTotalStaked() external view override returns (uint256) {
}
function updateSigners(address[] memory toAdd, address[] memory toRemove) public onlyOwner {
}
function deposit(
uint8 v,
bytes32 r,
bytes32 s
) external payable nonReentrant {
}
function _totalReward() internal view returns (uint256) {
}
function _pendingReward(address user) internal view returns (uint256, uint256) {
}
function pendingRewards(address[] memory users) external view returns (uint256) {
}
function pendingReward(address user) external view returns (uint256) {
}
function _pendingTokens(address user) internal view returns (uint256) {
}
function pendingTokens(address user) external view returns (uint256) {
}
function _harvest(address user) internal returns (uint256) {
}
function harvest() external nonReentrant {
require(currentPhase == SalePhase.Staking, 'Harvest: Phase must be Staking');
require(<FILL_ME>)
require(_harvest(msg.sender) > 0, 'Harvest: No pending reward');
}
function withdraw() external nonReentrant {
}
function emergencyWithdraw() external nonReentrant {
}
// withdraw presale ETH & remaining token, update to saleover
function withdrawPresale() external onlyOwner nonReentrant {
}
function updatePhaseToStaking() external onlyOwner nonReentrant {
}
function treasuryWithdraw(uint256 amount) external onlyOwner nonReentrant {
}
}
| userInfo[msg.sender].hasShare,'Harvest: User not eligible' | 374,829 | userInfo[msg.sender].hasShare |
'Harvest: No pending reward' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './ITokenStaked.sol';
contract Presale is Ownable, ReentrancyGuard, ITokenStaked {
using SafeERC20 for IERC20;
enum SalePhase {
Sale,
SaleOver,
Staking
}
struct UserInfo {
uint256 tokensClaimed;
uint256 rewardDebt;
bool hasShare;
}
uint256 public immutable safetyBufferInBlocks;
IERC20 public immutable x2y2Token; // x2y2
IERC20 public immutable rewardToken; // weth
// staking period in blocks
uint256 public immutable STAKING_PERIOD_IN_BLOCKS;
uint256 public immutable stakingStartBlock;
uint256 public immutable stakingEndBlock;
uint256 public immutable TOTAL_TOKEN_AMOUNT;
uint256 public immutable TOTAL_RAISING_AMOUNT;
uint256 public immutable MAX_SHARES;
uint256 public immutable PRICE_PER_SHARE;
uint256 public immutable TOKENS_PER_SHARE;
SalePhase public currentPhase;
// total shares sold (length of userInfo)
uint256 public totalShareSold;
// share * TOKENS_PER_SHARE
uint256 public totalTokensSold;
// weth harvested by user
uint256 public totalRewardDistributed;
// withdrawn reward token
uint256 public tokenRewardTreasuryWithdrawn;
mapping(address => bool) public signers;
mapping(address => UserInfo) public userInfo;
event SignerUpdate(address signer, bool isRemoval);
event Deposit(address indexed user);
event Harvest(address indexed user, uint256 amount);
event NewPhase(SalePhase newSalePhase);
event Withdraw(address indexed user, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 amount);
event TreasuryWithdraw(uint256 amount);
constructor(
IERC20 _x2y2Token,
IERC20 _rewardToken,
uint256 _stakingStartBlock,
uint256 _stakingEndBlock,
address[] memory _signers
) {
}
function getTotalStaked() external view override returns (uint256) {
}
function updateSigners(address[] memory toAdd, address[] memory toRemove) public onlyOwner {
}
function deposit(
uint8 v,
bytes32 r,
bytes32 s
) external payable nonReentrant {
}
function _totalReward() internal view returns (uint256) {
}
function _pendingReward(address user) internal view returns (uint256, uint256) {
}
function pendingRewards(address[] memory users) external view returns (uint256) {
}
function pendingReward(address user) external view returns (uint256) {
}
function _pendingTokens(address user) internal view returns (uint256) {
}
function pendingTokens(address user) external view returns (uint256) {
}
function _harvest(address user) internal returns (uint256) {
}
function harvest() external nonReentrant {
require(currentPhase == SalePhase.Staking, 'Harvest: Phase must be Staking');
require(userInfo[msg.sender].hasShare, 'Harvest: User not eligible');
require(<FILL_ME>)
}
function withdraw() external nonReentrant {
}
function emergencyWithdraw() external nonReentrant {
}
// withdraw presale ETH & remaining token, update to saleover
function withdrawPresale() external onlyOwner nonReentrant {
}
function updatePhaseToStaking() external onlyOwner nonReentrant {
}
function treasuryWithdraw(uint256 amount) external onlyOwner nonReentrant {
}
}
| _harvest(msg.sender)>0,'Harvest: No pending reward' | 374,829 | _harvest(msg.sender)>0 |
null | pragma solidity ^0.4.0;
contract AbstractENS {
function owner(bytes32 node) constant returns(address);
function resolver(bytes32 node) constant returns(address);
function ttl(bytes32 node) constant returns(uint64);
function setOwner(bytes32 node, address owner);
function setSubnodeOwner(bytes32 node, bytes32 label, address owner);
function setResolver(bytes32 node, address resolver);
function setTTL(bytes32 node, uint64 ttl);
}
/**
* A simple resolver intended for use with token contracts. Only allows the
* owner of a node to set its address, and returns the ERC20 JSON ABI for all
* ABI queries.
*
* Also acts as the registrar for 'thetoken.eth' to simplify setting up new tokens.
*/
contract TokenResolver {
bytes4 constant INTERFACE_META_ID = 0x01ffc9a7;
bytes4 constant ADDR_INTERFACE_ID = 0x3b3b57de;
bytes4 constant ABI_INTERFACE_ID = 0x2203ab56;
bytes32 constant ROOT_NODE = 0x637f12e7cd6bed65eeceee34d35868279778fc56c3e5e951f46b801fb78a2d26;
bytes TOKEN_JSON_ABI = '[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"name","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"totalSupply","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"decimals","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"symbol","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"}]';
event AddrChanged(bytes32 indexed node, address a);
AbstractENS ens = AbstractENS(0x314159265dD8dbb310642f98f50C066173C1259b);
mapping(bytes32=>address) addresses;
address owner;
modifier only_node_owner(bytes32 node) {
require(<FILL_ME>)
_;
}
modifier only_owner() {
}
function setOwner(address newOwner) only_owner {
}
function newToken(string name, address addr) only_owner {
}
function setSubnodeOwner(bytes22 label, address newOwner) only_owner {
}
function TokenResolver() {
}
/**
* Returns true if the resolver implements the interface specified by the provided hash.
* @param interfaceID The ID of the interface to check for.
* @return True if the contract implements the requested interface.
*/
function supportsInterface(bytes4 interfaceID) constant returns (bool) {
}
/**
* Returns the address associated with an ENS node.
* @param node The ENS node to query.
* @return The associated address.
*/
function addr(bytes32 node) constant returns (address ret) {
}
/**
* Sets the address associated with an ENS node.
* May only be called by the owner of that node in the ENS registry.
* @param node The node to update.
* @param addr The address to set.
*/
function setAddr(bytes32 node, address addr) only_node_owner(node) {
}
/**
* Returns the ABI associated with an ENS node.
* Defined in EIP205.
* @param node The ENS node to query
* @param contentTypes A bitwise OR of the ABI formats accepted by the caller.
* @return contentType The content type of the return value
* @return data The ABI data
*/
function ABI(bytes32 node, uint256 contentTypes) constant returns (uint256 contentType, bytes data) {
}
}
| ens.owner(node)==msg.sender||owner==msg.sender | 374,833 | ens.owner(node)==msg.sender||owner==msg.sender |
"Incorrect Ether value." | // SPDX-License-Identifier: MIT
/*
_ __ _ _ _ __ _____
/\/\ ___ _ __ ___| |_ ___ _ __ / _\ |__ ___| | |_ ___ _ __ / // __\ \
/ \ / _ \| '_ \/ __| __/ _ \ '__| \ \| '_ \ / _ \ | __/ _ \ '__| | |/ / | |
/ /\/\ \ (_) | | | \__ \ || __/ | _\ \ | | | __/ | || __/ | | / /___ | |
\/ \/\___/|_| |_|___/\__\___|_| \__/_| |_|\___|_|\__\___|_| | \____/ | |
\_\ /_/
*/
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract MonsterShelter is ERC721, Ownable {
using Strings for uint256;
//metadata
string baseURI;
//sales
uint256 public cost = 0.04 ether;
uint256 public preSaleCost = 0.035 ether;
uint256 public allowListCost = 0.03 ether;
uint256 public presaleSupply = 300;
uint256 public reservedSupply = 155;
uint256 public maxSupply = 5555;
uint256 public totalSupply;
uint256 public maxMintsPerTransaction = 10;
uint256 public saleStartTimestamp;
uint256 public preSaleStartTimestamp = 1637791200;
uint256 public earlyAccess = 900;
mapping(address => bool) public allowList;
constructor(string memory _initBaseURI) ERC721("MonsterShelter", "MNSTRS") {
}
// metadata region
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
//endregion
//setters and getters for sales region
function setCost(uint256 _newCost) public onlyOwner {
}
function setPreSaleCost(uint256 _newPreSaleCost) public onlyOwner {
}
function setAllowListCost(uint256 _newAllowListCost) public onlyOwner {
}
function getCurrentCost(address sender) public view returns (uint256) {
}
function configurePresale(uint256 _presaleSupply, uint256 _reservedSupply, uint256 _preSaleStartTimestamp) public onlyOwner {
}
function configureSale(uint256 _maxMintsPerTransaction, uint256 _saleStartTimestamp) external onlyOwner {
}
function getSaleState(address sender) public view returns (uint256) {
}
function setMaxSupply(uint256 _newMaxSupply) public onlyOwner {
}
function setMaxMintsPerTransaction(uint256 _newmaxMintsPerTransaction) public onlyOwner {
}
function setPreSaleStartTimestamp(uint256 _preSaleStartTimestamp) external onlyOwner {
}
function setSaleStartTimestamp(uint256 _saleStartTimestamp) external onlyOwner {
}
function setEarlyAccess(uint _newEarlyAccess) public onlyOwner {
}
function setAllowList(address[] memory _allowList) external onlyOwner {
}
//endregion
//mint and airdrop region
function mint(uint256 _mintAmount) public payable {
uint256 saleState = getSaleState(msg.sender);
uint256 currentCost = getCurrentCost(msg.sender);
require(saleState == 1 || saleState == 2, "Minting is not available.");
require(_mintAmount > 0, "Can't mint less than 1.");
require(_mintAmount <= maxMintsPerTransaction, "Can't mint more than maxMintsPerTransaction.");
require(<FILL_ME>)
if (saleState == 1) {
require(_mintAmount <= presaleSupply, "Presale supply is out.");
presaleSupply -= _mintAmount;
}
mintNFTs(msg.sender, _mintAmount);
}
modifier maxSupplyCheck(uint256 amount) {
}
function mintNFTs(address to, uint256 amount) internal maxSupplyCheck(amount) {
}
function airdrop(address[] memory addresses, uint256[] memory amounts) external onlyOwner {
}
//endregion
function withdraw() public payable onlyOwner {
}
}
| currentCost*_mintAmount==msg.value,"Incorrect Ether value." | 374,901 | currentCost*_mintAmount==msg.value |
"Tokens supply reached limit." | // SPDX-License-Identifier: MIT
/*
_ __ _ _ _ __ _____
/\/\ ___ _ __ ___| |_ ___ _ __ / _\ |__ ___| | |_ ___ _ __ / // __\ \
/ \ / _ \| '_ \/ __| __/ _ \ '__| \ \| '_ \ / _ \ | __/ _ \ '__| | |/ / | |
/ /\/\ \ (_) | | | \__ \ || __/ | _\ \ | | | __/ | || __/ | | / /___ | |
\/ \/\___/|_| |_|___/\__\___|_| \__/_| |_|\___|_|\__\___|_| | \____/ | |
\_\ /_/
*/
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract MonsterShelter is ERC721, Ownable {
using Strings for uint256;
//metadata
string baseURI;
//sales
uint256 public cost = 0.04 ether;
uint256 public preSaleCost = 0.035 ether;
uint256 public allowListCost = 0.03 ether;
uint256 public presaleSupply = 300;
uint256 public reservedSupply = 155;
uint256 public maxSupply = 5555;
uint256 public totalSupply;
uint256 public maxMintsPerTransaction = 10;
uint256 public saleStartTimestamp;
uint256 public preSaleStartTimestamp = 1637791200;
uint256 public earlyAccess = 900;
mapping(address => bool) public allowList;
constructor(string memory _initBaseURI) ERC721("MonsterShelter", "MNSTRS") {
}
// metadata region
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
//endregion
//setters and getters for sales region
function setCost(uint256 _newCost) public onlyOwner {
}
function setPreSaleCost(uint256 _newPreSaleCost) public onlyOwner {
}
function setAllowListCost(uint256 _newAllowListCost) public onlyOwner {
}
function getCurrentCost(address sender) public view returns (uint256) {
}
function configurePresale(uint256 _presaleSupply, uint256 _reservedSupply, uint256 _preSaleStartTimestamp) public onlyOwner {
}
function configureSale(uint256 _maxMintsPerTransaction, uint256 _saleStartTimestamp) external onlyOwner {
}
function getSaleState(address sender) public view returns (uint256) {
}
function setMaxSupply(uint256 _newMaxSupply) public onlyOwner {
}
function setMaxMintsPerTransaction(uint256 _newmaxMintsPerTransaction) public onlyOwner {
}
function setPreSaleStartTimestamp(uint256 _preSaleStartTimestamp) external onlyOwner {
}
function setSaleStartTimestamp(uint256 _saleStartTimestamp) external onlyOwner {
}
function setEarlyAccess(uint _newEarlyAccess) public onlyOwner {
}
function setAllowList(address[] memory _allowList) external onlyOwner {
}
//endregion
//mint and airdrop region
function mint(uint256 _mintAmount) public payable {
}
modifier maxSupplyCheck(uint256 amount) {
require(<FILL_ME>)
_;
}
function mintNFTs(address to, uint256 amount) internal maxSupplyCheck(amount) {
}
function airdrop(address[] memory addresses, uint256[] memory amounts) external onlyOwner {
}
//endregion
function withdraw() public payable onlyOwner {
}
}
| totalSupply+reservedSupply+amount<=maxSupply,"Tokens supply reached limit." | 374,901 | totalSupply+reservedSupply+amount<=maxSupply |
null | pragma solidity ^0.4.25;
contract ERC20 {
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);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract Leader {
address owner;
mapping (address => bool) public admins;
modifier onlyOwner() {
}
modifier onlyAdmins() {
}
function setOwner (address _addr) onlyOwner() public {
}
function addAdmin (address _addr) onlyOwner() public {
}
function removeAdmin (address _addr) onlyOwner() public {
}
}
contract AesopChain is ERC20, Leader {
string public name = "AesopChain";
string public symbol = "AEC";
uint8 public decimals = 8;
uint256 public totalSupply = 1000000000000000000;
using SafeMath for uint256;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
constructor() public {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require (_to != 0x0 && _value > 0);
require(<FILL_ME>)
balanceOf[_from] = balanceOf[_from].sub(_value);
balanceOf[_to] = balanceOf[_to].add(_value);
allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
}
/**
* @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 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts 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 c) {
}
}
| balanceOf[_from]>=_value&&_value<=allowance[_from][msg.sender] | 374,906 | balanceOf[_from]>=_value&&_value<=allowance[_from][msg.sender] |
"Must have original" | contract ActionNFT is ERC721Enumerable {
/* Variables */
address payable private beneficiary;
/* Common NFT */
uint256 public currentId;
uint256 public rampRate = 10**14;
uint256 public commonPrice;
mapping(address => uint256) public originalMintCount;
/* Accounting Data */
//uint256 public treasuryBalance;
mapping(address => uint256) public withdrawableBalance;
/* Mint Data */
bool public canMint = true;
uint256 public mintCap = 3000;
/* Withdraw Data */
uint256 public adminClaimTime;
uint256 public withdrawWindow = 24 * 60 * 60 * 30;
string public commonUrl = 'ipfs://QmTFMJ17s35Y2fHSomdTh29m8CdBPK8Cv8trXnAWTVJ1hc';
constructor(address payable _beneficiary, uint256 _minPrice)
public
ERC721('PACDAO ACTION', 'PAC-A1')
{
}
function store_withdrawable(address username, uint256 value) internal {
}
/* Payable Functions */
function mintCommon() public payable canMintQuantity(1) {
}
function mintMany(uint256 _mint_count)
public
payable
canMintQuantity(_mint_count)
{
}
/* Internal */
function _processMint() internal {
}
function getCostMany(uint256 mint_count)
public
view
returns (uint256, uint256)
{
}
function nextPrice(uint256 start_price) public view returns (uint256) {
}
/* Withdraw Functions */
function withdrawTreasury() public saleEnded {
}
function refundAll() public saleEnded {
require(block.timestamp < adminClaimTime, "Withdraw Period Ended");
require(<FILL_ME>)
require(withdrawableBalance[msg.sender] > 0, "No balance to withdraw");
uint256 _burnCount = originalMintCount[msg.sender];
uint256[] memory _ownedTokens = new uint256[](_burnCount);
for (uint256 _i = 0; _i < _burnCount; _i++) {
_ownedTokens[_i] = tokenOfOwnerByIndex(msg.sender, _i);
}
for (uint256 _i = 0; _i < _burnCount; _i++) {
_burn(_ownedTokens[_i]);
}
uint256 _val = withdrawableBalance[msg.sender];
withdrawableBalance[msg.sender] = 0;
payable(msg.sender).transfer(_val);
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
/* Admin Functions */
function signResolution(bool _resolution) public onlyAdmin {
}
function updateBeneficiary(address payable _newBeneficiary) public onlyAdmin {
}
function setTokenUri(string memory _newUri)
public
onlyAdmin
{
}
/* Fallback Functions */
receive() external payable {}
fallback() external payable {}
/* Modifiers */
modifier onlyAdmin() {
}
modifier saleEnded() {
}
modifier canMintQuantity(uint256 _quantity) {
}
}
| balanceOf(msg.sender)>=originalMintCount[msg.sender],"Must have original" | 375,024 | balanceOf(msg.sender)>=originalMintCount[msg.sender] |
"No balance to withdraw" | contract ActionNFT is ERC721Enumerable {
/* Variables */
address payable private beneficiary;
/* Common NFT */
uint256 public currentId;
uint256 public rampRate = 10**14;
uint256 public commonPrice;
mapping(address => uint256) public originalMintCount;
/* Accounting Data */
//uint256 public treasuryBalance;
mapping(address => uint256) public withdrawableBalance;
/* Mint Data */
bool public canMint = true;
uint256 public mintCap = 3000;
/* Withdraw Data */
uint256 public adminClaimTime;
uint256 public withdrawWindow = 24 * 60 * 60 * 30;
string public commonUrl = 'ipfs://QmTFMJ17s35Y2fHSomdTh29m8CdBPK8Cv8trXnAWTVJ1hc';
constructor(address payable _beneficiary, uint256 _minPrice)
public
ERC721('PACDAO ACTION', 'PAC-A1')
{
}
function store_withdrawable(address username, uint256 value) internal {
}
/* Payable Functions */
function mintCommon() public payable canMintQuantity(1) {
}
function mintMany(uint256 _mint_count)
public
payable
canMintQuantity(_mint_count)
{
}
/* Internal */
function _processMint() internal {
}
function getCostMany(uint256 mint_count)
public
view
returns (uint256, uint256)
{
}
function nextPrice(uint256 start_price) public view returns (uint256) {
}
/* Withdraw Functions */
function withdrawTreasury() public saleEnded {
}
function refundAll() public saleEnded {
require(block.timestamp < adminClaimTime, "Withdraw Period Ended");
require(balanceOf(msg.sender) >= originalMintCount[msg.sender], "Must have original");
require(<FILL_ME>)
uint256 _burnCount = originalMintCount[msg.sender];
uint256[] memory _ownedTokens = new uint256[](_burnCount);
for (uint256 _i = 0; _i < _burnCount; _i++) {
_ownedTokens[_i] = tokenOfOwnerByIndex(msg.sender, _i);
}
for (uint256 _i = 0; _i < _burnCount; _i++) {
_burn(_ownedTokens[_i]);
}
uint256 _val = withdrawableBalance[msg.sender];
withdrawableBalance[msg.sender] = 0;
payable(msg.sender).transfer(_val);
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
/* Admin Functions */
function signResolution(bool _resolution) public onlyAdmin {
}
function updateBeneficiary(address payable _newBeneficiary) public onlyAdmin {
}
function setTokenUri(string memory _newUri)
public
onlyAdmin
{
}
/* Fallback Functions */
receive() external payable {}
fallback() external payable {}
/* Modifiers */
modifier onlyAdmin() {
}
modifier saleEnded() {
}
modifier canMintQuantity(uint256 _quantity) {
}
}
| withdrawableBalance[msg.sender]>0,"No balance to withdraw" | 375,024 | withdrawableBalance[msg.sender]>0 |
'Insufficient Quantity' | contract ActionNFT is ERC721Enumerable {
/* Variables */
address payable private beneficiary;
/* Common NFT */
uint256 public currentId;
uint256 public rampRate = 10**14;
uint256 public commonPrice;
mapping(address => uint256) public originalMintCount;
/* Accounting Data */
//uint256 public treasuryBalance;
mapping(address => uint256) public withdrawableBalance;
/* Mint Data */
bool public canMint = true;
uint256 public mintCap = 3000;
/* Withdraw Data */
uint256 public adminClaimTime;
uint256 public withdrawWindow = 24 * 60 * 60 * 30;
string public commonUrl = 'ipfs://QmTFMJ17s35Y2fHSomdTh29m8CdBPK8Cv8trXnAWTVJ1hc';
constructor(address payable _beneficiary, uint256 _minPrice)
public
ERC721('PACDAO ACTION', 'PAC-A1')
{
}
function store_withdrawable(address username, uint256 value) internal {
}
/* Payable Functions */
function mintCommon() public payable canMintQuantity(1) {
}
function mintMany(uint256 _mint_count)
public
payable
canMintQuantity(_mint_count)
{
}
/* Internal */
function _processMint() internal {
}
function getCostMany(uint256 mint_count)
public
view
returns (uint256, uint256)
{
}
function nextPrice(uint256 start_price) public view returns (uint256) {
}
/* Withdraw Functions */
function withdrawTreasury() public saleEnded {
}
function refundAll() public saleEnded {
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
/* Admin Functions */
function signResolution(bool _resolution) public onlyAdmin {
}
function updateBeneficiary(address payable _newBeneficiary) public onlyAdmin {
}
function setTokenUri(string memory _newUri)
public
onlyAdmin
{
}
/* Fallback Functions */
receive() external payable {}
fallback() external payable {}
/* Modifiers */
modifier onlyAdmin() {
}
modifier saleEnded() {
}
modifier canMintQuantity(uint256 _quantity) {
require(canMint == true, 'Minting period over');
require(<FILL_ME>)
_;
}
}
| totalSupply()+_quantity<=mintCap,'Insufficient Quantity' | 375,024 | totalSupply()+_quantity<=mintCap |
null | pragma solidity ^0.5.11;
contract ERC20 {
function balanceOf(address who) public view returns (uint256);
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function transfer(address to, uint value) public returns(bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address indexed from, uint256 value);
}
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)
{
}
}
contract CTT is ERC20 {
using SafeMath for uint256;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
uint256 internal _totalSupply;
address internal _admin;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
constructor() public {
}
modifier ownership() {
}
function name() public view returns (string memory)
{
}
function symbol() public view returns (string memory)
{
}
function decimals() public view returns (uint8)
{
}
function totalSupply() public view returns (uint256)
{
}
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint burn_token = (_value*8)/100;
require(<FILL_ME>)
require(_value + burn_token <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value - burn_token);
balances[_to] = (balances[_to]).add( _value - burn_token);
emit ERC20.Transfer(msg.sender, _to, _value - burn_token);
require( burn(burn_token));
return true;
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
//Admin can transfer his ownership to new address
function transferownership(address _newaddress) public returns(bool){
}
}
| _value+burn_token>_value | 375,084 | _value+burn_token>_value |
null | pragma solidity ^0.5.11;
contract ERC20 {
function balanceOf(address who) public view returns (uint256);
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function transfer(address to, uint value) public returns(bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address indexed from, uint256 value);
}
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)
{
}
}
contract CTT is ERC20 {
using SafeMath for uint256;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
uint256 internal _totalSupply;
address internal _admin;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
constructor() public {
}
modifier ownership() {
}
function name() public view returns (string memory)
{
}
function symbol() public view returns (string memory)
{
}
function decimals() public view returns (uint8)
{
}
function totalSupply() public view returns (uint256)
{
}
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint burn_token = (_value*8)/100;
require(_value+burn_token > _value);
require(<FILL_ME>)
balances[msg.sender] = balances[msg.sender].sub(_value - burn_token);
balances[_to] = (balances[_to]).add( _value - burn_token);
emit ERC20.Transfer(msg.sender, _to, _value - burn_token);
require( burn(burn_token));
return true;
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
//Admin can transfer his ownership to new address
function transferownership(address _newaddress) public returns(bool){
}
}
| _value+burn_token<=balances[msg.sender] | 375,084 | _value+burn_token<=balances[msg.sender] |
null | pragma solidity ^0.5.11;
contract ERC20 {
function balanceOf(address who) public view returns (uint256);
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function transfer(address to, uint value) public returns(bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address indexed from, uint256 value);
}
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)
{
}
}
contract CTT is ERC20 {
using SafeMath for uint256;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
uint256 internal _totalSupply;
address internal _admin;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
constructor() public {
}
modifier ownership() {
}
function name() public view returns (string memory)
{
}
function symbol() public view returns (string memory)
{
}
function decimals() public view returns (uint8)
{
}
function totalSupply() public view returns (uint256)
{
}
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint burn_token = (_value*8)/100;
require(_value+burn_token > _value);
require(_value + burn_token <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value - burn_token);
balances[_to] = (balances[_to]).add( _value - burn_token);
emit ERC20.Transfer(msg.sender, _to, _value - burn_token);
require(<FILL_ME>)
return true;
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
//Admin can transfer his ownership to new address
function transferownership(address _newaddress) public returns(bool){
}
}
| burn(burn_token) | 375,084 | burn(burn_token) |
null | pragma solidity ^0.5.11;
contract ERC20 {
function balanceOf(address who) public view returns (uint256);
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function transfer(address to, uint value) public returns(bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address indexed from, uint256 value);
}
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)
{
}
}
contract CTT is ERC20 {
using SafeMath for uint256;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
uint256 internal _totalSupply;
address internal _admin;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
constructor() public {
}
modifier ownership() {
}
function name() public view returns (string memory)
{
}
function symbol() public view returns (string memory)
{
}
function decimals() public view returns (uint8)
{
}
function totalSupply() public view returns (uint256)
{
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint burn_token = (_value*8)/100;
require(_value+burn_token > _value);
require(<FILL_ME>)
require(_value + burn_token <= allowed[_from][msg.sender]);
balances[_from] = (balances[_from]).sub( _value - burn_token);
balances[_to] = (balances[_to]).add(_value - burn_token);
allowed[_from][msg.sender] = (allowed[_from][msg.sender]).sub(_value - burn_token);
emit ERC20.Transfer(_from, _to, _value - burn_token);
require( burn(burn_token));
return true;
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
//Admin can transfer his ownership to new address
function transferownership(address _newaddress) public returns(bool){
}
}
| _value+burn_token<=balances[_from] | 375,084 | _value+burn_token<=balances[_from] |
null | pragma solidity ^0.5.11;
contract ERC20 {
function balanceOf(address who) public view returns (uint256);
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function transfer(address to, uint value) public returns(bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address indexed from, uint256 value);
}
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)
{
}
}
contract CTT is ERC20 {
using SafeMath for uint256;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
uint256 internal _totalSupply;
address internal _admin;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
constructor() public {
}
modifier ownership() {
}
function name() public view returns (string memory)
{
}
function symbol() public view returns (string memory)
{
}
function decimals() public view returns (uint8)
{
}
function totalSupply() public view returns (uint256)
{
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint burn_token = (_value*8)/100;
require(_value+burn_token > _value);
require(_value + burn_token <= balances[_from]);
require(<FILL_ME>)
balances[_from] = (balances[_from]).sub( _value - burn_token);
balances[_to] = (balances[_to]).add(_value - burn_token);
allowed[_from][msg.sender] = (allowed[_from][msg.sender]).sub(_value - burn_token);
emit ERC20.Transfer(_from, _to, _value - burn_token);
require( burn(burn_token));
return true;
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
//Admin can transfer his ownership to new address
function transferownership(address _newaddress) public returns(bool){
}
}
| _value+burn_token<=allowed[_from][msg.sender] | 375,084 | _value+burn_token<=allowed[_from][msg.sender] |
"Max Per Address reached" | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
require(saleStarted, "Public sale not started");
require(tx.origin == msg.sender, "Prevent contract call");
require(<FILL_ME>)
require(_count > 0 && msg.value == _count * mintPrice, "invalid eth sent");
require(mintCount + _count + oldJKSupply <= maxKeySupply, "max key cards");
require(totalMinted + _count <= maxKeySupply, "max key cards");
mintCount += _count;
totalMinted += _count;
_mint(msg.sender, _tokenId, _count, "");
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| (balanceOf(msg.sender,_tokenId)+_count)<=maxPerAddress,"Max Per Address reached" | 375,206 | (balanceOf(msg.sender,_tokenId)+_count)<=maxPerAddress |
"max key cards" | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
require(saleStarted, "Public sale not started");
require(tx.origin == msg.sender, "Prevent contract call");
require((balanceOf(msg.sender, _tokenId) + _count) <= maxPerAddress, "Max Per Address reached");
require(_count > 0 && msg.value == _count * mintPrice, "invalid eth sent");
require(<FILL_ME>)
require(totalMinted + _count <= maxKeySupply, "max key cards");
mintCount += _count;
totalMinted += _count;
_mint(msg.sender, _tokenId, _count, "");
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| mintCount+_count+oldJKSupply<=maxKeySupply,"max key cards" | 375,206 | mintCount+_count+oldJKSupply<=maxKeySupply |
"max key cards" | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
require(saleStarted, "Public sale not started");
require(tx.origin == msg.sender, "Prevent contract call");
require((balanceOf(msg.sender, _tokenId) + _count) <= maxPerAddress, "Max Per Address reached");
require(_count > 0 && msg.value == _count * mintPrice, "invalid eth sent");
require(mintCount + _count + oldJKSupply <= maxKeySupply, "max key cards");
require(<FILL_ME>)
mintCount += _count;
totalMinted += _count;
_mint(msg.sender, _tokenId, _count, "");
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| totalMinted+_count<=maxKeySupply,"max key cards" | 375,206 | totalMinted+_count<=maxKeySupply |
"invalid hash" | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
require(presaleStarted, "Presale not started");
require(tx.origin == msg.sender, "Prevent contract call");
require((balanceOf(msg.sender, _tokenId) + _count) <= maxPerAddress, "Max Per Address reached");
require(_count > 0 && msg.value == _count * mintPrice, "invalid eth sent");
require(<FILL_ME>)
require(matchSigner(_hash, _sig), "invalid signer");
require(!_usedHashes[_hash], "_hash already used");
require(mintCount + _count + oldJKSupply <= maxKeySupply, "max key cards");
require(totalMinted + _count <= maxKeySupply, "max key cards");
_usedHashes[_hash] = true;
mintCount += _count;
totalMinted += _count;
_mint(msg.sender, _tokenId, _count, "");
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| matchHash(msg.sender,_count,_hash),"invalid hash" | 375,206 | matchHash(msg.sender,_count,_hash) |
"invalid signer" | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
require(presaleStarted, "Presale not started");
require(tx.origin == msg.sender, "Prevent contract call");
require((balanceOf(msg.sender, _tokenId) + _count) <= maxPerAddress, "Max Per Address reached");
require(_count > 0 && msg.value == _count * mintPrice, "invalid eth sent");
require(matchHash(msg.sender, _count, _hash), "invalid hash");
require(<FILL_ME>)
require(!_usedHashes[_hash], "_hash already used");
require(mintCount + _count + oldJKSupply <= maxKeySupply, "max key cards");
require(totalMinted + _count <= maxKeySupply, "max key cards");
_usedHashes[_hash] = true;
mintCount += _count;
totalMinted += _count;
_mint(msg.sender, _tokenId, _count, "");
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| matchSigner(_hash,_sig),"invalid signer" | 375,206 | matchSigner(_hash,_sig) |
"_hash already used" | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
require(presaleStarted, "Presale not started");
require(tx.origin == msg.sender, "Prevent contract call");
require((balanceOf(msg.sender, _tokenId) + _count) <= maxPerAddress, "Max Per Address reached");
require(_count > 0 && msg.value == _count * mintPrice, "invalid eth sent");
require(matchHash(msg.sender, _count, _hash), "invalid hash");
require(matchSigner(_hash, _sig), "invalid signer");
require(<FILL_ME>)
require(mintCount + _count + oldJKSupply <= maxKeySupply, "max key cards");
require(totalMinted + _count <= maxKeySupply, "max key cards");
_usedHashes[_hash] = true;
mintCount += _count;
totalMinted += _count;
_mint(msg.sender, _tokenId, _count, "");
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| !_usedHashes[_hash],"_hash already used" | 375,206 | !_usedHashes[_hash] |
"not approved." | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
require(<FILL_ME>)
require(IERC1155(oldJK).balanceOf(msg.sender, _tokenId) >= _count, "not enough balance");
require(bridgeCount + _count <= oldJKSupply, "bridge exceed supply");
bridgeCount += _count;
totalMinted += _count;
// BURN
IERC1155(oldJK).safeTransferFrom(msg.sender, 0xDEadadD000000000000000000000000000000000, 1, _count, "");
_mint(msg.sender, _tokenId, _count, "");
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| IERC1155(oldJK).isApprovedForAll(msg.sender,address(this)),"not approved." | 375,206 | IERC1155(oldJK).isApprovedForAll(msg.sender,address(this)) |
"not enough balance" | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
require(IERC1155(oldJK).isApprovedForAll(msg.sender, address(this)), "not approved.");
require(<FILL_ME>)
require(bridgeCount + _count <= oldJKSupply, "bridge exceed supply");
bridgeCount += _count;
totalMinted += _count;
// BURN
IERC1155(oldJK).safeTransferFrom(msg.sender, 0xDEadadD000000000000000000000000000000000, 1, _count, "");
_mint(msg.sender, _tokenId, _count, "");
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| IERC1155(oldJK).balanceOf(msg.sender,_tokenId)>=_count,"not enough balance" | 375,206 | IERC1155(oldJK).balanceOf(msg.sender,_tokenId)>=_count |
"bridge exceed supply" | /*
__ __ ___ _______ ___ ______
| | | |/ / | \ / \ / __ \
| | | ' / | .--. | / ^ \ | | | |
.--. | | | < | | | | / /_\ \ | | | |
| `--' | | . \ | '--' | / _____ \ | `--' |
\______/ |__|\__\ |_______/ /__/ \__\ \______/
Join us https://discord.gg/796KVFSf
*/
pragma solidity ^0.8.7;
contract JKDao is ReentrancyGuard, ERC1155, Ownable {
uint256 constant private _tokenId = 1;
uint256 constant public oldJKSupply = 2278;
address constant public oldJK = 0x137A81298c11708006405d75bC0541A2a07C0B33;
uint256 public maxPerAddress = 15;
uint256 public mintCount = 0;
uint256 public bridgeCount = 0;
uint256 public totalMinted = 0;
uint256 public maxKeySupply = 7500;
uint256 public mintPrice = 0.07 ether;
bool public saleStarted = false;
bool public presaleStarted = false;
mapping(bytes32 => bool) private _usedHashes;
address private _signerAddress;
constructor() ERC1155("https://ipfs.io/ipfs/QmYbWYv48DWGh5mTGUDo9i5EtZySpTVPv4nJ72A2B5vSuK?filename=jk_metadata%20copy.json") {}
function publicMint(uint256 _count) external payable nonReentrant {
}
// Preasale Mint Key Card
function presaleMint(
uint256 _count,
bytes32 _hash,
bytes memory _sig)
external payable nonReentrant
{
}
function matchSigner(bytes32 _hash, bytes memory _signature) private view returns(bool) {
}
function matchHash(address _sender, uint256 _count, bytes32 _hash) private pure returns(bool) {
}
function checkWhitelist(
address _sender,
uint256 _count,
bytes32 _hash,
bytes memory _sig
) public view returns(bool) {
}
// One Way Bridge function from old JKKeyCard to new JKKeyCard
function bridge(uint256 _count) external {
require(IERC1155(oldJK).isApprovedForAll(msg.sender, address(this)), "not approved.");
require(IERC1155(oldJK).balanceOf(msg.sender, _tokenId) >= _count, "not enough balance");
require(<FILL_ME>)
bridgeCount += _count;
totalMinted += _count;
// BURN
IERC1155(oldJK).safeTransferFrom(msg.sender, 0xDEadadD000000000000000000000000000000000, 1, _count, "");
_mint(msg.sender, _tokenId, _count, "");
}
// ** Admin Fuctions ** //
function setURI(string memory newuri) external onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function setSaleStarted(bool _hasStarted) external onlyOwner {
}
function setPresaleStarted(bool _hasStarted) external onlyOwner {
}
function setSignerAddress(address _signer) external onlyOwner {
}
function setMaxPerAddress(uint256 _max) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintPrice(uint256 _price) external onlyOwner {
}
}
| bridgeCount+_count<=oldJKSupply,"bridge exceed supply" | 375,206 | bridgeCount+_count<=oldJKSupply |
"Auction does not exist" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
require(<FILL_ME>)
_;
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| auctions[auctionId].tokenOwner!=address(0),"Auction does not exist" | 375,274 | auctions[auctionId].tokenOwner!=address(0) |
"House name already exists" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
require(<FILL_ME>)
require(
bytes(name).length > 0,
"House name is required");
require(
bytes(name).length <= 32,
"House name must be less than 32 characters");
require(
curator != address(0),
"Curator address is required");
require(
fee < 10000,
"Curator fee percentage must be less than 100%");
_houseIdTracker.increment();
uint256 houseId = _houseIdTracker.current();
houses[houseId] = House({
name: name,
curator: payable(curator),
fee: fee,
preApproved: preApproved,
metadata: metadata,
bids: 0,
sales: 0,
total: 0,
feesTotal: 0,
activeAuctions: 0,
rank: houseId
});
_curatorHouses[curator].add(houseId);
ranking[houseId] = houseId;
houseIDs[name] = houseId;
emit HouseCreated(
houseId
);
return houseId;
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| houseIDs[name]==0,"House name already exists" | 375,274 | houseIDs[name]==0 |
"Creator already added" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
require(<FILL_ME>)
_houseCreators[houseId].add(creator);
_creatorHouses[creator].add(houseId);
emit CreatorAdded(
houseId,
creator
);
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| _houseCreators[houseId].contains(creator)==false,"Creator already added" | 375,274 | _houseCreators[houseId].contains(creator)==false |
"Creator already removed" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
require(<FILL_ME>)
_houseCreators[houseId].remove(creator);
_creatorHouses[creator].remove(houseId);
emit CreatorRemoved(
houseId,
creator
);
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| _houseCreators[houseId].contains(creator)==true,"Creator already removed" | 375,274 | _houseCreators[houseId].contains(creator)==true |
"Must be approved by the house" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
require(
IERC165(tokenContract).supportsInterface(interfaceId),
"Token contract does not support ERC721 interface");
address tokenOwner = IERC721(tokenContract).ownerOf(tokenId);
require(
msg.sender == tokenOwner ||
msg.sender == IERC721(tokenContract).getApproved(tokenId),
"Must be token owner or approved");
uint16 fee = 0;
bool preApproved = true;
address curator = address(0);
if (houseId > 0) {
curator = houses[houseId].curator;
require(
curator != address(0),
"House does not exist");
require(<FILL_ME>)
fee = houses[houseId].fee;
preApproved = houses[houseId].preApproved;
houses[houseId].activeAuctions += 1;
}
if (contractIDs[tokenContract] == 0) {
registerTokenContract(tokenContract);
}
try ITux(tokenContract).tokenCreator(tokenId) returns (address creator) {
if (accounts[creator].creatorRank == 0) {
_creatorsTracker.increment();
uint256 creatorRank = _creatorsTracker.current();
creatorRanking[creatorRank] = creator;
accounts[creator].creatorRank = creatorRank;
creatorStats[creator] = CreatorStats({
bids: 0,
sales: 0,
total: 0
});
}
} catch {}
_auctionIdTracker.increment();
uint256 auctionId = _auctionIdTracker.current();
tokenAuction[keccak256(abi.encode(tokenContract, tokenId))] = auctionId;
_sellerAuctions[tokenOwner].add(auctionId);
bool approved = (curator == address(0) || preApproved || curator == tokenOwner);
if (houseId > 0) {
if (approved == true) {
_houseAuctions[houseId].add(auctionId);
}
else {
_houseQueue[houseId].add(auctionId);
}
}
else {
_activeAuctions.add(auctionId);
}
auctions[auctionId] = Auction({
tokenContract: tokenContract,
tokenId: tokenId,
tokenOwner: tokenOwner,
duration: duration,
reservePrice: reservePrice,
houseId: houseId,
fee: fee,
approved: approved,
firstBidTime: 0,
amount: 0,
bidder: payable(0),
created: block.timestamp
});
IERC721(tokenContract).transferFrom(tokenOwner, address(this), tokenId);
emit AuctionCreated(
auctionId
);
return auctionId;
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| _houseCreators[houseId].contains(tokenOwner)||msg.sender==curator,"Must be approved by the house" | 375,274 | _houseCreators[houseId].contains(tokenOwner)||msg.sender==curator |
"Auction already in this approved state" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
IAuctions.Auction storage auction = auctions[auctionId];
address curator = houses[auction.houseId].curator;
require(
curator != address(0) && curator == msg.sender,
"Must be auction curator");
require(
auction.firstBidTime == 0,
"Auction has already started");
require(<FILL_ME>)
auction.approved = approved;
if (approved == true) {
_houseAuctions[auction.houseId].add(auctionId);
_houseQueue[auction.houseId].remove(auctionId);
}
emit AuctionApprovalUpdated(
auctionId,
approved
);
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| (approved==true&&auction.approved==false)||(approved==false&&auction.approved==true),"Auction already in this approved state" | 375,274 | (approved==true&&auction.approved==false)||(approved==false&&auction.approved==true) |
"Auction must be approved by curator" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
IAuctions.Auction storage auction = auctions[auctionId];
require(<FILL_ME>)
require(
msg.value == amount,
"Sent ETH does not match specified bid amount");
require(
auction.firstBidTime == 0 ||
block.timestamp < auction.firstBidTime.add(auction.duration),
"Auction expired");
require(
amount >= auction.amount.add(
auction.amount.mul(minimumIncrementPercentage).div(10000)),
"Must send more than last bid by 5%");
require(
amount >= auction.reservePrice,
"Bid below reserve price");
address payable lastBidder = auction.bidder;
bool isFirstBid = true;
if (lastBidder != payable(0)) {
isFirstBid = false;
}
if (auction.firstBidTime == 0) {
auction.firstBidTime = block.timestamp;
} else if (isFirstBid == false) {
_handleOutgoingBid(lastBidder, auction.amount);
}
_handleIncomingBid(amount);
auction.amount = amount;
auction.bidder = payable(msg.sender);
_bidIdTracker.increment();
uint256 bidId = _bidIdTracker.current();
bids[bidId] = Bid({
timestamp: block.timestamp,
bidder: msg.sender,
value: amount
});
_auctionBids[auctionId].add(bidId);
_bidderAuctions[msg.sender].add(auctionId);
contracts[contractIDs[auction.tokenContract]].bids += 1;
try ITux(auction.tokenContract).tokenCreator(auction.tokenId) returns (address creator) {
if (creator == auction.tokenOwner) {
creatorStats[auction.tokenOwner].bids += 1;
}
uint256 creatorRank = accounts[creator].creatorRank;
if (creatorRank > 1) {
address rankedUp = creatorRanking[creatorRank - 1];
if (creatorStats[creator].bids > creatorStats[rankedUp].bids) {
accounts[creator].creatorRank -= 1;
accounts[rankedUp].creatorRank += 1;
creatorRanking[creatorRank - 1] = creator;
creatorRanking[creatorRank] = rankedUp;
}
}
} catch {}
uint256 collectorRank = accounts[msg.sender].collectorRank;
if (collectorRank == 0) {
_collectorsTracker.increment();
collectorRank = _collectorsTracker.current();
collectorRanking[collectorRank] = msg.sender;
accounts[msg.sender].collectorRank = collectorRank;
collectorStats[msg.sender] = CollectorStats({
bids: 0,
sales: 0,
bought: 0,
totalSold: 0,
totalSpent: 0
});
}
collectorStats[msg.sender].bids += 1;
if (collectorRank > 1) {
address rankedUp = collectorRanking[collectorRank - 1];
if (collectorStats[msg.sender].bids > collectorStats[rankedUp].bids) {
accounts[msg.sender].collectorRank -= 1;
accounts[rankedUp].collectorRank += 1;
collectorRanking[collectorRank - 1] = msg.sender;
collectorRanking[collectorRank] = rankedUp;
}
}
uint256 houseId = auction.houseId;
if (houseId > 0) {
houses[houseId].bids += 1;
uint256 rank = houses[houseId].rank;
if (rank > 1) {
uint256 rankedUpId = ranking[rank - 1];
if (houses[houseId].bids > houses[rankedUpId].bids) {
houses[houseId].rank -= 1;
houses[rankedUpId].rank += 1;
ranking[rank - 1] = houseId;
ranking[rank] = rankedUpId;
}
}
}
bool extended = false;
if (auction.duration > 0) {
uint256 timeRemaining = auction.firstBidTime.add(auction.duration).sub(block.timestamp);
if (timeRemaining < timeBuffer) {
auction.duration += timeBuffer.sub(timeRemaining);
extended = true;
}
}
emit AuctionBid(
auctionId,
msg.sender,
amount,
isFirstBid,
extended
);
if (extended) {
emit AuctionDurationExtended(
auctionId,
auction.duration
);
}
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| auction.approved,"Auction must be approved by curator" | 375,274 | auction.approved |
"Auction not started" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
IAuctions.Auction storage auction = auctions[auctionId];
require(<FILL_ME>)
require(
block.timestamp >=
auction.firstBidTime.add(auction.duration),
"Auction not completed");
try IERC721(auction.tokenContract).safeTransferFrom(
address(this), auction.bidder, auction.tokenId
) {} catch {
_handleOutgoingBid(auction.bidder, auction.amount);
_cancelAuction(auctionId);
return;
}
uint256 houseId = auction.houseId;
address curator = address(0);
uint256 curatorFee = 0;
uint256 tokenOwnerProfit = auction.amount;
uint256 contractId = contractIDs[auction.tokenContract];
collectorStats[auction.bidder].bought += 1;
collectorStats[auction.bidder].totalSpent += tokenOwnerProfit;
contracts[contractId].sales += 1;
contracts[contractId].total += tokenOwnerProfit;
try ITux(auction.tokenContract).tokenCreator(auction.tokenId) returns (address creator) {
if (creator == auction.tokenOwner) {
creatorStats[creator].sales += 1;
creatorStats[creator].total += tokenOwnerProfit;
} else {
collectorStats[auction.tokenOwner].sales += 1;
collectorStats[auction.tokenOwner].totalSold += tokenOwnerProfit;
}
} catch {
collectorStats[auction.tokenOwner].sales += 1;
collectorStats[auction.tokenOwner].totalSold += tokenOwnerProfit;
}
if (houseId > 0) {
curator = houses[houseId].curator;
houses[houseId].sales += 1;
houses[houseId].total += tokenOwnerProfit;
if (houses[houseId].activeAuctions > 0) {
houses[houseId].activeAuctions -= 1;
}
_houseAuctions[houseId].remove(auctionId);
}
else {
_activeAuctions.remove(auctionId);
}
uint256 contractRank = contracts[contractId].rank;
if (contractRank > 1) {
uint256 rankedUpContract = contractRanking[contractRank - 1];
if (contracts[contractId].bids > contracts[rankedUpContract].bids) {
contracts[contractId].rank -= 1;
contracts[rankedUpContract].rank += 1;
contractRanking[contractRank - 1] = contractId;
contractRanking[contractRank] = rankedUpContract;
}
}
if (curator != address(0)) {
curatorFee = tokenOwnerProfit.mul(auction.fee).div(10000);
tokenOwnerProfit = tokenOwnerProfit.sub(curatorFee);
_handleOutgoingBid(curator, curatorFee);
}
_handleOutgoingBid(auction.tokenOwner, tokenOwnerProfit);
if (houseId > 0) {
houses[houseId].feesTotal += curatorFee;
}
bytes32 auctionHash = keccak256(abi.encode(auction.tokenContract, auction.tokenId));
_previousTokenAuctions[auctionHash].add(auctionId);
delete tokenAuction[auctionHash];
uint256 i = _auctionBids[auctionId].length();
while (i > 0) {
uint256 bidId = _auctionBids[auctionId].at(i - 1);
_bidderAuctions[bids[bidId].bidder].remove(auctionId);
i--;
}
_sellerAuctions[auction.tokenOwner].remove(auctionId);
emit AuctionEnded(
auctionId
);
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| uint256(auction.firstBidTime)!=0,"Auction not started" | 375,274 | uint256(auction.firstBidTime)!=0 |
"Can only be called by auction creator" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
require(<FILL_ME>)
require(
uint256(auctions[auctionId].firstBidTime) == 0,
"Cannot cancel an auction once it has begun");
_cancelAuction(auctionId);
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| auctions[auctionId].tokenOwner==msg.sender,"Can only be called by auction creator" | 375,274 | auctions[auctionId].tokenOwner==msg.sender |
"Token contract already registered" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
require(<FILL_ME>)
_contractIdTracker.increment();
uint256 contractId = _contractIdTracker.current();
contractIDs[tokenContract] = contractId;
contractRanking[contractId] = contractId;
contracts[contractId] = TokenContract({
name: IERC721Metadata(tokenContract).name(),
tokenContract: tokenContract,
bids: 0,
sales: 0,
total: 0,
rank: contractId
});
return contractId;
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| contractIDs[tokenContract]==0,"Token contract already registered" | 375,274 | contractIDs[tokenContract]==0 |
'Auction exists for this token' | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
require(
IERC165(tokenContract).supportsInterface(interfaceId),
"Token contract does not support ERC721 interface");
bytes32 auctionHash = keccak256(abi.encode(tokenContract, tokenId));
require(<FILL_ME>)
require(
msg.value == amount,
"Sent ETH does not match specified offer amount");
_offerIdTracker.increment();
uint256 offerId = _offerIdTracker.current();
offers[offerId] = Offer({
tokenContract: tokenContract,
tokenId: tokenId,
from: msg.sender,
amount: amount
});
_tokenOffers[auctionHash].add(offerId);
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| tokenAuction[auctionHash]==0,'Auction exists for this token' | 375,274 | tokenAuction[auctionHash]==0 |
"ETH transfer failed" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import { ITux } from "./ITux.sol";
import { IAuctions } from "./IAuctions.sol";
import "./library/UintSet.sol";
import "./library/AddressSet.sol";
import "./library/OrderedSet.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract Auctions is
IAuctions,
ReentrancyGuard
{
using SafeMath for uint256;
using UintSet for UintSet.Set;
using AddressSet for AddressSet.Set;
using OrderedSet for OrderedSet.Set;
using Counters for Counters.Counter;
Counters.Counter private _bidIdTracker;
Counters.Counter private _houseIdTracker;
Counters.Counter private _auctionIdTracker;
Counters.Counter private _contractIdTracker;
Counters.Counter private _offerIdTracker;
Counters.Counter private _creatorsTracker;
Counters.Counter private _collectorsTracker;
// Minimum amount of time left in seconds to an auction after a new bid is placed
uint256 constant public timeBuffer = 900; // 15 minutes -> 900 seconds
// Minimum percentage difference between the last bid and the current bid
uint16 constant public minimumIncrementPercentage = 500; // 5%
// Mapping from house name to house ID
mapping(string => uint256) public houseIDs;
// Mapping from token contract to contract ID
mapping(address => uint256) public contractIDs;
// Mapping from keccak256(contract, token) to currently running auction ID
mapping(bytes32 => uint256) public tokenAuction;
// Mapping from rank to house ID
mapping(uint256 => uint256) public ranking;
// Mapping from rank to creator
mapping(uint256 => address) public creatorRanking;
// Mapping from rank to collector
mapping(uint256 => address) public collectorRanking;
// Mapping from rank to token contract ID
mapping(uint256 => uint256) public contractRanking;
// Mapping of token contracts
mapping(uint256 => IAuctions.TokenContract) public contracts;
// Mapping of auctions
mapping(uint256 => IAuctions.Auction) public auctions;
// Mapping of houses
mapping(uint256 => IAuctions.House) public houses;
// Mapping of bids
mapping(uint256 => IAuctions.Bid) public bids;
// Mapping of offers
mapping(uint256 => IAuctions.Offer) public offers;
// Mapping of accounts
mapping(address => IAuctions.Account) public accounts;
// Mapping from creator to stats
mapping(address => IAuctions.CreatorStats) public creatorStats;
// Mapping from collector to stats
mapping(address => IAuctions.CollectorStats) public collectorStats;
// Mapping from house ID to token IDs requiring approval
mapping(uint256 => UintSet.Set) private _houseQueue;
// Mapping from auction ID to bids
mapping(uint256 => UintSet.Set) private _auctionBids;
// Mapping from house ID to active auction IDs
mapping(uint256 => OrderedSet.Set) private _houseAuctions;
// Mapping from curator to enumerable house IDs
mapping(address => UintSet.Set) private _curatorHouses;
// Mapping from creator to enumerable house IDs
mapping(address => UintSet.Set) private _creatorHouses;
// Mapping from house id to enumerable creators
mapping(uint256 => AddressSet.Set) private _houseCreators;
// Mapping from seller to active auction IDs
mapping(address => UintSet.Set) private _sellerAuctions;
// Mapping from bidder to active auction IDs
mapping(address => UintSet.Set) private _bidderAuctions;
// Mapping from keccak256(contract, token) to previous auction IDs
mapping(bytes32 => UintSet.Set) private _previousTokenAuctions;
// Mapping from keccak256(contract, token) to offer IDs
mapping(bytes32 => UintSet.Set) private _tokenOffers;
// OrderedSet of active auction IDs without a house ID
OrderedSet.Set private _activeAuctions;
bytes4 constant interfaceId = 0x5b5e139f; // ERC721 interfaceId
modifier auctionExists(uint256 auctionId) {
}
modifier onlyHouseCurator(uint256 houseId) {
}
/*
* Constructor
*/
/* constructor() {} */
function totalHouses() public view override returns (uint256) {
}
function totalAuctions() public view override returns (uint256) {
}
function totalContracts() public view override returns (uint256) {
}
function totalCreators() public view override returns (uint256) {
}
function totalCollectors() public view override returns (uint256) {
}
function totalActiveAuctions() public view override returns (uint256) {
}
function totalActiveHouseAuctions(uint256 houseId) public view override returns (uint256) {
}
function getAuctions() public view override returns (uint256[] memory) {
}
function getAuctionsFromN(uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseAuctions(uint256 houseId) public view override returns (uint256[] memory) {
}
function getHouseAuctionsFromN(uint256 houseId, uint256 from, uint256 n) public view override returns (uint256[] memory) {
}
function getHouseQueue(uint256 houseId) public view override returns (uint256[] memory) {
}
function getAuctionBids(uint256 auctionId) public view override returns (uint256[] memory) {
}
function getCuratorHouses(address curator) public view override returns (uint256[] memory) {
}
function getCreatorHouses(address creator) public view override returns (uint256[] memory) {
}
function getHouseCreators(uint256 houseId) public view override returns (address[] memory) {
}
function getSellerAuctions(address seller) public view override returns (uint256[] memory) {
}
function getBidderAuctions(address bidder) public view override returns (uint256[] memory) {
}
function getPreviousAuctions(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function getTokenOffers(bytes32 tokenHash) public view override returns (uint256[] memory) {
}
function createHouse(
string memory name,
address curator,
uint16 fee,
bool preApproved,
string memory metadata
)
public
override
nonReentrant
returns (uint256)
{
}
function addCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function removeCreator(
uint256 houseId,
address creator
)
public
override
onlyHouseCurator(houseId)
{
}
function updateFee(
uint256 houseId,
uint16 fee
)
public
override
onlyHouseCurator(houseId)
{
}
function updateMetadata(
uint256 houseId,
string memory metadata
)
public
override
onlyHouseCurator(houseId)
{
}
function updateName(
string memory name
)
public
override
{
}
function updateBio(
string memory bioHash
)
public
override
{
}
function updatePicture(
string memory pictureHash
)
public
override
{
}
function createAuction(
address tokenContract,
uint256 tokenId,
uint256 duration,
uint256 reservePrice,
uint256 houseId
)
public
override
nonReentrant
returns (uint256)
{
}
function setAuctionApproval(uint256 auctionId, bool approved)
external
override
auctionExists(auctionId)
{
}
function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice)
external
override
auctionExists(auctionId)
{
}
function createBid(uint256 auctionId, uint256 amount)
external
override
payable
auctionExists(auctionId)
nonReentrant
{
}
function endAuction(uint256 auctionId)
external
override
auctionExists(auctionId)
nonReentrant
{
}
function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
}
function registerTokenContract(address tokenContract)
public
override
returns (uint256)
{
}
function makeOffer(address tokenContract, uint256 tokenId, uint256 amount)
public
override
payable
nonReentrant
{
}
function acceptOffer(uint256 offerId)
public
override
{
}
function cancelOffer(uint256 offerId)
public
override
{
}
function _handleIncomingBid(uint256 amount) internal {
}
function _handleOutgoingBid(address to, uint256 amount) internal {
require(<FILL_ME>)
}
function _safeTransferETH(address to, uint256 value) internal returns (bool) {
}
function _cancelAuction(uint256 auctionId) internal {
}
}
| _safeTransferETH(to,amount),"ETH transfer failed" | 375,274 | _safeTransferETH(to,amount) |
null | /*
* Visit: https://p4rty.io
* Discord: https://discord.gg/7y3DHYF
* P4RTY DICE
* Provably Fair Variable Chance DICE game
* Roll Under 2 to 99
* Play with ETH and play using previous winnings; withdraw anytime
* Upgradable and connects to P4RTY Bankroll
*/
contract Dice is Whitelist, SessionQueue {
using SafeMath for uint;
/*
* checks player profit, bet size and player number is within range
*/
modifier betIsValid(uint _betSize, uint _playerNumber) {
bool result = ((((_betSize * (100 - _playerNumber.sub(1))) / (_playerNumber.sub(1)) + _betSize)) * houseEdge / houseEdgeDivisor) - _betSize > maxProfit || _betSize < minBet || _playerNumber < minNumber || _playerNumber > maxNumber;
require(<FILL_ME>)
_;
}
/*
* checks game is currently active
*/
modifier gameIsActive {
}
/**
*
* Events
*/
event onSessionOpen(
uint indexed id,
uint block,
uint futureBlock,
address player,
uint wager,
uint rollUnder,
uint profit
);
event onSessionClose(
uint indexed id,
uint block,
uint futureBlock,
uint futureHash,
uint seed,
address player,
uint wager,
uint rollUnder,
uint dieRoll,
uint payout,
bool timeout
);
event onCredit(address player, uint amount);
event onWithdraw(address player, uint amount);
/**
*
* Structs
*/
struct Session {
uint id;
uint block;
uint futureBlock;
uint futureHash;
address player;
uint wager;
uint dieRoll;
uint seed;
uint rollUnder;
uint profit;
uint payout;
bool complete;
bool timeout;
}
struct Stats {
uint rolls;
uint wagered;
uint profit;
uint wins;
uint loss;
}
/*
* game vars
*/
uint constant public maxProfitDivisor = 1000000;
uint constant public houseEdgeDivisor = 1000;
uint constant public maxNumber = 99;
uint constant public minNumber = 2;
uint constant public futureDelta = 2;
uint internal sessionProcessingCap = 3;
bool public gamePaused;
bool public payoutsPaused;
uint public houseEdge;
uint public maxProfit;
uint public maxProfitAsPercentOfHouse;
uint maxPendingPayouts;
uint public minBet;
uint public totalSessions;
uint public totalBets;
uint public totalWon;
uint public totalWagered;
uint private seed;
/*
* player vars
*/
mapping(address => Session) sessions;
mapping(address => Stats) stats;
mapping(bytes32 => bytes32) playerBetId;
mapping(bytes32 => uint) playerBetValue;
mapping(bytes32 => uint) playerTempBetValue;
mapping(bytes32 => uint) playerDieResult;
mapping(bytes32 => uint) playerNumber;
mapping(address => uint) playerPendingWithdrawals;
mapping(bytes32 => uint) playerProfit;
mapping(bytes32 => uint) playerTempReward;
//The House
Bankroll public bankroll;
constructor() public {
}
/**
*
*Update BankRoll address
*/
function updateBankrollAddress(address bankrollAddress) onlyOwner public {
}
function contractBalance() internal view returns (uint256){
}
/**
*
*Play with ETH
*/
function play(uint rollUnder) payable public {
}
/**
*
*Play with balance
*/
function playWithVault(uint rollUnder, uint wager) public {
}
/*
* private
* player submit bet
* only if game is active & bet is valid
*/
function rollDice(uint rollUnder, uint wager) internal gameIsActive betIsValid(wager, rollUnder)
{
}
/// @dev Queue up dice session so that it can be processed by others
function queueSession(Session session) internal {
}
/// @dev Process sessions in bulk
function processSessions() internal {
}
/*
@dev Proceses the session if possible by the given player
*/
function closeSession() public {
}
/**
*
* Random num
*/
function random(Session session) private returns (uint256, uint256, uint256){
}
function profit(uint rollUnder, uint wager) public view returns (uint) {
}
/**
*
*Generates a unique sessionId and adds entropy to the overall random calc
*/
function generateSessionId(Session session) private view returns (uint256) {
}
/*
* Process roll
*/
function completeSession(address _customer) private returns (bool)
{
}
/// @dev Closes a session and fires event for audit
function closeSession(Session session) internal {
}
/// @dev Returns true if there is an active session
function isMining() public view returns (bool) {
}
/*
* public function
* Withdraw funds for current player
*/
function withdraw() public
{
}
/*
* Return the balance of a given player
*
*/
function balanceOf(address player) public view returns (uint) {
}
/// @dev Stats of any single address
function statsOf(address player) public view returns (uint256[5]){
}
/// @dev Returns the last roll of a complete session for an address
function lastSession(address player) public view returns (address, uint[7], bytes32[3], bool[2]) {
}
/*
* internal function
* sets max profit
*/
function setMaxProfit() internal {
}
/* only owner address can set houseEdge */
function ownerSetHouseEdge(uint newHouseEdge) public
onlyOwner
{
}
/* only owner address can set maxProfitAsPercentOfHouse */
function ownerSetMaxProfitAsPercentOfHouse(uint newMaxProfitAsPercent) public
onlyOwner
{
}
/* only owner address can set minBet */
function ownerSetMinBet(uint newMinimumBet) public
onlyOwner
{
}
/// @dev Set the maximum amount of sessions to be processed
function ownerSetProcessingCap(uint cap) public onlyOwner {
}
/* only owner address can set emergency pause #1 */
function ownerPauseGame(bool newStatus) public
onlyOwner
{
}
}
| !result | 375,299 | !result |
null | /*
* Visit: https://p4rty.io
* Discord: https://discord.gg/7y3DHYF
* P4RTY DICE
* Provably Fair Variable Chance DICE game
* Roll Under 2 to 99
* Play with ETH and play using previous winnings; withdraw anytime
* Upgradable and connects to P4RTY Bankroll
*/
contract Dice is Whitelist, SessionQueue {
using SafeMath for uint;
/*
* checks player profit, bet size and player number is within range
*/
modifier betIsValid(uint _betSize, uint _playerNumber) {
}
/*
* checks game is currently active
*/
modifier gameIsActive {
require(<FILL_ME>)
_;
}
/**
*
* Events
*/
event onSessionOpen(
uint indexed id,
uint block,
uint futureBlock,
address player,
uint wager,
uint rollUnder,
uint profit
);
event onSessionClose(
uint indexed id,
uint block,
uint futureBlock,
uint futureHash,
uint seed,
address player,
uint wager,
uint rollUnder,
uint dieRoll,
uint payout,
bool timeout
);
event onCredit(address player, uint amount);
event onWithdraw(address player, uint amount);
/**
*
* Structs
*/
struct Session {
uint id;
uint block;
uint futureBlock;
uint futureHash;
address player;
uint wager;
uint dieRoll;
uint seed;
uint rollUnder;
uint profit;
uint payout;
bool complete;
bool timeout;
}
struct Stats {
uint rolls;
uint wagered;
uint profit;
uint wins;
uint loss;
}
/*
* game vars
*/
uint constant public maxProfitDivisor = 1000000;
uint constant public houseEdgeDivisor = 1000;
uint constant public maxNumber = 99;
uint constant public minNumber = 2;
uint constant public futureDelta = 2;
uint internal sessionProcessingCap = 3;
bool public gamePaused;
bool public payoutsPaused;
uint public houseEdge;
uint public maxProfit;
uint public maxProfitAsPercentOfHouse;
uint maxPendingPayouts;
uint public minBet;
uint public totalSessions;
uint public totalBets;
uint public totalWon;
uint public totalWagered;
uint private seed;
/*
* player vars
*/
mapping(address => Session) sessions;
mapping(address => Stats) stats;
mapping(bytes32 => bytes32) playerBetId;
mapping(bytes32 => uint) playerBetValue;
mapping(bytes32 => uint) playerTempBetValue;
mapping(bytes32 => uint) playerDieResult;
mapping(bytes32 => uint) playerNumber;
mapping(address => uint) playerPendingWithdrawals;
mapping(bytes32 => uint) playerProfit;
mapping(bytes32 => uint) playerTempReward;
//The House
Bankroll public bankroll;
constructor() public {
}
/**
*
*Update BankRoll address
*/
function updateBankrollAddress(address bankrollAddress) onlyOwner public {
}
function contractBalance() internal view returns (uint256){
}
/**
*
*Play with ETH
*/
function play(uint rollUnder) payable public {
}
/**
*
*Play with balance
*/
function playWithVault(uint rollUnder, uint wager) public {
}
/*
* private
* player submit bet
* only if game is active & bet is valid
*/
function rollDice(uint rollUnder, uint wager) internal gameIsActive betIsValid(wager, rollUnder)
{
}
/// @dev Queue up dice session so that it can be processed by others
function queueSession(Session session) internal {
}
/// @dev Process sessions in bulk
function processSessions() internal {
}
/*
@dev Proceses the session if possible by the given player
*/
function closeSession() public {
}
/**
*
* Random num
*/
function random(Session session) private returns (uint256, uint256, uint256){
}
function profit(uint rollUnder, uint wager) public view returns (uint) {
}
/**
*
*Generates a unique sessionId and adds entropy to the overall random calc
*/
function generateSessionId(Session session) private view returns (uint256) {
}
/*
* Process roll
*/
function completeSession(address _customer) private returns (bool)
{
}
/// @dev Closes a session and fires event for audit
function closeSession(Session session) internal {
}
/// @dev Returns true if there is an active session
function isMining() public view returns (bool) {
}
/*
* public function
* Withdraw funds for current player
*/
function withdraw() public
{
}
/*
* Return the balance of a given player
*
*/
function balanceOf(address player) public view returns (uint) {
}
/// @dev Stats of any single address
function statsOf(address player) public view returns (uint256[5]){
}
/// @dev Returns the last roll of a complete session for an address
function lastSession(address player) public view returns (address, uint[7], bytes32[3], bool[2]) {
}
/*
* internal function
* sets max profit
*/
function setMaxProfit() internal {
}
/* only owner address can set houseEdge */
function ownerSetHouseEdge(uint newHouseEdge) public
onlyOwner
{
}
/* only owner address can set maxProfitAsPercentOfHouse */
function ownerSetMaxProfitAsPercentOfHouse(uint newMaxProfitAsPercent) public
onlyOwner
{
}
/* only owner address can set minBet */
function ownerSetMinBet(uint newMinimumBet) public
onlyOwner
{
}
/// @dev Set the maximum amount of sessions to be processed
function ownerSetProcessingCap(uint cap) public onlyOwner {
}
/* only owner address can set emergency pause #1 */
function ownerPauseGame(bool newStatus) public
onlyOwner
{
}
}
| !gamePaused | 375,299 | !gamePaused |
null | /*
* Visit: https://p4rty.io
* Discord: https://discord.gg/7y3DHYF
* P4RTY DICE
* Provably Fair Variable Chance DICE game
* Roll Under 2 to 99
* Play with ETH and play using previous winnings; withdraw anytime
* Upgradable and connects to P4RTY Bankroll
*/
contract Dice is Whitelist, SessionQueue {
using SafeMath for uint;
/*
* checks player profit, bet size and player number is within range
*/
modifier betIsValid(uint _betSize, uint _playerNumber) {
}
/*
* checks game is currently active
*/
modifier gameIsActive {
}
/**
*
* Events
*/
event onSessionOpen(
uint indexed id,
uint block,
uint futureBlock,
address player,
uint wager,
uint rollUnder,
uint profit
);
event onSessionClose(
uint indexed id,
uint block,
uint futureBlock,
uint futureHash,
uint seed,
address player,
uint wager,
uint rollUnder,
uint dieRoll,
uint payout,
bool timeout
);
event onCredit(address player, uint amount);
event onWithdraw(address player, uint amount);
/**
*
* Structs
*/
struct Session {
uint id;
uint block;
uint futureBlock;
uint futureHash;
address player;
uint wager;
uint dieRoll;
uint seed;
uint rollUnder;
uint profit;
uint payout;
bool complete;
bool timeout;
}
struct Stats {
uint rolls;
uint wagered;
uint profit;
uint wins;
uint loss;
}
/*
* game vars
*/
uint constant public maxProfitDivisor = 1000000;
uint constant public houseEdgeDivisor = 1000;
uint constant public maxNumber = 99;
uint constant public minNumber = 2;
uint constant public futureDelta = 2;
uint internal sessionProcessingCap = 3;
bool public gamePaused;
bool public payoutsPaused;
uint public houseEdge;
uint public maxProfit;
uint public maxProfitAsPercentOfHouse;
uint maxPendingPayouts;
uint public minBet;
uint public totalSessions;
uint public totalBets;
uint public totalWon;
uint public totalWagered;
uint private seed;
/*
* player vars
*/
mapping(address => Session) sessions;
mapping(address => Stats) stats;
mapping(bytes32 => bytes32) playerBetId;
mapping(bytes32 => uint) playerBetValue;
mapping(bytes32 => uint) playerTempBetValue;
mapping(bytes32 => uint) playerDieResult;
mapping(bytes32 => uint) playerNumber;
mapping(address => uint) playerPendingWithdrawals;
mapping(bytes32 => uint) playerProfit;
mapping(bytes32 => uint) playerTempReward;
//The House
Bankroll public bankroll;
constructor() public {
}
/**
*
*Update BankRoll address
*/
function updateBankrollAddress(address bankrollAddress) onlyOwner public {
}
function contractBalance() internal view returns (uint256){
}
/**
*
*Play with ETH
*/
function play(uint rollUnder) payable public {
}
/**
*
*Play with balance
*/
function playWithVault(uint rollUnder, uint wager) public {
//A player can play with a previous win which is store in their vault first
require(<FILL_ME>)
//Reduce credit
bankroll.debit(msg.sender, wager);
//Roll
rollDice(rollUnder, wager);
}
/*
* private
* player submit bet
* only if game is active & bet is valid
*/
function rollDice(uint rollUnder, uint wager) internal gameIsActive betIsValid(wager, rollUnder)
{
}
/// @dev Queue up dice session so that it can be processed by others
function queueSession(Session session) internal {
}
/// @dev Process sessions in bulk
function processSessions() internal {
}
/*
@dev Proceses the session if possible by the given player
*/
function closeSession() public {
}
/**
*
* Random num
*/
function random(Session session) private returns (uint256, uint256, uint256){
}
function profit(uint rollUnder, uint wager) public view returns (uint) {
}
/**
*
*Generates a unique sessionId and adds entropy to the overall random calc
*/
function generateSessionId(Session session) private view returns (uint256) {
}
/*
* Process roll
*/
function completeSession(address _customer) private returns (bool)
{
}
/// @dev Closes a session and fires event for audit
function closeSession(Session session) internal {
}
/// @dev Returns true if there is an active session
function isMining() public view returns (bool) {
}
/*
* public function
* Withdraw funds for current player
*/
function withdraw() public
{
}
/*
* Return the balance of a given player
*
*/
function balanceOf(address player) public view returns (uint) {
}
/// @dev Stats of any single address
function statsOf(address player) public view returns (uint256[5]){
}
/// @dev Returns the last roll of a complete session for an address
function lastSession(address player) public view returns (address, uint[7], bytes32[3], bool[2]) {
}
/*
* internal function
* sets max profit
*/
function setMaxProfit() internal {
}
/* only owner address can set houseEdge */
function ownerSetHouseEdge(uint newHouseEdge) public
onlyOwner
{
}
/* only owner address can set maxProfitAsPercentOfHouse */
function ownerSetMaxProfitAsPercentOfHouse(uint newMaxProfitAsPercent) public
onlyOwner
{
}
/* only owner address can set minBet */
function ownerSetMinBet(uint newMinimumBet) public
onlyOwner
{
}
/// @dev Set the maximum amount of sessions to be processed
function ownerSetProcessingCap(uint cap) public onlyOwner {
}
/* only owner address can set emergency pause #1 */
function ownerPauseGame(bool newStatus) public
onlyOwner
{
}
}
| bankroll.balanceOf(msg.sender)>=wager | 375,299 | bankroll.balanceOf(msg.sender)>=wager |
"Only one roll can be played at a time" | /*
* Visit: https://p4rty.io
* Discord: https://discord.gg/7y3DHYF
* P4RTY DICE
* Provably Fair Variable Chance DICE game
* Roll Under 2 to 99
* Play with ETH and play using previous winnings; withdraw anytime
* Upgradable and connects to P4RTY Bankroll
*/
contract Dice is Whitelist, SessionQueue {
using SafeMath for uint;
/*
* checks player profit, bet size and player number is within range
*/
modifier betIsValid(uint _betSize, uint _playerNumber) {
}
/*
* checks game is currently active
*/
modifier gameIsActive {
}
/**
*
* Events
*/
event onSessionOpen(
uint indexed id,
uint block,
uint futureBlock,
address player,
uint wager,
uint rollUnder,
uint profit
);
event onSessionClose(
uint indexed id,
uint block,
uint futureBlock,
uint futureHash,
uint seed,
address player,
uint wager,
uint rollUnder,
uint dieRoll,
uint payout,
bool timeout
);
event onCredit(address player, uint amount);
event onWithdraw(address player, uint amount);
/**
*
* Structs
*/
struct Session {
uint id;
uint block;
uint futureBlock;
uint futureHash;
address player;
uint wager;
uint dieRoll;
uint seed;
uint rollUnder;
uint profit;
uint payout;
bool complete;
bool timeout;
}
struct Stats {
uint rolls;
uint wagered;
uint profit;
uint wins;
uint loss;
}
/*
* game vars
*/
uint constant public maxProfitDivisor = 1000000;
uint constant public houseEdgeDivisor = 1000;
uint constant public maxNumber = 99;
uint constant public minNumber = 2;
uint constant public futureDelta = 2;
uint internal sessionProcessingCap = 3;
bool public gamePaused;
bool public payoutsPaused;
uint public houseEdge;
uint public maxProfit;
uint public maxProfitAsPercentOfHouse;
uint maxPendingPayouts;
uint public minBet;
uint public totalSessions;
uint public totalBets;
uint public totalWon;
uint public totalWagered;
uint private seed;
/*
* player vars
*/
mapping(address => Session) sessions;
mapping(address => Stats) stats;
mapping(bytes32 => bytes32) playerBetId;
mapping(bytes32 => uint) playerBetValue;
mapping(bytes32 => uint) playerTempBetValue;
mapping(bytes32 => uint) playerDieResult;
mapping(bytes32 => uint) playerNumber;
mapping(address => uint) playerPendingWithdrawals;
mapping(bytes32 => uint) playerProfit;
mapping(bytes32 => uint) playerTempReward;
//The House
Bankroll public bankroll;
constructor() public {
}
/**
*
*Update BankRoll address
*/
function updateBankrollAddress(address bankrollAddress) onlyOwner public {
}
function contractBalance() internal view returns (uint256){
}
/**
*
*Play with ETH
*/
function play(uint rollUnder) payable public {
}
/**
*
*Play with balance
*/
function playWithVault(uint rollUnder, uint wager) public {
}
/*
* private
* player submit bet
* only if game is active & bet is valid
*/
function rollDice(uint rollUnder, uint wager) internal gameIsActive betIsValid(wager, rollUnder)
{
//Complete previous sessions
processSessions();
Session memory session = sessions[msg.sender];
//Strictly cannot wager twice in the same block
require(block.number != session.block, "Only one roll can be played at a time");
// If there exists a roll, it must be completed
if (session.block != 0 && !session.complete) {
require(<FILL_ME>)
}
//Increment Sessions
totalSessions += 1;
//Invalidate passive session components so it is processed
session.complete = false;
session.timeout = false;
session.payout = 0;
session.block = block.number;
session.futureBlock = block.number + futureDelta;
session.player = msg.sender;
session.rollUnder = rollUnder;
session.wager = wager;
session.profit = profit(rollUnder, wager);
session.id = generateSessionId(session);
//Save new session
sessions[msg.sender] = session;
/* safely increase maxPendingPayouts liability - calc all pending payouts under assumption they win */
maxPendingPayouts = maxPendingPayouts.add(session.profit);
/* check contract can payout on win
*/
require(maxPendingPayouts < contractBalance(), "Reached maximum wagers supported");
/* total number of bets */
totalBets += 1;
/* total wagered */
totalWagered += session.wager;
/* Queue session, can be processed by another player */
queueSession(session);
/* Stats */
stats[session.player].rolls += 1;
stats[session.player].wagered += session.wager;
/* provides accurate numbers for listeners */
emit onSessionOpen(session.id, session.block, session.futureBlock, session.player, session.wager, session.rollUnder, session.profit);
}
/// @dev Queue up dice session so that it can be processed by others
function queueSession(Session session) internal {
}
/// @dev Process sessions in bulk
function processSessions() internal {
}
/*
@dev Proceses the session if possible by the given player
*/
function closeSession() public {
}
/**
*
* Random num
*/
function random(Session session) private returns (uint256, uint256, uint256){
}
function profit(uint rollUnder, uint wager) public view returns (uint) {
}
/**
*
*Generates a unique sessionId and adds entropy to the overall random calc
*/
function generateSessionId(Session session) private view returns (uint256) {
}
/*
* Process roll
*/
function completeSession(address _customer) private returns (bool)
{
}
/// @dev Closes a session and fires event for audit
function closeSession(Session session) internal {
}
/// @dev Returns true if there is an active session
function isMining() public view returns (bool) {
}
/*
* public function
* Withdraw funds for current player
*/
function withdraw() public
{
}
/*
* Return the balance of a given player
*
*/
function balanceOf(address player) public view returns (uint) {
}
/// @dev Stats of any single address
function statsOf(address player) public view returns (uint256[5]){
}
/// @dev Returns the last roll of a complete session for an address
function lastSession(address player) public view returns (address, uint[7], bytes32[3], bool[2]) {
}
/*
* internal function
* sets max profit
*/
function setMaxProfit() internal {
}
/* only owner address can set houseEdge */
function ownerSetHouseEdge(uint newHouseEdge) public
onlyOwner
{
}
/* only owner address can set maxProfitAsPercentOfHouse */
function ownerSetMaxProfitAsPercentOfHouse(uint newMaxProfitAsPercent) public
onlyOwner
{
}
/* only owner address can set minBet */
function ownerSetMinBet(uint newMinimumBet) public
onlyOwner
{
}
/// @dev Set the maximum amount of sessions to be processed
function ownerSetProcessingCap(uint cap) public onlyOwner {
}
/* only owner address can set emergency pause #1 */
function ownerPauseGame(bool newStatus) public
onlyOwner
{
}
}
| completeSession(msg.sender),"Only one roll can be played at a time" | 375,299 | completeSession(msg.sender) |
"ReNFT::invalid nft standard" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
uint256[] memory lentAmounts = new uint256[](cd.right - cd.left);
for (uint256 i = cd.left; i < cd.right; i++) {
bytes32 lendingIdentifier = keccak256(
abi.encodePacked(
cd.nftAddress[cd.left],
cd.tokenID[i],
cd.lendingID[i]
)
);
Lending storage lending = lendings[lendingIdentifier];
ensureIsNotNull(lending);
ensureIsStoppable(lending, msg.sender);
require(<FILL_ME>)
require(
lending.lendAmount == lending.availableAmount,
"ReNFT::actively rented"
);
lentAmounts[i - cd.left] = lending.lendAmount;
emit IRegistry.StopLend(cd.lendingID[i], uint32(block.timestamp));
delete lendings[lendingIdentifier];
}
safeTransfer(
cd,
address(this),
msg.sender,
sliceArr(cd.tokenID, cd.left, cd.right, 0),
sliceArr(lentAmounts, cd.left, cd.right, cd.left)
);
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.nftStandard[i]==lending.nftStandard,"ReNFT::invalid nft standard" | 375,307 | cd.nftStandard[i]==lending.nftStandard |
"ReNFT::invalid rent amount" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
for (uint256 i = cd.left; i < cd.right; i++) {
bytes32 lendingIdentifier = keccak256(
abi.encodePacked(
cd.nftAddress[cd.left],
cd.tokenID[i],
cd.lendingID[i]
)
);
bytes32 rentingIdentifier = keccak256(
abi.encodePacked(
cd.nftAddress[cd.left],
cd.tokenID[i],
rentingID
)
);
IRegistry.Lending storage lending = lendings[lendingIdentifier];
IRegistry.Renting storage renting = rentings[rentingIdentifier];
ensureIsNotNull(lending);
ensureIsNull(renting);
ensureIsRentable(lending, cd, i, msg.sender);
require(
cd.nftStandard[i] == lending.nftStandard,
"ReNFT::invalid nft standard"
);
require(<FILL_ME>)
uint8 paymentTokenIx = uint8(lending.paymentToken);
address paymentToken = resolver.getPaymentToken(paymentTokenIx);
uint256 decimals = ERC20(paymentToken).decimals();
{
uint256 scale = 10**decimals;
uint256 rentPrice = cd.rentAmount[i] *
cd.rentDuration[i] *
unpackPrice(lending.dailyRentPrice, scale);
require(rentPrice > 0, "ReNFT::rent price is zero");
ERC20(paymentToken).safeTransferFrom(
msg.sender,
address(this),
rentPrice
);
}
rentings[rentingIdentifier] = IRegistry.Renting({
renterAddress: payable(msg.sender),
rentAmount: uint16(cd.rentAmount[i]),
rentDuration: cd.rentDuration[i],
rentedAt: uint32(block.timestamp)
});
lendings[lendingIdentifier].availableAmount -= uint16(
cd.rentAmount[i]
);
emit IRegistry.Rent(
msg.sender,
cd.lendingID[i],
rentingID,
uint16(cd.rentAmount[i]),
cd.rentDuration[i],
renting.rentedAt
);
rentingID++;
}
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.rentAmount[i]<=lending.availableAmount,"ReNFT::invalid rent amount" | 375,307 | cd.rentAmount[i]<=lending.availableAmount |
"ReNFT::lend amount is zero" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
require(<FILL_ME>)
require(cd.lendAmount[i] <= type(uint16).max, "ReNFT::not uint16");
require(cd.maxRentDuration[i] > 0, "ReNFT::duration is zero");
require(cd.maxRentDuration[i] <= type(uint8).max, "ReNFT::not uint8");
require(uint32(cd.dailyRentPrice[i]) > 0, "ReNFT::rent price is zero");
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.lendAmount[i]>0,"ReNFT::lend amount is zero" | 375,307 | cd.lendAmount[i]>0 |
"ReNFT::not uint16" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
require(cd.lendAmount[i] > 0, "ReNFT::lend amount is zero");
require(<FILL_ME>)
require(cd.maxRentDuration[i] > 0, "ReNFT::duration is zero");
require(cd.maxRentDuration[i] <= type(uint8).max, "ReNFT::not uint8");
require(uint32(cd.dailyRentPrice[i]) > 0, "ReNFT::rent price is zero");
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.lendAmount[i]<=type(uint16).max,"ReNFT::not uint16" | 375,307 | cd.lendAmount[i]<=type(uint16).max |
"ReNFT::duration is zero" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
require(cd.lendAmount[i] > 0, "ReNFT::lend amount is zero");
require(cd.lendAmount[i] <= type(uint16).max, "ReNFT::not uint16");
require(<FILL_ME>)
require(cd.maxRentDuration[i] <= type(uint8).max, "ReNFT::not uint8");
require(uint32(cd.dailyRentPrice[i]) > 0, "ReNFT::rent price is zero");
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.maxRentDuration[i]>0,"ReNFT::duration is zero" | 375,307 | cd.maxRentDuration[i]>0 |
"ReNFT::not uint8" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
require(cd.lendAmount[i] > 0, "ReNFT::lend amount is zero");
require(cd.lendAmount[i] <= type(uint16).max, "ReNFT::not uint16");
require(cd.maxRentDuration[i] > 0, "ReNFT::duration is zero");
require(<FILL_ME>)
require(uint32(cd.dailyRentPrice[i]) > 0, "ReNFT::rent price is zero");
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.maxRentDuration[i]<=type(uint8).max,"ReNFT::not uint8" | 375,307 | cd.maxRentDuration[i]<=type(uint8).max |
"ReNFT::rent price is zero" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
require(cd.lendAmount[i] > 0, "ReNFT::lend amount is zero");
require(cd.lendAmount[i] <= type(uint16).max, "ReNFT::not uint16");
require(cd.maxRentDuration[i] > 0, "ReNFT::duration is zero");
require(cd.maxRentDuration[i] <= type(uint8).max, "ReNFT::not uint8");
require(<FILL_ME>)
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| uint32(cd.dailyRentPrice[i])>0,"ReNFT::rent price is zero" | 375,307 | uint32(cd.dailyRentPrice[i])>0 |
"ReNFT::not uint8" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
require(msgSender != lending.lenderAddress, "ReNFT::cant rent own nft");
require(<FILL_ME>)
require(cd.rentDuration[i] > 0, "ReNFT::duration is zero");
require(cd.rentAmount[i] <= type(uint16).max, "ReNFT::not uint16");
require(cd.rentAmount[i] > 0, "ReNFT::rentAmount is zero");
require(
cd.rentDuration[i] <= lending.maxRentDuration,
"ReNFT::rent duration exceeds allowed max"
);
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.rentDuration[i]<=type(uint8).max,"ReNFT::not uint8" | 375,307 | cd.rentDuration[i]<=type(uint8).max |
"ReNFT::duration is zero" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
require(msgSender != lending.lenderAddress, "ReNFT::cant rent own nft");
require(cd.rentDuration[i] <= type(uint8).max, "ReNFT::not uint8");
require(<FILL_ME>)
require(cd.rentAmount[i] <= type(uint16).max, "ReNFT::not uint16");
require(cd.rentAmount[i] > 0, "ReNFT::rentAmount is zero");
require(
cd.rentDuration[i] <= lending.maxRentDuration,
"ReNFT::rent duration exceeds allowed max"
);
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.rentDuration[i]>0,"ReNFT::duration is zero" | 375,307 | cd.rentDuration[i]>0 |
"ReNFT::not uint16" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
require(msgSender != lending.lenderAddress, "ReNFT::cant rent own nft");
require(cd.rentDuration[i] <= type(uint8).max, "ReNFT::not uint8");
require(cd.rentDuration[i] > 0, "ReNFT::duration is zero");
require(<FILL_ME>)
require(cd.rentAmount[i] > 0, "ReNFT::rentAmount is zero");
require(
cd.rentDuration[i] <= lending.maxRentDuration,
"ReNFT::rent duration exceeds allowed max"
);
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.rentAmount[i]<=type(uint16).max,"ReNFT::not uint16" | 375,307 | cd.rentAmount[i]<=type(uint16).max |
"ReNFT::rentAmount is zero" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
require(msgSender != lending.lenderAddress, "ReNFT::cant rent own nft");
require(cd.rentDuration[i] <= type(uint8).max, "ReNFT::not uint8");
require(cd.rentDuration[i] > 0, "ReNFT::duration is zero");
require(cd.rentAmount[i] <= type(uint16).max, "ReNFT::not uint16");
require(<FILL_ME>)
require(
cd.rentDuration[i] <= lending.maxRentDuration,
"ReNFT::rent duration exceeds allowed max"
);
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.rentAmount[i]>0,"ReNFT::rentAmount is zero" | 375,307 | cd.rentAmount[i]>0 |
"ReNFT::rent duration exceeds allowed max" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
require(msgSender != lending.lenderAddress, "ReNFT::cant rent own nft");
require(cd.rentDuration[i] <= type(uint8).max, "ReNFT::not uint8");
require(cd.rentDuration[i] > 0, "ReNFT::duration is zero");
require(cd.rentAmount[i] <= type(uint16).max, "ReNFT::not uint16");
require(cd.rentAmount[i] > 0, "ReNFT::rentAmount is zero");
require(<FILL_ME>)
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| cd.rentDuration[i]<=lending.maxRentDuration,"ReNFT::rent duration exceeds allowed max" | 375,307 | cd.rentDuration[i]<=lending.maxRentDuration |
"ReNFT::past return date" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
require(renting.renterAddress == msgSender, "ReNFT::not renter");
require(<FILL_ME>)
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| !isPastReturnDate(renting,blockTimestamp),"ReNFT::past return date" | 375,307 | !isPastReturnDate(renting,blockTimestamp) |
"ReNFT::invalid price" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
require(<FILL_ME>)
require(scale >= 10000, "ReNFT::invalid scale");
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| uint32(price)>0,"ReNFT::invalid price" | 375,307 | uint32(price)>0 |
"ReNFT::return date not passed" | // @@@@@@@@@@@@@@@@ ,@@@@@@@@@@@@@@@@
// @@@,,,,,,,,,,@@@ ,@@&,,,,,,,,,,@@@
// @@@@@@@@,,,,,,,,,,@@@@@@@@& ,@@&,,,,,,,,,,@@@@@@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& ,@@@@@@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@@@@@@& .@@@**********@@@@@@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@
// @@@**********@@@@@@@@@@@@@& .@@@@@@@@**********@@@@@@@@
// @@@@@@@@**********@@@@@@@@& .@@@**********@@@@@@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& .@@@//////////@@@@@@@@@@@@@
// @@@//////////@@@@@@@@& ,@@@@@@@@//////////@@@@@@@@@@@@@
// @@@%%%%%/////(((((@@@& ,@@@(((((/////%%%%%@@@@@@@@
// @@@@@@@@//////////@@@@@@@@& ,@@@//////////@@@@@@@@@@@@@
// @@@%%%%%%%%%%@@@@@@@@& ,@@@%%%%%%%%%%@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@& ,@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@& @@@@@@@@@@@@@@@@
contract Registry is IRegistry, ERC721Holder, ERC1155Receiver, ERC1155Holder {
using SafeERC20 for ERC20;
IResolver private resolver;
address private admin;
address payable private beneficiary;
uint256 private lendingID = 1;
uint256 private rentingID = 1;
bool public paused = false;
uint256 public rentFee = 0;
uint256 private constant SECONDS_IN_DAY = 86400;
mapping(bytes32 => Lending) private lendings;
mapping(bytes32 => Renting) private rentings;
modifier onlyAdmin() {
}
modifier notPaused() {
}
constructor(
address newResolver,
address payable newBeneficiary,
address newAdmin
) {
}
function lend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) external override notPaused {
}
function stopLend(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID
) external override notPaused {
}
function rent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) external payable override notPaused {
}
function stopRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
function claimRent(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) external override notPaused {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function handleLend(IRegistry.CallData memory cd) private {
}
function handleStopLend(IRegistry.CallData memory cd) private {
}
function handleRent(IRegistry.CallData memory cd) private {
}
function handleStopRent(IRegistry.CallData memory cd) private {
}
function handleClaimRent(CallData memory cd) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function bundleCall(
function(IRegistry.CallData memory) handler,
IRegistry.CallData memory cd
) private {
}
function takeFee(uint256 rentAmt, IResolver.PaymentToken paymentToken)
private
returns (uint256 fee)
{
}
function distributePayments(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting,
uint256 secondsSinceRentStart
) private {
}
function distributeClaimPayment(
IRegistry.Lending memory lending,
IRegistry.Renting memory renting
) private {
}
function safeTransfer(
CallData memory cd,
address from,
address to,
uint256[] memory tokenID,
uint256[] memory lendAmount
) private {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function getLending(
address nftAddress,
uint256 tokenID,
uint256 _lendingID
)
external
view
returns (
uint8,
address,
uint8,
bytes4,
uint16,
uint16,
uint8
)
{
}
function getRenting(
address nftAddress,
uint256 tokenID,
uint256 _rentingID
)
external
view
returns (
address,
uint16,
uint8,
uint32
)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function createLendCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory lendAmount,
uint8[] memory maxRentDuration,
bytes4[] memory dailyRentPrice,
IResolver.PaymentToken[] memory paymentToken
) private pure returns (CallData memory cd) {
}
function createRentCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint8[] memory rentDuration,
uint256[] memory rentAmount
) private pure returns (CallData memory cd) {
}
function createActionCallData(
IRegistry.NFTStandard[] memory nftStandard,
address[] memory nftAddress,
uint256[] memory tokenID,
uint256[] memory _lendingID,
uint256[] memory _rentingID
) private pure returns (CallData memory cd) {
}
function unpackPrice(bytes4 price, uint256 scale)
private
pure
returns (uint256)
{
}
function sliceArr(
uint256[] memory arr,
uint256 fromIx,
uint256 toIx,
uint256 arrOffset
) private pure returns (uint256[] memory r) {
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function ensureIsNotZeroAddr(address addr) private pure {
}
function ensureIsZeroAddr(address addr) private pure {
}
function ensureIsNull(Lending memory lending) private pure {
}
function ensureIsNotNull(Lending memory lending) private pure {
}
function ensureIsNull(Renting memory renting) private pure {
}
function ensureIsNotNull(Renting memory renting) private pure {
}
function ensureIsLendable(CallData memory cd, uint256 i) private pure {
}
function ensureIsRentable(
Lending memory lending,
CallData memory cd,
uint256 i,
address msgSender
) private pure {
}
function ensureIsReturnable(
Renting memory renting,
address msgSender,
uint256 blockTimestamp
) private pure {
}
function ensureIsStoppable(Lending memory lending, address msgSender)
private
pure
{
}
function ensureIsUnpackablePrice(bytes4 price, uint256 scale) private pure {
}
function ensureTokenNotSentinel(uint8 paymentIx) private pure {
}
function ensureIsClaimable(
IRegistry.Renting memory renting,
uint256 blockTimestamp
) private pure {
require(<FILL_ME>)
}
function isPastReturnDate(Renting memory renting, uint256 nowTime)
private
pure
returns (bool)
{
}
// .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
// `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.'
function setRentFee(uint256 newRentFee) external onlyAdmin {
}
function setBeneficiary(address payable newBeneficiary) external onlyAdmin {
}
function setPaused(bool newPaused) external onlyAdmin {
}
}
| isPastReturnDate(renting,blockTimestamp),"ReNFT::return date not passed" | 375,307 | isPastReturnDate(renting,blockTimestamp) |
"Signature Invalid" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC1155.sol";
import "./IERC1155.sol";
import "./Ownable.sol";
import "./Strings.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
contract MerchMintPass is ERC1155, EIP712, Ownable {
using Strings for string;
mapping(uint256 => uint256) private _totalSupply;
//signature
string private constant SINGING_DOMAIN = "MINTPASS";
string private constant SIGNATURE_VERSION = "1";
//constants
uint256 public burnedCounter;
uint256 public totalMinted;
uint256 public maxMintPerWallet = 1;
uint256 public maxMintPerWalletPuzzler = 1;
//mappings
mapping(uint256 => bool) private soldOut;
mapping(address => uint256) private mintCountMap;
mapping(address => uint256) private allowedMintCountMap;
mapping(address => uint256) private mintCountMapPuzzler;
mapping(address => uint256) private allowedMintCountMapPuzzler;
uint256 constant level1 = 1;
uint256 constant level2 = 2;
uint256 constant level3 = 3;
uint256 constant puzzler = 4;
event Redeemed(address indexed from, uint256 id, uint256 uuid);
string public _baseURI;
string public _contractURI;
bool saleLive = false;
bool burnLive = false;
constructor()
ERC1155(_baseURI)
EIP712(SINGING_DOMAIN, SIGNATURE_VERSION)
{}
function mintLevel1(uint256 qty, string memory name, bytes memory signature) public {
require(<FILL_ME>) //server side signature
require(saleLive, "sale is not live");
require(soldOut[level1] == false, "item out of stock");
require(allowedMintCount(msg.sender) >= 1,"You minted too many");
totalMinted = totalMinted + qty;
_totalSupply[level1] = _totalSupply[level1] + qty;
_mint(msg.sender, level1, qty, "0x0000");
updateMintCount(msg.sender);
}
function mintLevel2(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel3(uint256 qty, string memory name, bytes memory signature) public {
}
function mintPuzzler(uint256 qty, string memory name, bytes memory signature) public {
}
//redeem function
function burn(
address account,
uint256 id,
uint256 qty,
uint256 uuid
) public virtual {
}
function check(string memory name, bytes memory signature) public view returns (address) {
}
function _verify(string memory name, bytes memory signature) internal view returns (address) {
}
function _hash(string memory name) internal view returns (bytes32) {
}
function setBaseURI(string memory newuri) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function allowedMintCount(address minter) public view returns (uint256) {
}
function updateMintCount(address minter) private {
}
function allowedMintCountPuzzler(address minter) public view returns (uint256) {
}
function updateMintCountPuzzler(address minter) private {
}
function totalSupply(uint256 id) public view virtual returns (uint256) {
}
function exists(uint256 id) public view virtual returns (bool) {
}
// sets soldout
function setSoldOut(uint256 _id, bool isSoldOut) external onlyOwner {
}
// enables sales
function setSaleLive(bool _saleLive) external onlyOwner {
}
//max switch
function setMaxPerWallet(uint256 _newMaxMintAmount) public onlyOwner {
}
function setMaxPerWalletPuzzler(uint256 _newMaxMintAmount) public onlyOwner {
}
// enables burn
function setBurnLive(bool _burnLive) external onlyOwner {
}
function withdrawToOwner() external onlyOwner {
}
}
| check(name,signature)==msg.sender,"Signature Invalid" | 375,404 | check(name,signature)==msg.sender |
"item out of stock" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC1155.sol";
import "./IERC1155.sol";
import "./Ownable.sol";
import "./Strings.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
contract MerchMintPass is ERC1155, EIP712, Ownable {
using Strings for string;
mapping(uint256 => uint256) private _totalSupply;
//signature
string private constant SINGING_DOMAIN = "MINTPASS";
string private constant SIGNATURE_VERSION = "1";
//constants
uint256 public burnedCounter;
uint256 public totalMinted;
uint256 public maxMintPerWallet = 1;
uint256 public maxMintPerWalletPuzzler = 1;
//mappings
mapping(uint256 => bool) private soldOut;
mapping(address => uint256) private mintCountMap;
mapping(address => uint256) private allowedMintCountMap;
mapping(address => uint256) private mintCountMapPuzzler;
mapping(address => uint256) private allowedMintCountMapPuzzler;
uint256 constant level1 = 1;
uint256 constant level2 = 2;
uint256 constant level3 = 3;
uint256 constant puzzler = 4;
event Redeemed(address indexed from, uint256 id, uint256 uuid);
string public _baseURI;
string public _contractURI;
bool saleLive = false;
bool burnLive = false;
constructor()
ERC1155(_baseURI)
EIP712(SINGING_DOMAIN, SIGNATURE_VERSION)
{}
function mintLevel1(uint256 qty, string memory name, bytes memory signature) public {
require(check(name, signature) == msg.sender, "Signature Invalid"); //server side signature
require(saleLive, "sale is not live");
require(<FILL_ME>)
require(allowedMintCount(msg.sender) >= 1,"You minted too many");
totalMinted = totalMinted + qty;
_totalSupply[level1] = _totalSupply[level1] + qty;
_mint(msg.sender, level1, qty, "0x0000");
updateMintCount(msg.sender);
}
function mintLevel2(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel3(uint256 qty, string memory name, bytes memory signature) public {
}
function mintPuzzler(uint256 qty, string memory name, bytes memory signature) public {
}
//redeem function
function burn(
address account,
uint256 id,
uint256 qty,
uint256 uuid
) public virtual {
}
function check(string memory name, bytes memory signature) public view returns (address) {
}
function _verify(string memory name, bytes memory signature) internal view returns (address) {
}
function _hash(string memory name) internal view returns (bytes32) {
}
function setBaseURI(string memory newuri) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function allowedMintCount(address minter) public view returns (uint256) {
}
function updateMintCount(address minter) private {
}
function allowedMintCountPuzzler(address minter) public view returns (uint256) {
}
function updateMintCountPuzzler(address minter) private {
}
function totalSupply(uint256 id) public view virtual returns (uint256) {
}
function exists(uint256 id) public view virtual returns (bool) {
}
// sets soldout
function setSoldOut(uint256 _id, bool isSoldOut) external onlyOwner {
}
// enables sales
function setSaleLive(bool _saleLive) external onlyOwner {
}
//max switch
function setMaxPerWallet(uint256 _newMaxMintAmount) public onlyOwner {
}
function setMaxPerWalletPuzzler(uint256 _newMaxMintAmount) public onlyOwner {
}
// enables burn
function setBurnLive(bool _burnLive) external onlyOwner {
}
function withdrawToOwner() external onlyOwner {
}
}
| soldOut[level1]==false,"item out of stock" | 375,404 | soldOut[level1]==false |
"You minted too many" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC1155.sol";
import "./IERC1155.sol";
import "./Ownable.sol";
import "./Strings.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
contract MerchMintPass is ERC1155, EIP712, Ownable {
using Strings for string;
mapping(uint256 => uint256) private _totalSupply;
//signature
string private constant SINGING_DOMAIN = "MINTPASS";
string private constant SIGNATURE_VERSION = "1";
//constants
uint256 public burnedCounter;
uint256 public totalMinted;
uint256 public maxMintPerWallet = 1;
uint256 public maxMintPerWalletPuzzler = 1;
//mappings
mapping(uint256 => bool) private soldOut;
mapping(address => uint256) private mintCountMap;
mapping(address => uint256) private allowedMintCountMap;
mapping(address => uint256) private mintCountMapPuzzler;
mapping(address => uint256) private allowedMintCountMapPuzzler;
uint256 constant level1 = 1;
uint256 constant level2 = 2;
uint256 constant level3 = 3;
uint256 constant puzzler = 4;
event Redeemed(address indexed from, uint256 id, uint256 uuid);
string public _baseURI;
string public _contractURI;
bool saleLive = false;
bool burnLive = false;
constructor()
ERC1155(_baseURI)
EIP712(SINGING_DOMAIN, SIGNATURE_VERSION)
{}
function mintLevel1(uint256 qty, string memory name, bytes memory signature) public {
require(check(name, signature) == msg.sender, "Signature Invalid"); //server side signature
require(saleLive, "sale is not live");
require(soldOut[level1] == false, "item out of stock");
require(<FILL_ME>)
totalMinted = totalMinted + qty;
_totalSupply[level1] = _totalSupply[level1] + qty;
_mint(msg.sender, level1, qty, "0x0000");
updateMintCount(msg.sender);
}
function mintLevel2(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel3(uint256 qty, string memory name, bytes memory signature) public {
}
function mintPuzzler(uint256 qty, string memory name, bytes memory signature) public {
}
//redeem function
function burn(
address account,
uint256 id,
uint256 qty,
uint256 uuid
) public virtual {
}
function check(string memory name, bytes memory signature) public view returns (address) {
}
function _verify(string memory name, bytes memory signature) internal view returns (address) {
}
function _hash(string memory name) internal view returns (bytes32) {
}
function setBaseURI(string memory newuri) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function allowedMintCount(address minter) public view returns (uint256) {
}
function updateMintCount(address minter) private {
}
function allowedMintCountPuzzler(address minter) public view returns (uint256) {
}
function updateMintCountPuzzler(address minter) private {
}
function totalSupply(uint256 id) public view virtual returns (uint256) {
}
function exists(uint256 id) public view virtual returns (bool) {
}
// sets soldout
function setSoldOut(uint256 _id, bool isSoldOut) external onlyOwner {
}
// enables sales
function setSaleLive(bool _saleLive) external onlyOwner {
}
//max switch
function setMaxPerWallet(uint256 _newMaxMintAmount) public onlyOwner {
}
function setMaxPerWalletPuzzler(uint256 _newMaxMintAmount) public onlyOwner {
}
// enables burn
function setBurnLive(bool _burnLive) external onlyOwner {
}
function withdrawToOwner() external onlyOwner {
}
}
| allowedMintCount(msg.sender)>=1,"You minted too many" | 375,404 | allowedMintCount(msg.sender)>=1 |
"item out of stock" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC1155.sol";
import "./IERC1155.sol";
import "./Ownable.sol";
import "./Strings.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
contract MerchMintPass is ERC1155, EIP712, Ownable {
using Strings for string;
mapping(uint256 => uint256) private _totalSupply;
//signature
string private constant SINGING_DOMAIN = "MINTPASS";
string private constant SIGNATURE_VERSION = "1";
//constants
uint256 public burnedCounter;
uint256 public totalMinted;
uint256 public maxMintPerWallet = 1;
uint256 public maxMintPerWalletPuzzler = 1;
//mappings
mapping(uint256 => bool) private soldOut;
mapping(address => uint256) private mintCountMap;
mapping(address => uint256) private allowedMintCountMap;
mapping(address => uint256) private mintCountMapPuzzler;
mapping(address => uint256) private allowedMintCountMapPuzzler;
uint256 constant level1 = 1;
uint256 constant level2 = 2;
uint256 constant level3 = 3;
uint256 constant puzzler = 4;
event Redeemed(address indexed from, uint256 id, uint256 uuid);
string public _baseURI;
string public _contractURI;
bool saleLive = false;
bool burnLive = false;
constructor()
ERC1155(_baseURI)
EIP712(SINGING_DOMAIN, SIGNATURE_VERSION)
{}
function mintLevel1(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel2(uint256 qty, string memory name, bytes memory signature) public {
require(check(name, signature) == msg.sender, "Signature Invalid"); //server side signature
require(saleLive, "sale is not live");
require(<FILL_ME>)
require(allowedMintCount(msg.sender) >= 1,"You minted too many");
totalMinted = totalMinted + qty;
_totalSupply[level2] = _totalSupply[level2] + qty;
_mint(msg.sender, level1, qty, "0x0000");
_mint(msg.sender, level2, qty, "0x0000");
updateMintCount(msg.sender);
}
function mintLevel3(uint256 qty, string memory name, bytes memory signature) public {
}
function mintPuzzler(uint256 qty, string memory name, bytes memory signature) public {
}
//redeem function
function burn(
address account,
uint256 id,
uint256 qty,
uint256 uuid
) public virtual {
}
function check(string memory name, bytes memory signature) public view returns (address) {
}
function _verify(string memory name, bytes memory signature) internal view returns (address) {
}
function _hash(string memory name) internal view returns (bytes32) {
}
function setBaseURI(string memory newuri) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function allowedMintCount(address minter) public view returns (uint256) {
}
function updateMintCount(address minter) private {
}
function allowedMintCountPuzzler(address minter) public view returns (uint256) {
}
function updateMintCountPuzzler(address minter) private {
}
function totalSupply(uint256 id) public view virtual returns (uint256) {
}
function exists(uint256 id) public view virtual returns (bool) {
}
// sets soldout
function setSoldOut(uint256 _id, bool isSoldOut) external onlyOwner {
}
// enables sales
function setSaleLive(bool _saleLive) external onlyOwner {
}
//max switch
function setMaxPerWallet(uint256 _newMaxMintAmount) public onlyOwner {
}
function setMaxPerWalletPuzzler(uint256 _newMaxMintAmount) public onlyOwner {
}
// enables burn
function setBurnLive(bool _burnLive) external onlyOwner {
}
function withdrawToOwner() external onlyOwner {
}
}
| soldOut[level2]==false,"item out of stock" | 375,404 | soldOut[level2]==false |
"item out of stock" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC1155.sol";
import "./IERC1155.sol";
import "./Ownable.sol";
import "./Strings.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
contract MerchMintPass is ERC1155, EIP712, Ownable {
using Strings for string;
mapping(uint256 => uint256) private _totalSupply;
//signature
string private constant SINGING_DOMAIN = "MINTPASS";
string private constant SIGNATURE_VERSION = "1";
//constants
uint256 public burnedCounter;
uint256 public totalMinted;
uint256 public maxMintPerWallet = 1;
uint256 public maxMintPerWalletPuzzler = 1;
//mappings
mapping(uint256 => bool) private soldOut;
mapping(address => uint256) private mintCountMap;
mapping(address => uint256) private allowedMintCountMap;
mapping(address => uint256) private mintCountMapPuzzler;
mapping(address => uint256) private allowedMintCountMapPuzzler;
uint256 constant level1 = 1;
uint256 constant level2 = 2;
uint256 constant level3 = 3;
uint256 constant puzzler = 4;
event Redeemed(address indexed from, uint256 id, uint256 uuid);
string public _baseURI;
string public _contractURI;
bool saleLive = false;
bool burnLive = false;
constructor()
ERC1155(_baseURI)
EIP712(SINGING_DOMAIN, SIGNATURE_VERSION)
{}
function mintLevel1(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel2(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel3(uint256 qty, string memory name, bytes memory signature) public {
require(check(name, signature) == msg.sender, "Signature Invalid"); //server side signature
require(saleLive, "sale is not live");
require(<FILL_ME>)
require(allowedMintCount(msg.sender) >= 1,"You already minted");
totalMinted = totalMinted + qty;
_totalSupply[level3] = _totalSupply[level3] + qty;
_mint(msg.sender, level1, qty, "0x0000");
_mint(msg.sender, level2, qty, "0x0000");
_mint(msg.sender, level3, qty, "0x0000");
updateMintCount(msg.sender);
}
function mintPuzzler(uint256 qty, string memory name, bytes memory signature) public {
}
//redeem function
function burn(
address account,
uint256 id,
uint256 qty,
uint256 uuid
) public virtual {
}
function check(string memory name, bytes memory signature) public view returns (address) {
}
function _verify(string memory name, bytes memory signature) internal view returns (address) {
}
function _hash(string memory name) internal view returns (bytes32) {
}
function setBaseURI(string memory newuri) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function allowedMintCount(address minter) public view returns (uint256) {
}
function updateMintCount(address minter) private {
}
function allowedMintCountPuzzler(address minter) public view returns (uint256) {
}
function updateMintCountPuzzler(address minter) private {
}
function totalSupply(uint256 id) public view virtual returns (uint256) {
}
function exists(uint256 id) public view virtual returns (bool) {
}
// sets soldout
function setSoldOut(uint256 _id, bool isSoldOut) external onlyOwner {
}
// enables sales
function setSaleLive(bool _saleLive) external onlyOwner {
}
//max switch
function setMaxPerWallet(uint256 _newMaxMintAmount) public onlyOwner {
}
function setMaxPerWalletPuzzler(uint256 _newMaxMintAmount) public onlyOwner {
}
// enables burn
function setBurnLive(bool _burnLive) external onlyOwner {
}
function withdrawToOwner() external onlyOwner {
}
}
| soldOut[level3]==false,"item out of stock" | 375,404 | soldOut[level3]==false |
"item out of stock" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC1155.sol";
import "./IERC1155.sol";
import "./Ownable.sol";
import "./Strings.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
contract MerchMintPass is ERC1155, EIP712, Ownable {
using Strings for string;
mapping(uint256 => uint256) private _totalSupply;
//signature
string private constant SINGING_DOMAIN = "MINTPASS";
string private constant SIGNATURE_VERSION = "1";
//constants
uint256 public burnedCounter;
uint256 public totalMinted;
uint256 public maxMintPerWallet = 1;
uint256 public maxMintPerWalletPuzzler = 1;
//mappings
mapping(uint256 => bool) private soldOut;
mapping(address => uint256) private mintCountMap;
mapping(address => uint256) private allowedMintCountMap;
mapping(address => uint256) private mintCountMapPuzzler;
mapping(address => uint256) private allowedMintCountMapPuzzler;
uint256 constant level1 = 1;
uint256 constant level2 = 2;
uint256 constant level3 = 3;
uint256 constant puzzler = 4;
event Redeemed(address indexed from, uint256 id, uint256 uuid);
string public _baseURI;
string public _contractURI;
bool saleLive = false;
bool burnLive = false;
constructor()
ERC1155(_baseURI)
EIP712(SINGING_DOMAIN, SIGNATURE_VERSION)
{}
function mintLevel1(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel2(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel3(uint256 qty, string memory name, bytes memory signature) public {
}
function mintPuzzler(uint256 qty, string memory name, bytes memory signature) public {
require(check(name, signature) == msg.sender, "Signature Invalid"); //server side signature
require(saleLive, "sale is not live");
require(<FILL_ME>)
require(allowedMintCountPuzzler(msg.sender) >= 1,"You already minted");
totalMinted = totalMinted + qty;
_totalSupply[puzzler] = _totalSupply[puzzler] + qty;
_mint(msg.sender, puzzler, qty, "0x0000");
updateMintCountPuzzler(msg.sender);
}
//redeem function
function burn(
address account,
uint256 id,
uint256 qty,
uint256 uuid
) public virtual {
}
function check(string memory name, bytes memory signature) public view returns (address) {
}
function _verify(string memory name, bytes memory signature) internal view returns (address) {
}
function _hash(string memory name) internal view returns (bytes32) {
}
function setBaseURI(string memory newuri) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function allowedMintCount(address minter) public view returns (uint256) {
}
function updateMintCount(address minter) private {
}
function allowedMintCountPuzzler(address minter) public view returns (uint256) {
}
function updateMintCountPuzzler(address minter) private {
}
function totalSupply(uint256 id) public view virtual returns (uint256) {
}
function exists(uint256 id) public view virtual returns (bool) {
}
// sets soldout
function setSoldOut(uint256 _id, bool isSoldOut) external onlyOwner {
}
// enables sales
function setSaleLive(bool _saleLive) external onlyOwner {
}
//max switch
function setMaxPerWallet(uint256 _newMaxMintAmount) public onlyOwner {
}
function setMaxPerWalletPuzzler(uint256 _newMaxMintAmount) public onlyOwner {
}
// enables burn
function setBurnLive(bool _burnLive) external onlyOwner {
}
function withdrawToOwner() external onlyOwner {
}
}
| soldOut[puzzler]==false,"item out of stock" | 375,404 | soldOut[puzzler]==false |
"You already minted" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC1155.sol";
import "./IERC1155.sol";
import "./Ownable.sol";
import "./Strings.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
contract MerchMintPass is ERC1155, EIP712, Ownable {
using Strings for string;
mapping(uint256 => uint256) private _totalSupply;
//signature
string private constant SINGING_DOMAIN = "MINTPASS";
string private constant SIGNATURE_VERSION = "1";
//constants
uint256 public burnedCounter;
uint256 public totalMinted;
uint256 public maxMintPerWallet = 1;
uint256 public maxMintPerWalletPuzzler = 1;
//mappings
mapping(uint256 => bool) private soldOut;
mapping(address => uint256) private mintCountMap;
mapping(address => uint256) private allowedMintCountMap;
mapping(address => uint256) private mintCountMapPuzzler;
mapping(address => uint256) private allowedMintCountMapPuzzler;
uint256 constant level1 = 1;
uint256 constant level2 = 2;
uint256 constant level3 = 3;
uint256 constant puzzler = 4;
event Redeemed(address indexed from, uint256 id, uint256 uuid);
string public _baseURI;
string public _contractURI;
bool saleLive = false;
bool burnLive = false;
constructor()
ERC1155(_baseURI)
EIP712(SINGING_DOMAIN, SIGNATURE_VERSION)
{}
function mintLevel1(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel2(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel3(uint256 qty, string memory name, bytes memory signature) public {
}
function mintPuzzler(uint256 qty, string memory name, bytes memory signature) public {
require(check(name, signature) == msg.sender, "Signature Invalid"); //server side signature
require(saleLive, "sale is not live");
require(soldOut[puzzler] == false, "item out of stock");
require(<FILL_ME>)
totalMinted = totalMinted + qty;
_totalSupply[puzzler] = _totalSupply[puzzler] + qty;
_mint(msg.sender, puzzler, qty, "0x0000");
updateMintCountPuzzler(msg.sender);
}
//redeem function
function burn(
address account,
uint256 id,
uint256 qty,
uint256 uuid
) public virtual {
}
function check(string memory name, bytes memory signature) public view returns (address) {
}
function _verify(string memory name, bytes memory signature) internal view returns (address) {
}
function _hash(string memory name) internal view returns (bytes32) {
}
function setBaseURI(string memory newuri) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function allowedMintCount(address minter) public view returns (uint256) {
}
function updateMintCount(address minter) private {
}
function allowedMintCountPuzzler(address minter) public view returns (uint256) {
}
function updateMintCountPuzzler(address minter) private {
}
function totalSupply(uint256 id) public view virtual returns (uint256) {
}
function exists(uint256 id) public view virtual returns (bool) {
}
// sets soldout
function setSoldOut(uint256 _id, bool isSoldOut) external onlyOwner {
}
// enables sales
function setSaleLive(bool _saleLive) external onlyOwner {
}
//max switch
function setMaxPerWallet(uint256 _newMaxMintAmount) public onlyOwner {
}
function setMaxPerWalletPuzzler(uint256 _newMaxMintAmount) public onlyOwner {
}
// enables burn
function setBurnLive(bool _burnLive) external onlyOwner {
}
function withdrawToOwner() external onlyOwner {
}
}
| allowedMintCountPuzzler(msg.sender)>=1,"You already minted" | 375,404 | allowedMintCountPuzzler(msg.sender)>=1 |
"balance too low" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC1155.sol";
import "./IERC1155.sol";
import "./Ownable.sol";
import "./Strings.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
contract MerchMintPass is ERC1155, EIP712, Ownable {
using Strings for string;
mapping(uint256 => uint256) private _totalSupply;
//signature
string private constant SINGING_DOMAIN = "MINTPASS";
string private constant SIGNATURE_VERSION = "1";
//constants
uint256 public burnedCounter;
uint256 public totalMinted;
uint256 public maxMintPerWallet = 1;
uint256 public maxMintPerWalletPuzzler = 1;
//mappings
mapping(uint256 => bool) private soldOut;
mapping(address => uint256) private mintCountMap;
mapping(address => uint256) private allowedMintCountMap;
mapping(address => uint256) private mintCountMapPuzzler;
mapping(address => uint256) private allowedMintCountMapPuzzler;
uint256 constant level1 = 1;
uint256 constant level2 = 2;
uint256 constant level3 = 3;
uint256 constant puzzler = 4;
event Redeemed(address indexed from, uint256 id, uint256 uuid);
string public _baseURI;
string public _contractURI;
bool saleLive = false;
bool burnLive = false;
constructor()
ERC1155(_baseURI)
EIP712(SINGING_DOMAIN, SIGNATURE_VERSION)
{}
function mintLevel1(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel2(uint256 qty, string memory name, bytes memory signature) public {
}
function mintLevel3(uint256 qty, string memory name, bytes memory signature) public {
}
function mintPuzzler(uint256 qty, string memory name, bytes memory signature) public {
}
//redeem function
function burn(
address account,
uint256 id,
uint256 qty,
uint256 uuid
) public virtual {
require(burnLive, "burn is not enabled");
require(
account == _msgSender() || isApprovedForAll(account, _msgSender()),
"ERC1155: caller is not owner nor approved"
);
require(<FILL_ME>)
burnedCounter = burnedCounter + qty;
_burn(account, id, qty);
emit Redeemed(account, id, uuid);
}
function check(string memory name, bytes memory signature) public view returns (address) {
}
function _verify(string memory name, bytes memory signature) internal view returns (address) {
}
function _hash(string memory name) internal view returns (bytes32) {
}
function setBaseURI(string memory newuri) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function allowedMintCount(address minter) public view returns (uint256) {
}
function updateMintCount(address minter) private {
}
function allowedMintCountPuzzler(address minter) public view returns (uint256) {
}
function updateMintCountPuzzler(address minter) private {
}
function totalSupply(uint256 id) public view virtual returns (uint256) {
}
function exists(uint256 id) public view virtual returns (bool) {
}
// sets soldout
function setSoldOut(uint256 _id, bool isSoldOut) external onlyOwner {
}
// enables sales
function setSaleLive(bool _saleLive) external onlyOwner {
}
//max switch
function setMaxPerWallet(uint256 _newMaxMintAmount) public onlyOwner {
}
function setMaxPerWalletPuzzler(uint256 _newMaxMintAmount) public onlyOwner {
}
// enables burn
function setBurnLive(bool _burnLive) external onlyOwner {
}
function withdrawToOwner() external onlyOwner {
}
}
| balanceOf(account,id)>=qty,"balance too low" | 375,404 | balanceOf(account,id)>=qty |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.