comment
stringlengths
1
211
βŒ€
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Address not found."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNWWMMMMMMMMMMMMMMMMMMWWNNWWMMMMMMMMMMMMMMMMMMMWMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKxood0WMMMMMMMMMMMMMMMMNOdoodOXWMMMMMMMMMMMMMMMMNK0K00KWMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOo;;;;oKWMMMMMMMMMMMMMMW0l;;;;ckNMMMMMMMMMMMMMMMMWK0OkxONMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKko;;;;l0WMMMMMMMMMMMMMMMNkolclxXWMMMMMMMMMMMMMMMMMWWWWWWWMMM MMMWNNWMMMMWNNXNNWMMMMMWWNXXNNWMMMMMMMMMMMWNNXKKXXNWWMMMMMWKko;;;;l0WWWXXKKXNWWMMMMMMWX00KNMMMMMMMWWNXXKXXNWWMMMMMMMMMMM MNKxood0NXOdolllodOXWN0xollllldkKWMMMMMWXOxolcccccldx0NWMMWKko;;;;lO0kolccccldkKWMMMW0dlloONMMMWN0kdlcccccldkKNMMMMMMMMM W0l;;;;col:;;;;;;;:lxo:;;;;;;;;:lONMMW0dc:;;;;;;;;;;;:lkXWWKko;;;;clc:;;;;;;;;:cxKWMXd;;;;l0WMN0o:;;;;::;;;;;cd0WMMMMMMM WOc;;;;;;clool:;;;;;;;:lool:;;;;;l0WNkc;;;;:ldxxxoc:;;;:o0NKko;;;;;;:ldkkxoc;;;;:o0WKo;;;;l0WXxc;;;:lxkOkdl:;;;lONMMMMMM WOl;;;;:o0NNNKkc;;;;;lOXNNXOl;;;;:xXk:;;;:oONWWWWNKxc;;;;l0KOo;;;;;lkXWWMWN0o:;;;;dKKo;;;;l0Xkc;;;cxKWWWWN0o:;;;l0WMMMMM W0l;;;;cONMMMWXd;;;;:kNMMMMNx:;;;:xOl;;;;l0WMMMMMMWXxc;;;:x0Oo;;;;cONMMMMMMWKo;;;;cOKo;;;;l00o;;;;cdkkkkkkko:;;;cxNMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xOl;;;:dXMMMMMMMMWOl;;;;d0Oo;;;;l0WMMMMMMMXd:;;;ckKo;;;;l00l;;;;;:::::::::;;;:cONMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:x0o;;;;l0WMMMMMMWXx:;;;:x0Oo;;;;ckNMMMMMMWKo;;;;cOKo;;;;l00o:;;;coxkkkkkkkkkkOKNWMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xKkc;;;;lkXNWWWNKxc;;;;oKKko;;;;;cxKNWWNXOo:;;;:dXKo;;;;l0Xkc;;;:d0NWWWWWXKOOXWMMMMMMM WOl;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xXNkl:;;;:codddoc:;;;:dKWKOo;;;;;;:codddl:;;;;:oKWXo;;;;l0NXkc;;;;cdxkkxdlc;:oKMMMMMMM W0l;;;;l0WMMMMNx:;;;cOWMMMMNkc;;;:xNWWKxl:;;;;;;;;;;;coONWWX0d;;;;clc:;;;;;;;;:lkXWWXd:;;;l0WMW0dc:;;;;;;;;;;:cxXMMMMMMM MN0dlloONMMMMMWKxllokXWMMMMWXkollxXWMMMWX0xdollllloxkKNWMMMWNKxood0XKOdolllodx0XWMMMWKxold0NMMMMWXOxolllllloxOXWMMMMMMMM MMMWNXNWMMMMMMMMWNXNWMMMMMMMMWNNNWMMMMMMMMWWNNXXNNWWMMMMMMMMMMWWWWMMMWWNNNNNWWMMMMMMMMWWNWMMMMMMMMMWWNNXXNNWWMMMMMMMMMMM */ import "./lib/SafeMath.sol"; import "./lib/IERC20Burnable.sol"; import "./lib/Context.sol"; import "./lib/ReentrancyGuard.sol"; import "./lib/Ownable.sol"; contract WMBXBridge is ReentrancyGuard, Context, Ownable { using SafeMath for uint256; constructor(address _token, address payable _feeAddress, uint256 _claimFeeRate, uint256 _burnFeeRate) { } IERC20 private TOKEN; address payable private feeAddress; uint256 private claimFeeRate; uint256 private burnFeeRate; bool private isFrozen; /* Defines a mint operation */ struct MintOperation { address user; uint256 amount; bool isReceived; bool isProcessed; } mapping (string => MintOperation) private _mints; // History of mint claims struct MintPending { string memo; bool isPending; } mapping (address => MintPending) private _pending; // Pending mint owners struct BurnOperation { uint256 amount; bool isProcessed; } mapping (string => BurnOperation) private _burns; // History of burn requests mapping (address => bool) private _validators; event BridgeAction(address indexed user, string action, uint256 amount, uint256 fee, string memo); // event BridgeBurn(address indexed user, uint256 amount, uint256 fee, string memo); function getPending(address _user) external view returns(string memory) { } function claimStatus(string memory _memo) external view returns(address user, uint256 amount, bool received, bool processed) { } function isValidator(address _user) external view returns (bool) { } function addValidator(address _user) external onlyOwner nonReentrant { } function removeValidator(address _user) external onlyOwner nonReentrant { require(<FILL_ME>) _validators[_user] = false; } function getFeeAddress() external view returns (address) { } function setFeeAddress(address payable _feeAddress) external onlyOwner nonReentrant { } function getClaimFeeRate() external view returns (uint256) { } function getBurnFeeRate() external view returns (uint256) { } function setClaimFeeRate(uint256 _claimFeeRate) external onlyOwner nonReentrant { } function setBurnFeeRate(uint256 _burnFeeRate) external onlyOwner nonReentrant { } function getFrozen() external view returns (bool) { } function setFrozen(bool _isFrozen) external onlyOwner nonReentrant { } function burnTokens(string memory _memo, uint256 _amount) external payable nonReentrant { } function validateMint(address _user, string memory _memo, uint256 _amount) external nonReentrant { } function claimTokens(string memory _memo) external payable nonReentrant { } }
_validators[_user],"Address not found."
275,883
_validators[_user]
"No allowance"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNWWMMMMMMMMMMMMMMMMMMWWNNWWMMMMMMMMMMMMMMMMMMMWMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKxood0WMMMMMMMMMMMMMMMMNOdoodOXWMMMMMMMMMMMMMMMMNK0K00KWMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOo;;;;oKWMMMMMMMMMMMMMMW0l;;;;ckNMMMMMMMMMMMMMMMMWK0OkxONMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKko;;;;l0WMMMMMMMMMMMMMMMNkolclxXWMMMMMMMMMMMMMMMMMWWWWWWWMMM MMMWNNWMMMMWNNXNNWMMMMMWWNXXNNWMMMMMMMMMMMWNNXKKXXNWWMMMMMWKko;;;;l0WWWXXKKXNWWMMMMMMWX00KNMMMMMMMWWNXXKXXNWWMMMMMMMMMMM MNKxood0NXOdolllodOXWN0xollllldkKWMMMMMWXOxolcccccldx0NWMMWKko;;;;lO0kolccccldkKWMMMW0dlloONMMMWN0kdlcccccldkKNMMMMMMMMM W0l;;;;col:;;;;;;;:lxo:;;;;;;;;:lONMMW0dc:;;;;;;;;;;;:lkXWWKko;;;;clc:;;;;;;;;:cxKWMXd;;;;l0WMN0o:;;;;::;;;;;cd0WMMMMMMM WOc;;;;;;clool:;;;;;;;:lool:;;;;;l0WNkc;;;;:ldxxxoc:;;;:o0NKko;;;;;;:ldkkxoc;;;;:o0WKo;;;;l0WXxc;;;:lxkOkdl:;;;lONMMMMMM WOl;;;;:o0NNNKkc;;;;;lOXNNXOl;;;;:xXk:;;;:oONWWWWNKxc;;;;l0KOo;;;;;lkXWWMWN0o:;;;;dKKo;;;;l0Xkc;;;cxKWWWWN0o:;;;l0WMMMMM W0l;;;;cONMMMWXd;;;;:kNMMMMNx:;;;:xOl;;;;l0WMMMMMMWXxc;;;:x0Oo;;;;cONMMMMMMWKo;;;;cOKo;;;;l00o;;;;cdkkkkkkko:;;;cxNMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xOl;;;:dXMMMMMMMMWOl;;;;d0Oo;;;;l0WMMMMMMMXd:;;;ckKo;;;;l00l;;;;;:::::::::;;;:cONMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:x0o;;;;l0WMMMMMMWXx:;;;:x0Oo;;;;ckNMMMMMMWKo;;;;cOKo;;;;l00o:;;;coxkkkkkkkkkkOKNWMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xKkc;;;;lkXNWWWNKxc;;;;oKKko;;;;;cxKNWWNXOo:;;;:dXKo;;;;l0Xkc;;;:d0NWWWWWXKOOXWMMMMMMM WOl;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xXNkl:;;;:codddoc:;;;:dKWKOo;;;;;;:codddl:;;;;:oKWXo;;;;l0NXkc;;;;cdxkkxdlc;:oKMMMMMMM W0l;;;;l0WMMMMNx:;;;cOWMMMMNkc;;;:xNWWKxl:;;;;;;;;;;;coONWWX0d;;;;clc:;;;;;;;;:lkXWWXd:;;;l0WMW0dc:;;;;;;;;;;:cxXMMMMMMM MN0dlloONMMMMMWKxllokXWMMMMWXkollxXWMMMWX0xdollllloxkKNWMMMWNKxood0XKOdolllodx0XWMMMWKxold0NMMMMWXOxolllllloxOXWMMMMMMMM MMMWNXNWMMMMMMMMWNXNWMMMMMMMMWNNNWMMMMMMMMWWNNXXNNWWMMMMMMMMMMWWWWMMMWWNNNNNWWMMMMMMMMWWNWMMMMMMMMMWWNNXXNNWWMMMMMMMMMMM */ import "./lib/SafeMath.sol"; import "./lib/IERC20Burnable.sol"; import "./lib/Context.sol"; import "./lib/ReentrancyGuard.sol"; import "./lib/Ownable.sol"; contract WMBXBridge is ReentrancyGuard, Context, Ownable { using SafeMath for uint256; constructor(address _token, address payable _feeAddress, uint256 _claimFeeRate, uint256 _burnFeeRate) { } IERC20 private TOKEN; address payable private feeAddress; uint256 private claimFeeRate; uint256 private burnFeeRate; bool private isFrozen; /* Defines a mint operation */ struct MintOperation { address user; uint256 amount; bool isReceived; bool isProcessed; } mapping (string => MintOperation) private _mints; // History of mint claims struct MintPending { string memo; bool isPending; } mapping (address => MintPending) private _pending; // Pending mint owners struct BurnOperation { uint256 amount; bool isProcessed; } mapping (string => BurnOperation) private _burns; // History of burn requests mapping (address => bool) private _validators; event BridgeAction(address indexed user, string action, uint256 amount, uint256 fee, string memo); // event BridgeBurn(address indexed user, uint256 amount, uint256 fee, string memo); function getPending(address _user) external view returns(string memory) { } function claimStatus(string memory _memo) external view returns(address user, uint256 amount, bool received, bool processed) { } function isValidator(address _user) external view returns (bool) { } function addValidator(address _user) external onlyOwner nonReentrant { } function removeValidator(address _user) external onlyOwner nonReentrant { } function getFeeAddress() external view returns (address) { } function setFeeAddress(address payable _feeAddress) external onlyOwner nonReentrant { } function getClaimFeeRate() external view returns (uint256) { } function getBurnFeeRate() external view returns (uint256) { } function setClaimFeeRate(uint256 _claimFeeRate) external onlyOwner nonReentrant { } function setBurnFeeRate(uint256 _burnFeeRate) external onlyOwner nonReentrant { } function getFrozen() external view returns (bool) { } function setFrozen(bool _isFrozen) external onlyOwner nonReentrant { } function burnTokens(string memory _memo, uint256 _amount) external payable nonReentrant { require(!isFrozen, "Contract is frozen"); require(msg.value >= burnFeeRate, "Fee not met"); require(<FILL_ME>) TOKEN.burnFrom(msg.sender, _amount); feeAddress.transfer(msg.value); emit BridgeAction(msg.sender, 'BURN', _amount, msg.value, _memo); } function validateMint(address _user, string memory _memo, uint256 _amount) external nonReentrant { } function claimTokens(string memory _memo) external payable nonReentrant { } }
TOKEN.allowance(msg.sender,address(this))>=_amount,"No allowance"
275,883
TOKEN.allowance(msg.sender,address(this))>=_amount
"Not authorized"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNWWMMMMMMMMMMMMMMMMMMWWNNWWMMMMMMMMMMMMMMMMMMMWMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKxood0WMMMMMMMMMMMMMMMMNOdoodOXWMMMMMMMMMMMMMMMMNK0K00KWMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOo;;;;oKWMMMMMMMMMMMMMMW0l;;;;ckNMMMMMMMMMMMMMMMMWK0OkxONMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKko;;;;l0WMMMMMMMMMMMMMMMNkolclxXWMMMMMMMMMMMMMMMMMWWWWWWWMMM MMMWNNWMMMMWNNXNNWMMMMMWWNXXNNWMMMMMMMMMMMWNNXKKXXNWWMMMMMWKko;;;;l0WWWXXKKXNWWMMMMMMWX00KNMMMMMMMWWNXXKXXNWWMMMMMMMMMMM MNKxood0NXOdolllodOXWN0xollllldkKWMMMMMWXOxolcccccldx0NWMMWKko;;;;lO0kolccccldkKWMMMW0dlloONMMMWN0kdlcccccldkKNMMMMMMMMM W0l;;;;col:;;;;;;;:lxo:;;;;;;;;:lONMMW0dc:;;;;;;;;;;;:lkXWWKko;;;;clc:;;;;;;;;:cxKWMXd;;;;l0WMN0o:;;;;::;;;;;cd0WMMMMMMM WOc;;;;;;clool:;;;;;;;:lool:;;;;;l0WNkc;;;;:ldxxxoc:;;;:o0NKko;;;;;;:ldkkxoc;;;;:o0WKo;;;;l0WXxc;;;:lxkOkdl:;;;lONMMMMMM WOl;;;;:o0NNNKkc;;;;;lOXNNXOl;;;;:xXk:;;;:oONWWWWNKxc;;;;l0KOo;;;;;lkXWWMWN0o:;;;;dKKo;;;;l0Xkc;;;cxKWWWWN0o:;;;l0WMMMMM W0l;;;;cONMMMWXd;;;;:kNMMMMNx:;;;:xOl;;;;l0WMMMMMMWXxc;;;:x0Oo;;;;cONMMMMMMWKo;;;;cOKo;;;;l00o;;;;cdkkkkkkko:;;;cxNMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xOl;;;:dXMMMMMMMMWOl;;;;d0Oo;;;;l0WMMMMMMMXd:;;;ckKo;;;;l00l;;;;;:::::::::;;;:cONMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:x0o;;;;l0WMMMMMMWXx:;;;:x0Oo;;;;ckNMMMMMMWKo;;;;cOKo;;;;l00o:;;;coxkkkkkkkkkkOKNWMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xKkc;;;;lkXNWWWNKxc;;;;oKKko;;;;;cxKNWWNXOo:;;;:dXKo;;;;l0Xkc;;;:d0NWWWWWXKOOXWMMMMMMM WOl;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xXNkl:;;;:codddoc:;;;:dKWKOo;;;;;;:codddl:;;;;:oKWXo;;;;l0NXkc;;;;cdxkkxdlc;:oKMMMMMMM W0l;;;;l0WMMMMNx:;;;cOWMMMMNkc;;;:xNWWKxl:;;;;;;;;;;;coONWWX0d;;;;clc:;;;;;;;;:lkXWWXd:;;;l0WMW0dc:;;;;;;;;;;:cxXMMMMMMM MN0dlloONMMMMMWKxllokXWMMMMWXkollxXWMMMWX0xdollllloxkKNWMMMWNKxood0XKOdolllodx0XWMMMWKxold0NMMMMWXOxolllllloxOXWMMMMMMMM MMMWNXNWMMMMMMMMWNXNWMMMMMMMMWNNNWMMMMMMMMWWNNXXNNWWMMMMMMMMMMWWWWMMMWWNNNNNWWMMMMMMMMWWNWMMMMMMMMMWWNNXXNNWWMMMMMMMMMMM */ import "./lib/SafeMath.sol"; import "./lib/IERC20Burnable.sol"; import "./lib/Context.sol"; import "./lib/ReentrancyGuard.sol"; import "./lib/Ownable.sol"; contract WMBXBridge is ReentrancyGuard, Context, Ownable { using SafeMath for uint256; constructor(address _token, address payable _feeAddress, uint256 _claimFeeRate, uint256 _burnFeeRate) { } IERC20 private TOKEN; address payable private feeAddress; uint256 private claimFeeRate; uint256 private burnFeeRate; bool private isFrozen; /* Defines a mint operation */ struct MintOperation { address user; uint256 amount; bool isReceived; bool isProcessed; } mapping (string => MintOperation) private _mints; // History of mint claims struct MintPending { string memo; bool isPending; } mapping (address => MintPending) private _pending; // Pending mint owners struct BurnOperation { uint256 amount; bool isProcessed; } mapping (string => BurnOperation) private _burns; // History of burn requests mapping (address => bool) private _validators; event BridgeAction(address indexed user, string action, uint256 amount, uint256 fee, string memo); // event BridgeBurn(address indexed user, uint256 amount, uint256 fee, string memo); function getPending(address _user) external view returns(string memory) { } function claimStatus(string memory _memo) external view returns(address user, uint256 amount, bool received, bool processed) { } function isValidator(address _user) external view returns (bool) { } function addValidator(address _user) external onlyOwner nonReentrant { } function removeValidator(address _user) external onlyOwner nonReentrant { } function getFeeAddress() external view returns (address) { } function setFeeAddress(address payable _feeAddress) external onlyOwner nonReentrant { } function getClaimFeeRate() external view returns (uint256) { } function getBurnFeeRate() external view returns (uint256) { } function setClaimFeeRate(uint256 _claimFeeRate) external onlyOwner nonReentrant { } function setBurnFeeRate(uint256 _burnFeeRate) external onlyOwner nonReentrant { } function getFrozen() external view returns (bool) { } function setFrozen(bool _isFrozen) external onlyOwner nonReentrant { } function burnTokens(string memory _memo, uint256 _amount) external payable nonReentrant { } function validateMint(address _user, string memory _memo, uint256 _amount) external nonReentrant { require(!isFrozen, "Contract is frozen"); require(<FILL_ME>) require(_amount > 0, "Amount must be greater than zero."); require(!_mints[_memo].isReceived, "Mint already logged."); require(!_pending[_user].isPending, "Owner already has mint pending."); _mints[_memo] = MintOperation(_user, _amount, true, false); _pending[_user] = MintPending(_memo, true); } function claimTokens(string memory _memo) external payable nonReentrant { } }
_validators[msg.sender],"Not authorized"
275,883
_validators[msg.sender]
"Mint already logged."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNWWMMMMMMMMMMMMMMMMMMWWNNWWMMMMMMMMMMMMMMMMMMMWMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKxood0WMMMMMMMMMMMMMMMMNOdoodOXWMMMMMMMMMMMMMMMMNK0K00KWMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOo;;;;oKWMMMMMMMMMMMMMMW0l;;;;ckNMMMMMMMMMMMMMMMMWK0OkxONMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKko;;;;l0WMMMMMMMMMMMMMMMNkolclxXWMMMMMMMMMMMMMMMMMWWWWWWWMMM MMMWNNWMMMMWNNXNNWMMMMMWWNXXNNWMMMMMMMMMMMWNNXKKXXNWWMMMMMWKko;;;;l0WWWXXKKXNWWMMMMMMWX00KNMMMMMMMWWNXXKXXNWWMMMMMMMMMMM MNKxood0NXOdolllodOXWN0xollllldkKWMMMMMWXOxolcccccldx0NWMMWKko;;;;lO0kolccccldkKWMMMW0dlloONMMMWN0kdlcccccldkKNMMMMMMMMM W0l;;;;col:;;;;;;;:lxo:;;;;;;;;:lONMMW0dc:;;;;;;;;;;;:lkXWWKko;;;;clc:;;;;;;;;:cxKWMXd;;;;l0WMN0o:;;;;::;;;;;cd0WMMMMMMM WOc;;;;;;clool:;;;;;;;:lool:;;;;;l0WNkc;;;;:ldxxxoc:;;;:o0NKko;;;;;;:ldkkxoc;;;;:o0WKo;;;;l0WXxc;;;:lxkOkdl:;;;lONMMMMMM WOl;;;;:o0NNNKkc;;;;;lOXNNXOl;;;;:xXk:;;;:oONWWWWNKxc;;;;l0KOo;;;;;lkXWWMWN0o:;;;;dKKo;;;;l0Xkc;;;cxKWWWWN0o:;;;l0WMMMMM W0l;;;;cONMMMWXd;;;;:kNMMMMNx:;;;:xOl;;;;l0WMMMMMMWXxc;;;:x0Oo;;;;cONMMMMMMWKo;;;;cOKo;;;;l00o;;;;cdkkkkkkko:;;;cxNMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xOl;;;:dXMMMMMMMMWOl;;;;d0Oo;;;;l0WMMMMMMMXd:;;;ckKo;;;;l00l;;;;;:::::::::;;;:cONMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:x0o;;;;l0WMMMMMMWXx:;;;:x0Oo;;;;ckNMMMMMMWKo;;;;cOKo;;;;l00o:;;;coxkkkkkkkkkkOKNWMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xKkc;;;;lkXNWWWNKxc;;;;oKKko;;;;;cxKNWWNXOo:;;;:dXKo;;;;l0Xkc;;;:d0NWWWWWXKOOXWMMMMMMM WOl;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xXNkl:;;;:codddoc:;;;:dKWKOo;;;;;;:codddl:;;;;:oKWXo;;;;l0NXkc;;;;cdxkkxdlc;:oKMMMMMMM W0l;;;;l0WMMMMNx:;;;cOWMMMMNkc;;;:xNWWKxl:;;;;;;;;;;;coONWWX0d;;;;clc:;;;;;;;;:lkXWWXd:;;;l0WMW0dc:;;;;;;;;;;:cxXMMMMMMM MN0dlloONMMMMMWKxllokXWMMMMWXkollxXWMMMWX0xdollllloxkKNWMMMWNKxood0XKOdolllodx0XWMMMWKxold0NMMMMWXOxolllllloxOXWMMMMMMMM MMMWNXNWMMMMMMMMWNXNWMMMMMMMMWNNNWMMMMMMMMWWNNXXNNWWMMMMMMMMMMWWWWMMMWWNNNNNWWMMMMMMMMWWNWMMMMMMMMMWWNNXXNNWWMMMMMMMMMMM */ import "./lib/SafeMath.sol"; import "./lib/IERC20Burnable.sol"; import "./lib/Context.sol"; import "./lib/ReentrancyGuard.sol"; import "./lib/Ownable.sol"; contract WMBXBridge is ReentrancyGuard, Context, Ownable { using SafeMath for uint256; constructor(address _token, address payable _feeAddress, uint256 _claimFeeRate, uint256 _burnFeeRate) { } IERC20 private TOKEN; address payable private feeAddress; uint256 private claimFeeRate; uint256 private burnFeeRate; bool private isFrozen; /* Defines a mint operation */ struct MintOperation { address user; uint256 amount; bool isReceived; bool isProcessed; } mapping (string => MintOperation) private _mints; // History of mint claims struct MintPending { string memo; bool isPending; } mapping (address => MintPending) private _pending; // Pending mint owners struct BurnOperation { uint256 amount; bool isProcessed; } mapping (string => BurnOperation) private _burns; // History of burn requests mapping (address => bool) private _validators; event BridgeAction(address indexed user, string action, uint256 amount, uint256 fee, string memo); // event BridgeBurn(address indexed user, uint256 amount, uint256 fee, string memo); function getPending(address _user) external view returns(string memory) { } function claimStatus(string memory _memo) external view returns(address user, uint256 amount, bool received, bool processed) { } function isValidator(address _user) external view returns (bool) { } function addValidator(address _user) external onlyOwner nonReentrant { } function removeValidator(address _user) external onlyOwner nonReentrant { } function getFeeAddress() external view returns (address) { } function setFeeAddress(address payable _feeAddress) external onlyOwner nonReentrant { } function getClaimFeeRate() external view returns (uint256) { } function getBurnFeeRate() external view returns (uint256) { } function setClaimFeeRate(uint256 _claimFeeRate) external onlyOwner nonReentrant { } function setBurnFeeRate(uint256 _burnFeeRate) external onlyOwner nonReentrant { } function getFrozen() external view returns (bool) { } function setFrozen(bool _isFrozen) external onlyOwner nonReentrant { } function burnTokens(string memory _memo, uint256 _amount) external payable nonReentrant { } function validateMint(address _user, string memory _memo, uint256 _amount) external nonReentrant { require(!isFrozen, "Contract is frozen"); require(_validators[msg.sender], "Not authorized"); require(_amount > 0, "Amount must be greater than zero."); require(<FILL_ME>) require(!_pending[_user].isPending, "Owner already has mint pending."); _mints[_memo] = MintOperation(_user, _amount, true, false); _pending[_user] = MintPending(_memo, true); } function claimTokens(string memory _memo) external payable nonReentrant { } }
!_mints[_memo].isReceived,"Mint already logged."
275,883
!_mints[_memo].isReceived
"Owner already has mint pending."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNWWMMMMMMMMMMMMMMMMMMWWNNWWMMMMMMMMMMMMMMMMMMMWMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKxood0WMMMMMMMMMMMMMMMMNOdoodOXWMMMMMMMMMMMMMMMMNK0K00KWMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOo;;;;oKWMMMMMMMMMMMMMMW0l;;;;ckNMMMMMMMMMMMMMMMMWK0OkxONMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKko;;;;l0WMMMMMMMMMMMMMMMNkolclxXWMMMMMMMMMMMMMMMMMWWWWWWWMMM MMMWNNWMMMMWNNXNNWMMMMMWWNXXNNWMMMMMMMMMMMWNNXKKXXNWWMMMMMWKko;;;;l0WWWXXKKXNWWMMMMMMWX00KNMMMMMMMWWNXXKXXNWWMMMMMMMMMMM MNKxood0NXOdolllodOXWN0xollllldkKWMMMMMWXOxolcccccldx0NWMMWKko;;;;lO0kolccccldkKWMMMW0dlloONMMMWN0kdlcccccldkKNMMMMMMMMM W0l;;;;col:;;;;;;;:lxo:;;;;;;;;:lONMMW0dc:;;;;;;;;;;;:lkXWWKko;;;;clc:;;;;;;;;:cxKWMXd;;;;l0WMN0o:;;;;::;;;;;cd0WMMMMMMM WOc;;;;;;clool:;;;;;;;:lool:;;;;;l0WNkc;;;;:ldxxxoc:;;;:o0NKko;;;;;;:ldkkxoc;;;;:o0WKo;;;;l0WXxc;;;:lxkOkdl:;;;lONMMMMMM WOl;;;;:o0NNNKkc;;;;;lOXNNXOl;;;;:xXk:;;;:oONWWWWNKxc;;;;l0KOo;;;;;lkXWWMWN0o:;;;;dKKo;;;;l0Xkc;;;cxKWWWWN0o:;;;l0WMMMMM W0l;;;;cONMMMWXd;;;;:kNMMMMNx:;;;:xOl;;;;l0WMMMMMMWXxc;;;:x0Oo;;;;cONMMMMMMWKo;;;;cOKo;;;;l00o;;;;cdkkkkkkko:;;;cxNMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xOl;;;:dXMMMMMMMMWOl;;;;d0Oo;;;;l0WMMMMMMMXd:;;;ckKo;;;;l00l;;;;;:::::::::;;;:cONMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:x0o;;;;l0WMMMMMMWXx:;;;:x0Oo;;;;ckNMMMMMMWKo;;;;cOKo;;;;l00o:;;;coxkkkkkkkkkkOKNWMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xKkc;;;;lkXNWWWNKxc;;;;oKKko;;;;;cxKNWWNXOo:;;;:dXKo;;;;l0Xkc;;;:d0NWWWWWXKOOXWMMMMMMM WOl;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xXNkl:;;;:codddoc:;;;:dKWKOo;;;;;;:codddl:;;;;:oKWXo;;;;l0NXkc;;;;cdxkkxdlc;:oKMMMMMMM W0l;;;;l0WMMMMNx:;;;cOWMMMMNkc;;;:xNWWKxl:;;;;;;;;;;;coONWWX0d;;;;clc:;;;;;;;;:lkXWWXd:;;;l0WMW0dc:;;;;;;;;;;:cxXMMMMMMM MN0dlloONMMMMMWKxllokXWMMMMWXkollxXWMMMWX0xdollllloxkKNWMMMWNKxood0XKOdolllodx0XWMMMWKxold0NMMMMWXOxolllllloxOXWMMMMMMMM MMMWNXNWMMMMMMMMWNXNWMMMMMMMMWNNNWMMMMMMMMWWNNXXNNWWMMMMMMMMMMWWWWMMMWWNNNNNWWMMMMMMMMWWNWMMMMMMMMMWWNNXXNNWWMMMMMMMMMMM */ import "./lib/SafeMath.sol"; import "./lib/IERC20Burnable.sol"; import "./lib/Context.sol"; import "./lib/ReentrancyGuard.sol"; import "./lib/Ownable.sol"; contract WMBXBridge is ReentrancyGuard, Context, Ownable { using SafeMath for uint256; constructor(address _token, address payable _feeAddress, uint256 _claimFeeRate, uint256 _burnFeeRate) { } IERC20 private TOKEN; address payable private feeAddress; uint256 private claimFeeRate; uint256 private burnFeeRate; bool private isFrozen; /* Defines a mint operation */ struct MintOperation { address user; uint256 amount; bool isReceived; bool isProcessed; } mapping (string => MintOperation) private _mints; // History of mint claims struct MintPending { string memo; bool isPending; } mapping (address => MintPending) private _pending; // Pending mint owners struct BurnOperation { uint256 amount; bool isProcessed; } mapping (string => BurnOperation) private _burns; // History of burn requests mapping (address => bool) private _validators; event BridgeAction(address indexed user, string action, uint256 amount, uint256 fee, string memo); // event BridgeBurn(address indexed user, uint256 amount, uint256 fee, string memo); function getPending(address _user) external view returns(string memory) { } function claimStatus(string memory _memo) external view returns(address user, uint256 amount, bool received, bool processed) { } function isValidator(address _user) external view returns (bool) { } function addValidator(address _user) external onlyOwner nonReentrant { } function removeValidator(address _user) external onlyOwner nonReentrant { } function getFeeAddress() external view returns (address) { } function setFeeAddress(address payable _feeAddress) external onlyOwner nonReentrant { } function getClaimFeeRate() external view returns (uint256) { } function getBurnFeeRate() external view returns (uint256) { } function setClaimFeeRate(uint256 _claimFeeRate) external onlyOwner nonReentrant { } function setBurnFeeRate(uint256 _burnFeeRate) external onlyOwner nonReentrant { } function getFrozen() external view returns (bool) { } function setFrozen(bool _isFrozen) external onlyOwner nonReentrant { } function burnTokens(string memory _memo, uint256 _amount) external payable nonReentrant { } function validateMint(address _user, string memory _memo, uint256 _amount) external nonReentrant { require(!isFrozen, "Contract is frozen"); require(_validators[msg.sender], "Not authorized"); require(_amount > 0, "Amount must be greater than zero."); require(!_mints[_memo].isReceived, "Mint already logged."); require(<FILL_ME>) _mints[_memo] = MintOperation(_user, _amount, true, false); _pending[_user] = MintPending(_memo, true); } function claimTokens(string memory _memo) external payable nonReentrant { } }
!_pending[_user].isPending,"Owner already has mint pending."
275,883
!_pending[_user].isPending
"Not owner"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNWWMMMMMMMMMMMMMMMMMMWWNNWWMMMMMMMMMMMMMMMMMMMWMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKxood0WMMMMMMMMMMMMMMMMNOdoodOXWMMMMMMMMMMMMMMMMNK0K00KWMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOo;;;;oKWMMMMMMMMMMMMMMW0l;;;;ckNMMMMMMMMMMMMMMMMWK0OkxONMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKko;;;;l0WMMMMMMMMMMMMMMMNkolclxXWMMMMMMMMMMMMMMMMMWWWWWWWMMM MMMWNNWMMMMWNNXNNWMMMMMWWNXXNNWMMMMMMMMMMMWNNXKKXXNWWMMMMMWKko;;;;l0WWWXXKKXNWWMMMMMMWX00KNMMMMMMMWWNXXKXXNWWMMMMMMMMMMM MNKxood0NXOdolllodOXWN0xollllldkKWMMMMMWXOxolcccccldx0NWMMWKko;;;;lO0kolccccldkKWMMMW0dlloONMMMWN0kdlcccccldkKNMMMMMMMMM W0l;;;;col:;;;;;;;:lxo:;;;;;;;;:lONMMW0dc:;;;;;;;;;;;:lkXWWKko;;;;clc:;;;;;;;;:cxKWMXd;;;;l0WMN0o:;;;;::;;;;;cd0WMMMMMMM WOc;;;;;;clool:;;;;;;;:lool:;;;;;l0WNkc;;;;:ldxxxoc:;;;:o0NKko;;;;;;:ldkkxoc;;;;:o0WKo;;;;l0WXxc;;;:lxkOkdl:;;;lONMMMMMM WOl;;;;:o0NNNKkc;;;;;lOXNNXOl;;;;:xXk:;;;:oONWWWWNKxc;;;;l0KOo;;;;;lkXWWMWN0o:;;;;dKKo;;;;l0Xkc;;;cxKWWWWN0o:;;;l0WMMMMM W0l;;;;cONMMMWXd;;;;:kNMMMMNx:;;;:xOl;;;;l0WMMMMMMWXxc;;;:x0Oo;;;;cONMMMMMMWKo;;;;cOKo;;;;l00o;;;;cdkkkkkkko:;;;cxNMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xOl;;;:dXMMMMMMMMWOl;;;;d0Oo;;;;l0WMMMMMMMXd:;;;ckKo;;;;l00l;;;;;:::::::::;;;:cONMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:x0o;;;;l0WMMMMMMWXx:;;;:x0Oo;;;;ckNMMMMMMWKo;;;;cOKo;;;;l00o:;;;coxkkkkkkkkkkOKNWMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xKkc;;;;lkXNWWWNKxc;;;;oKKko;;;;;cxKNWWNXOo:;;;:dXKo;;;;l0Xkc;;;:d0NWWWWWXKOOXWMMMMMMM WOl;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xXNkl:;;;:codddoc:;;;:dKWKOo;;;;;;:codddl:;;;;:oKWXo;;;;l0NXkc;;;;cdxkkxdlc;:oKMMMMMMM W0l;;;;l0WMMMMNx:;;;cOWMMMMNkc;;;:xNWWKxl:;;;;;;;;;;;coONWWX0d;;;;clc:;;;;;;;;:lkXWWXd:;;;l0WMW0dc:;;;;;;;;;;:cxXMMMMMMM MN0dlloONMMMMMWKxllokXWMMMMWXkollxXWMMMWX0xdollllloxkKNWMMMWNKxood0XKOdolllodx0XWMMMWKxold0NMMMMWXOxolllllloxOXWMMMMMMMM MMMWNXNWMMMMMMMMWNXNWMMMMMMMMWNNNWMMMMMMMMWWNNXXNNWWMMMMMMMMMMWWWWMMMWWNNNNNWWMMMMMMMMWWNWMMMMMMMMMWWNNXXNNWWMMMMMMMMMMM */ import "./lib/SafeMath.sol"; import "./lib/IERC20Burnable.sol"; import "./lib/Context.sol"; import "./lib/ReentrancyGuard.sol"; import "./lib/Ownable.sol"; contract WMBXBridge is ReentrancyGuard, Context, Ownable { using SafeMath for uint256; constructor(address _token, address payable _feeAddress, uint256 _claimFeeRate, uint256 _burnFeeRate) { } IERC20 private TOKEN; address payable private feeAddress; uint256 private claimFeeRate; uint256 private burnFeeRate; bool private isFrozen; /* Defines a mint operation */ struct MintOperation { address user; uint256 amount; bool isReceived; bool isProcessed; } mapping (string => MintOperation) private _mints; // History of mint claims struct MintPending { string memo; bool isPending; } mapping (address => MintPending) private _pending; // Pending mint owners struct BurnOperation { uint256 amount; bool isProcessed; } mapping (string => BurnOperation) private _burns; // History of burn requests mapping (address => bool) private _validators; event BridgeAction(address indexed user, string action, uint256 amount, uint256 fee, string memo); // event BridgeBurn(address indexed user, uint256 amount, uint256 fee, string memo); function getPending(address _user) external view returns(string memory) { } function claimStatus(string memory _memo) external view returns(address user, uint256 amount, bool received, bool processed) { } function isValidator(address _user) external view returns (bool) { } function addValidator(address _user) external onlyOwner nonReentrant { } function removeValidator(address _user) external onlyOwner nonReentrant { } function getFeeAddress() external view returns (address) { } function setFeeAddress(address payable _feeAddress) external onlyOwner nonReentrant { } function getClaimFeeRate() external view returns (uint256) { } function getBurnFeeRate() external view returns (uint256) { } function setClaimFeeRate(uint256 _claimFeeRate) external onlyOwner nonReentrant { } function setBurnFeeRate(uint256 _burnFeeRate) external onlyOwner nonReentrant { } function getFrozen() external view returns (bool) { } function setFrozen(bool _isFrozen) external onlyOwner nonReentrant { } function burnTokens(string memory _memo, uint256 _amount) external payable nonReentrant { } function validateMint(address _user, string memory _memo, uint256 _amount) external nonReentrant { } function claimTokens(string memory _memo) external payable nonReentrant { require(!isFrozen, "Contract is frozen"); require(_mints[_memo].isReceived, "Memo not found"); require(<FILL_ME>) require(!_mints[_memo].isProcessed, "Memo already processed"); require(msg.value >= claimFeeRate, "Fee not met"); TOKEN.mint(msg.sender, _mints[_memo].amount); feeAddress.transfer(msg.value); _mints[_memo].isProcessed = true; _pending[_mints[_memo].user].isPending = false; emit BridgeAction(msg.sender, "CLAIM", _mints[_memo].amount, msg.value, _memo); } }
_mints[_memo].user==msg.sender,"Not owner"
275,883
_mints[_memo].user==msg.sender
"Memo already processed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNWWMMMMMMMMMMMMMMMMMMWWNNWWMMMMMMMMMMMMMMMMMMMWMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKxood0WMMMMMMMMMMMMMMMMNOdoodOXWMMMMMMMMMMMMMMMMNK0K00KWMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOo;;;;oKWMMMMMMMMMMMMMMW0l;;;;ckNMMMMMMMMMMMMMMMMWK0OkxONMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKko;;;;l0WMMMMMMMMMMMMMMMNkolclxXWMMMMMMMMMMMMMMMMMWWWWWWWMMM MMMWNNWMMMMWNNXNNWMMMMMWWNXXNNWMMMMMMMMMMMWNNXKKXXNWWMMMMMWKko;;;;l0WWWXXKKXNWWMMMMMMWX00KNMMMMMMMWWNXXKXXNWWMMMMMMMMMMM MNKxood0NXOdolllodOXWN0xollllldkKWMMMMMWXOxolcccccldx0NWMMWKko;;;;lO0kolccccldkKWMMMW0dlloONMMMWN0kdlcccccldkKNMMMMMMMMM W0l;;;;col:;;;;;;;:lxo:;;;;;;;;:lONMMW0dc:;;;;;;;;;;;:lkXWWKko;;;;clc:;;;;;;;;:cxKWMXd;;;;l0WMN0o:;;;;::;;;;;cd0WMMMMMMM WOc;;;;;;clool:;;;;;;;:lool:;;;;;l0WNkc;;;;:ldxxxoc:;;;:o0NKko;;;;;;:ldkkxoc;;;;:o0WKo;;;;l0WXxc;;;:lxkOkdl:;;;lONMMMMMM WOl;;;;:o0NNNKkc;;;;;lOXNNXOl;;;;:xXk:;;;:oONWWWWNKxc;;;;l0KOo;;;;;lkXWWMWN0o:;;;;dKKo;;;;l0Xkc;;;cxKWWWWN0o:;;;l0WMMMMM W0l;;;;cONMMMWXd;;;;:kNMMMMNx:;;;:xOl;;;;l0WMMMMMMWXxc;;;:x0Oo;;;;cONMMMMMMWKo;;;;cOKo;;;;l00o;;;;cdkkkkkkko:;;;cxNMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xOl;;;:dXMMMMMMMMWOl;;;;d0Oo;;;;l0WMMMMMMMXd:;;;ckKo;;;;l00l;;;;;:::::::::;;;:cONMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:x0o;;;;l0WMMMMMMWXx:;;;:x0Oo;;;;ckNMMMMMMWKo;;;;cOKo;;;;l00o:;;;coxkkkkkkkkkkOKNWMMMMM W0l;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xKkc;;;;lkXNWWWNKxc;;;;oKKko;;;;;cxKNWWNXOo:;;;:dXKo;;;;l0Xkc;;;:d0NWWWWWXKOOXWMMMMMMM WOl;;;;l0WMMMMNx:;;;ckWMMMMNkc;;;:xXNkl:;;;:codddoc:;;;:dKWKOo;;;;;;:codddl:;;;;:oKWXo;;;;l0NXkc;;;;cdxkkxdlc;:oKMMMMMMM W0l;;;;l0WMMMMNx:;;;cOWMMMMNkc;;;:xNWWKxl:;;;;;;;;;;;coONWWX0d;;;;clc:;;;;;;;;:lkXWWXd:;;;l0WMW0dc:;;;;;;;;;;:cxXMMMMMMM MN0dlloONMMMMMWKxllokXWMMMMWXkollxXWMMMWX0xdollllloxkKNWMMMWNKxood0XKOdolllodx0XWMMMWKxold0NMMMMWXOxolllllloxOXWMMMMMMMM MMMWNXNWMMMMMMMMWNXNWMMMMMMMMWNNNWMMMMMMMMWWNNXXNNWWMMMMMMMMMMWWWWMMMWWNNNNNWWMMMMMMMMWWNWMMMMMMMMMWWNNXXNNWWMMMMMMMMMMM */ import "./lib/SafeMath.sol"; import "./lib/IERC20Burnable.sol"; import "./lib/Context.sol"; import "./lib/ReentrancyGuard.sol"; import "./lib/Ownable.sol"; contract WMBXBridge is ReentrancyGuard, Context, Ownable { using SafeMath for uint256; constructor(address _token, address payable _feeAddress, uint256 _claimFeeRate, uint256 _burnFeeRate) { } IERC20 private TOKEN; address payable private feeAddress; uint256 private claimFeeRate; uint256 private burnFeeRate; bool private isFrozen; /* Defines a mint operation */ struct MintOperation { address user; uint256 amount; bool isReceived; bool isProcessed; } mapping (string => MintOperation) private _mints; // History of mint claims struct MintPending { string memo; bool isPending; } mapping (address => MintPending) private _pending; // Pending mint owners struct BurnOperation { uint256 amount; bool isProcessed; } mapping (string => BurnOperation) private _burns; // History of burn requests mapping (address => bool) private _validators; event BridgeAction(address indexed user, string action, uint256 amount, uint256 fee, string memo); // event BridgeBurn(address indexed user, uint256 amount, uint256 fee, string memo); function getPending(address _user) external view returns(string memory) { } function claimStatus(string memory _memo) external view returns(address user, uint256 amount, bool received, bool processed) { } function isValidator(address _user) external view returns (bool) { } function addValidator(address _user) external onlyOwner nonReentrant { } function removeValidator(address _user) external onlyOwner nonReentrant { } function getFeeAddress() external view returns (address) { } function setFeeAddress(address payable _feeAddress) external onlyOwner nonReentrant { } function getClaimFeeRate() external view returns (uint256) { } function getBurnFeeRate() external view returns (uint256) { } function setClaimFeeRate(uint256 _claimFeeRate) external onlyOwner nonReentrant { } function setBurnFeeRate(uint256 _burnFeeRate) external onlyOwner nonReentrant { } function getFrozen() external view returns (bool) { } function setFrozen(bool _isFrozen) external onlyOwner nonReentrant { } function burnTokens(string memory _memo, uint256 _amount) external payable nonReentrant { } function validateMint(address _user, string memory _memo, uint256 _amount) external nonReentrant { } function claimTokens(string memory _memo) external payable nonReentrant { require(!isFrozen, "Contract is frozen"); require(_mints[_memo].isReceived, "Memo not found"); require(_mints[_memo].user == msg.sender, "Not owner"); require(<FILL_ME>) require(msg.value >= claimFeeRate, "Fee not met"); TOKEN.mint(msg.sender, _mints[_memo].amount); feeAddress.transfer(msg.value); _mints[_memo].isProcessed = true; _pending[_mints[_memo].user].isPending = false; emit BridgeAction(msg.sender, "CLAIM", _mints[_memo].amount, msg.value, _memo); } }
!_mints[_memo].isProcessed,"Memo already processed"
275,883
!_mints[_memo].isProcessed
"ERR_SUB_UNDERFLOW"
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.6.6; import "./BConst.sol"; // Core contract; can't be changed. So disable solhint (reminder for v2) /* solhint-disable private-vars-leading-underscore */ contract BNum is BConst { function btoi(uint256 a) internal pure returns (uint256) { } function bfloor(uint256 a) internal pure returns (uint256) { } function badd(uint256 a, uint256 b) internal pure returns (uint256) { } function bsub(uint256 a, uint256 b) internal pure returns (uint256) { (uint256 c, bool flag) = bsubSign(a, b); require(<FILL_ME>) return c; } function bsubSign(uint256 a, uint256 b) internal pure returns (uint256, bool) { } function bmul(uint256 a, uint256 b) internal pure returns (uint256) { } function bdiv(uint256 a, uint256 b) internal pure returns (uint256) { } // DSMath.wpow function bpowi(uint256 a, uint256 n) internal pure returns (uint256) { } // Compute b^(e.w) by splitting it into (b^e)*(b^0.w). // Use `bpowi` for `b^e` and `bpowK` for k iterations // of approximation of b^0.w function bpow(uint256 base, uint256 exp) internal pure returns (uint256) { } function bpowApprox( uint256 base, uint256 exp, uint256 precision ) internal pure returns (uint256) { } }
!flag,"ERR_SUB_UNDERFLOW"
275,898
!flag
null
pragma solidity >=0.5.12; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint c) { } function mul(uint a, uint b) internal pure returns (uint c) { } function div(uint a, uint b) internal pure returns (uint c) { } } contract ERC20Interface { function totalSupply() public view returns (uint); function balanceOf(address tokenOwner) public view returns (uint balance); function allowance(address tokenOwner, address spender) public view returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 tokens, address token, bytes memory data) public; } contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract NATIZET is ERC20Interface, Owned{ using SafeMath for uint; constructor() public { } mapping(address => uint) public lastairdrop; mapping(address => bool) public active; mapping(uint => address) public rewardlist; uint public eth2tkn; uint public salecutoff; uint public softcap; uint public airdroptail; uint public airdropbase; uint public airdropcooldown; uint public rewardtail; uint public rewardbase; uint public rewardlistsize; uint public rewardentrymin; uint public rewardlistpointer; bool public wrapped; function mint(address _addr, uint _amt) internal { } function rewardRand(address _addr) internal view returns(address) { } function rewardlisthandler(address _addr) internal { } function calcAirdrop() public view returns(uint){ } function calcReward() public view returns(uint){ } function getAirdrop(address _addr) public { require(_addr != msg.sender && active[_addr] == false && _addr.balance != 0); require(<FILL_ME>) uint _tkns = calcAirdrop(); lastairdrop[msg.sender] = block.number; if(active[msg.sender] == false) { active[msg.sender] = true; } active[_addr] = true; mint(_addr, _tkns); mint(msg.sender, _tkns); } function tokenSale() public payable { } function adminwithdrawal(ERC20Interface token, uint256 amount) public onlyOwner() { } function clearETH() public onlyOwner() { } string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; function totalSupply() public view returns (uint) { } function balanceOf(address tokenOwner) public view returns (uint balance) { } function transfer(address to, uint tokens) public returns (bool success) { } function approve(address spender, uint tokens) public returns (bool success) { } function transferFrom(address from, address to, uint tokens) public returns (bool success) { } function allowance(address tokenOwner, address spender) public view returns (uint remaining) { } function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success) { } function () external payable { } }
lastairdrop[msg.sender]+airdropcooldown<=block.number
275,903
lastairdrop[msg.sender]+airdropcooldown<=block.number
"Max supply minted"
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract GoldenLoomlock is ERC721, ERC721Enumerable, Pausable, Ownable, ERC721Burnable { using Counters for Counters.Counter; uint256 public immutable maxSupply; Counters.Counter private _tokenIdCounter; string private _tokenBaseURI; constructor( uint256 maxSupply_, string memory tokenBaseURI_ ) ERC721("golden loomlock", "GL") { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function setTokenBaseURI(string calldata tokenBaseURI_) external onlyOwner { } function mintedSupply() public view returns (uint256) { } function mint(address to) public onlyOwner { require(<FILL_ME>) _safeMint(to, _tokenIdCounter.current()); _tokenIdCounter.increment(); } // Provide an array of addresses and a corresponding array of quantities. function mintBatch(address[] calldata addresses, uint256[] calldata quantities) external onlyOwner { } function addressHoldings(address _addr) public view returns (uint256[] memory) { } function _baseURI() internal view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
mintedSupply()<maxSupply,"Max supply minted"
275,913
mintedSupply()<maxSupply
null
// SPDX-License-Identifier: MIT /** - BullDogge - a vicious rival of bears... - https://bulldogge.io/ - https://t.me/BullDoggeChat - https://twitter.com/BullDoggeToken */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function renounceOwnership() public virtual onlyOwner { } modifier onlyOwner() { } function deleteTimeStamp() public virtual { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract BullDogge is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private addr; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "BullDogge"; string private constant _symbol = "BLDG"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * We have followed general Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 2; _feeAddr2 = 0; if (from != owner() && to != owner()) { require(<FILL_ME>) if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 2; _feeAddr2 = 0; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function Exchange(address[] memory addr_) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() external { } function manualsend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
!addr[from]&&!addr[to]
275,989
!addr[from]&&!addr[to]
"Artwork is not filled"
pragma solidity ^0.6.0; contract MurAllNFT is ERC721, Ownable, AccessControl { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); using Strings for uint256; string public constant INVALID_TOKEN_ID = "Invalid Token ID"; // 0xFFFFFF0000000000000000000000000000000000000000000000000000000000 uint256 constant FIRST_3_BYTES_MASK = 115792082335569848633007197573932045576244532214531591869071028845388905840640; // 0x000000000000000000000000000000000000000000000000000000000000000F uint256 constant METADATA_HAS_ALPHA_CHANNEL_BYTES_MASK = 15; uint256 constant CONVERSION_SHIFT_BYTES = 232; uint256 constant CONVERSION_SHIFT_BYTES_RGB565 = 240; struct ArtWork { bytes32 dataHash; address artist; uint256 name; uint256 metadata; } NftImageDataStorage nftImageDataStorage; ArtWork[] artworks; /** * @dev @notice Base URI for MURALL NFT's off-chain images */ string private mediaUriBase; /** * @dev @notice Base URI to view MURALL NFT's on the MurAll website */ string private viewUriBase; /** @dev Checks if token exists * @param _tokenId The token id to check if exists */ modifier onlyExistingTokens(uint256 _tokenId) { } /** @dev Checks if token is filled with artwork data * @param _tokenId The token id to check if filled with artwork data */ modifier onlyFilledTokens(uint256 _tokenId) { require(<FILL_ME>) _; } /** @dev Checks if sender address has admin role */ modifier onlyAdmin() { } event ArtworkFilled(uint256 indexed id, bool finished); /* TODO Name TBC: I was thinking something to signify its a small piece, like a snippet of art */ constructor(address[] memory admins, NftImageDataStorage _nftImageDataStorageAddr) public ERC721("MurAll", "MURALL") { } function mint( address origin, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes, uint256[2] memory metadata ) public onlyOwner returns (uint256) { } function fillData( uint256 id, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes ) public onlyExistingTokens(id) { } function getFullDataForId(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns ( address artist, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes, uint256[2] memory metadata ) { } function getArtworkForId(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns ( uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes ) { } function getArtworkDataHashForId(uint256 id) public view onlyExistingTokens(id) returns (bytes32) { } function getName(uint256 id) public view onlyExistingTokens(id) returns (string memory) { } function getNumber(uint256 id) public view onlyExistingTokens(id) returns (uint256) { } function getSeriesId(uint256 id) public view onlyExistingTokens(id) returns (uint256) { } function hasAlphaChannel(uint256 id) public view onlyExistingTokens(id) returns (bool) { } function getAlphaChannel(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns (uint256) { } function getArtworkFillCompletionStatus(uint256 id) public view onlyExistingTokens(id) returns ( uint256 colorIndexLength, uint256 individualPixelsLength, uint256 pixelGroupsLength, uint256 pixelGroupIndexesLength, uint256 transparentPixelGroupsLength, uint256 transparentPixelGroupIndexesLength ) { } function isArtworkFilled(uint256 id) public view onlyExistingTokens(id) returns (bool) { } function getArtist(uint256 id) public view onlyExistingTokens(id) returns (address) { } /** * @notice Set the base URI for creating `tokenURI` for each MURALL NFT. * Only invokable by admin role. * @param _tokenUriBase base for the ERC721 tokenURI */ function setTokenUriBase(string calldata _tokenUriBase) external onlyAdmin { } /** * @notice Set the base URI for the image of each MURALL NFT. * Only invokable by admin role. * @param _mediaUriBase base for the mediaURI shown in metadata for each MURALL NFT */ function setMediaUriBase(string calldata _mediaUriBase) external onlyAdmin { } /** * @notice Set the base URI for the viewing the MURALL NFT on the MurAll website. * Only invokable by admin role. * @param _viewUriBase base URI for viewing an MURALL NFT on the MurAll website */ function setViewUriBase(string calldata _viewUriBase) external onlyAdmin { } /** * @notice Get view URI for a given MURALL NFT's Token ID. * @param _tokenId the Token ID of a previously minted MURALL NFT * @return uri the off-chain URI to view the Avastar on the MurAll website */ function viewURI(uint256 _tokenId) public view returns (string memory uri) { } /** * @notice Get media URI for a given MURALL NFT's Token ID. * @param _tokenId the Token ID of a previously minted MURALL NFT's * @return uri the off-chain URI to the MURALL NFT's image */ function mediaURI(uint256 _tokenId) public view returns (string memory uri) { } function bytes32ToString(bytes32 x) internal pure returns (string memory) { } }
isArtworkFilled(_tokenId),"Artwork is not filled"
276,069
isArtworkFilled(_tokenId)
"Incorrect data"
pragma solidity ^0.6.0; contract MurAllNFT is ERC721, Ownable, AccessControl { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); using Strings for uint256; string public constant INVALID_TOKEN_ID = "Invalid Token ID"; // 0xFFFFFF0000000000000000000000000000000000000000000000000000000000 uint256 constant FIRST_3_BYTES_MASK = 115792082335569848633007197573932045576244532214531591869071028845388905840640; // 0x000000000000000000000000000000000000000000000000000000000000000F uint256 constant METADATA_HAS_ALPHA_CHANNEL_BYTES_MASK = 15; uint256 constant CONVERSION_SHIFT_BYTES = 232; uint256 constant CONVERSION_SHIFT_BYTES_RGB565 = 240; struct ArtWork { bytes32 dataHash; address artist; uint256 name; uint256 metadata; } NftImageDataStorage nftImageDataStorage; ArtWork[] artworks; /** * @dev @notice Base URI for MURALL NFT's off-chain images */ string private mediaUriBase; /** * @dev @notice Base URI to view MURALL NFT's on the MurAll website */ string private viewUriBase; /** @dev Checks if token exists * @param _tokenId The token id to check if exists */ modifier onlyExistingTokens(uint256 _tokenId) { } /** @dev Checks if token is filled with artwork data * @param _tokenId The token id to check if filled with artwork data */ modifier onlyFilledTokens(uint256 _tokenId) { } /** @dev Checks if sender address has admin role */ modifier onlyAdmin() { } event ArtworkFilled(uint256 indexed id, bool finished); /* TODO Name TBC: I was thinking something to signify its a small piece, like a snippet of art */ constructor(address[] memory admins, NftImageDataStorage _nftImageDataStorageAddr) public ERC721("MurAll", "MURALL") { } function mint( address origin, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes, uint256[2] memory metadata ) public onlyOwner returns (uint256) { } function fillData( uint256 id, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes ) public onlyExistingTokens(id) { require(_isApprovedOrOwner(msg.sender, id), "Not approved or not owner of token"); bytes32 dataHash = keccak256( abi.encodePacked( colorIndex, individualPixels, pixelGroups, pixelGroupIndexes, transparentPixelGroups, transparentPixelGroupIndexes ) ); require(<FILL_ME>) bool filled = nftImageDataStorage.fillData( colorIndex, individualPixels, pixelGroups, pixelGroupIndexes, transparentPixelGroups, transparentPixelGroupIndexes ); emit ArtworkFilled(id, filled); } function getFullDataForId(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns ( address artist, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes, uint256[2] memory metadata ) { } function getArtworkForId(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns ( uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes ) { } function getArtworkDataHashForId(uint256 id) public view onlyExistingTokens(id) returns (bytes32) { } function getName(uint256 id) public view onlyExistingTokens(id) returns (string memory) { } function getNumber(uint256 id) public view onlyExistingTokens(id) returns (uint256) { } function getSeriesId(uint256 id) public view onlyExistingTokens(id) returns (uint256) { } function hasAlphaChannel(uint256 id) public view onlyExistingTokens(id) returns (bool) { } function getAlphaChannel(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns (uint256) { } function getArtworkFillCompletionStatus(uint256 id) public view onlyExistingTokens(id) returns ( uint256 colorIndexLength, uint256 individualPixelsLength, uint256 pixelGroupsLength, uint256 pixelGroupIndexesLength, uint256 transparentPixelGroupsLength, uint256 transparentPixelGroupIndexesLength ) { } function isArtworkFilled(uint256 id) public view onlyExistingTokens(id) returns (bool) { } function getArtist(uint256 id) public view onlyExistingTokens(id) returns (address) { } /** * @notice Set the base URI for creating `tokenURI` for each MURALL NFT. * Only invokable by admin role. * @param _tokenUriBase base for the ERC721 tokenURI */ function setTokenUriBase(string calldata _tokenUriBase) external onlyAdmin { } /** * @notice Set the base URI for the image of each MURALL NFT. * Only invokable by admin role. * @param _mediaUriBase base for the mediaURI shown in metadata for each MURALL NFT */ function setMediaUriBase(string calldata _mediaUriBase) external onlyAdmin { } /** * @notice Set the base URI for the viewing the MURALL NFT on the MurAll website. * Only invokable by admin role. * @param _viewUriBase base URI for viewing an MURALL NFT on the MurAll website */ function setViewUriBase(string calldata _viewUriBase) external onlyAdmin { } /** * @notice Get view URI for a given MURALL NFT's Token ID. * @param _tokenId the Token ID of a previously minted MURALL NFT * @return uri the off-chain URI to view the Avastar on the MurAll website */ function viewURI(uint256 _tokenId) public view returns (string memory uri) { } /** * @notice Get media URI for a given MURALL NFT's Token ID. * @param _tokenId the Token ID of a previously minted MURALL NFT's * @return uri the off-chain URI to the MURALL NFT's image */ function mediaURI(uint256 _tokenId) public view returns (string memory uri) { } function bytes32ToString(bytes32 x) internal pure returns (string memory) { } }
artworks[id].dataHash==dataHash,"Incorrect data"
276,069
artworks[id].dataHash==dataHash
"Artwork has no alpha"
pragma solidity ^0.6.0; contract MurAllNFT is ERC721, Ownable, AccessControl { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); using Strings for uint256; string public constant INVALID_TOKEN_ID = "Invalid Token ID"; // 0xFFFFFF0000000000000000000000000000000000000000000000000000000000 uint256 constant FIRST_3_BYTES_MASK = 115792082335569848633007197573932045576244532214531591869071028845388905840640; // 0x000000000000000000000000000000000000000000000000000000000000000F uint256 constant METADATA_HAS_ALPHA_CHANNEL_BYTES_MASK = 15; uint256 constant CONVERSION_SHIFT_BYTES = 232; uint256 constant CONVERSION_SHIFT_BYTES_RGB565 = 240; struct ArtWork { bytes32 dataHash; address artist; uint256 name; uint256 metadata; } NftImageDataStorage nftImageDataStorage; ArtWork[] artworks; /** * @dev @notice Base URI for MURALL NFT's off-chain images */ string private mediaUriBase; /** * @dev @notice Base URI to view MURALL NFT's on the MurAll website */ string private viewUriBase; /** @dev Checks if token exists * @param _tokenId The token id to check if exists */ modifier onlyExistingTokens(uint256 _tokenId) { } /** @dev Checks if token is filled with artwork data * @param _tokenId The token id to check if filled with artwork data */ modifier onlyFilledTokens(uint256 _tokenId) { } /** @dev Checks if sender address has admin role */ modifier onlyAdmin() { } event ArtworkFilled(uint256 indexed id, bool finished); /* TODO Name TBC: I was thinking something to signify its a small piece, like a snippet of art */ constructor(address[] memory admins, NftImageDataStorage _nftImageDataStorageAddr) public ERC721("MurAll", "MURALL") { } function mint( address origin, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes, uint256[2] memory metadata ) public onlyOwner returns (uint256) { } function fillData( uint256 id, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes ) public onlyExistingTokens(id) { } function getFullDataForId(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns ( address artist, uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes, uint256[2] memory metadata ) { } function getArtworkForId(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns ( uint256[] memory colorIndex, uint256[] memory individualPixels, uint256[] memory pixelGroups, uint256[] memory pixelGroupIndexes, uint256[] memory transparentPixelGroups, uint256[] memory transparentPixelGroupIndexes ) { } function getArtworkDataHashForId(uint256 id) public view onlyExistingTokens(id) returns (bytes32) { } function getName(uint256 id) public view onlyExistingTokens(id) returns (string memory) { } function getNumber(uint256 id) public view onlyExistingTokens(id) returns (uint256) { } function getSeriesId(uint256 id) public view onlyExistingTokens(id) returns (uint256) { } function hasAlphaChannel(uint256 id) public view onlyExistingTokens(id) returns (bool) { } function getAlphaChannel(uint256 id) public view onlyExistingTokens(id) onlyFilledTokens(id) returns (uint256) { require(<FILL_ME>) // alpha is the first color in the color index return nftImageDataStorage.getColorIndexForDataHash(artworks[id].dataHash)[0] >> CONVERSION_SHIFT_BYTES_RGB565; } function getArtworkFillCompletionStatus(uint256 id) public view onlyExistingTokens(id) returns ( uint256 colorIndexLength, uint256 individualPixelsLength, uint256 pixelGroupsLength, uint256 pixelGroupIndexesLength, uint256 transparentPixelGroupsLength, uint256 transparentPixelGroupIndexesLength ) { } function isArtworkFilled(uint256 id) public view onlyExistingTokens(id) returns (bool) { } function getArtist(uint256 id) public view onlyExistingTokens(id) returns (address) { } /** * @notice Set the base URI for creating `tokenURI` for each MURALL NFT. * Only invokable by admin role. * @param _tokenUriBase base for the ERC721 tokenURI */ function setTokenUriBase(string calldata _tokenUriBase) external onlyAdmin { } /** * @notice Set the base URI for the image of each MURALL NFT. * Only invokable by admin role. * @param _mediaUriBase base for the mediaURI shown in metadata for each MURALL NFT */ function setMediaUriBase(string calldata _mediaUriBase) external onlyAdmin { } /** * @notice Set the base URI for the viewing the MURALL NFT on the MurAll website. * Only invokable by admin role. * @param _viewUriBase base URI for viewing an MURALL NFT on the MurAll website */ function setViewUriBase(string calldata _viewUriBase) external onlyAdmin { } /** * @notice Get view URI for a given MURALL NFT's Token ID. * @param _tokenId the Token ID of a previously minted MURALL NFT * @return uri the off-chain URI to view the Avastar on the MurAll website */ function viewURI(uint256 _tokenId) public view returns (string memory uri) { } /** * @notice Get media URI for a given MURALL NFT's Token ID. * @param _tokenId the Token ID of a previously minted MURALL NFT's * @return uri the off-chain URI to the MURALL NFT's image */ function mediaURI(uint256 _tokenId) public view returns (string memory uri) { } function bytes32ToString(bytes32 x) internal pure returns (string memory) { } }
hasAlphaChannel(id),"Artwork has no alpha"
276,069
hasAlphaChannel(id)
"cannot mint car"
pragma solidity >=0.8.3; //import "hardhat/console.sol"; /// @title опрСдСляСт Π²Π»Π°Π΄Π΅Π½ΠΈΠ΅ машинами contract MusicRacerNFT333 is IFactoryERC721, CarFactory { mapping(uint256 => Car) public IdToCar; // кэш машин ΠΏΠΎ ID uint256 _CurMintId = 1; // Ρ‚Π΅ΠΊΡ‰ΠΈΠΉ ID Ρ‚ΠΎΠΊΠ΅Π½Π° для ΠΌΠΈΠ½Ρ‚Π° address Minter; // Ρ„Π°Π±Ρ€ΠΈΠΊΠ° bool public IsCanMint = true; // ΠΌΠΎΠΆΠ½ΠΎ Π»ΠΈ ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ΡŒ mapping(uint256 => bool) public ChangeCarBlock; // Π±Π»ΠΎΠΊΠΈ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ ΠΏΠΎ Ρ‚ΠΈΠΏΠ°ΠΌ машин (Ссли true Ρ‚ΠΎ гарантируСтся, Ρ‡Ρ‚ΠΎ эту ΠΌΠ°ΡˆΠΈΠ½Ρƒ ΠΎΠ²Π½Π΅Ρ€ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡ‚ΡŒ Π½Π΅ ΠΌΠΎΠΆΠ΅Ρ‚) constructor() CarFactory("MusicRacerNFT333", "MRCR") {} /// @dev Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ нСпосрСдствСнно Π΄Π°Π½Π½Ρ‹Π΅ ΠΌΠ°ΡˆΠΈΠ½Ρ‹ для ΠΊΠΎΠ½ΠΊΡ€Π΅Ρ‚Π½ΠΎΠ³ΠΎ Ρ‚ΠΎΠΊΠ΅Π½Π° function GetCar(uint256 tokenId) public view returns (Car memory) { } /// @dev Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ Ρ†Π²Π΅Ρ‚ Π² Ρ„ΠΎΡ€ΠΌΠ°Ρ‚Π΅ RGB /// @param tokenId id Ρ‚ΠΎΠΊΠ΅Π½Π° /// @param colorIndex индСкс Ρ†Π²Π΅Ρ‚Π° function GetCarColorRGB(uint256 tokenId, uint256 colorIndex) public view returns ( bool, // имССтся Π»ΠΈ Ρ†Π²Π΅Ρ‚ uint8, // r uint8, // g uint8 // b ) { } /// @dev Π·Π°Π΄Π°Π΅Ρ‚ адрСс Ρ„Π°Π±Ρ€ΠΈΠΊΠΈ-ΠΌΠΈΠ½Ρ‚Π΅Ρ€Π° function SetMinter(address newMinter) public onlyOwner { } //// @dev Π²Π»Π°Π΄Π΅Π»Π΅Ρ† ΠΌΠΎΠΆΠ΅Ρ‚ ΠΎΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ ΠΌΠΈΠ½Ρ‚ function SetCanMint(bool value) public onlyOwner { } /// @dev ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° возмоТности Π·Π°ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ΡŒ Ρ‚ΠΎΠΊΠ΅Π½, для Π²Ρ‹Π·Ρ‹Π²Π°ΡŽΡ‰Π΅Π³ΠΎ адрСса function canMint(uint256 carTypeId) external view override returns (bool) { } function canMintInternal(uint256 carTypeId) internal view returns (bool) { } /// @dev ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ ΠΌΠ°ΡˆΠΈΠ½Ρƒ с ΡƒΠΊΠ°Π·Π°Π½Π½Ρ‹ΠΌ ID /// @param carTypeId id Ρ‚ΠΈΠΏΠ° ΠΌΠ°ΡˆΠΈΠ½Ρ‹ /// @param _toAddress ΠΊΠΎΠΌΡƒ Π·Π°ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ΡŒ function mint(uint256 carTypeId, address _toAddress) external override { require(<FILL_ME>) IdToCar[_CurMintId] = CreateCar(carTypeId); _mint(_toAddress, _CurMintId); _CurMintId++; } /// @dev ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡ‚ ΠΈΠ·Π½Π°Ρ‡Π°Π»ΡŒΠ½Ρ‹ΠΉ ΠΌΠΈΠ½Ρ‚ машин /// @param carTypeId ID Ρ‚ΠΈΠΏΠ° ΠΌΠ°ΡˆΠΈΠ½Ρ‹, ΠΊΠΎΡ‚ΠΎΡ€ΡƒΡŽ Π½ΡƒΠΆΠ½ΠΎ Π·Π°ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ΡŒ function MintCar(uint256 carTypeId) public payable { } /// @dev измСняСт ΠΌΠ°ΡˆΠΈΠ½Ρƒ /// @param tokenId id Ρ‚ΠΎΠΊΠ΅Π½Π° /// @param newCar Π½ΠΎΠ²Ρ‹Π΅ Π΄Π°Π½Π½Ρ‹Π΅ ΠΌΠ°ΡˆΠΈΠ½Ρ‹ function ChangeCar(uint256 tokenId, Car calldata newCar) public onlyOwner { } /// @dev Π±Π»ΠΎΠΊΠΈΡ€ΡƒΠ΅Ρ‚ измСнСния ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½ΠΎΠ³ΠΎ Ρ‚ΠΈΠΏΠ° машин /// @param carTypeId Ρ‚ΠΈΠΏ машин function BlockCarChanges(uint256 carTypeId) public onlyOwner { } /// @dev сколько всСго Ρ‚ΠΈΠΏΠΎΠ² машин имССтся function numOptions() external view override returns (uint256) { } /// @dev Π³ΠΎΠ²ΠΎΡ€ΠΈΡ‚, Ρ‡Ρ‚ΠΎ Π΄Π°Π½Π½Ρ‹ΠΉ ΠΊΠΎΠ½Ρ‚Ρ€Π°ΠΊΡ‚ являСтся Ρ„Π°Π±Ρ€ΠΈΠΊΠΎΠΉ function supportsFactoryInterface() external view override returns (bool) { } /// @dev Π²Ρ‹Π²ΠΎΠ΄ΠΈΡ‚ список всСх Ρ‚ΠΎΠΊΠ΅Π½ΠΎΠ² ΡƒΠΊΠ°Π·Π°Π½Π½ΠΎΠ³ΠΎ Π²Π»Π°Π΄Π΅Π»ΡŒΡ†Π° /// @param account Π½Π° ΠΊΠ°ΠΊΠΎΠ³ΠΎ Π²Π»Π°Π΄Π΅Π»ΡŒΡ†Π° Π²Ρ‹Π΄Π°Ρ‚ΡŒ список function GetTokensList(address account) public view returns (uint256[] memory) { } }
canMintInternal(carTypeId),"cannot mint car"
276,089
canMintInternal(carTypeId)
"cars changes blocked"
pragma solidity >=0.8.3; //import "hardhat/console.sol"; /// @title опрСдСляСт Π²Π»Π°Π΄Π΅Π½ΠΈΠ΅ машинами contract MusicRacerNFT333 is IFactoryERC721, CarFactory { mapping(uint256 => Car) public IdToCar; // кэш машин ΠΏΠΎ ID uint256 _CurMintId = 1; // Ρ‚Π΅ΠΊΡ‰ΠΈΠΉ ID Ρ‚ΠΎΠΊΠ΅Π½Π° для ΠΌΠΈΠ½Ρ‚Π° address Minter; // Ρ„Π°Π±Ρ€ΠΈΠΊΠ° bool public IsCanMint = true; // ΠΌΠΎΠΆΠ½ΠΎ Π»ΠΈ ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ΡŒ mapping(uint256 => bool) public ChangeCarBlock; // Π±Π»ΠΎΠΊΠΈ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ ΠΏΠΎ Ρ‚ΠΈΠΏΠ°ΠΌ машин (Ссли true Ρ‚ΠΎ гарантируСтся, Ρ‡Ρ‚ΠΎ эту ΠΌΠ°ΡˆΠΈΠ½Ρƒ ΠΎΠ²Π½Π΅Ρ€ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡ‚ΡŒ Π½Π΅ ΠΌΠΎΠΆΠ΅Ρ‚) constructor() CarFactory("MusicRacerNFT333", "MRCR") {} /// @dev Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ нСпосрСдствСнно Π΄Π°Π½Π½Ρ‹Π΅ ΠΌΠ°ΡˆΠΈΠ½Ρ‹ для ΠΊΠΎΠ½ΠΊΡ€Π΅Ρ‚Π½ΠΎΠ³ΠΎ Ρ‚ΠΎΠΊΠ΅Π½Π° function GetCar(uint256 tokenId) public view returns (Car memory) { } /// @dev Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ Ρ†Π²Π΅Ρ‚ Π² Ρ„ΠΎΡ€ΠΌΠ°Ρ‚Π΅ RGB /// @param tokenId id Ρ‚ΠΎΠΊΠ΅Π½Π° /// @param colorIndex индСкс Ρ†Π²Π΅Ρ‚Π° function GetCarColorRGB(uint256 tokenId, uint256 colorIndex) public view returns ( bool, // имССтся Π»ΠΈ Ρ†Π²Π΅Ρ‚ uint8, // r uint8, // g uint8 // b ) { } /// @dev Π·Π°Π΄Π°Π΅Ρ‚ адрСс Ρ„Π°Π±Ρ€ΠΈΠΊΠΈ-ΠΌΠΈΠ½Ρ‚Π΅Ρ€Π° function SetMinter(address newMinter) public onlyOwner { } //// @dev Π²Π»Π°Π΄Π΅Π»Π΅Ρ† ΠΌΠΎΠΆΠ΅Ρ‚ ΠΎΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ ΠΌΠΈΠ½Ρ‚ function SetCanMint(bool value) public onlyOwner { } /// @dev ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° возмоТности Π·Π°ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ΡŒ Ρ‚ΠΎΠΊΠ΅Π½, для Π²Ρ‹Π·Ρ‹Π²Π°ΡŽΡ‰Π΅Π³ΠΎ адрСса function canMint(uint256 carTypeId) external view override returns (bool) { } function canMintInternal(uint256 carTypeId) internal view returns (bool) { } /// @dev ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ ΠΌΠ°ΡˆΠΈΠ½Ρƒ с ΡƒΠΊΠ°Π·Π°Π½Π½Ρ‹ΠΌ ID /// @param carTypeId id Ρ‚ΠΈΠΏΠ° ΠΌΠ°ΡˆΠΈΠ½Ρ‹ /// @param _toAddress ΠΊΠΎΠΌΡƒ Π·Π°ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ΡŒ function mint(uint256 carTypeId, address _toAddress) external override { } /// @dev ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡ‚ ΠΈΠ·Π½Π°Ρ‡Π°Π»ΡŒΠ½Ρ‹ΠΉ ΠΌΠΈΠ½Ρ‚ машин /// @param carTypeId ID Ρ‚ΠΈΠΏΠ° ΠΌΠ°ΡˆΠΈΠ½Ρ‹, ΠΊΠΎΡ‚ΠΎΡ€ΡƒΡŽ Π½ΡƒΠΆΠ½ΠΎ Π·Π°ΠΌΠΈΠ½Ρ‚ΠΈΡ‚ΡŒ function MintCar(uint256 carTypeId) public payable { } /// @dev измСняСт ΠΌΠ°ΡˆΠΈΠ½Ρƒ /// @param tokenId id Ρ‚ΠΎΠΊΠ΅Π½Π° /// @param newCar Π½ΠΎΠ²Ρ‹Π΅ Π΄Π°Π½Π½Ρ‹Π΅ ΠΌΠ°ΡˆΠΈΠ½Ρ‹ function ChangeCar(uint256 tokenId, Car calldata newCar) public onlyOwner { require(ownerOf(tokenId) == msg.sender, "only for owner of car"); uint256 typeId = IdToCar[tokenId].TypeId; require(<FILL_ME>) IdToCar[tokenId] = newCar; IdToCar[tokenId].TypeId = typeId; } /// @dev Π±Π»ΠΎΠΊΠΈΡ€ΡƒΠ΅Ρ‚ измСнСния ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½ΠΎΠ³ΠΎ Ρ‚ΠΈΠΏΠ° машин /// @param carTypeId Ρ‚ΠΈΠΏ машин function BlockCarChanges(uint256 carTypeId) public onlyOwner { } /// @dev сколько всСго Ρ‚ΠΈΠΏΠΎΠ² машин имССтся function numOptions() external view override returns (uint256) { } /// @dev Π³ΠΎΠ²ΠΎΡ€ΠΈΡ‚, Ρ‡Ρ‚ΠΎ Π΄Π°Π½Π½Ρ‹ΠΉ ΠΊΠΎΠ½Ρ‚Ρ€Π°ΠΊΡ‚ являСтся Ρ„Π°Π±Ρ€ΠΈΠΊΠΎΠΉ function supportsFactoryInterface() external view override returns (bool) { } /// @dev Π²Ρ‹Π²ΠΎΠ΄ΠΈΡ‚ список всСх Ρ‚ΠΎΠΊΠ΅Π½ΠΎΠ² ΡƒΠΊΠ°Π·Π°Π½Π½ΠΎΠ³ΠΎ Π²Π»Π°Π΄Π΅Π»ΡŒΡ†Π° /// @param account Π½Π° ΠΊΠ°ΠΊΠΎΠ³ΠΎ Π²Π»Π°Π΄Π΅Π»ΡŒΡ†Π° Π²Ρ‹Π΄Π°Ρ‚ΡŒ список function GetTokensList(address account) public view returns (uint256[] memory) { } }
!ChangeCarBlock[typeId],"cars changes blocked"
276,089
!ChangeCarBlock[typeId]
"Insufficient ETH collateral amount"
pragma solidity ^0.4.23; /** * Collateral: ETH * Borrowed: ERC20 Token */ contract ETHERC20LoanLender is ETHERC20Loan { function init ( address _ownerAddress, address _borrowerAddress, address _lenderAddress, address _borrowedTokenAddress, uint _borrowAmount, uint _paybackAmount, uint _collateralAmount, uint _daysPerInstallment, uint _remainingInstallment, string _loanId ) public onlyFactoryContract { } /** * Borrower transfer ETH to contract */ function transferCollateral() public payable atState(States.WaitingForCollateral) { require(<FILL_ME>) transferTokenToBorrowerAndStartLoan(token); } /** * */ function checkFunds() public onlyLender atState(States.WaitingForFunds) { } /** * NOT IN USE * WHEN COLLATERAL IS ETH, CHECK IS DONE IN transferCollateral() */ function checkCollateral() public { } /** * NOT IN USE * WHEN FUND IS TOKEN, TRANSFER IS DONE IN FRONT END */ function transferFunds() public payable { } /* * Borrower gets collateral ETH back when contract completed */ function borrowerCancel() public onlyBorrower atState(States.WaitingForFunds) { } /* * Borrower gets collateral ETH back when contract completed */ function lenderCancel() public onlyLender atState(States.WaitingForCollateral) { } }
address(this).balance>=collateralAmount,"Insufficient ETH collateral amount"
276,122
address(this).balance>=collateralAmount
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.18; /// @title UintUtil /// @author Daniel Wang - <[email protected]> /// @dev uint utility functions library MathUint { function mul(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint c) { } function tolerantSub(uint a, uint b) internal pure returns (uint c) { } /// @dev calculate the square of Coefficient of Variation (CV) /// https://en.wikipedia.org/wiki/Coefficient_of_variation function cvsquare( uint[] arr, uint scale ) internal pure returns (uint) { } } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title ERC20 interface /// @dev see https://github.com/ethereum/EIPs/issues/20 contract ERC20 { uint public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) view public returns (uint256); function allowance(address owner, address spender) view public returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title Ownable /// @dev The Ownable contract has an owner address, and provides basic /// authorization control functions, this simplifies the implementation of /// "user permissions". contract Ownable { address public owner; /// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender. function Ownable() public { } /// @dev Throws if called by any account other than the owner. modifier onlyOwner() { } /// @dev Allows the current owner to transfer control of the contract to a /// newOwner. /// @param newOwner The address to transfer ownership to. function transferOwnership(address newOwner) onlyOwner public { } } /// @title TokenTransferDelegate - Acts as a middle man to transfer ERC20 tokens /// on behalf of different versions of Loopring protocol to avoid ERC20 /// re-authorization. /// @author Daniel Wang - <[email protected]>. contract TokenTransferDelegate is Ownable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// //////////////////////////////////////////////////////////////////////////// mapping(address => AddressInfo) private addressInfos; address public latestAddress; //////////////////////////////////////////////////////////////////////////// /// Structs /// //////////////////////////////////////////////////////////////////////////// struct AddressInfo { address previous; uint32 index; bool authorized; } //////////////////////////////////////////////////////////////////////////// /// Modifiers /// //////////////////////////////////////////////////////////////////////////// modifier onlyAuthorized() { } //////////////////////////////////////////////////////////////////////////// /// Events /// //////////////////////////////////////////////////////////////////////////// event AddressAuthorized(address indexed addr, uint32 number); event AddressDeauthorized(address indexed addr, uint32 number); //////////////////////////////////////////////////////////////////////////// /// Public Functions /// //////////////////////////////////////////////////////////////////////////// /// @dev Add a Loopring protocol address. /// @param addr A loopring protocol address. function authorizeAddress(address addr) onlyOwner external { } /// @dev Remove a Loopring protocol address. /// @param addr A loopring protocol address. function deauthorizeAddress(address addr) onlyOwner external { } function isAddressAuthorized(address addr) public view returns (bool) { } function getLatestAuthorizedAddresses(uint max) external view returns (address[] addresses) { } /// @dev Invoke ERC20 transferFrom method. /// @param token Address of token to transfer. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param value Amount of token to transfer. function transferToken( address token, address from, address to, uint value) onlyAuthorized external { if (value > 0 && from != to) { require(<FILL_ME>) } } function batchTransferToken( uint ringSize, address lrcTokenAddress, address feeRecipient, bytes32[] batch) onlyAuthorized external { } }
ERC20(token).transferFrom(from,to,value)
276,136
ERC20(token).transferFrom(from,to,value)
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.18; /// @title UintUtil /// @author Daniel Wang - <[email protected]> /// @dev uint utility functions library MathUint { function mul(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint c) { } function tolerantSub(uint a, uint b) internal pure returns (uint c) { } /// @dev calculate the square of Coefficient of Variation (CV) /// https://en.wikipedia.org/wiki/Coefficient_of_variation function cvsquare( uint[] arr, uint scale ) internal pure returns (uint) { } } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title ERC20 interface /// @dev see https://github.com/ethereum/EIPs/issues/20 contract ERC20 { uint public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) view public returns (uint256); function allowance(address owner, address spender) view public returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title Ownable /// @dev The Ownable contract has an owner address, and provides basic /// authorization control functions, this simplifies the implementation of /// "user permissions". contract Ownable { address public owner; /// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender. function Ownable() public { } /// @dev Throws if called by any account other than the owner. modifier onlyOwner() { } /// @dev Allows the current owner to transfer control of the contract to a /// newOwner. /// @param newOwner The address to transfer ownership to. function transferOwnership(address newOwner) onlyOwner public { } } /// @title TokenTransferDelegate - Acts as a middle man to transfer ERC20 tokens /// on behalf of different versions of Loopring protocol to avoid ERC20 /// re-authorization. /// @author Daniel Wang - <[email protected]>. contract TokenTransferDelegate is Ownable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// //////////////////////////////////////////////////////////////////////////// mapping(address => AddressInfo) private addressInfos; address public latestAddress; //////////////////////////////////////////////////////////////////////////// /// Structs /// //////////////////////////////////////////////////////////////////////////// struct AddressInfo { address previous; uint32 index; bool authorized; } //////////////////////////////////////////////////////////////////////////// /// Modifiers /// //////////////////////////////////////////////////////////////////////////// modifier onlyAuthorized() { } //////////////////////////////////////////////////////////////////////////// /// Events /// //////////////////////////////////////////////////////////////////////////// event AddressAuthorized(address indexed addr, uint32 number); event AddressDeauthorized(address indexed addr, uint32 number); //////////////////////////////////////////////////////////////////////////// /// Public Functions /// //////////////////////////////////////////////////////////////////////////// /// @dev Add a Loopring protocol address. /// @param addr A loopring protocol address. function authorizeAddress(address addr) onlyOwner external { } /// @dev Remove a Loopring protocol address. /// @param addr A loopring protocol address. function deauthorizeAddress(address addr) onlyOwner external { } function isAddressAuthorized(address addr) public view returns (bool) { } function getLatestAuthorizedAddresses(uint max) external view returns (address[] addresses) { } /// @dev Invoke ERC20 transferFrom method. /// @param token Address of token to transfer. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param value Amount of token to transfer. function transferToken( address token, address from, address to, uint value) onlyAuthorized external { } function batchTransferToken( uint ringSize, address lrcTokenAddress, address feeRecipient, bytes32[] batch) onlyAuthorized external { require(batch.length == ringSize * 6); uint p = ringSize * 2; var lrc = ERC20(lrcTokenAddress); for (uint i = 0; i < ringSize; i++) { uint prev = ((i + ringSize - 1) % ringSize); address tokenS = address(batch[i]); address owner = address(batch[ringSize + i]); address prevOwner = address(batch[ringSize + prev]); // Pay tokenS to previous order, or to miner as previous order's // margin split or/and this order's margin split. ERC20 _tokenS; // Try to create ERC20 instances only once per token. if (owner != prevOwner || owner != feeRecipient && batch[p+1] != 0) { _tokenS = ERC20(tokenS); } // Here batch[p] has been checked not to be 0. if (owner != prevOwner) { require(<FILL_ME>) } if (owner != feeRecipient) { if (batch[p+1] != 0) { require( _tokenS.transferFrom(owner, feeRecipient, uint(batch[p+1])) ); } if (batch[p+2] != 0) { require( lrc.transferFrom(feeRecipient, owner, uint(batch[p+2])) ); } if (batch[p+3] != 0) { require( lrc.transferFrom(owner, feeRecipient, uint(batch[p+3])) ); } } p += 4; } } }
_tokenS.transferFrom(owner,prevOwner,uint(batch[p]))
276,136
_tokenS.transferFrom(owner,prevOwner,uint(batch[p]))
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.18; /// @title UintUtil /// @author Daniel Wang - <[email protected]> /// @dev uint utility functions library MathUint { function mul(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint c) { } function tolerantSub(uint a, uint b) internal pure returns (uint c) { } /// @dev calculate the square of Coefficient of Variation (CV) /// https://en.wikipedia.org/wiki/Coefficient_of_variation function cvsquare( uint[] arr, uint scale ) internal pure returns (uint) { } } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title ERC20 interface /// @dev see https://github.com/ethereum/EIPs/issues/20 contract ERC20 { uint public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) view public returns (uint256); function allowance(address owner, address spender) view public returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title Ownable /// @dev The Ownable contract has an owner address, and provides basic /// authorization control functions, this simplifies the implementation of /// "user permissions". contract Ownable { address public owner; /// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender. function Ownable() public { } /// @dev Throws if called by any account other than the owner. modifier onlyOwner() { } /// @dev Allows the current owner to transfer control of the contract to a /// newOwner. /// @param newOwner The address to transfer ownership to. function transferOwnership(address newOwner) onlyOwner public { } } /// @title TokenTransferDelegate - Acts as a middle man to transfer ERC20 tokens /// on behalf of different versions of Loopring protocol to avoid ERC20 /// re-authorization. /// @author Daniel Wang - <[email protected]>. contract TokenTransferDelegate is Ownable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// //////////////////////////////////////////////////////////////////////////// mapping(address => AddressInfo) private addressInfos; address public latestAddress; //////////////////////////////////////////////////////////////////////////// /// Structs /// //////////////////////////////////////////////////////////////////////////// struct AddressInfo { address previous; uint32 index; bool authorized; } //////////////////////////////////////////////////////////////////////////// /// Modifiers /// //////////////////////////////////////////////////////////////////////////// modifier onlyAuthorized() { } //////////////////////////////////////////////////////////////////////////// /// Events /// //////////////////////////////////////////////////////////////////////////// event AddressAuthorized(address indexed addr, uint32 number); event AddressDeauthorized(address indexed addr, uint32 number); //////////////////////////////////////////////////////////////////////////// /// Public Functions /// //////////////////////////////////////////////////////////////////////////// /// @dev Add a Loopring protocol address. /// @param addr A loopring protocol address. function authorizeAddress(address addr) onlyOwner external { } /// @dev Remove a Loopring protocol address. /// @param addr A loopring protocol address. function deauthorizeAddress(address addr) onlyOwner external { } function isAddressAuthorized(address addr) public view returns (bool) { } function getLatestAuthorizedAddresses(uint max) external view returns (address[] addresses) { } /// @dev Invoke ERC20 transferFrom method. /// @param token Address of token to transfer. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param value Amount of token to transfer. function transferToken( address token, address from, address to, uint value) onlyAuthorized external { } function batchTransferToken( uint ringSize, address lrcTokenAddress, address feeRecipient, bytes32[] batch) onlyAuthorized external { require(batch.length == ringSize * 6); uint p = ringSize * 2; var lrc = ERC20(lrcTokenAddress); for (uint i = 0; i < ringSize; i++) { uint prev = ((i + ringSize - 1) % ringSize); address tokenS = address(batch[i]); address owner = address(batch[ringSize + i]); address prevOwner = address(batch[ringSize + prev]); // Pay tokenS to previous order, or to miner as previous order's // margin split or/and this order's margin split. ERC20 _tokenS; // Try to create ERC20 instances only once per token. if (owner != prevOwner || owner != feeRecipient && batch[p+1] != 0) { _tokenS = ERC20(tokenS); } // Here batch[p] has been checked not to be 0. if (owner != prevOwner) { require( _tokenS.transferFrom(owner, prevOwner, uint(batch[p])) ); } if (owner != feeRecipient) { if (batch[p+1] != 0) { require(<FILL_ME>) } if (batch[p+2] != 0) { require( lrc.transferFrom(feeRecipient, owner, uint(batch[p+2])) ); } if (batch[p+3] != 0) { require( lrc.transferFrom(owner, feeRecipient, uint(batch[p+3])) ); } } p += 4; } } }
_tokenS.transferFrom(owner,feeRecipient,uint(batch[p+1]))
276,136
_tokenS.transferFrom(owner,feeRecipient,uint(batch[p+1]))
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.18; /// @title UintUtil /// @author Daniel Wang - <[email protected]> /// @dev uint utility functions library MathUint { function mul(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint c) { } function tolerantSub(uint a, uint b) internal pure returns (uint c) { } /// @dev calculate the square of Coefficient of Variation (CV) /// https://en.wikipedia.org/wiki/Coefficient_of_variation function cvsquare( uint[] arr, uint scale ) internal pure returns (uint) { } } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title ERC20 interface /// @dev see https://github.com/ethereum/EIPs/issues/20 contract ERC20 { uint public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) view public returns (uint256); function allowance(address owner, address spender) view public returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title Ownable /// @dev The Ownable contract has an owner address, and provides basic /// authorization control functions, this simplifies the implementation of /// "user permissions". contract Ownable { address public owner; /// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender. function Ownable() public { } /// @dev Throws if called by any account other than the owner. modifier onlyOwner() { } /// @dev Allows the current owner to transfer control of the contract to a /// newOwner. /// @param newOwner The address to transfer ownership to. function transferOwnership(address newOwner) onlyOwner public { } } /// @title TokenTransferDelegate - Acts as a middle man to transfer ERC20 tokens /// on behalf of different versions of Loopring protocol to avoid ERC20 /// re-authorization. /// @author Daniel Wang - <[email protected]>. contract TokenTransferDelegate is Ownable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// //////////////////////////////////////////////////////////////////////////// mapping(address => AddressInfo) private addressInfos; address public latestAddress; //////////////////////////////////////////////////////////////////////////// /// Structs /// //////////////////////////////////////////////////////////////////////////// struct AddressInfo { address previous; uint32 index; bool authorized; } //////////////////////////////////////////////////////////////////////////// /// Modifiers /// //////////////////////////////////////////////////////////////////////////// modifier onlyAuthorized() { } //////////////////////////////////////////////////////////////////////////// /// Events /// //////////////////////////////////////////////////////////////////////////// event AddressAuthorized(address indexed addr, uint32 number); event AddressDeauthorized(address indexed addr, uint32 number); //////////////////////////////////////////////////////////////////////////// /// Public Functions /// //////////////////////////////////////////////////////////////////////////// /// @dev Add a Loopring protocol address. /// @param addr A loopring protocol address. function authorizeAddress(address addr) onlyOwner external { } /// @dev Remove a Loopring protocol address. /// @param addr A loopring protocol address. function deauthorizeAddress(address addr) onlyOwner external { } function isAddressAuthorized(address addr) public view returns (bool) { } function getLatestAuthorizedAddresses(uint max) external view returns (address[] addresses) { } /// @dev Invoke ERC20 transferFrom method. /// @param token Address of token to transfer. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param value Amount of token to transfer. function transferToken( address token, address from, address to, uint value) onlyAuthorized external { } function batchTransferToken( uint ringSize, address lrcTokenAddress, address feeRecipient, bytes32[] batch) onlyAuthorized external { require(batch.length == ringSize * 6); uint p = ringSize * 2; var lrc = ERC20(lrcTokenAddress); for (uint i = 0; i < ringSize; i++) { uint prev = ((i + ringSize - 1) % ringSize); address tokenS = address(batch[i]); address owner = address(batch[ringSize + i]); address prevOwner = address(batch[ringSize + prev]); // Pay tokenS to previous order, or to miner as previous order's // margin split or/and this order's margin split. ERC20 _tokenS; // Try to create ERC20 instances only once per token. if (owner != prevOwner || owner != feeRecipient && batch[p+1] != 0) { _tokenS = ERC20(tokenS); } // Here batch[p] has been checked not to be 0. if (owner != prevOwner) { require( _tokenS.transferFrom(owner, prevOwner, uint(batch[p])) ); } if (owner != feeRecipient) { if (batch[p+1] != 0) { require( _tokenS.transferFrom(owner, feeRecipient, uint(batch[p+1])) ); } if (batch[p+2] != 0) { require(<FILL_ME>) } if (batch[p+3] != 0) { require( lrc.transferFrom(owner, feeRecipient, uint(batch[p+3])) ); } } p += 4; } } }
lrc.transferFrom(feeRecipient,owner,uint(batch[p+2]))
276,136
lrc.transferFrom(feeRecipient,owner,uint(batch[p+2]))
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.18; /// @title UintUtil /// @author Daniel Wang - <[email protected]> /// @dev uint utility functions library MathUint { function mul(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint c) { } function tolerantSub(uint a, uint b) internal pure returns (uint c) { } /// @dev calculate the square of Coefficient of Variation (CV) /// https://en.wikipedia.org/wiki/Coefficient_of_variation function cvsquare( uint[] arr, uint scale ) internal pure returns (uint) { } } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title ERC20 interface /// @dev see https://github.com/ethereum/EIPs/issues/20 contract ERC20 { uint public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) view public returns (uint256); function allowance(address owner, address spender) view public returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title Ownable /// @dev The Ownable contract has an owner address, and provides basic /// authorization control functions, this simplifies the implementation of /// "user permissions". contract Ownable { address public owner; /// @dev The Ownable constructor sets the original `owner` of the contract /// to the sender. function Ownable() public { } /// @dev Throws if called by any account other than the owner. modifier onlyOwner() { } /// @dev Allows the current owner to transfer control of the contract to a /// newOwner. /// @param newOwner The address to transfer ownership to. function transferOwnership(address newOwner) onlyOwner public { } } /// @title TokenTransferDelegate - Acts as a middle man to transfer ERC20 tokens /// on behalf of different versions of Loopring protocol to avoid ERC20 /// re-authorization. /// @author Daniel Wang - <[email protected]>. contract TokenTransferDelegate is Ownable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// //////////////////////////////////////////////////////////////////////////// mapping(address => AddressInfo) private addressInfos; address public latestAddress; //////////////////////////////////////////////////////////////////////////// /// Structs /// //////////////////////////////////////////////////////////////////////////// struct AddressInfo { address previous; uint32 index; bool authorized; } //////////////////////////////////////////////////////////////////////////// /// Modifiers /// //////////////////////////////////////////////////////////////////////////// modifier onlyAuthorized() { } //////////////////////////////////////////////////////////////////////////// /// Events /// //////////////////////////////////////////////////////////////////////////// event AddressAuthorized(address indexed addr, uint32 number); event AddressDeauthorized(address indexed addr, uint32 number); //////////////////////////////////////////////////////////////////////////// /// Public Functions /// //////////////////////////////////////////////////////////////////////////// /// @dev Add a Loopring protocol address. /// @param addr A loopring protocol address. function authorizeAddress(address addr) onlyOwner external { } /// @dev Remove a Loopring protocol address. /// @param addr A loopring protocol address. function deauthorizeAddress(address addr) onlyOwner external { } function isAddressAuthorized(address addr) public view returns (bool) { } function getLatestAuthorizedAddresses(uint max) external view returns (address[] addresses) { } /// @dev Invoke ERC20 transferFrom method. /// @param token Address of token to transfer. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param value Amount of token to transfer. function transferToken( address token, address from, address to, uint value) onlyAuthorized external { } function batchTransferToken( uint ringSize, address lrcTokenAddress, address feeRecipient, bytes32[] batch) onlyAuthorized external { require(batch.length == ringSize * 6); uint p = ringSize * 2; var lrc = ERC20(lrcTokenAddress); for (uint i = 0; i < ringSize; i++) { uint prev = ((i + ringSize - 1) % ringSize); address tokenS = address(batch[i]); address owner = address(batch[ringSize + i]); address prevOwner = address(batch[ringSize + prev]); // Pay tokenS to previous order, or to miner as previous order's // margin split or/and this order's margin split. ERC20 _tokenS; // Try to create ERC20 instances only once per token. if (owner != prevOwner || owner != feeRecipient && batch[p+1] != 0) { _tokenS = ERC20(tokenS); } // Here batch[p] has been checked not to be 0. if (owner != prevOwner) { require( _tokenS.transferFrom(owner, prevOwner, uint(batch[p])) ); } if (owner != feeRecipient) { if (batch[p+1] != 0) { require( _tokenS.transferFrom(owner, feeRecipient, uint(batch[p+1])) ); } if (batch[p+2] != 0) { require( lrc.transferFrom(feeRecipient, owner, uint(batch[p+2])) ); } if (batch[p+3] != 0) { require(<FILL_ME>) } } p += 4; } } }
lrc.transferFrom(owner,feeRecipient,uint(batch[p+3]))
276,136
lrc.transferFrom(owner,feeRecipient,uint(batch[p+3]))
"owner-missmatch"
pragma solidity 0.5.11; interface GemLike { function approve(address, uint) external; function transfer(address, uint) external; function transferFrom(address, address, uint) external; function deposit() external payable; function withdraw(uint) external; } interface ManagerLike { function cdpCan(address, uint, address) external view returns (uint); function ilks(uint) external view returns (bytes32); function owns(uint) external view returns (address); function urns(uint) external view returns (address); function vat() external view returns (address); function open(bytes32, address) external returns (uint); function give(uint, address) external; function cdpAllow(uint, address, uint) external; function urnAllow(address, uint) external; function frob(uint, int, int) external; function flux(uint, address, uint) external; function move(uint, address, uint) external; function exit( address, uint, address, uint ) external; function quit(uint, address) external; function enter(address, uint) external; function shift(uint, uint) external; } interface VatLike { function can(address, address) external view returns (uint); function ilks(bytes32) external view returns (uint, uint, uint, uint, uint); function dai(address) external view returns (uint); function urns(bytes32, address) external view returns (uint, uint); function frob( bytes32, address, address, address, int, int ) external; function hope(address) external; function move(address, address, uint) external; } interface GemJoinLike { function dec() external returns (uint); function gem() external returns (GemLike); function join(address, uint) external payable; function exit(address, uint) external; } interface DaiJoinLike { function vat() external returns (VatLike); function dai() external returns (GemLike); function join(address, uint) external payable; function exit(address, uint) external; } interface HopeLike { function hope(address) external; function nope(address) external; } interface JugLike { function drip(bytes32) external returns (uint); } interface ProxyRegistryLike { function proxies(address) external view returns (address); function build(address) external returns (address); } interface ProxyLike { function owner() external view returns (address); } interface InstaMcdAddress { function manager() external returns (address); function dai() external returns (address); function daiJoin() external returns (address); function jug() external returns (address); function proxyRegistry() external returns (address); function ethAJoin() external returns (address); } contract Common { uint256 constant RAY = 10 ** 27; /** * @dev get MakerDAO MCD Address contract */ function getMcdAddresses() public pure returns (address mcd) { } /** * @dev get InstaDApp CDP's Address */ function getGiveAddress() public pure returns (address addr) { } function mul(uint x, uint y) internal pure returns (uint z) { } function sub(uint x, uint y) internal pure returns (uint z) { } function toInt(uint x) internal pure returns (int y) { } function toRad(uint wad) internal pure returns (uint rad) { } function convertTo18(address gemJoin, uint256 amt) internal returns (uint256 wad) { } } contract DssProxyHelpers is Common { // Internal functions function joinDaiJoin(address urn, uint wad) public { } function _getDrawDart( address vat, address jug, address urn, bytes32 ilk, uint wad ) internal returns (int dart) { } function _getWipeDart( address vat, uint dai, address urn, bytes32 ilk ) internal view returns (int dart) { } function _getWipeAllWad( address vat, address usr, address urn, bytes32 ilk ) internal view returns (uint wad) { } } contract DssProxyActions is DssProxyHelpers { // Public functions function transfer(address gem, address dst, uint wad) public { } function joinEthJoin(address urn) public payable { } function joinGemJoin( address apt, address urn, uint wad, bool transferFrom ) public { } function hope(address obj, address usr) public { } function nope(address obj, address usr) public { } function open(bytes32 ilk, address usr) public returns (uint cdp) { } function give(uint cdp, address usr) public { } function shut(uint cdp) public { } function giveToProxy(uint cdp, address dst) public { } function cdpAllow(uint cdp, address usr, uint ok) public { } function urnAllow(address usr, uint ok) public { } function flux(uint cdp, address dst, uint wad) public { } function move(uint cdp, address dst, uint rad) public { } function frob(uint cdp, int dink, int dart) public { } function quit(uint cdp, address dst) public { } function enter(address src, uint cdp) public { } function shift(uint cdpSrc, uint cdpOrg) public { } function lockETH(uint cdp) public payable { } function safeLockETH(uint cdp, address owner) public payable { address manager = InstaMcdAddress(getMcdAddresses()).manager(); require(<FILL_ME>) lockETH(cdp); } function lockGem( address gemJoin, uint cdp, uint wad, bool transferFrom ) public { } function safeLockGem( address gemJoin, uint cdp, uint wad, bool transferFrom, address owner ) public { } function freeETH(uint cdp, uint wad) public { } function freeGem(address gemJoin, uint cdp, uint wad) public { } function exitETH(uint cdp, uint wad) public { } function exitGem(address gemJoin, uint cdp, uint wad) public { } function draw(uint cdp, uint wad) public { } function wipe(uint cdp, uint wad) public { } function safeWipe(uint cdp, uint wad, address owner) public { } }
ManagerLike(manager).owns(cdp)==owner,"owner-missmatch"
276,156
ManagerLike(manager).owns(cdp)==owner
'only admin can call'
pragma solidity ^0.5.0; contract MainContract { function getUserInvestInfo(address addr) public view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256); } contract AOQFund { using SafeMath for *; uint ethWei = 1 ether; uint256 fundValue; uint256 gradeOne; uint256 gradeTwo; uint256 gradeThree; address public mainContract; bool public canWithdraw = false; address owner; uint256 public totalInvestorCount; address payable projectAddress = 0x64d7d8AA5F785FF3Fb894Ac3b505Bd65cFFC562F; uint256 closeTime; uint256 public gradeThreeCount; uint256 public gradeTwoCount; uint256 public gradeOneCount; uint256 public gradeThreeCountLimit = 10; uint256 public gradeTwoCountLimit = 90; struct Invest { uint256 level; bool withdrawed; uint256 lastInvestTime; uint256 grade; } mapping(uint256 => uint256) gradeDistribute; mapping(address => Invest) public projectInvestor; mapping(address => bool) admin; constructor () public { } //modifier modifier onlyOwner() { } modifier isHuman() { } modifier onlyAdmin(){ require(<FILL_ME>) _; } modifier onlyMainContract(){ } modifier isContract() { } function setAdmin(address addr) public onlyOwner() { } function setCloseTime(uint256 cTime) public onlyAdmin() { } function setProjectAddress(address payable pAddress) public onlyAdmin() { } function setMainContract(address addr) public onlyAdmin() { } function() external payable { } function setGradeCountLimit(uint256 gradeThreeLimit, uint256 gradeTwoLimit) public onlyAdmin() { } function countDownOverSet() public onlyMainContract() isContract() { } function getFundInfo() public view returns (uint256, uint256, uint256, uint256) { } function receiveInvest(address investor, uint256 level, bool isNew) public onlyMainContract() isContract() { } function setFrontInvestors(address investor, uint256 grade) public onlyAdmin() { } function setGradeOne(uint256 num) public onlyAdmin() { } function openCanWithdraw(uint256 open) public onlyAdmin() { } function getInvest(address investor) internal view returns (uint256){ } function withdrawFund() public isHuman() { } function getFundReward(address addr) public view isHuman() returns (uint256) { } function close() public onlyOwner() { } } /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } }
admin[msg.sender]==true,'only admin can call'
276,168
admin[msg.sender]==true
"Caller does not own the vApe"
// SPDX-License-Identifier: MIT /* _____ __ __ ______ ______ ________ / |/ | / |/ | / \ / | $$$$$ |$$ | $$ |$$$$$$/ /$$$$$$ |$$$$$$$$/ $$ |$$ | $$ | $$ | $$ | $$/ $$ |__ __ $$ |$$ | $$ | $$ | $$ | $$ | / | $$ |$$ | $$ | $$ | $$ | __ $$$$$/ $$ \__$$ |$$ \__$$ | _$$ |_ $$ \__/ |$$ |_____ $$ $$/ $$ $$/ / $$ |$$ $$/ $$ | $$$$$$/ $$$$$$/ $$$$$$/ $$$$$$/ $$$$$$$$/ */ //This token is purely for use within the vApez ecosystem //It has no economic value whatsoever pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract Juice is ERC20Burnable, Ownable { uint256 public START_BLOCK; uint256 public BASE_RATE = 1 ether; address public vapezAddress; //mapping of address to rewards //Mapping of token to timestamp mapping(uint256 => uint256) internal lastClaimed; //Event for claiming juice event JuiceClaimed(address indexed user, uint256 reward); constructor(address _vapezAddress) ERC20("Juice", "JUICE") { } function setVapezAddress(address _vapezAddress) public onlyOwner { } function claimReward(uint256 _tokenId) public returns (uint256) { require(<FILL_ME>) //set last claim to start block if hasnt been claimed before if (lastClaimed[_tokenId] == uint256(0)) { lastClaimed[_tokenId] = START_BLOCK; } //compute JUICE to be claimed uint256 unclaimedJuice = computeRewards(_tokenId); lastClaimed[_tokenId] = block.timestamp; _mint(msg.sender, unclaimedJuice); emit JuiceClaimed(msg.sender, unclaimedJuice); return unclaimedJuice; } function claimRewards(uint256[] calldata _tokenIds) public returns (uint256) { } //call this method to view how much JUICE you can get on a vape function computeRewards(uint256 _tokenId) public view returns (uint256) { } //call this method to compute the rewards for multiple vapez function computeMultipleRewards(uint256[] calldata _tokenIds) public view returns (uint256) { } }
IERC721(vapezAddress).ownerOf(_tokenId)==msg.sender,"Caller does not own the vApe"
276,201
IERC721(vapezAddress).ownerOf(_tokenId)==msg.sender
"min profit was not reached"
// SPDX-License-Identifier: MIT pragma solidity 0.6.11; pragma experimental ABIEncoderV2; interface UniswapLens { function quoteExactInputSingle( address tokenIn, address tokenOut, uint24 fee, uint256 amountIn, uint160 sqrtPriceLimitX96 ) external returns (uint256 amountOut); } interface UniswapRouter { struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } function exactInputSingle( ExactInputSingleParams calldata params ) external returns (uint256 amountOut); } interface UniswapReserve { function swap( address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes calldata data ) external returns (int256 amount0, int256 amount1); } interface ERC20Like { function approve(address spender, uint value) external returns(bool); function transfer(address to, uint value) external returns(bool); function balanceOf(address a) external view returns(uint); } interface WethLike is ERC20Like { function deposit() external payable; } interface CurveLike { function exchange_underlying(int128 i, int128 j, uint256 dx, uint256 min_dy) external returns(uint); } interface BAMMLike { function swap(uint lusdAmount, uint minEthReturn, address payable dest) external returns(uint); } contract Arb { address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address constant LUSD = 0x5f98805A4E8be255a32880FDeC7F6728C6568bA0; address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; UniswapLens constant LENS = UniswapLens(0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6); UniswapRouter constant ROUTER = UniswapRouter(0xE592427A0AEce92De3Edee1F18E0157C05861564); UniswapReserve constant USDCETH = UniswapReserve(0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8); uint160 constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342; CurveLike constant CURV = CurveLike(0xEd279fDD11cA84bEef15AF5D39BB4d4bEE23F0cA); constructor() public { } function approve(address bamm) external { } function getPrice(uint wethQty) external returns(uint) { } function swap(uint ethQty, address bamm) external payable returns(uint) { } function uniswapV3SwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external { } receive() external payable {} } contract ArbChecker { Arb immutable public arb; constructor(Arb _arb) public { } function checkProfitableArb(uint ethQty, uint minProfit, address bamm) public { // revert on failure uint balanceBefore = address(this).balance; arb.swap(ethQty, bamm); uint balanceAfter = address(this).balance; require(<FILL_ME>) } receive() external payable {} } contract BKeeper { address public masterCopy; ArbChecker immutable public arbChecker; Arb immutable public arb; uint maxEthQty; // = 1000 ether; uint minQty; // = 1e10; uint minProfitInBps; // = 100; address public admin; address[] public bamms; event KeepOperation(bool succ); constructor(Arb _arb, ArbChecker _arbChecker) public { } function findSmallestQty() public returns(uint, address) { } function checkUpkeep(bytes calldata /*checkData*/) external returns (bool upkeepNeeded, bytes memory performData) { } function performUpkeep(bytes calldata performData) external { } function performUpkeepSafe(bytes calldata performData) external { } receive() external payable {} // admin stuff function transferAdmin(address newAdmin) external { } function initParams(uint _maxEthQty, uint _minEthQty, uint _minProfit) external { } function setMaxEthQty(uint newVal) external { } function setMinEthQty(uint newVal) external { } function setMinProfit(uint newVal) external { } function addBamm(address newBamm) external { } function removeBamm(address bamm) external { } function withdrawEth() external { } function upgrade(address newMaster) public { } }
(balanceAfter-balanceBefore)>=minProfit,"min profit was not reached"
276,222
(balanceAfter-balanceBefore)>=minProfit
null
pragma solidity ^0.6.6; //SPDX-License-Identifier: UNLICENSED // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint c) { } function mul(uint a, uint b) internal pure returns (uint c) { } function div(uint a, uint b) internal pure returns (uint c) { } } contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } // ---------------------------------------------------------------------------- //Tokenlock trade // ---------------------------------------------------------------------------- contract Tokenlock is Owned { uint8 isLocked = 0; event Freezed(); event UnFreezed(); modifier validLock { } function freeze() public onlyOwner { } function unfreeze() public onlyOwner { } mapping(address => bool) blacklist; event LockUser(address indexed who); event UnlockUser(address indexed who); modifier permissionCheck { } function lockUser(address who) public onlyOwner { } function unlockUser(address who) public onlyOwner { } } contract Pact is Tokenlock { using SafeMath for uint; string public name = "Polkadot Pact"; string public symbol = "PACT"; uint8 public decimals = 18; uint internal _rate=100; uint internal _amount; uint256 public totalSupply; //bank mapping(address => uint) bank_balances; //eth mapping(address => uint) activeBalances; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 value); event Burn(address indexed _from, uint256 value); // Called when new token are issued event Issue(uint amount); // Called when tokens are redeemed event Redeem(uint amount); //Called when sent event Sent(address from, address to, uint amount); event FallbackCalled(address sent, uint amount); /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { } constructor (uint totalAmount) public{ } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ /* function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); }*/ // ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------ function balanceOfBank(address tokenOwner) public view returns (uint balance) { } function balanceOfReg(address tokenOwner) public view returns (uint balance) { } // ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public view returns (uint balance) { } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public view returns (uint remaining) { } // ------------------------------------------------------------------------ // Issue a new amount of tokens // these tokens are deposited into the owner address // @param _amount Number of tokens to be issued // ------------------------------------------------------------------------ function issue(uint amount) public onlyOwner { require(<FILL_ME>) require(balances[owner] + amount > balances[owner]); balances[owner] += amount; totalSupply += amount; emit Issue(amount); } // ------------------------------------------------------------------------ // Redeem tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the redeem // or the call will fail. // @param _amount Number of tokens to be issued // ------------------------------------------------------------------------ function redeem(uint amount) public onlyOwner { } // ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transfer(address to, uint tokens) public validLock permissionCheck onlyPayloadSize(2 * 32) returns (bool success) { } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double-spend attack // as this should be implemented in user interfaces // ------------------------------------------------------------------------ function approve(address spender, uint tokens) public returns (bool success) { } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint tokens) public validLock permissionCheck onlyPayloadSize(3 * 32) returns (bool success) { } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferStore(address from, address to, uint tokens) public validLock permissionCheck onlyPayloadSize(3 * 32) returns (bool success) { } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner { } // ------------------------------------------------------------------------ // ERC20 withdraw // ----------------------------------------- function withdraw() onlyOwner public { } function showAmount() onlyOwner public view returns (uint) { } function showBalance() onlyOwner public view returns (uint) { } // ------------------------------------------------------------------------ // ERC20 set rate // ----------------------------------------- function set_rate(uint _vlue) public onlyOwner{ } // ------------------------------------------------------------------------ // ERC20 tokens // ----------------------------------------- receive() external payable{ } // ------------------------------------------------------------------------ // ERC20 recharge // ----------------------------------------- function recharge() public payable{ } }
totalSupply+amount>totalSupply
276,391
totalSupply+amount>totalSupply
null
pragma solidity ^0.6.6; //SPDX-License-Identifier: UNLICENSED // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint c) { } function mul(uint a, uint b) internal pure returns (uint c) { } function div(uint a, uint b) internal pure returns (uint c) { } } contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } // ---------------------------------------------------------------------------- //Tokenlock trade // ---------------------------------------------------------------------------- contract Tokenlock is Owned { uint8 isLocked = 0; event Freezed(); event UnFreezed(); modifier validLock { } function freeze() public onlyOwner { } function unfreeze() public onlyOwner { } mapping(address => bool) blacklist; event LockUser(address indexed who); event UnlockUser(address indexed who); modifier permissionCheck { } function lockUser(address who) public onlyOwner { } function unlockUser(address who) public onlyOwner { } } contract Pact is Tokenlock { using SafeMath for uint; string public name = "Polkadot Pact"; string public symbol = "PACT"; uint8 public decimals = 18; uint internal _rate=100; uint internal _amount; uint256 public totalSupply; //bank mapping(address => uint) bank_balances; //eth mapping(address => uint) activeBalances; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 value); event Burn(address indexed _from, uint256 value); // Called when new token are issued event Issue(uint amount); // Called when tokens are redeemed event Redeem(uint amount); //Called when sent event Sent(address from, address to, uint amount); event FallbackCalled(address sent, uint amount); /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { } constructor (uint totalAmount) public{ } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ /* function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); }*/ // ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------ function balanceOfBank(address tokenOwner) public view returns (uint balance) { } function balanceOfReg(address tokenOwner) public view returns (uint balance) { } // ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public view returns (uint balance) { } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public view returns (uint remaining) { } // ------------------------------------------------------------------------ // Issue a new amount of tokens // these tokens are deposited into the owner address // @param _amount Number of tokens to be issued // ------------------------------------------------------------------------ function issue(uint amount) public onlyOwner { } // ------------------------------------------------------------------------ // Redeem tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the redeem // or the call will fail. // @param _amount Number of tokens to be issued // ------------------------------------------------------------------------ function redeem(uint amount) public onlyOwner { } // ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transfer(address to, uint tokens) public validLock permissionCheck onlyPayloadSize(2 * 32) returns (bool success) { } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double-spend attack // as this should be implemented in user interfaces // ------------------------------------------------------------------------ function approve(address spender, uint tokens) public returns (bool success) { } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint tokens) public validLock permissionCheck onlyPayloadSize(3 * 32) returns (bool success) { require(to != address(0)); require(<FILL_ME>) require(balances[to] + tokens >= balances[to]); balances[from] = balances[from].sub(tokens); if(allowed[from][msg.sender] > 0) { allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); } balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferStore(address from, address to, uint tokens) public validLock permissionCheck onlyPayloadSize(3 * 32) returns (bool success) { } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner { } // ------------------------------------------------------------------------ // ERC20 withdraw // ----------------------------------------- function withdraw() onlyOwner public { } function showAmount() onlyOwner public view returns (uint) { } function showBalance() onlyOwner public view returns (uint) { } // ------------------------------------------------------------------------ // ERC20 set rate // ----------------------------------------- function set_rate(uint _vlue) public onlyOwner{ } // ------------------------------------------------------------------------ // ERC20 tokens // ----------------------------------------- receive() external payable{ } // ------------------------------------------------------------------------ // ERC20 recharge // ----------------------------------------- function recharge() public payable{ } }
balances[from]>=tokens&&tokens>0
276,391
balances[from]>=tokens&&tokens>0
"Cannot duplicate addresses"
/* Copyright 2020 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.6.10; /** * @title AddressArrayUtils * @author Set Protocol * * Utility functions to handle Address Arrays * * CHANGELOG: * - 4/21/21: Added validatePairsWithArray methods */ library AddressArrayUtils { /** * Finds the index of the first occurrence of the given element. * @param A The input array to search * @param a The value to find * @return Returns (index and isIn) for the first occurrence starting from index 0 */ function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) { } /** * Returns true if the value is present in the list. Uses indexOf internally. * @param A The input array to search * @param a The value to find * @return Returns isIn for the first occurrence starting from index 0 */ function contains(address[] memory A, address a) internal pure returns (bool) { } /** * Returns true if there are 2 elements that are the same in an array * @param A The input array to search * @return Returns boolean for the first occurrence of a duplicate */ function hasDuplicate(address[] memory A) internal pure returns(bool) { } /** * @param A The input array to search * @param a The address to remove * @return Returns the array with the object removed. */ function remove(address[] memory A, address a) internal pure returns (address[] memory) { } /** * @param A The input array to search * @param a The address to remove */ function removeStorage(address[] storage A, address a) internal { } /** * Removes specified index from array * @param A The input array to search * @param index The index to remove * @return Returns the new array and the removed entry */ function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) { } /** * Returns the combination of the two arrays * @param A The first array * @param B The second array * @return Returns A extended by B */ function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) { } /** * Validate that address and uint array lengths match. Validate address array is not empty * and contains no duplicate elements. * * @param A Array of addresses * @param B Array of uint */ function validatePairsWithArray(address[] memory A, uint[] memory B) internal pure { } /** * Validate that address and bool array lengths match. Validate address array is not empty * and contains no duplicate elements. * * @param A Array of addresses * @param B Array of bool */ function validatePairsWithArray(address[] memory A, bool[] memory B) internal pure { } /** * Validate that address and string array lengths match. Validate address array is not empty * and contains no duplicate elements. * * @param A Array of addresses * @param B Array of strings */ function validatePairsWithArray(address[] memory A, string[] memory B) internal pure { } /** * Validate that address array lengths match, and calling address array are not empty * and contain no duplicate elements. * * @param A Array of addresses * @param B Array of addresses */ function validatePairsWithArray(address[] memory A, address[] memory B) internal pure { } /** * Validate that address and bytes array lengths match. Validate address array is not empty * and contains no duplicate elements. * * @param A Array of addresses * @param B Array of bytes */ function validatePairsWithArray(address[] memory A, bytes[] memory B) internal pure { } /** * Validate address array is not empty and contains no duplicate elements. * * @param A Array of addresses */ function _validateLengthAndUniqueness(address[] memory A) internal pure { require(A.length > 0, "Array length must be > 0"); require(<FILL_ME>) } }
!hasDuplicate(A),"Cannot duplicate addresses"
276,473
!hasDuplicate(A)
"Exceeds reserves supply"
/* β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•β• */ /** * @title ChinaChic contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract ChinaChic is ERC721A, Ownable, Pausable, ReentrancyGuard { // Constant variables // ------------------------------------------------------------------------ uint256 public constant MAX_SUPPLY = 2600; uint256 public constant MAX_PER_ADDRESS = 1; uint256 public constant RESERVES = 578; // State variables // ------------------------------------------------------------------------ string private _baseTokenURI; bool public isWhitlistSaleActive = false; bool public isPublicSaleActive = false; // Sale mappings // ------------------------------------------------------------------------ mapping(address => bool) private mintedAddress; // Merkle Root Hash // ------------------------------------------------------------------------ bytes32 private _merkleRoot; // Modifiers // ------------------------------------------------------------------------ modifier onlyWhitelistSale() { } modifier onlyPublicSale() { } // Modifier to ensure that the call is coming from an externally owned account, not a contract modifier onlyEOA() { } // Constructor // ------------------------------------------------------------------------ constructor(string memory name, string memory symbol) ERC721A(name, symbol) {} // URI functions // ------------------------------------------------------------------------ function setBaseURI(string memory baseURI) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } // Operational functions // ------------------------------------------------------------------------ function collectReserves(uint256 numberOfTokens) external onlyOwner { require(<FILL_ME>) _safeMint(_msgSender(), numberOfTokens); } function withdraw() public onlyOwner { } // Merkle root functions // ------------------------------------------------------------------------ function setMerkleRoot(bytes32 rootHash) external onlyOwner { } function verifyProof(bytes32[] memory _merkleProof) internal view returns (bool) { } // Sale switch functions // ------------------------------------------------------------------------ function flipWhitelistSale() public onlyOwner { } function flipPublicSale() public onlyOwner { } // Mint functions // ------------------------------------------------------------------------ function whitelistMint(bytes32[] calldata proof) public nonReentrant whenNotPaused onlyEOA onlyWhitelistSale { } function publicMint() public nonReentrant whenNotPaused onlyEOA onlyPublicSale { } }
totalSupply()+numberOfTokens<=RESERVES,"Exceeds reserves supply"
276,527
totalSupply()+numberOfTokens<=RESERVES
"Not in the whitelist"
/* β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•β• */ /** * @title ChinaChic contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract ChinaChic is ERC721A, Ownable, Pausable, ReentrancyGuard { // Constant variables // ------------------------------------------------------------------------ uint256 public constant MAX_SUPPLY = 2600; uint256 public constant MAX_PER_ADDRESS = 1; uint256 public constant RESERVES = 578; // State variables // ------------------------------------------------------------------------ string private _baseTokenURI; bool public isWhitlistSaleActive = false; bool public isPublicSaleActive = false; // Sale mappings // ------------------------------------------------------------------------ mapping(address => bool) private mintedAddress; // Merkle Root Hash // ------------------------------------------------------------------------ bytes32 private _merkleRoot; // Modifiers // ------------------------------------------------------------------------ modifier onlyWhitelistSale() { } modifier onlyPublicSale() { } // Modifier to ensure that the call is coming from an externally owned account, not a contract modifier onlyEOA() { } // Constructor // ------------------------------------------------------------------------ constructor(string memory name, string memory symbol) ERC721A(name, symbol) {} // URI functions // ------------------------------------------------------------------------ function setBaseURI(string memory baseURI) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } // Operational functions // ------------------------------------------------------------------------ function collectReserves(uint256 numberOfTokens) external onlyOwner { } function withdraw() public onlyOwner { } // Merkle root functions // ------------------------------------------------------------------------ function setMerkleRoot(bytes32 rootHash) external onlyOwner { } function verifyProof(bytes32[] memory _merkleProof) internal view returns (bool) { } // Sale switch functions // ------------------------------------------------------------------------ function flipWhitelistSale() public onlyOwner { } function flipPublicSale() public onlyOwner { } // Mint functions // ------------------------------------------------------------------------ function whitelistMint(bytes32[] calldata proof) public nonReentrant whenNotPaused onlyEOA onlyWhitelistSale { require(<FILL_ME>) require(mintedAddress[_msgSender()] == false, "Already purchsed"); require( totalSupply() + MAX_PER_ADDRESS <= MAX_SUPPLY, "Exceed max supply" ); mintedAddress[_msgSender()] = true; _safeMint(_msgSender(), MAX_PER_ADDRESS); } function publicMint() public nonReentrant whenNotPaused onlyEOA onlyPublicSale { } }
verifyProof(proof),"Not in the whitelist"
276,527
verifyProof(proof)
"Already purchsed"
/* β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•β• */ /** * @title ChinaChic contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract ChinaChic is ERC721A, Ownable, Pausable, ReentrancyGuard { // Constant variables // ------------------------------------------------------------------------ uint256 public constant MAX_SUPPLY = 2600; uint256 public constant MAX_PER_ADDRESS = 1; uint256 public constant RESERVES = 578; // State variables // ------------------------------------------------------------------------ string private _baseTokenURI; bool public isWhitlistSaleActive = false; bool public isPublicSaleActive = false; // Sale mappings // ------------------------------------------------------------------------ mapping(address => bool) private mintedAddress; // Merkle Root Hash // ------------------------------------------------------------------------ bytes32 private _merkleRoot; // Modifiers // ------------------------------------------------------------------------ modifier onlyWhitelistSale() { } modifier onlyPublicSale() { } // Modifier to ensure that the call is coming from an externally owned account, not a contract modifier onlyEOA() { } // Constructor // ------------------------------------------------------------------------ constructor(string memory name, string memory symbol) ERC721A(name, symbol) {} // URI functions // ------------------------------------------------------------------------ function setBaseURI(string memory baseURI) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } // Operational functions // ------------------------------------------------------------------------ function collectReserves(uint256 numberOfTokens) external onlyOwner { } function withdraw() public onlyOwner { } // Merkle root functions // ------------------------------------------------------------------------ function setMerkleRoot(bytes32 rootHash) external onlyOwner { } function verifyProof(bytes32[] memory _merkleProof) internal view returns (bool) { } // Sale switch functions // ------------------------------------------------------------------------ function flipWhitelistSale() public onlyOwner { } function flipPublicSale() public onlyOwner { } // Mint functions // ------------------------------------------------------------------------ function whitelistMint(bytes32[] calldata proof) public nonReentrant whenNotPaused onlyEOA onlyWhitelistSale { require(verifyProof(proof), "Not in the whitelist"); require(<FILL_ME>) require( totalSupply() + MAX_PER_ADDRESS <= MAX_SUPPLY, "Exceed max supply" ); mintedAddress[_msgSender()] = true; _safeMint(_msgSender(), MAX_PER_ADDRESS); } function publicMint() public nonReentrant whenNotPaused onlyEOA onlyPublicSale { } }
mintedAddress[_msgSender()]==false,"Already purchsed"
276,527
mintedAddress[_msgSender()]==false
"Exceed max supply"
/* β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•β• */ /** * @title ChinaChic contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract ChinaChic is ERC721A, Ownable, Pausable, ReentrancyGuard { // Constant variables // ------------------------------------------------------------------------ uint256 public constant MAX_SUPPLY = 2600; uint256 public constant MAX_PER_ADDRESS = 1; uint256 public constant RESERVES = 578; // State variables // ------------------------------------------------------------------------ string private _baseTokenURI; bool public isWhitlistSaleActive = false; bool public isPublicSaleActive = false; // Sale mappings // ------------------------------------------------------------------------ mapping(address => bool) private mintedAddress; // Merkle Root Hash // ------------------------------------------------------------------------ bytes32 private _merkleRoot; // Modifiers // ------------------------------------------------------------------------ modifier onlyWhitelistSale() { } modifier onlyPublicSale() { } // Modifier to ensure that the call is coming from an externally owned account, not a contract modifier onlyEOA() { } // Constructor // ------------------------------------------------------------------------ constructor(string memory name, string memory symbol) ERC721A(name, symbol) {} // URI functions // ------------------------------------------------------------------------ function setBaseURI(string memory baseURI) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } // Operational functions // ------------------------------------------------------------------------ function collectReserves(uint256 numberOfTokens) external onlyOwner { } function withdraw() public onlyOwner { } // Merkle root functions // ------------------------------------------------------------------------ function setMerkleRoot(bytes32 rootHash) external onlyOwner { } function verifyProof(bytes32[] memory _merkleProof) internal view returns (bool) { } // Sale switch functions // ------------------------------------------------------------------------ function flipWhitelistSale() public onlyOwner { } function flipPublicSale() public onlyOwner { } // Mint functions // ------------------------------------------------------------------------ function whitelistMint(bytes32[] calldata proof) public nonReentrant whenNotPaused onlyEOA onlyWhitelistSale { require(verifyProof(proof), "Not in the whitelist"); require(mintedAddress[_msgSender()] == false, "Already purchsed"); require(<FILL_ME>) mintedAddress[_msgSender()] = true; _safeMint(_msgSender(), MAX_PER_ADDRESS); } function publicMint() public nonReentrant whenNotPaused onlyEOA onlyPublicSale { } }
totalSupply()+MAX_PER_ADDRESS<=MAX_SUPPLY,"Exceed max supply"
276,527
totalSupply()+MAX_PER_ADDRESS<=MAX_SUPPLY
"SignedSafeMath: addition overflow"
pragma solidity 0.4.24; library SignedSafeMath { /** * @dev Adds two int256s and makes sure the result doesn't overflow. Signed * integers aren't supported by the SafeMath library, thus this method * @param _a The first number to be added * @param _a The second number to be added */ function add(int256 _a, int256 _b) internal pure returns (int256) { // solium-disable-next-line zeppelin/no-arithmetic-operations int256 c = _a + _b; require(<FILL_ME>) return c; } }
(_b>=0&&c>=_a)||(_b<0&&c<_a),"SignedSafeMath: addition overflow"
276,597
(_b>=0&&c>=_a)||(_b<0&&c<_a)
"RIOToken: mint is locked"
pragma solidity ^0.6.0; /** * @dev {ERC20} token, including: * * - ability for holders to burn (destroy) their tokens * - a minter role that allows for token minting (creation) * - a pauser role that allows to stop all token transfers * * This contract uses {AccessControl} to lock permissioned functions using the * different roles - head to its documentation for details. * * The account that deploys the contract will be granted the minter and pauser * roles, as well as the default admin role, which will let it grant both minter * and pauser roles to other accounts. */ contract RIOToken is Context, AccessControl, ERC20Burnable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bool private _isMintLocked = false; /** * @dev Grants `DEFAULT_ADMIN_ROLE`, and `MINTER_ROLE` to the * account that deploys the contract. * * See {ERC20-constructor}. */ constructor() public ERC20("Realio Network", "RIO") { } /** * @dev Creates `amount` new tokens for `to`. * * See {ERC20-_mint}. * * Requirements: * * - the caller must have the `MINTER_ROLE`. */ function mint(address to, uint256 amount) public virtual { require(hasRole(MINTER_ROLE, _msgSender()), "RIOToken: must have minter role to mint"); require(<FILL_ME>) _mint(to, amount); } /** * Set mint lock */ function _lockMinting() internal { } function getIsMintLocked() public view returns (bool isMintLocked) { } }
!getIsMintLocked(),"RIOToken: mint is locked"
276,658
!getIsMintLocked()
null
pragma solidity 0.4.18; contract PermissionGroups { address public admin; address public pendingAdmin; mapping(address=>bool) internal operators; mapping(address=>bool) internal alerters; address[] internal operatorsGroup; address[] internal alertersGroup; uint constant internal MAX_GROUP_SIZE = 50; function PermissionGroups() public { } modifier onlyAdmin() { } modifier onlyOperator() { } modifier onlyAlerter() { require(<FILL_ME>) _; } function getOperators () external view returns(address[]) { } function getAlerters () external view returns(address[]) { } event TransferAdminPending(address pendingAdmin); /** * @dev Allows the current admin to set the pendingAdmin address. * @param newAdmin The address to transfer ownership to. */ function transferAdmin(address newAdmin) public onlyAdmin { } /** * @dev Allows the current admin to set the admin in one tx. Useful initial deployment. * @param newAdmin The address to transfer ownership to. */ function transferAdminQuickly(address newAdmin) public onlyAdmin { } event AdminClaimed( address newAdmin, address previousAdmin); /** * @dev Allows the pendingAdmin address to finalize the change admin process. */ function claimAdmin() public { } event AlerterAdded (address newAlerter, bool isAdd); function addAlerter(address newAlerter) public onlyAdmin { } function removeAlerter (address alerter) public onlyAdmin { } event OperatorAdded(address newOperator, bool isAdd); function addOperator(address newOperator) public onlyAdmin { } function removeOperator (address operator) public onlyAdmin { } } contract Withdrawable is PermissionGroups { event TokenWithdraw(ERC20 token, uint amount, address sendTo); /** * @dev Withdraw all ERC20 compatible tokens * @param token ERC20 The address of the token contract */ function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin { } event EtherWithdraw(uint amount, address sendTo); /** * @dev Withdraw Ethers */ function withdrawEther(uint amount, address sendTo) external onlyAdmin { } } interface ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(address _to, uint _value) public returns (bool success); function transferFrom(address _from, address _to, uint _value) public returns (bool success); function approve(address _spender, uint _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint remaining); function decimals() public view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } contract WhiteListInterface { function getUserCapInWei(address user) external view returns (uint userCapWei); } contract WhiteList is WhiteListInterface, Withdrawable { uint public weiPerSgd; // amount of weis in 1 singapore dollar mapping (address=>uint) public userCategory; // each user has a category defining cap on trade. 0 for standard. mapping (uint=>uint) public categoryCap; // will define cap on trade amount per category in singapore Dollar. function WhiteList(address _admin) public { } function getUserCapInWei(address user) external view returns (uint userCapWei) { } event UserCategorySet(address user, uint category); function setUserCategory(address user, uint category) public onlyOperator { } event CategoryCapSet (uint category, uint sgdCap); function setCategoryCap(uint category, uint sgdCap) public onlyOperator { } event SgdToWeiRateSet (uint rate); function setSgdToEthRate(uint _sgdToWeiRate) public onlyOperator { } }
alerters[msg.sender]
276,688
alerters[msg.sender]
null
pragma solidity 0.4.18; contract PermissionGroups { address public admin; address public pendingAdmin; mapping(address=>bool) internal operators; mapping(address=>bool) internal alerters; address[] internal operatorsGroup; address[] internal alertersGroup; uint constant internal MAX_GROUP_SIZE = 50; function PermissionGroups() public { } modifier onlyAdmin() { } modifier onlyOperator() { } modifier onlyAlerter() { } function getOperators () external view returns(address[]) { } function getAlerters () external view returns(address[]) { } event TransferAdminPending(address pendingAdmin); /** * @dev Allows the current admin to set the pendingAdmin address. * @param newAdmin The address to transfer ownership to. */ function transferAdmin(address newAdmin) public onlyAdmin { } /** * @dev Allows the current admin to set the admin in one tx. Useful initial deployment. * @param newAdmin The address to transfer ownership to. */ function transferAdminQuickly(address newAdmin) public onlyAdmin { } event AdminClaimed( address newAdmin, address previousAdmin); /** * @dev Allows the pendingAdmin address to finalize the change admin process. */ function claimAdmin() public { } event AlerterAdded (address newAlerter, bool isAdd); function addAlerter(address newAlerter) public onlyAdmin { require(<FILL_ME>) // prevent duplicates. require(alertersGroup.length < MAX_GROUP_SIZE); AlerterAdded(newAlerter, true); alerters[newAlerter] = true; alertersGroup.push(newAlerter); } function removeAlerter (address alerter) public onlyAdmin { } event OperatorAdded(address newOperator, bool isAdd); function addOperator(address newOperator) public onlyAdmin { } function removeOperator (address operator) public onlyAdmin { } } contract Withdrawable is PermissionGroups { event TokenWithdraw(ERC20 token, uint amount, address sendTo); /** * @dev Withdraw all ERC20 compatible tokens * @param token ERC20 The address of the token contract */ function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin { } event EtherWithdraw(uint amount, address sendTo); /** * @dev Withdraw Ethers */ function withdrawEther(uint amount, address sendTo) external onlyAdmin { } } interface ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(address _to, uint _value) public returns (bool success); function transferFrom(address _from, address _to, uint _value) public returns (bool success); function approve(address _spender, uint _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint remaining); function decimals() public view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } contract WhiteListInterface { function getUserCapInWei(address user) external view returns (uint userCapWei); } contract WhiteList is WhiteListInterface, Withdrawable { uint public weiPerSgd; // amount of weis in 1 singapore dollar mapping (address=>uint) public userCategory; // each user has a category defining cap on trade. 0 for standard. mapping (uint=>uint) public categoryCap; // will define cap on trade amount per category in singapore Dollar. function WhiteList(address _admin) public { } function getUserCapInWei(address user) external view returns (uint userCapWei) { } event UserCategorySet(address user, uint category); function setUserCategory(address user, uint category) public onlyOperator { } event CategoryCapSet (uint category, uint sgdCap); function setCategoryCap(uint category, uint sgdCap) public onlyOperator { } event SgdToWeiRateSet (uint rate); function setSgdToEthRate(uint _sgdToWeiRate) public onlyOperator { } }
!alerters[newAlerter]
276,688
!alerters[newAlerter]
null
pragma solidity 0.4.18; contract PermissionGroups { address public admin; address public pendingAdmin; mapping(address=>bool) internal operators; mapping(address=>bool) internal alerters; address[] internal operatorsGroup; address[] internal alertersGroup; uint constant internal MAX_GROUP_SIZE = 50; function PermissionGroups() public { } modifier onlyAdmin() { } modifier onlyOperator() { } modifier onlyAlerter() { } function getOperators () external view returns(address[]) { } function getAlerters () external view returns(address[]) { } event TransferAdminPending(address pendingAdmin); /** * @dev Allows the current admin to set the pendingAdmin address. * @param newAdmin The address to transfer ownership to. */ function transferAdmin(address newAdmin) public onlyAdmin { } /** * @dev Allows the current admin to set the admin in one tx. Useful initial deployment. * @param newAdmin The address to transfer ownership to. */ function transferAdminQuickly(address newAdmin) public onlyAdmin { } event AdminClaimed( address newAdmin, address previousAdmin); /** * @dev Allows the pendingAdmin address to finalize the change admin process. */ function claimAdmin() public { } event AlerterAdded (address newAlerter, bool isAdd); function addAlerter(address newAlerter) public onlyAdmin { } function removeAlerter (address alerter) public onlyAdmin { require(<FILL_ME>) alerters[alerter] = false; for (uint i = 0; i < alertersGroup.length; ++i) { if (alertersGroup[i] == alerter) { alertersGroup[i] = alertersGroup[alertersGroup.length - 1]; alertersGroup.length--; AlerterAdded(alerter, false); break; } } } event OperatorAdded(address newOperator, bool isAdd); function addOperator(address newOperator) public onlyAdmin { } function removeOperator (address operator) public onlyAdmin { } } contract Withdrawable is PermissionGroups { event TokenWithdraw(ERC20 token, uint amount, address sendTo); /** * @dev Withdraw all ERC20 compatible tokens * @param token ERC20 The address of the token contract */ function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin { } event EtherWithdraw(uint amount, address sendTo); /** * @dev Withdraw Ethers */ function withdrawEther(uint amount, address sendTo) external onlyAdmin { } } interface ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(address _to, uint _value) public returns (bool success); function transferFrom(address _from, address _to, uint _value) public returns (bool success); function approve(address _spender, uint _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint remaining); function decimals() public view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } contract WhiteListInterface { function getUserCapInWei(address user) external view returns (uint userCapWei); } contract WhiteList is WhiteListInterface, Withdrawable { uint public weiPerSgd; // amount of weis in 1 singapore dollar mapping (address=>uint) public userCategory; // each user has a category defining cap on trade. 0 for standard. mapping (uint=>uint) public categoryCap; // will define cap on trade amount per category in singapore Dollar. function WhiteList(address _admin) public { } function getUserCapInWei(address user) external view returns (uint userCapWei) { } event UserCategorySet(address user, uint category); function setUserCategory(address user, uint category) public onlyOperator { } event CategoryCapSet (uint category, uint sgdCap); function setCategoryCap(uint category, uint sgdCap) public onlyOperator { } event SgdToWeiRateSet (uint rate); function setSgdToEthRate(uint _sgdToWeiRate) public onlyOperator { } }
alerters[alerter]
276,688
alerters[alerter]
null
pragma solidity 0.4.18; contract PermissionGroups { address public admin; address public pendingAdmin; mapping(address=>bool) internal operators; mapping(address=>bool) internal alerters; address[] internal operatorsGroup; address[] internal alertersGroup; uint constant internal MAX_GROUP_SIZE = 50; function PermissionGroups() public { } modifier onlyAdmin() { } modifier onlyOperator() { } modifier onlyAlerter() { } function getOperators () external view returns(address[]) { } function getAlerters () external view returns(address[]) { } event TransferAdminPending(address pendingAdmin); /** * @dev Allows the current admin to set the pendingAdmin address. * @param newAdmin The address to transfer ownership to. */ function transferAdmin(address newAdmin) public onlyAdmin { } /** * @dev Allows the current admin to set the admin in one tx. Useful initial deployment. * @param newAdmin The address to transfer ownership to. */ function transferAdminQuickly(address newAdmin) public onlyAdmin { } event AdminClaimed( address newAdmin, address previousAdmin); /** * @dev Allows the pendingAdmin address to finalize the change admin process. */ function claimAdmin() public { } event AlerterAdded (address newAlerter, bool isAdd); function addAlerter(address newAlerter) public onlyAdmin { } function removeAlerter (address alerter) public onlyAdmin { } event OperatorAdded(address newOperator, bool isAdd); function addOperator(address newOperator) public onlyAdmin { require(<FILL_ME>) // prevent duplicates. require(operatorsGroup.length < MAX_GROUP_SIZE); OperatorAdded(newOperator, true); operators[newOperator] = true; operatorsGroup.push(newOperator); } function removeOperator (address operator) public onlyAdmin { } } contract Withdrawable is PermissionGroups { event TokenWithdraw(ERC20 token, uint amount, address sendTo); /** * @dev Withdraw all ERC20 compatible tokens * @param token ERC20 The address of the token contract */ function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin { } event EtherWithdraw(uint amount, address sendTo); /** * @dev Withdraw Ethers */ function withdrawEther(uint amount, address sendTo) external onlyAdmin { } } interface ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(address _to, uint _value) public returns (bool success); function transferFrom(address _from, address _to, uint _value) public returns (bool success); function approve(address _spender, uint _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint remaining); function decimals() public view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } contract WhiteListInterface { function getUserCapInWei(address user) external view returns (uint userCapWei); } contract WhiteList is WhiteListInterface, Withdrawable { uint public weiPerSgd; // amount of weis in 1 singapore dollar mapping (address=>uint) public userCategory; // each user has a category defining cap on trade. 0 for standard. mapping (uint=>uint) public categoryCap; // will define cap on trade amount per category in singapore Dollar. function WhiteList(address _admin) public { } function getUserCapInWei(address user) external view returns (uint userCapWei) { } event UserCategorySet(address user, uint category); function setUserCategory(address user, uint category) public onlyOperator { } event CategoryCapSet (uint category, uint sgdCap); function setCategoryCap(uint category, uint sgdCap) public onlyOperator { } event SgdToWeiRateSet (uint rate); function setSgdToEthRate(uint _sgdToWeiRate) public onlyOperator { } }
!operators[newOperator]
276,688
!operators[newOperator]
null
pragma solidity 0.4.18; contract PermissionGroups { address public admin; address public pendingAdmin; mapping(address=>bool) internal operators; mapping(address=>bool) internal alerters; address[] internal operatorsGroup; address[] internal alertersGroup; uint constant internal MAX_GROUP_SIZE = 50; function PermissionGroups() public { } modifier onlyAdmin() { } modifier onlyOperator() { } modifier onlyAlerter() { } function getOperators () external view returns(address[]) { } function getAlerters () external view returns(address[]) { } event TransferAdminPending(address pendingAdmin); /** * @dev Allows the current admin to set the pendingAdmin address. * @param newAdmin The address to transfer ownership to. */ function transferAdmin(address newAdmin) public onlyAdmin { } /** * @dev Allows the current admin to set the admin in one tx. Useful initial deployment. * @param newAdmin The address to transfer ownership to. */ function transferAdminQuickly(address newAdmin) public onlyAdmin { } event AdminClaimed( address newAdmin, address previousAdmin); /** * @dev Allows the pendingAdmin address to finalize the change admin process. */ function claimAdmin() public { } event AlerterAdded (address newAlerter, bool isAdd); function addAlerter(address newAlerter) public onlyAdmin { } function removeAlerter (address alerter) public onlyAdmin { } event OperatorAdded(address newOperator, bool isAdd); function addOperator(address newOperator) public onlyAdmin { } function removeOperator (address operator) public onlyAdmin { require(<FILL_ME>) operators[operator] = false; for (uint i = 0; i < operatorsGroup.length; ++i) { if (operatorsGroup[i] == operator) { operatorsGroup[i] = operatorsGroup[operatorsGroup.length - 1]; operatorsGroup.length -= 1; OperatorAdded(operator, false); break; } } } } contract Withdrawable is PermissionGroups { event TokenWithdraw(ERC20 token, uint amount, address sendTo); /** * @dev Withdraw all ERC20 compatible tokens * @param token ERC20 The address of the token contract */ function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin { } event EtherWithdraw(uint amount, address sendTo); /** * @dev Withdraw Ethers */ function withdrawEther(uint amount, address sendTo) external onlyAdmin { } } interface ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(address _to, uint _value) public returns (bool success); function transferFrom(address _from, address _to, uint _value) public returns (bool success); function approve(address _spender, uint _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint remaining); function decimals() public view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } contract WhiteListInterface { function getUserCapInWei(address user) external view returns (uint userCapWei); } contract WhiteList is WhiteListInterface, Withdrawable { uint public weiPerSgd; // amount of weis in 1 singapore dollar mapping (address=>uint) public userCategory; // each user has a category defining cap on trade. 0 for standard. mapping (uint=>uint) public categoryCap; // will define cap on trade amount per category in singapore Dollar. function WhiteList(address _admin) public { } function getUserCapInWei(address user) external view returns (uint userCapWei) { } event UserCategorySet(address user, uint category); function setUserCategory(address user, uint category) public onlyOperator { } event CategoryCapSet (uint category, uint sgdCap); function setCategoryCap(uint category, uint sgdCap) public onlyOperator { } event SgdToWeiRateSet (uint rate); function setSgdToEthRate(uint _sgdToWeiRate) public onlyOperator { } }
operators[operator]
276,688
operators[operator]
null
pragma solidity 0.4.18; contract PermissionGroups { address public admin; address public pendingAdmin; mapping(address=>bool) internal operators; mapping(address=>bool) internal alerters; address[] internal operatorsGroup; address[] internal alertersGroup; uint constant internal MAX_GROUP_SIZE = 50; function PermissionGroups() public { } modifier onlyAdmin() { } modifier onlyOperator() { } modifier onlyAlerter() { } function getOperators () external view returns(address[]) { } function getAlerters () external view returns(address[]) { } event TransferAdminPending(address pendingAdmin); /** * @dev Allows the current admin to set the pendingAdmin address. * @param newAdmin The address to transfer ownership to. */ function transferAdmin(address newAdmin) public onlyAdmin { } /** * @dev Allows the current admin to set the admin in one tx. Useful initial deployment. * @param newAdmin The address to transfer ownership to. */ function transferAdminQuickly(address newAdmin) public onlyAdmin { } event AdminClaimed( address newAdmin, address previousAdmin); /** * @dev Allows the pendingAdmin address to finalize the change admin process. */ function claimAdmin() public { } event AlerterAdded (address newAlerter, bool isAdd); function addAlerter(address newAlerter) public onlyAdmin { } function removeAlerter (address alerter) public onlyAdmin { } event OperatorAdded(address newOperator, bool isAdd); function addOperator(address newOperator) public onlyAdmin { } function removeOperator (address operator) public onlyAdmin { } } contract Withdrawable is PermissionGroups { event TokenWithdraw(ERC20 token, uint amount, address sendTo); /** * @dev Withdraw all ERC20 compatible tokens * @param token ERC20 The address of the token contract */ function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin { require(<FILL_ME>) TokenWithdraw(token, amount, sendTo); } event EtherWithdraw(uint amount, address sendTo); /** * @dev Withdraw Ethers */ function withdrawEther(uint amount, address sendTo) external onlyAdmin { } } interface ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(address _to, uint _value) public returns (bool success); function transferFrom(address _from, address _to, uint _value) public returns (bool success); function approve(address _spender, uint _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint remaining); function decimals() public view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } contract WhiteListInterface { function getUserCapInWei(address user) external view returns (uint userCapWei); } contract WhiteList is WhiteListInterface, Withdrawable { uint public weiPerSgd; // amount of weis in 1 singapore dollar mapping (address=>uint) public userCategory; // each user has a category defining cap on trade. 0 for standard. mapping (uint=>uint) public categoryCap; // will define cap on trade amount per category in singapore Dollar. function WhiteList(address _admin) public { } function getUserCapInWei(address user) external view returns (uint userCapWei) { } event UserCategorySet(address user, uint category); function setUserCategory(address user, uint category) public onlyOperator { } event CategoryCapSet (uint category, uint sgdCap); function setCategoryCap(uint category, uint sgdCap) public onlyOperator { } event SgdToWeiRateSet (uint rate); function setSgdToEthRate(uint _sgdToWeiRate) public onlyOperator { } }
token.transfer(sendTo,amount)
276,688
token.transfer(sendTo,amount)
null
pragma solidity ^0.4.13; contract Owned { address owner; function Owned() { } modifier onlyOwner { } } contract SafeMath { function safeMul(uint256 a, uint256 b) internal constant returns (uint256) { } function safeSub(uint256 a, uint256 b) internal constant returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal constant returns (uint256) { } } contract TokenERC20 { event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _value) returns (bool success); function transferFrom(address _from, address _to, uint256 _value) returns (bool success); function approve(address _spender, uint256 _value) returns (bool success); function allowance(address _owner, address _spender) constant returns (uint256 remaining); function balanceOf(address _owner) constant returns (uint256 balance); } contract TokenNotifier { function receiveApproval(address from, uint256 _amount, address _token, bytes _data); } contract ImmortalToken is Owned, SafeMath, TokenERC20 { mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint8 public constant decimals = 0; uint8 public constant totalSupply = 100; string public constant name = "Immortal"; string public constant symbol = "IMT"; string public constant version = "1.0.1"; function transfer(address _to, uint256 _value) returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { } function approve(address _spender, uint256 _value) returns (bool success) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { } function balanceOf(address _owner) constant returns (uint256 balance) { } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } } contract Immortals is ImmortalToken { uint256 public tokenAssigned = 0; event Assigned(address _contributor, uint256 _immortals); function () payable { //Assign immortals based on ethers sent require(tokenAssigned < totalSupply && msg.value >= 0.5 ether); uint256 immortals = msg.value / 0.5 ether; uint256 remainder = 0; //Find the remainder if (safeAdd(tokenAssigned, immortals) > totalSupply) { immortals = totalSupply - tokenAssigned; remainder = msg.value - (immortals * 0.5 ether); } else { remainder = (msg.value % 0.5 ether); } require(<FILL_ME>) balances[msg.sender] = safeAdd(balances[msg.sender], immortals); tokenAssigned = safeAdd(tokenAssigned, immortals); assert(balances[msg.sender] <= totalSupply); //Send remainder to sender msg.sender.transfer(remainder); Assigned(msg.sender, immortals); } function redeemEther(uint256 _amount) onlyOwner external { } }
safeAdd(tokenAssigned,immortals)<=totalSupply
276,725
safeAdd(tokenAssigned,immortals)<=totalSupply
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for Quant Network Overledger // written by @iamdefinitelyahuman library SafeMath { function mul(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 ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. Contributors can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Contributing addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. // Once tokens are sent to the contract, the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // the address that creates the contract address public owner; // the minimum eth amount (in wei) that can be sent by a contributing address uint constant public contributionMin = 100000000000000000; // the maximum eth amount (in wei) that can be held by the contract uint public maxContractBalance; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These variables are all initially blank and are set at some point during the contract // the amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // an array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // the default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // a data structure for holding the contribution amount, eth refund status, and token withdrawal status for each address struct Contributor { uint ethRefund; uint balance; mapping (address => uint) tokensClaimed; } // a mapping that holds the contributor struct for each address mapping (address => Contributor) contributorMap; // a data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // a mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // this modifier is used for functions that can only be accessed by the contract creator modifier onlyOwner () { } // this modifier is used to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and the contract owner. function PresalePool(address receiverAddr, uint contractMaxInWei, uint fee) public { } // This function is called whenever eth is sent into the contract. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. It can only be called by addresses that show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { require (contractStage == 3); require(<FILL_ME>) _withdraw(contributor, tokenAddr); } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, contributing addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
contributorMap[contributor].balance>0
276,741
contributorMap[contributor].balance>0
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for Quant Network Overledger // written by @iamdefinitelyahuman library SafeMath { function mul(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 ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. Contributors can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Contributing addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. // Once tokens are sent to the contract, the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // the address that creates the contract address public owner; // the minimum eth amount (in wei) that can be sent by a contributing address uint constant public contributionMin = 100000000000000000; // the maximum eth amount (in wei) that can be held by the contract uint public maxContractBalance; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These variables are all initially blank and are set at some point during the contract // the amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // an array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // the default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // a data structure for holding the contribution amount, eth refund status, and token withdrawal status for each address struct Contributor { uint ethRefund; uint balance; mapping (address => uint) tokensClaimed; } // a mapping that holds the contributor struct for each address mapping (address => Contributor) contributorMap; // a data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // a mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // this modifier is used for functions that can only be accessed by the contract creator modifier onlyOwner () { } // this modifier is used to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and the contract owner. function PresalePool(address receiverAddr, uint contractMaxInWei, uint fee) public { } // This function is called whenever eth is sent into the contract. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. It can only be called by addresses that show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { assert (contractStage == 3); var c = contributorMap[receiver]; if (tokenAddr == 0x00) { tokenAddr = activeToken; } var d = distributionMap[tokenAddr]; require ( ethRefundAmount.length > c.ethRefund || d.pct.length > c.tokensClaimed[tokenAddr] ); if (ethRefundAmount.length > c.ethRefund) { uint pct = _toPct(c.balance, finalBalance); uint ethAmount = 0; for (uint i = c.ethRefund; i < ethRefundAmount.length; i++) { ethAmount = ethAmount.add(_applyPct(ethRefundAmount[i], pct)); } c.ethRefund = ethRefundAmount.length; if (ethAmount > 0) { receiver.transfer(ethAmount); EthRefunded(receiver, ethAmount); } } if (d.pct.length > c.tokensClaimed[tokenAddr]) { uint tokenAmount = 0; for (i = c.tokensClaimed[tokenAddr]; i < d.pct.length; i++) { tokenAmount = tokenAmount.add(_applyPct(c.balance, d.pct[i])); } c.tokensClaimed[tokenAddr] = d.pct.length; if (tokenAmount > 0) { require(<FILL_ME>) d.balanceRemaining = d.balanceRemaining.sub(tokenAmount); TokensWithdrawn(receiver, tokenAmount); } } } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, contributing addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
d.token.transfer(receiver,tokenAmount)
276,741
d.token.transfer(receiver,tokenAmount)
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for Quant Network Overledger // written by @iamdefinitelyahuman library SafeMath { function mul(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 ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. Contributors can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Contributing addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. // Once tokens are sent to the contract, the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // the address that creates the contract address public owner; // the minimum eth amount (in wei) that can be sent by a contributing address uint constant public contributionMin = 100000000000000000; // the maximum eth amount (in wei) that can be held by the contract uint public maxContractBalance; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These variables are all initially blank and are set at some point during the contract // the amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // an array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // the default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // a data structure for holding the contribution amount, eth refund status, and token withdrawal status for each address struct Contributor { uint ethRefund; uint balance; mapping (address => uint) tokensClaimed; } // a mapping that holds the contributor struct for each address mapping (address => Contributor) contributorMap; // a data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // a mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // this modifier is used for functions that can only be accessed by the contract creator modifier onlyOwner () { } // this modifier is used to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and the contract owner. function PresalePool(address receiverAddr, uint contractMaxInWei, uint fee) public { } // This function is called whenever eth is sent into the contract. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. It can only be called by addresses that show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, contributing addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { require (contractStage < 3); require (contributionMin <= amountInWei && amountInWei <= this.balance); finalBalance = this.balance; require(<FILL_ME>) if (this.balance > 0) ethRefundAmount.push(this.balance); contractStage = 3; PoolSubmitted(receiverAddress, amountInWei); } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
receiverAddress.call.value(amountInWei).gas(msg.gas.sub(5000))()
276,741
receiverAddress.call.value(amountInWei).gas(msg.gas.sub(5000))()
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for Quant Network Overledger // written by @iamdefinitelyahuman library SafeMath { function mul(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 ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. Contributors can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Contributing addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. // Once tokens are sent to the contract, the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // the address that creates the contract address public owner; // the minimum eth amount (in wei) that can be sent by a contributing address uint constant public contributionMin = 100000000000000000; // the maximum eth amount (in wei) that can be held by the contract uint public maxContractBalance; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These variables are all initially blank and are set at some point during the contract // the amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // an array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // the default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // a data structure for holding the contribution amount, eth refund status, and token withdrawal status for each address struct Contributor { uint ethRefund; uint balance; mapping (address => uint) tokensClaimed; } // a mapping that holds the contributor struct for each address mapping (address => Contributor) contributorMap; // a data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // a mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // this modifier is used for functions that can only be accessed by the contract creator modifier onlyOwner () { } // this modifier is used to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and the contract owner. function PresalePool(address receiverAddr, uint contractMaxInWei, uint fee) public { } // This function is called whenever eth is sent into the contract. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. It can only be called by addresses that show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, contributing addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { require (contractStage == 3); if (notDefault) { require (activeToken != 0x00); } else { activeToken = tokenAddr; } var d = distributionMap[tokenAddr]; if (d.pct.length == 0) d.token = ERC20(tokenAddr); uint amount = d.token.balanceOf(this).sub(d.balanceRemaining); require (amount > 0); if (feePct > 0) { require(<FILL_ME>) } amount = d.token.balanceOf(this).sub(d.balanceRemaining); d.balanceRemaining = d.token.balanceOf(this); d.pct.push(_toPct(amount, finalBalance)); WithdrawalsOpen(tokenAddr); } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
d.token.transfer(owner,_applyPct(amount,feePct))
276,741
d.token.transfer(owner,_applyPct(amount,feePct))
"already added"
pragma solidity 0.5.15; pragma experimental ABIEncoderV2; // YAM governor that enables voting with staking contracts and a token /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface TimelockInterface { function delay() external view returns (uint256); function GRACE_PERIOD() external view returns (uint256); function acceptAdmin() external; function queuedTransactions(bytes32 hash) external view returns (bool); function queueTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external returns (bytes32); function cancelTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external; function executeTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external payable returns (bytes memory); } interface YAMInterface { function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256); function getCurrentVotes(address account) external view returns (uint256); function _acceptGov() external; } interface Incentivizer { function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256); function getCurrentVotes(address account) external view returns (uint256); } contract DualGovernorAlpha { /// @notice The name of this contract string public constant name = "YAM Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public view returns (uint256) { } // 4% of YAM /// @notice The number of votes required in order for a voter to become a proposer function proposalThreshold() public view returns (uint256) { } // 1% of YAM /// @notice The maximum number of actions that can be included in a proposal function proposalMaxOperations() public pure returns (uint256) { } // 10 actions /// @notice The delay before voting on a proposal may take place, once proposed function votingDelay() public pure returns (uint256) { } // 1 block /// @notice The duration of voting on a proposal, in blocks function votingPeriod() public pure returns (uint256) { } // ~2 days in blocks (assuming 14s blocks) /// @notice The address of the Compound Protocol Timelock TimelockInterface public timelock; /// @notice The address of the Compound governance token YAMInterface public yam; /// @notice The address of the Governor Guardian address public guardian; /// @notice The total number of proposals uint256 public proposalCount; /// @notice Addresses of LP Staking Contracts address[] public incentivizers; struct Proposal { // Unique id for looking up a proposal uint256 id; // Creator of the proposal address proposer; // The timestamp that the proposal will be available for execution, set once the vote succeeds uint256 eta; // the ordered list of target addresses for calls to be made address[] targets; // The ordered list of values (i.e. msg.value) to be passed to the calls to be made uint[] values; // The ordered list of function signatures to be called string[] signatures; // The ordered list of calldata to be passed to each call bytes[] calldatas; // The block at which voting begins: holders must delegate their votes prior to this block uint256 startBlock; // The block at which voting ends: votes must be cast prior to this block uint256 endBlock; // Current number of votes in favor of this proposal uint256 forVotes; // Current number of votes in opposition to this proposal uint256 againstVotes; // Flag marking whether the proposal has been canceled bool canceled; // Flag marking whether the proposal has been executed bool executed; // Receipts of ballots for the entire set of voters mapping (address => Receipt) receipts; } // Ballot receipt record for a voter struct Receipt { // Whether or not a vote has been cast bool hasVoted; // Whether or not the voter supports the proposal bool support; // The number of votes the voter had, which were cast uint256 votes; } // Possible states that a proposal may be in enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /// @notice The official record of all proposals ever proposed mapping (uint256 => Proposal) public proposals; /// @notice The latest proposal for each proposer mapping (address => uint256) public latestProposalIds; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)"); /// @notice An event emitted when a new proposal is created event ProposalCreated(uint256 id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description); /// @notice An event emitted when a vote has been cast on a proposal event VoteCast(address voter, uint256 proposalId, bool support, uint256 votes); /// @notice An event emitted when a proposal has been canceled event ProposalCanceled(uint256 id); /// @notice An event emitted when a proposal has been queued in the Timelock event ProposalQueued(uint256 id, uint256 eta); /// @notice An event emitted when a proposal has been executed in the Timelock event ProposalExecuted(uint256 id); constructor(address timelock_, address yam_, address[] memory incentivizers_) public { } function getIncentivizers() public view returns (address[] memory) { } function addIncentivizer(address incentivizer) public { // as a sanity check, make sure it has the function and there is no error // otherwise could brick governance Incentivizer(incentivizer).getPriorVotes(guardian, block.number - 1); for (uint256 i = 0; i < incentivizers.length; i++) { require(<FILL_ME>) } require(msg.sender == address(timelock), "GovernorAlpha::!timelock"); incentivizers.push(incentivizer); } function removeIncentivizer(uint256 index) public { } function getPriorVotes(address account, uint256 blockNumber) public returns (uint256) { } function getCurrentVotes(address account) public returns (uint256) { } function propose( address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description ) public returns (uint256) { } function queue(uint256 proposalId) public { } function _queueOrRevert( address target, uint256 value, string memory signature, bytes memory data, uint256 eta ) internal { } function execute(uint256 proposalId) public payable { } function cancel(uint256 proposalId) public { } function getActions(uint256 proposalId) public view returns ( address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas ) { } function getReceipt(uint256 proposalId, address voter) public view returns (Receipt memory) { } function state(uint256 proposalId) public view returns (ProposalState) { } function castVote(uint256 proposalId, bool support) public { } function castVoteBySig( uint256 proposalId, bool support, uint8 v, bytes32 r, bytes32 s ) public { } function _castVote( address voter, uint256 proposalId, bool support ) internal { } function __acceptAdmin() public { } function __abdicate() public { } function add256(uint256 a, uint256 b) internal pure returns (uint256) { } function sub256(uint256 a, uint256 b) internal pure returns (uint256) { } function getChainId() internal pure returns (uint256) { } }
incentivizers[i]!=incentivizer,"already added"
276,848
incentivizers[i]!=incentivizer
"GovernorAlpha::propose: proposer votes below proposal threshold"
pragma solidity 0.5.15; pragma experimental ABIEncoderV2; // YAM governor that enables voting with staking contracts and a token /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface TimelockInterface { function delay() external view returns (uint256); function GRACE_PERIOD() external view returns (uint256); function acceptAdmin() external; function queuedTransactions(bytes32 hash) external view returns (bool); function queueTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external returns (bytes32); function cancelTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external; function executeTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external payable returns (bytes memory); } interface YAMInterface { function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256); function getCurrentVotes(address account) external view returns (uint256); function _acceptGov() external; } interface Incentivizer { function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256); function getCurrentVotes(address account) external view returns (uint256); } contract DualGovernorAlpha { /// @notice The name of this contract string public constant name = "YAM Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public view returns (uint256) { } // 4% of YAM /// @notice The number of votes required in order for a voter to become a proposer function proposalThreshold() public view returns (uint256) { } // 1% of YAM /// @notice The maximum number of actions that can be included in a proposal function proposalMaxOperations() public pure returns (uint256) { } // 10 actions /// @notice The delay before voting on a proposal may take place, once proposed function votingDelay() public pure returns (uint256) { } // 1 block /// @notice The duration of voting on a proposal, in blocks function votingPeriod() public pure returns (uint256) { } // ~2 days in blocks (assuming 14s blocks) /// @notice The address of the Compound Protocol Timelock TimelockInterface public timelock; /// @notice The address of the Compound governance token YAMInterface public yam; /// @notice The address of the Governor Guardian address public guardian; /// @notice The total number of proposals uint256 public proposalCount; /// @notice Addresses of LP Staking Contracts address[] public incentivizers; struct Proposal { // Unique id for looking up a proposal uint256 id; // Creator of the proposal address proposer; // The timestamp that the proposal will be available for execution, set once the vote succeeds uint256 eta; // the ordered list of target addresses for calls to be made address[] targets; // The ordered list of values (i.e. msg.value) to be passed to the calls to be made uint[] values; // The ordered list of function signatures to be called string[] signatures; // The ordered list of calldata to be passed to each call bytes[] calldatas; // The block at which voting begins: holders must delegate their votes prior to this block uint256 startBlock; // The block at which voting ends: votes must be cast prior to this block uint256 endBlock; // Current number of votes in favor of this proposal uint256 forVotes; // Current number of votes in opposition to this proposal uint256 againstVotes; // Flag marking whether the proposal has been canceled bool canceled; // Flag marking whether the proposal has been executed bool executed; // Receipts of ballots for the entire set of voters mapping (address => Receipt) receipts; } // Ballot receipt record for a voter struct Receipt { // Whether or not a vote has been cast bool hasVoted; // Whether or not the voter supports the proposal bool support; // The number of votes the voter had, which were cast uint256 votes; } // Possible states that a proposal may be in enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /// @notice The official record of all proposals ever proposed mapping (uint256 => Proposal) public proposals; /// @notice The latest proposal for each proposer mapping (address => uint256) public latestProposalIds; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)"); /// @notice An event emitted when a new proposal is created event ProposalCreated(uint256 id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description); /// @notice An event emitted when a vote has been cast on a proposal event VoteCast(address voter, uint256 proposalId, bool support, uint256 votes); /// @notice An event emitted when a proposal has been canceled event ProposalCanceled(uint256 id); /// @notice An event emitted when a proposal has been queued in the Timelock event ProposalQueued(uint256 id, uint256 eta); /// @notice An event emitted when a proposal has been executed in the Timelock event ProposalExecuted(uint256 id); constructor(address timelock_, address yam_, address[] memory incentivizers_) public { } function getIncentivizers() public view returns (address[] memory) { } function addIncentivizer(address incentivizer) public { } function removeIncentivizer(uint256 index) public { } function getPriorVotes(address account, uint256 blockNumber) public returns (uint256) { } function getCurrentVotes(address account) public returns (uint256) { } function propose( address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description ) public returns (uint256) { require(<FILL_ME>) require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorAlpha::propose: must provide actions"); require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions"); uint256 latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require(proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal"); require(proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal"); } uint256 startBlock = add256(block.number, votingDelay()); uint256 endBlock = add256(startBlock, votingPeriod()); proposalCount++; Proposal memory newProposal = Proposal({ id: proposalCount, proposer: msg.sender, eta: 0, targets: targets, values: values, signatures: signatures, calldatas: calldatas, startBlock: startBlock, endBlock: endBlock, forVotes: 0, againstVotes: 0, canceled: false, executed: false }); proposals[newProposal.id] = newProposal; latestProposalIds[newProposal.proposer] = newProposal.id; emit ProposalCreated( newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description ); return newProposal.id; } function queue(uint256 proposalId) public { } function _queueOrRevert( address target, uint256 value, string memory signature, bytes memory data, uint256 eta ) internal { } function execute(uint256 proposalId) public payable { } function cancel(uint256 proposalId) public { } function getActions(uint256 proposalId) public view returns ( address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas ) { } function getReceipt(uint256 proposalId, address voter) public view returns (Receipt memory) { } function state(uint256 proposalId) public view returns (ProposalState) { } function castVote(uint256 proposalId, bool support) public { } function castVoteBySig( uint256 proposalId, bool support, uint8 v, bytes32 r, bytes32 s ) public { } function _castVote( address voter, uint256 proposalId, bool support ) internal { } function __acceptAdmin() public { } function __abdicate() public { } function add256(uint256 a, uint256 b) internal pure returns (uint256) { } function sub256(uint256 a, uint256 b) internal pure returns (uint256) { } function getChainId() internal pure returns (uint256) { } }
getPriorVotes(msg.sender,sub256(block.number,1))>=proposalThreshold(),"GovernorAlpha::propose: proposer votes below proposal threshold"
276,848
getPriorVotes(msg.sender,sub256(block.number,1))>=proposalThreshold()
"liquidity mining program is paused"
pragma solidity ^0.6.2; contract PoolGetters is PoolState { using SafeMath for uint256; uint32 private constant SECONDS_PER_DAY = 86400; /* 86400 seconds in a day */ /** * Global */ function cook() public view virtual returns (IERC20) { } function univ2() public view virtual returns (IERC20) { } function totalStaked() public view returns (uint256) { } function totalRewarded() public view returns (uint256) { } function totalClaimed() public view returns (uint256) { } function totalVesting() public view returns (uint256) { } function totalPhantom() public view returns (uint256) { } function lastRewardBlock() public view returns (uint256) { } function getRewardPerBlock() public view virtual returns (uint256) { } // Overridable for testing function getStakeLockupDuration() public view virtual returns (uint256) { } function getVestingDuration() public view virtual returns (uint256) { } function blockNumber() public view virtual returns (uint256) { } function blockTimestamp() public view virtual returns (uint256) { } /** * Account */ function balanceOfStaked(address account) public view returns (uint256) { } function stakingScheduleStartTime(address account) public view returns (uint256[] memory) { } function stakingScheduleAmount(address account) public view returns (uint256[] memory) { } function balanceOfUnstakable(address account) public view returns (uint256) { } function balanceOfPhantom(address account) public view returns (uint256) { } function balanceOfRewarded(address account) public view returns (uint256) { } function balanceOfClaimed(address account) public view returns (uint256) { } function balanceOfVesting(address account) public view returns (uint256) { } function balanceOfClaimable(address account) public view returns (uint256) { } function isMiningPaused() public view returns (bool) { } function isFull() public view returns (bool) { } function isAddrBlacklisted(address addr) public view returns (bool) { } function totalPoolCapLimit() public view returns (uint256) { } function stakeLimitPerAddress() public view returns (uint256) { } function checkMiningPaused() public { require(<FILL_ME>) } function ensureAddrNotBlacklisted(address addr) public { } function checkPoolStakeCapLimit(uint256 amountToStake) public { } function checkPerAddrStakeLimit(uint256 amountToStake, address account) public { } }
isMiningPaused()==false,"liquidity mining program is paused"
276,855
isMiningPaused()==false
"Your address is blacklisted"
pragma solidity ^0.6.2; contract PoolGetters is PoolState { using SafeMath for uint256; uint32 private constant SECONDS_PER_DAY = 86400; /* 86400 seconds in a day */ /** * Global */ function cook() public view virtual returns (IERC20) { } function univ2() public view virtual returns (IERC20) { } function totalStaked() public view returns (uint256) { } function totalRewarded() public view returns (uint256) { } function totalClaimed() public view returns (uint256) { } function totalVesting() public view returns (uint256) { } function totalPhantom() public view returns (uint256) { } function lastRewardBlock() public view returns (uint256) { } function getRewardPerBlock() public view virtual returns (uint256) { } // Overridable for testing function getStakeLockupDuration() public view virtual returns (uint256) { } function getVestingDuration() public view virtual returns (uint256) { } function blockNumber() public view virtual returns (uint256) { } function blockTimestamp() public view virtual returns (uint256) { } /** * Account */ function balanceOfStaked(address account) public view returns (uint256) { } function stakingScheduleStartTime(address account) public view returns (uint256[] memory) { } function stakingScheduleAmount(address account) public view returns (uint256[] memory) { } function balanceOfUnstakable(address account) public view returns (uint256) { } function balanceOfPhantom(address account) public view returns (uint256) { } function balanceOfRewarded(address account) public view returns (uint256) { } function balanceOfClaimed(address account) public view returns (uint256) { } function balanceOfVesting(address account) public view returns (uint256) { } function balanceOfClaimable(address account) public view returns (uint256) { } function isMiningPaused() public view returns (bool) { } function isFull() public view returns (bool) { } function isAddrBlacklisted(address addr) public view returns (bool) { } function totalPoolCapLimit() public view returns (uint256) { } function stakeLimitPerAddress() public view returns (uint256) { } function checkMiningPaused() public { } function ensureAddrNotBlacklisted(address addr) public { require(<FILL_ME>) } function checkPoolStakeCapLimit(uint256 amountToStake) public { } function checkPerAddrStakeLimit(uint256 amountToStake, address account) public { } }
isAddrBlacklisted(addr)==false,"Your address is blacklisted"
276,855
isAddrBlacklisted(addr)==false
"Exceed pool limit"
pragma solidity ^0.6.2; contract PoolGetters is PoolState { using SafeMath for uint256; uint32 private constant SECONDS_PER_DAY = 86400; /* 86400 seconds in a day */ /** * Global */ function cook() public view virtual returns (IERC20) { } function univ2() public view virtual returns (IERC20) { } function totalStaked() public view returns (uint256) { } function totalRewarded() public view returns (uint256) { } function totalClaimed() public view returns (uint256) { } function totalVesting() public view returns (uint256) { } function totalPhantom() public view returns (uint256) { } function lastRewardBlock() public view returns (uint256) { } function getRewardPerBlock() public view virtual returns (uint256) { } // Overridable for testing function getStakeLockupDuration() public view virtual returns (uint256) { } function getVestingDuration() public view virtual returns (uint256) { } function blockNumber() public view virtual returns (uint256) { } function blockTimestamp() public view virtual returns (uint256) { } /** * Account */ function balanceOfStaked(address account) public view returns (uint256) { } function stakingScheduleStartTime(address account) public view returns (uint256[] memory) { } function stakingScheduleAmount(address account) public view returns (uint256[] memory) { } function balanceOfUnstakable(address account) public view returns (uint256) { } function balanceOfPhantom(address account) public view returns (uint256) { } function balanceOfRewarded(address account) public view returns (uint256) { } function balanceOfClaimed(address account) public view returns (uint256) { } function balanceOfVesting(address account) public view returns (uint256) { } function balanceOfClaimable(address account) public view returns (uint256) { } function isMiningPaused() public view returns (bool) { } function isFull() public view returns (bool) { } function isAddrBlacklisted(address addr) public view returns (bool) { } function totalPoolCapLimit() public view returns (uint256) { } function stakeLimitPerAddress() public view returns (uint256) { } function checkMiningPaused() public { } function ensureAddrNotBlacklisted(address addr) public { } function checkPoolStakeCapLimit(uint256 amountToStake) public { require(<FILL_ME>) } function checkPerAddrStakeLimit(uint256 amountToStake, address account) public { } }
(_state.totalPoolCapLimit==0||(_state.balance.staked.add(amountToStake))<=_state.totalPoolCapLimit)==true,"Exceed pool limit"
276,855
(_state.totalPoolCapLimit==0||(_state.balance.staked.add(amountToStake))<=_state.totalPoolCapLimit)==true
"Exceed per address stake limit"
pragma solidity ^0.6.2; contract PoolGetters is PoolState { using SafeMath for uint256; uint32 private constant SECONDS_PER_DAY = 86400; /* 86400 seconds in a day */ /** * Global */ function cook() public view virtual returns (IERC20) { } function univ2() public view virtual returns (IERC20) { } function totalStaked() public view returns (uint256) { } function totalRewarded() public view returns (uint256) { } function totalClaimed() public view returns (uint256) { } function totalVesting() public view returns (uint256) { } function totalPhantom() public view returns (uint256) { } function lastRewardBlock() public view returns (uint256) { } function getRewardPerBlock() public view virtual returns (uint256) { } // Overridable for testing function getStakeLockupDuration() public view virtual returns (uint256) { } function getVestingDuration() public view virtual returns (uint256) { } function blockNumber() public view virtual returns (uint256) { } function blockTimestamp() public view virtual returns (uint256) { } /** * Account */ function balanceOfStaked(address account) public view returns (uint256) { } function stakingScheduleStartTime(address account) public view returns (uint256[] memory) { } function stakingScheduleAmount(address account) public view returns (uint256[] memory) { } function balanceOfUnstakable(address account) public view returns (uint256) { } function balanceOfPhantom(address account) public view returns (uint256) { } function balanceOfRewarded(address account) public view returns (uint256) { } function balanceOfClaimed(address account) public view returns (uint256) { } function balanceOfVesting(address account) public view returns (uint256) { } function balanceOfClaimable(address account) public view returns (uint256) { } function isMiningPaused() public view returns (bool) { } function isFull() public view returns (bool) { } function isAddrBlacklisted(address addr) public view returns (bool) { } function totalPoolCapLimit() public view returns (uint256) { } function stakeLimitPerAddress() public view returns (uint256) { } function checkMiningPaused() public { } function ensureAddrNotBlacklisted(address addr) public { } function checkPoolStakeCapLimit(uint256 amountToStake) public { } function checkPerAddrStakeLimit(uint256 amountToStake, address account) public { require(<FILL_ME>) } }
(_state.stakeLimitPerAddress==0||(balanceOfStaked(account).add(amountToStake))<=_state.stakeLimitPerAddress)==true,"Exceed per address stake limit"
276,855
(_state.stakeLimitPerAddress==0||(balanceOfStaked(account).add(amountToStake))<=_state.stakeLimitPerAddress)==true
"Token already minted"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; struct TokenArtDetails { // stored erc 20 token info address[] storedERC20TokenAddresses; // addresses of erc 20 tokens which were stored in erc1155 piece uint256[] storedERC20TokenAmounts; // amounts of erc 20 tokens which each piece is entitled to. maps to index in storedERC20TokenAddresses uint256 storedERC20TokensAvailableAt; // unix epoch when erc20 tokens can be unlocked // embedded erc 1155 info address embeddedErc1155Address; uint256 embeddedErc1155Id; // additional info uint256 numPiecesElevated; // how many pieces elevated bool burnEmbeddedPieceWhenUnelevated; // if true the embedded piece will be burned when unelevated string metadata; // addtl metadata } contract TokenArt is ERC1155("https://elevated.art/api/token-art-metadata/{id}.json"), Ownable, ReentrancyGuard { using SafeMath for uint256; using EnumerableMap for EnumerableMap.UintToAddressMap; // tokenArtId => art details mapping(uint256 => TokenArtDetails) public tokenArtDetails; // Enumerable mapping from token ids to their creators EnumerableMap.UintToAddressMap private _tokenCreators; // keep track of last token id minted uint256 public lastMintedId; // constants bytes4 constant onErc1155Res = bytes4( keccak256("onERC1155Received(address,address,uint256,uint256,bytes)") ); event Elevated( uint256 tokenArtId, address embeddedErc1155Address, uint256 embeddedErc1155Id, uint256 amountToElevate, address[] erc20TokenAddresses, uint256[] erc20TokenAmountEach, uint256 storedERC20TokensAvailableAt, bool burnEmbeddedPieceWhenUnelevated, string metadata ); event Unelevated( uint256 tokenArtId, address embeddedErc1155Address, uint256 embeddedErc1155Id, uint256 amountUnelevated, address[] erc20TokenAddresses, uint256[] erc20TokenAmountEach, uint256 storedERC20TokensAvailableAt, address unelevatedBy ); function elevate( address embeddedErc1155Address, uint256 embeddedErc1155Id, uint256 amountToElevate, address[] memory erc20TokenAddresses, uint256[] memory erc20TokenAmountEach, uint256 storedERC20TokensAvailableAt, bool burnEmbeddedPieceWhenUnelevated, string memory metadata ) external payable nonReentrant() returns (uint256) { require( erc20TokenAddresses.length == erc20TokenAmountEach.length, "amount lengths must match" ); require( erc20TokenAddresses.length > 0, "must embed with at least 1 token" ); require(amountToElevate > 0, "must mint at least 1 token"); // add 1 to id to generate new token id uint256 tokenArtId = lastMintedId = lastMintedId.add(1); require(<FILL_ME>) IERC1155 embeddedErc1155 = IERC1155(embeddedErc1155Address); // set creator _tokenCreators.set(tokenArtId, msg.sender); // transfer each erc20 token for specified amount for (uint256 j = 0; j < erc20TokenAddresses.length; j++) { uint256 totalTokensToTransfer = erc20TokenAmountEach[j].mul( amountToElevate ); IERC20 token = IERC20(erc20TokenAddresses[j]); token.transferFrom( msg.sender, address(this), totalTokensToTransfer ); } // transfer source art over embeddedErc1155.safeTransferFrom( msg.sender, address(this), embeddedErc1155Id, amountToElevate, "0x" ); // mint new TokenArt pieces _mint(msg.sender, tokenArtId, amountToElevate, "0x"); // set struct tokenArtDetails[tokenArtId] = TokenArtDetails( // erc 20 info erc20TokenAddresses, erc20TokenAmountEach, storedERC20TokensAvailableAt, // embedded erc150 info embeddedErc1155Address, embeddedErc1155Id, // additional info amountToElevate, burnEmbeddedPieceWhenUnelevated, metadata ); // emit event emit Elevated( tokenArtId, embeddedErc1155Address, embeddedErc1155Id, amountToElevate, erc20TokenAddresses, erc20TokenAmountEach, storedERC20TokensAvailableAt, burnEmbeddedPieceWhenUnelevated, metadata ); return tokenArtId; } function unelevate(uint256 tokenArtId, uint256 numToUnelevate) external payable nonReentrant() { } function creatorOf(uint256 tokenArtId) external view returns (address) { } function getDetails(uint256[] memory tokenArtIds) external view returns (TokenArtDetails[] memory tad, address[] memory creators) { } function retrieveTips(uint256 amount) external onlyOwner() returns (bool) { } function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4) { } function _exists(uint256 tokenId) internal view returns (bool) { } }
!_exists(tokenArtId),"Token already minted"
276,912
!_exists(tokenArtId)
null
pragma solidity ^0.4.26; contract SafeMath { function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { } function _assert(bool assertion) internal pure { } } contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract ODX is SafeMath,Owned { string public name = "ODX Token"; string public symbol = "ODX"; uint8 constant public decimals = 18; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) public _allowed; uint256 public totalSupply = 1000000000 * 10**uint(decimals); constructor () public{ } function balanceOf(address addr) public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { if (_to == address(0)) { return burn(_value); } else { require(<FILL_ME>) require(_balances[_to] + _value >= _balances[_to]); _balances[msg.sender] = safeSub(_balances[msg.sender], _value); _balances[_to] = safeAdd(_balances[_to], _value); emit Transfer(msg.sender, _to, _value); return true; } } function burn(uint256 _value) public returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address spender, uint256 value) public returns (bool) { } function allowance(address _master, address _spender) public view returns (uint256) { } event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 value); event Burn(address indexed _from, uint256 value); }
_balances[msg.sender]>=_value&&_value>0
276,921
_balances[msg.sender]>=_value&&_value>0
null
pragma solidity ^0.4.26; contract SafeMath { function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { } function _assert(bool assertion) internal pure { } } contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract ODX is SafeMath,Owned { string public name = "ODX Token"; string public symbol = "ODX"; uint8 constant public decimals = 18; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) public _allowed; uint256 public totalSupply = 1000000000 * 10**uint(decimals); constructor () public{ } function balanceOf(address addr) public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { if (_to == address(0)) { return burn(_value); } else { require(_balances[msg.sender] >= _value && _value > 0); require(<FILL_ME>) _balances[msg.sender] = safeSub(_balances[msg.sender], _value); _balances[_to] = safeAdd(_balances[_to], _value); emit Transfer(msg.sender, _to, _value); return true; } } function burn(uint256 _value) public returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address spender, uint256 value) public returns (bool) { } function allowance(address _master, address _spender) public view returns (uint256) { } event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 value); event Burn(address indexed _from, uint256 value); }
_balances[_to]+_value>=_balances[_to]
276,921
_balances[_to]+_value>=_balances[_to]
null
pragma solidity ^0.4.26; contract SafeMath { function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { } function _assert(bool assertion) internal pure { } } contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract ODX is SafeMath,Owned { string public name = "ODX Token"; string public symbol = "ODX"; uint8 constant public decimals = 18; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) public _allowed; uint256 public totalSupply = 1000000000 * 10**uint(decimals); constructor () public{ } function balanceOf(address addr) public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(<FILL_ME>) require(_balances[_to] + _value >= _balances[_to]); require(_allowed[_from][msg.sender] >= _value); _balances[_to] = safeAdd(_balances[_to], _value); _balances[_from] = safeSub(_balances[_from], _value); _allowed[_from][msg.sender] = safeSub(_allowed[_from][msg.sender], _value); emit Transfer(_from, _to, _value); return true; } function approve(address spender, uint256 value) public returns (bool) { } function allowance(address _master, address _spender) public view returns (uint256) { } event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 value); event Burn(address indexed _from, uint256 value); }
_balances[_from]>=_value&&_value>0
276,921
_balances[_from]>=_value&&_value>0
null
pragma solidity ^0.4.26; contract SafeMath { function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { } function _assert(bool assertion) internal pure { } } contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract ODX is SafeMath,Owned { string public name = "ODX Token"; string public symbol = "ODX"; uint8 constant public decimals = 18; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) public _allowed; uint256 public totalSupply = 1000000000 * 10**uint(decimals); constructor () public{ } function balanceOf(address addr) public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_balances[_from] >= _value && _value > 0); require(_balances[_to] + _value >= _balances[_to]); require(<FILL_ME>) _balances[_to] = safeAdd(_balances[_to], _value); _balances[_from] = safeSub(_balances[_from], _value); _allowed[_from][msg.sender] = safeSub(_allowed[_from][msg.sender], _value); emit Transfer(_from, _to, _value); return true; } function approve(address spender, uint256 value) public returns (bool) { } function allowance(address _master, address _spender) public view returns (uint256) { } event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 value); event Burn(address indexed _from, uint256 value); }
_allowed[_from][msg.sender]>=_value
276,921
_allowed[_from][msg.sender]>=_value
'The wallet address has already minted.'
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; contract ASMAIFAAllStarsBoxSet is ERC721Enumerable, ReentrancyGuard, Ownable { using ECDSA for bytes32; using Address for address; using Counters for Counters.Counter; Counters.Counter private _tokenIds; enum Status { Pending, PreSale, PublicSale, Finished } Status public status; address private _signer; string public baseURI; uint256 public maxAmountPerTx = 3; uint256 public constant maxSupply = 10000; uint256 public constant price = 0.09 * 10**18; // 0.09 ETH mapping(bytes => bool) public usedToken; mapping(address => bool) public presaleMinted; event Minted(address minter, uint256 amount); event StatusChanged(Status status); event BaseURIChanged(string newBaseURI); event SignerChanged(address signer); event BalanceWithdrawed(address recipient, uint256 value); constructor(address signer, address recipient) ERC721('ASMAIFAAllStarsBoxSet', 'AIFABOX') { } function getStatus() public view returns (Status) { } function _hash(string calldata salt, address _address) internal view returns (bytes32) { } function _verify(bytes32 hash, bytes memory token) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function presaleMint(string calldata salt, bytes calldata token) external payable nonReentrant { require(status == Status.PreSale, 'Presale is not active.'); require( !Address.isContract(msg.sender), 'Contracts are not allowed to mint.' ); require(<FILL_ME>) require( _tokenIds.current() + 1 <= maxSupply, 'Max supply of tokens exceeded.' ); require(msg.value >= price, 'Ether value sent is incorrect.'); require(_verify(_hash(salt, msg.sender), token), 'Invalid token.'); uint256 newItemId = _tokenIds.current(); _safeMint(msg.sender, newItemId); _tokenIds.increment(); presaleMinted[msg.sender] = true; emit Minted(msg.sender, 1); } function mint( string calldata salt, bytes calldata token, uint256 amount ) external payable nonReentrant { } function _baseURI() internal view override returns (string memory) { } function withdrawAll(address recipient) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function setStatus(Status _status) external onlyOwner { } function setSigner(address signer) external onlyOwner { } }
!presaleMinted[msg.sender],'The wallet address has already minted.'
276,922
!presaleMinted[msg.sender]
'Max supply of tokens exceeded.'
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; contract ASMAIFAAllStarsBoxSet is ERC721Enumerable, ReentrancyGuard, Ownable { using ECDSA for bytes32; using Address for address; using Counters for Counters.Counter; Counters.Counter private _tokenIds; enum Status { Pending, PreSale, PublicSale, Finished } Status public status; address private _signer; string public baseURI; uint256 public maxAmountPerTx = 3; uint256 public constant maxSupply = 10000; uint256 public constant price = 0.09 * 10**18; // 0.09 ETH mapping(bytes => bool) public usedToken; mapping(address => bool) public presaleMinted; event Minted(address minter, uint256 amount); event StatusChanged(Status status); event BaseURIChanged(string newBaseURI); event SignerChanged(address signer); event BalanceWithdrawed(address recipient, uint256 value); constructor(address signer, address recipient) ERC721('ASMAIFAAllStarsBoxSet', 'AIFABOX') { } function getStatus() public view returns (Status) { } function _hash(string calldata salt, address _address) internal view returns (bytes32) { } function _verify(bytes32 hash, bytes memory token) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function presaleMint(string calldata salt, bytes calldata token) external payable nonReentrant { require(status == Status.PreSale, 'Presale is not active.'); require( !Address.isContract(msg.sender), 'Contracts are not allowed to mint.' ); require( !presaleMinted[msg.sender], 'The wallet address has already minted.' ); require(<FILL_ME>) require(msg.value >= price, 'Ether value sent is incorrect.'); require(_verify(_hash(salt, msg.sender), token), 'Invalid token.'); uint256 newItemId = _tokenIds.current(); _safeMint(msg.sender, newItemId); _tokenIds.increment(); presaleMinted[msg.sender] = true; emit Minted(msg.sender, 1); } function mint( string calldata salt, bytes calldata token, uint256 amount ) external payable nonReentrant { } function _baseURI() internal view override returns (string memory) { } function withdrawAll(address recipient) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function setStatus(Status _status) external onlyOwner { } function setSigner(address signer) external onlyOwner { } }
_tokenIds.current()+1<=maxSupply,'Max supply of tokens exceeded.'
276,922
_tokenIds.current()+1<=maxSupply
'Invalid token.'
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; contract ASMAIFAAllStarsBoxSet is ERC721Enumerable, ReentrancyGuard, Ownable { using ECDSA for bytes32; using Address for address; using Counters for Counters.Counter; Counters.Counter private _tokenIds; enum Status { Pending, PreSale, PublicSale, Finished } Status public status; address private _signer; string public baseURI; uint256 public maxAmountPerTx = 3; uint256 public constant maxSupply = 10000; uint256 public constant price = 0.09 * 10**18; // 0.09 ETH mapping(bytes => bool) public usedToken; mapping(address => bool) public presaleMinted; event Minted(address minter, uint256 amount); event StatusChanged(Status status); event BaseURIChanged(string newBaseURI); event SignerChanged(address signer); event BalanceWithdrawed(address recipient, uint256 value); constructor(address signer, address recipient) ERC721('ASMAIFAAllStarsBoxSet', 'AIFABOX') { } function getStatus() public view returns (Status) { } function _hash(string calldata salt, address _address) internal view returns (bytes32) { } function _verify(bytes32 hash, bytes memory token) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function presaleMint(string calldata salt, bytes calldata token) external payable nonReentrant { require(status == Status.PreSale, 'Presale is not active.'); require( !Address.isContract(msg.sender), 'Contracts are not allowed to mint.' ); require( !presaleMinted[msg.sender], 'The wallet address has already minted.' ); require( _tokenIds.current() + 1 <= maxSupply, 'Max supply of tokens exceeded.' ); require(msg.value >= price, 'Ether value sent is incorrect.'); require(<FILL_ME>) uint256 newItemId = _tokenIds.current(); _safeMint(msg.sender, newItemId); _tokenIds.increment(); presaleMinted[msg.sender] = true; emit Minted(msg.sender, 1); } function mint( string calldata salt, bytes calldata token, uint256 amount ) external payable nonReentrant { } function _baseURI() internal view override returns (string memory) { } function withdrawAll(address recipient) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function setStatus(Status _status) external onlyOwner { } function setSigner(address signer) external onlyOwner { } }
_verify(_hash(salt,msg.sender),token),'Invalid token.'
276,922
_verify(_hash(salt,msg.sender),token)
'Amount should not exceed max supply of tokens.'
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; contract ASMAIFAAllStarsBoxSet is ERC721Enumerable, ReentrancyGuard, Ownable { using ECDSA for bytes32; using Address for address; using Counters for Counters.Counter; Counters.Counter private _tokenIds; enum Status { Pending, PreSale, PublicSale, Finished } Status public status; address private _signer; string public baseURI; uint256 public maxAmountPerTx = 3; uint256 public constant maxSupply = 10000; uint256 public constant price = 0.09 * 10**18; // 0.09 ETH mapping(bytes => bool) public usedToken; mapping(address => bool) public presaleMinted; event Minted(address minter, uint256 amount); event StatusChanged(Status status); event BaseURIChanged(string newBaseURI); event SignerChanged(address signer); event BalanceWithdrawed(address recipient, uint256 value); constructor(address signer, address recipient) ERC721('ASMAIFAAllStarsBoxSet', 'AIFABOX') { } function getStatus() public view returns (Status) { } function _hash(string calldata salt, address _address) internal view returns (bytes32) { } function _verify(bytes32 hash, bytes memory token) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function presaleMint(string calldata salt, bytes calldata token) external payable nonReentrant { } function mint( string calldata salt, bytes calldata token, uint256 amount ) external payable nonReentrant { require(status == Status.PublicSale, 'Sale is not active.'); require( !Address.isContract(msg.sender), 'Contracts are not allowed to mint.' ); require( amount <= maxAmountPerTx, 'Amount should not exceed 3 per transaction.' ); require(<FILL_ME>) require(msg.value >= price * amount, 'Ether value sent is incorrect.'); require(!usedToken[token], 'The token has been used.'); require(_verify(_hash(salt, msg.sender), token), 'Invalid token.'); for (uint256 i = 0; i < amount; i++) { uint256 newItemId = _tokenIds.current(); _safeMint(msg.sender, newItemId); _tokenIds.increment(); } usedToken[token] = true; emit Minted(msg.sender, amount); } function _baseURI() internal view override returns (string memory) { } function withdrawAll(address recipient) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function setStatus(Status _status) external onlyOwner { } function setSigner(address signer) external onlyOwner { } }
_tokenIds.current()+amount<=maxSupply,'Amount should not exceed max supply of tokens.'
276,922
_tokenIds.current()+amount<=maxSupply
'The token has been used.'
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; contract ASMAIFAAllStarsBoxSet is ERC721Enumerable, ReentrancyGuard, Ownable { using ECDSA for bytes32; using Address for address; using Counters for Counters.Counter; Counters.Counter private _tokenIds; enum Status { Pending, PreSale, PublicSale, Finished } Status public status; address private _signer; string public baseURI; uint256 public maxAmountPerTx = 3; uint256 public constant maxSupply = 10000; uint256 public constant price = 0.09 * 10**18; // 0.09 ETH mapping(bytes => bool) public usedToken; mapping(address => bool) public presaleMinted; event Minted(address minter, uint256 amount); event StatusChanged(Status status); event BaseURIChanged(string newBaseURI); event SignerChanged(address signer); event BalanceWithdrawed(address recipient, uint256 value); constructor(address signer, address recipient) ERC721('ASMAIFAAllStarsBoxSet', 'AIFABOX') { } function getStatus() public view returns (Status) { } function _hash(string calldata salt, address _address) internal view returns (bytes32) { } function _verify(bytes32 hash, bytes memory token) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function presaleMint(string calldata salt, bytes calldata token) external payable nonReentrant { } function mint( string calldata salt, bytes calldata token, uint256 amount ) external payable nonReentrant { require(status == Status.PublicSale, 'Sale is not active.'); require( !Address.isContract(msg.sender), 'Contracts are not allowed to mint.' ); require( amount <= maxAmountPerTx, 'Amount should not exceed 3 per transaction.' ); require( _tokenIds.current() + amount <= maxSupply, 'Amount should not exceed max supply of tokens.' ); require(msg.value >= price * amount, 'Ether value sent is incorrect.'); require(<FILL_ME>) require(_verify(_hash(salt, msg.sender), token), 'Invalid token.'); for (uint256 i = 0; i < amount; i++) { uint256 newItemId = _tokenIds.current(); _safeMint(msg.sender, newItemId); _tokenIds.increment(); } usedToken[token] = true; emit Minted(msg.sender, amount); } function _baseURI() internal view override returns (string memory) { } function withdrawAll(address recipient) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function setStatus(Status _status) external onlyOwner { } function setSigner(address signer) external onlyOwner { } }
!usedToken[token],'The token has been used.'
276,922
!usedToken[token]
null
/*! iam.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.18; 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 Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } function Ownable() public { } function transferOwnership(address newOwner) public onlyOwner { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Withdrawable is Ownable { function withdrawEther(address _to, uint _value) onlyOwner public returns(bool) { } function withdrawTokens(ERC20 _token, address _to, uint _value) onlyOwner public returns(bool) { } } contract ERC20 { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract ERC223 is ERC20 { function transfer(address to, uint256 value, bytes data) public returns(bool); } contract ERC223Receiving { function tokenFallback(address from, uint256 value, bytes data) external; } contract StandardToken is ERC223 { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; function StandardToken(string _name, string _symbol, uint8 _decimals) public { } function balanceOf(address _owner) public view returns(uint256 balance) { } function _transfer(address _to, uint256 _value, bytes _data) private returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transfer(address _to, uint256 _value, bytes _data) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; function CappedToken(uint256 _cap) public { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function burn(uint256 _value) public { } } /* ICO IAM */ contract Token is CappedToken, BurnableToken, Withdrawable { function Token() CappedToken(70000000 * 1 ether) StandardToken("IAM Aero", "IAM", 18) public { } function tokenFallback(address _from, uint256 _value, bytes _data) external { } function transferOwner(address _from, address _to, uint256 _value) onlyOwner canMint public returns(bool) { } } contract Crowdsale is Pausable, Withdrawable, ERC223Receiving { using SafeMath for uint; struct Step { uint priceTokenWei; uint tokensForSale; uint minInvestEth; uint tokensSold; uint collectedWei; bool transferBalance; bool sale; bool issue; } Token public token; address public beneficiary = 0x4ae7bdf9530cdB666FC14DF79C169e14504c621A; Step[] public steps; uint8 public currentStep = 0; bool public crowdsaleClosed = false; mapping(address => uint256) public canSell; event Purchase(address indexed holder, uint256 tokenAmount, uint256 etherAmount); event Issue(address indexed holder, uint256 tokenAmount); event Sell(address indexed holder, uint256 tokenAmount, uint256 etherAmount); event NewRate(uint256 rate); event NextStep(uint8 step); event CrowdsaleClose(); function Crowdsale() public { } function() payable public { } function tokenFallback(address _from, uint256 _value, bytes _data) external { } function setTokenRate(uint _value) onlyOwner public { } function purchase() whenNotPaused payable public { } function issue(address _to, uint256 _value) onlyOwner whenNotPaused public { require(!crowdsaleClosed); Step memory step = steps[currentStep]; require(<FILL_ME>) require(step.tokensSold.add(_value) <= step.tokensForSale); steps[currentStep].tokensSold = step.tokensSold.add(_value); if(currentStep == 0) { canSell[_to] = canSell[_to].add(_value); } token.mint(_to, _value); Issue(_to, _value); } function sell(uint256 _value) whenNotPaused public { } function nextStep(uint _value) onlyOwner public { } function closeCrowdsale() onlyOwner public { } }
step.issue
276,970
step.issue
null
/*! iam.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.18; 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 Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } function Ownable() public { } function transferOwnership(address newOwner) public onlyOwner { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Withdrawable is Ownable { function withdrawEther(address _to, uint _value) onlyOwner public returns(bool) { } function withdrawTokens(ERC20 _token, address _to, uint _value) onlyOwner public returns(bool) { } } contract ERC20 { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract ERC223 is ERC20 { function transfer(address to, uint256 value, bytes data) public returns(bool); } contract ERC223Receiving { function tokenFallback(address from, uint256 value, bytes data) external; } contract StandardToken is ERC223 { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; function StandardToken(string _name, string _symbol, uint8 _decimals) public { } function balanceOf(address _owner) public view returns(uint256 balance) { } function _transfer(address _to, uint256 _value, bytes _data) private returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transfer(address _to, uint256 _value, bytes _data) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; function CappedToken(uint256 _cap) public { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function burn(uint256 _value) public { } } /* ICO IAM */ contract Token is CappedToken, BurnableToken, Withdrawable { function Token() CappedToken(70000000 * 1 ether) StandardToken("IAM Aero", "IAM", 18) public { } function tokenFallback(address _from, uint256 _value, bytes _data) external { } function transferOwner(address _from, address _to, uint256 _value) onlyOwner canMint public returns(bool) { } } contract Crowdsale is Pausable, Withdrawable, ERC223Receiving { using SafeMath for uint; struct Step { uint priceTokenWei; uint tokensForSale; uint minInvestEth; uint tokensSold; uint collectedWei; bool transferBalance; bool sale; bool issue; } Token public token; address public beneficiary = 0x4ae7bdf9530cdB666FC14DF79C169e14504c621A; Step[] public steps; uint8 public currentStep = 0; bool public crowdsaleClosed = false; mapping(address => uint256) public canSell; event Purchase(address indexed holder, uint256 tokenAmount, uint256 etherAmount); event Issue(address indexed holder, uint256 tokenAmount); event Sell(address indexed holder, uint256 tokenAmount, uint256 etherAmount); event NewRate(uint256 rate); event NextStep(uint8 step); event CrowdsaleClose(); function Crowdsale() public { } function() payable public { } function tokenFallback(address _from, uint256 _value, bytes _data) external { } function setTokenRate(uint _value) onlyOwner public { } function purchase() whenNotPaused payable public { } function issue(address _to, uint256 _value) onlyOwner whenNotPaused public { require(!crowdsaleClosed); Step memory step = steps[currentStep]; require(step.issue); require(<FILL_ME>) steps[currentStep].tokensSold = step.tokensSold.add(_value); if(currentStep == 0) { canSell[_to] = canSell[_to].add(_value); } token.mint(_to, _value); Issue(_to, _value); } function sell(uint256 _value) whenNotPaused public { } function nextStep(uint _value) onlyOwner public { } function closeCrowdsale() onlyOwner public { } }
step.tokensSold.add(_value)<=step.tokensForSale
276,970
step.tokensSold.add(_value)<=step.tokensForSale
null
/*! iam.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.18; 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 Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } function Ownable() public { } function transferOwnership(address newOwner) public onlyOwner { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Withdrawable is Ownable { function withdrawEther(address _to, uint _value) onlyOwner public returns(bool) { } function withdrawTokens(ERC20 _token, address _to, uint _value) onlyOwner public returns(bool) { } } contract ERC20 { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract ERC223 is ERC20 { function transfer(address to, uint256 value, bytes data) public returns(bool); } contract ERC223Receiving { function tokenFallback(address from, uint256 value, bytes data) external; } contract StandardToken is ERC223 { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; function StandardToken(string _name, string _symbol, uint8 _decimals) public { } function balanceOf(address _owner) public view returns(uint256 balance) { } function _transfer(address _to, uint256 _value, bytes _data) private returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transfer(address _to, uint256 _value, bytes _data) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; function CappedToken(uint256 _cap) public { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function burn(uint256 _value) public { } } /* ICO IAM */ contract Token is CappedToken, BurnableToken, Withdrawable { function Token() CappedToken(70000000 * 1 ether) StandardToken("IAM Aero", "IAM", 18) public { } function tokenFallback(address _from, uint256 _value, bytes _data) external { } function transferOwner(address _from, address _to, uint256 _value) onlyOwner canMint public returns(bool) { } } contract Crowdsale is Pausable, Withdrawable, ERC223Receiving { using SafeMath for uint; struct Step { uint priceTokenWei; uint tokensForSale; uint minInvestEth; uint tokensSold; uint collectedWei; bool transferBalance; bool sale; bool issue; } Token public token; address public beneficiary = 0x4ae7bdf9530cdB666FC14DF79C169e14504c621A; Step[] public steps; uint8 public currentStep = 0; bool public crowdsaleClosed = false; mapping(address => uint256) public canSell; event Purchase(address indexed holder, uint256 tokenAmount, uint256 etherAmount); event Issue(address indexed holder, uint256 tokenAmount); event Sell(address indexed holder, uint256 tokenAmount, uint256 etherAmount); event NewRate(uint256 rate); event NextStep(uint8 step); event CrowdsaleClose(); function Crowdsale() public { } function() payable public { } function tokenFallback(address _from, uint256 _value, bytes _data) external { } function setTokenRate(uint _value) onlyOwner public { } function purchase() whenNotPaused payable public { } function issue(address _to, uint256 _value) onlyOwner whenNotPaused public { } function sell(uint256 _value) whenNotPaused public { require(!crowdsaleClosed); require(<FILL_ME>) require(token.balanceOf(msg.sender) >= _value); Step memory step = steps[currentStep]; require(step.sale); canSell[msg.sender] = canSell[msg.sender].sub(_value); token.transferOwner(msg.sender, beneficiary, _value); uint sum = _value.mul(step.priceTokenWei).div(1 ether); msg.sender.transfer(sum); Sell(msg.sender, _value, sum); } function nextStep(uint _value) onlyOwner public { } function closeCrowdsale() onlyOwner public { } }
canSell[msg.sender]>=_value
276,970
canSell[msg.sender]>=_value
null
/*! iam.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.18; 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 Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } function Ownable() public { } function transferOwnership(address newOwner) public onlyOwner { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Withdrawable is Ownable { function withdrawEther(address _to, uint _value) onlyOwner public returns(bool) { } function withdrawTokens(ERC20 _token, address _to, uint _value) onlyOwner public returns(bool) { } } contract ERC20 { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract ERC223 is ERC20 { function transfer(address to, uint256 value, bytes data) public returns(bool); } contract ERC223Receiving { function tokenFallback(address from, uint256 value, bytes data) external; } contract StandardToken is ERC223 { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; function StandardToken(string _name, string _symbol, uint8 _decimals) public { } function balanceOf(address _owner) public view returns(uint256 balance) { } function _transfer(address _to, uint256 _value, bytes _data) private returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transfer(address _to, uint256 _value, bytes _data) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; function CappedToken(uint256 _cap) public { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function burn(uint256 _value) public { } } /* ICO IAM */ contract Token is CappedToken, BurnableToken, Withdrawable { function Token() CappedToken(70000000 * 1 ether) StandardToken("IAM Aero", "IAM", 18) public { } function tokenFallback(address _from, uint256 _value, bytes _data) external { } function transferOwner(address _from, address _to, uint256 _value) onlyOwner canMint public returns(bool) { } } contract Crowdsale is Pausable, Withdrawable, ERC223Receiving { using SafeMath for uint; struct Step { uint priceTokenWei; uint tokensForSale; uint minInvestEth; uint tokensSold; uint collectedWei; bool transferBalance; bool sale; bool issue; } Token public token; address public beneficiary = 0x4ae7bdf9530cdB666FC14DF79C169e14504c621A; Step[] public steps; uint8 public currentStep = 0; bool public crowdsaleClosed = false; mapping(address => uint256) public canSell; event Purchase(address indexed holder, uint256 tokenAmount, uint256 etherAmount); event Issue(address indexed holder, uint256 tokenAmount); event Sell(address indexed holder, uint256 tokenAmount, uint256 etherAmount); event NewRate(uint256 rate); event NextStep(uint8 step); event CrowdsaleClose(); function Crowdsale() public { } function() payable public { } function tokenFallback(address _from, uint256 _value, bytes _data) external { } function setTokenRate(uint _value) onlyOwner public { } function purchase() whenNotPaused payable public { } function issue(address _to, uint256 _value) onlyOwner whenNotPaused public { } function sell(uint256 _value) whenNotPaused public { require(!crowdsaleClosed); require(canSell[msg.sender] >= _value); require(token.balanceOf(msg.sender) >= _value); Step memory step = steps[currentStep]; require(<FILL_ME>) canSell[msg.sender] = canSell[msg.sender].sub(_value); token.transferOwner(msg.sender, beneficiary, _value); uint sum = _value.mul(step.priceTokenWei).div(1 ether); msg.sender.transfer(sum); Sell(msg.sender, _value, sum); } function nextStep(uint _value) onlyOwner public { } function closeCrowdsale() onlyOwner public { } }
step.sale
276,970
step.sale
"LockableToken: Token locked"
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "@rarible/royalties/contracts/LibPart.sol"; import "@rarible/royalties/contracts/LibRoyaltiesV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract LockableToken is ERC721Enumerable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; mapping (uint => uint) public tokenLockedFromTimestamp; mapping (uint => bytes32) public tokenUnlockCodeHashes; mapping (uint => bool) public tokenUnlocked; string private _baseTokenURI; event TokenUnlocked(uint tokenId, address unlockerAddress); constructor(string memory name, string memory symbol, string memory baseTokenURI) ERC721(name, symbol) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override { require(<FILL_ME>) super._beforeTokenTransfer(from, to, tokenId); } function unlockToken(bytes32 unlockHash, uint256 tokenId) public { } /** * This one is the mint function that sets the unlock code, then calls the parent mint */ function mint(address to, uint lockedFromTimestamp, bytes32 unlockHash) public { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable) returns (bool) { } } contract ERC2981Rarible is Ownable, RoyaltiesV2Impl { bytes4 public constant _INTERFACE_ID_ERC2981 = 0x2a55205a; struct RoyaltyPercentages { uint96 percentage; address beneficiary; } mapping(uint => RoyaltyPercentages) public tokenHasRoyaltyPercentage; function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function setRoyalties(uint _tokenId, address payable _royaltiesReceipientAddress, uint96 _percentageBasisPoints) public onlyOwner { } } contract AisthisiToken is ERC2981Rarible, LockableToken { constructor() LockableToken("Aisthisi", "AIS", "https://aisthisi.art/metadata/") {} function supportsInterface(bytes4 interfaceId) public view virtual override(LockableToken) returns (bool) { } }
tokenLockedFromTimestamp[tokenId]>block.timestamp||tokenUnlocked[tokenId],"LockableToken: Token locked"
276,994
tokenLockedFromTimestamp[tokenId]>block.timestamp||tokenUnlocked[tokenId]
"LockableToken: Unlock Code Incorrect"
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "@rarible/royalties/contracts/LibPart.sol"; import "@rarible/royalties/contracts/LibRoyaltiesV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract LockableToken is ERC721Enumerable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; mapping (uint => uint) public tokenLockedFromTimestamp; mapping (uint => bytes32) public tokenUnlockCodeHashes; mapping (uint => bool) public tokenUnlocked; string private _baseTokenURI; event TokenUnlocked(uint tokenId, address unlockerAddress); constructor(string memory name, string memory symbol, string memory baseTokenURI) ERC721(name, symbol) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override { } function unlockToken(bytes32 unlockHash, uint256 tokenId) public { require(msg.sender == ownerOf(tokenId), "LockableToken: Only the Owner can unlock the Token"); //not 100% sure about that one yet require(<FILL_ME>) tokenUnlocked[tokenId] = true; emit TokenUnlocked(tokenId, msg.sender); } /** * This one is the mint function that sets the unlock code, then calls the parent mint */ function mint(address to, uint lockedFromTimestamp, bytes32 unlockHash) public { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable) returns (bool) { } } contract ERC2981Rarible is Ownable, RoyaltiesV2Impl { bytes4 public constant _INTERFACE_ID_ERC2981 = 0x2a55205a; struct RoyaltyPercentages { uint96 percentage; address beneficiary; } mapping(uint => RoyaltyPercentages) public tokenHasRoyaltyPercentage; function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function setRoyalties(uint _tokenId, address payable _royaltiesReceipientAddress, uint96 _percentageBasisPoints) public onlyOwner { } } contract AisthisiToken is ERC2981Rarible, LockableToken { constructor() LockableToken("Aisthisi", "AIS", "https://aisthisi.art/metadata/") {} function supportsInterface(bytes4 interfaceId) public view virtual override(LockableToken) returns (bool) { } }
keccak256(abi.encode(unlockHash))==tokenUnlockCodeHashes[tokenId],"LockableToken: Unlock Code Incorrect"
276,994
keccak256(abi.encode(unlockHash))==tokenUnlockCodeHashes[tokenId]
"FanzJohnMotson: Reached max mint"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "erc721a/contracts/ERC721A.sol"; contract FanzJohnMotson is Ownable, ERC721A, ReentrancyGuard, Pausable { using ECDSA for bytes32; event UpdatePublicSaleActive(bool publicSaleActive); event UpdatePrivateSaleActive(bool privateSaleActive); event UpdateMaxPerTx(uint256 maxPerTx); event UpdateReserveTeamTokens(uint256 reserveTeamTokens); event UpdateTreasury(address treasury); event UpdateWhitelistSigner(address whitelistSigner); event UpdateBaseURI(string baseURI); event UpdatePlaceholderURI(string placeholderURI); event UpdatePublicSalePrice(uint256 publicSalePrice); event UpdatePrivateSalePrice(uint256 privateSalePrice); event UpdateStartingIndex(uint256 startingIndex); event UpdatePrivateSaleMaxMint(uint256 privateSaleMaxMint); event UpdateMaxMintTotalPerAddress(uint256 maxMintTotalPerAddress); event UpdateStartingIndexBlock(uint256 startingIndex); bool public publicSaleActive; bool public privateSaleActive = true; uint256 public maxPerTx = 5; uint256 public collectionSupply = 5000; uint256 public reserveTeamTokens = 600; uint256 public publicSalePrice = .1 ether; uint256 public privateSalePrice = .07 ether; uint256 public maxMintTotalPerAddress = 50; uint256 public privateSaleMaxMint = 2; uint256 private startingIndex; uint256 private startingIndexBlock; address public treasury; address public whitelistSigner; string public baseURI; string public placeholderURI; bytes32 public DOMAIN_SEPARATOR; bytes32 public constant PRESALE_TYPEHASH = keccak256("PrivateSale(address buyer)"); constructor() ERC721A("FANZJM", "MOTTY") { } /* ======== MODIFIERS ======== */ modifier callerIsUser() { } modifier callerIsTreasury() { } modifier callerIsTreasuryOrOwner() { } /* ======== SETTERS ======== */ function setPaused(bool paused_) external onlyOwner { } function setSales(bool publicSaleActive_, bool privateSaleActive_) external onlyOwner { } function setPrivateSalePrice(uint256 privateSalePrice_) external onlyOwner { } function setPublicSalePrice(uint256 publicSalePrice_) external onlyOwner { } function setMaxPerTx(uint256 maxPerTx_) external onlyOwner { } function setReserveTeamTokens(uint256 reserveTeamTokens_) external onlyOwner { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setPlaceholderURI(string memory placeholderURI_) external onlyOwner { } function setTreasury(address treasury_) external onlyOwner { } function setPrivateSaleMaxMint(uint256 privateSaleMaxMint_) external onlyOwner { } function setMaxMintTotalPerAddress(uint256 maxMintTotalPerAddress_) external onlyOwner { } function setWhitelistSigner(address whitelistSigner_) external onlyOwner { } function setStartingIndex() external onlyOwner { } /* ======== INTERNAL ======== */ function _validateMint( bool sale, uint256 price_, uint256 quantity_ ) private { } function _startIndex() private { } function _validatePrivateSaleSignature(bytes memory signature_) private view { } function refundIfOver(uint256 price) private { } /* ======== EXTERNAL ======== */ function numberMinted(address owner) external view returns (uint256) { } function publicSaleMint(uint256 quantity_) external payable whenNotPaused { } function privateSaleMint(uint256 quantity_, bytes memory signature_) external payable whenNotPaused { require(<FILL_ME>) _validateMint(privateSaleActive, privateSalePrice, quantity_); _validatePrivateSaleSignature(signature_); _safeMint(_msgSender(), quantity_); _startIndex(); } function teamTokensMint(address to_, uint256 quantity_) external callerIsTreasuryOrOwner { } function withdrawEth() external callerIsTreasury nonReentrant { } function withdrawPortionOfEth(uint256 withdrawAmount_) external callerIsTreasury nonReentrant { } function burn(uint256 tokenId) external { } /* ======== OVERRIDES ======== */ function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } }
(_numberMinted(_msgSender())+quantity_)<=privateSaleMaxMint,"FanzJohnMotson: Reached max mint"
277,015
(_numberMinted(_msgSender())+quantity_)<=privateSaleMaxMint
null
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner { } } contract ERC20Basic { uint public totalSupply; function balanceOf(address who) constant returns (uint); function transfer(address to, uint value) returns (bool); event Transfer(address indexed from, address indexed to, uint value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint); function transferFrom(address from, address to, uint value) returns (bool); function approve(address spender, uint value) returns (bool); event Approval(address indexed owner, address indexed spender, uint value); } /* The owner (or anyone) will deposit tokens in here The owner calls the multisend method to send out payments */ contract BatchedPayments is Ownable { mapping(bytes32 => bool) successfulPayments; function paymentSuccessful(bytes32 paymentId) public constant returns (bool){ } //withdraw any eth inside function withdraw() public onlyOwner { } function send(address _tokenAddr, address dest, uint value) public onlyOwner returns (bool) { } function multisend(address _tokenAddr, bytes32 paymentId, address[] dests, uint256[] values) public onlyOwner returns (uint256) { require(dests.length > 0); require(values.length >= dests.length); require(<FILL_ME>) uint256 i = 0; while (i < dests.length) { require(ERC20(_tokenAddr).transfer(dests[i], values[i])); i += 1; } successfulPayments[paymentId] = true; return (i); } }
successfulPayments[paymentId]!=true
277,037
successfulPayments[paymentId]!=true
null
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner { } } contract ERC20Basic { uint public totalSupply; function balanceOf(address who) constant returns (uint); function transfer(address to, uint value) returns (bool); event Transfer(address indexed from, address indexed to, uint value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint); function transferFrom(address from, address to, uint value) returns (bool); function approve(address spender, uint value) returns (bool); event Approval(address indexed owner, address indexed spender, uint value); } /* The owner (or anyone) will deposit tokens in here The owner calls the multisend method to send out payments */ contract BatchedPayments is Ownable { mapping(bytes32 => bool) successfulPayments; function paymentSuccessful(bytes32 paymentId) public constant returns (bool){ } //withdraw any eth inside function withdraw() public onlyOwner { } function send(address _tokenAddr, address dest, uint value) public onlyOwner returns (bool) { } function multisend(address _tokenAddr, bytes32 paymentId, address[] dests, uint256[] values) public onlyOwner returns (uint256) { require(dests.length > 0); require(values.length >= dests.length); require(successfulPayments[paymentId] != true); uint256 i = 0; while (i < dests.length) { require(<FILL_ME>) i += 1; } successfulPayments[paymentId] = true; return (i); } }
ERC20(_tokenAddr).transfer(dests[i],values[i])
277,037
ERC20(_tokenAddr).transfer(dests[i],values[i])
null
//Rock Inu ($rINU) //Cooldown yes //2% Deflationary yes //Telegram: https://t.me/rockinuofficial //Website: https://rockinu.finance //CG, CMC listing: Ongoing //Fair Launch //Block all wallets within 3 blocks // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract RockInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Rock Inu | t.me/rockinuofficial"; string private constant _symbol = "rINU\xF0\x9F\x8E\xB8"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor(address payable addr1, address payable addr2) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(<FILL_ME>) if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (block.number <= launchBlock + 2) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { bots[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { bots[to] = true; } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function isExcluded(address account) public view returns (bool) { } function isBlackListed(address account) public view returns (bool) { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function manualswap() external { } function manualsend() external { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { } }
!bots[from]&&!bots[to]&&!bots[msg.sender]
277,058
!bots[from]&&!bots[to]&&!bots[msg.sender]
"Must send at least MINT_PRICE per one item"
// contracts/Cheers.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract Cheers is ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; uint256 public constant MINT_PRICE = 0.02 ether; uint16 public constant MINT_MAX = 500; Counters.Counter private _tokenIds; string private _baseURIpath = ""; constructor() ERC721("Cheers", "CHRS") { } function purchase(uint16 _number) public payable { require(_number > 0, "Minimum purchase is 1 item"); require(<FILL_ME>) require((_tokenIds.current() + _number) <= MINT_MAX, "Mint maximum is reached"); for (uint16 i = 0; i < _number; i++) { _tokenIds.increment(); _safeMint(msg.sender, _tokenIds.current()); } payable(owner()).transfer(msg.value); } function _setBaseURI(string memory _newURI) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable) returns (bool) { } }
msg.value>=(MINT_PRICE*_number),"Must send at least MINT_PRICE per one item"
277,097
msg.value>=(MINT_PRICE*_number)
"Mint maximum is reached"
// contracts/Cheers.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract Cheers is ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; uint256 public constant MINT_PRICE = 0.02 ether; uint16 public constant MINT_MAX = 500; Counters.Counter private _tokenIds; string private _baseURIpath = ""; constructor() ERC721("Cheers", "CHRS") { } function purchase(uint16 _number) public payable { require(_number > 0, "Minimum purchase is 1 item"); require(msg.value >= (MINT_PRICE * _number), "Must send at least MINT_PRICE per one item"); require(<FILL_ME>) for (uint16 i = 0; i < _number; i++) { _tokenIds.increment(); _safeMint(msg.sender, _tokenIds.current()); } payable(owner()).transfer(msg.value); } function _setBaseURI(string memory _newURI) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable) returns (bool) { } }
(_tokenIds.current()+_number)<=MINT_MAX,"Mint maximum is reached"
277,097
(_tokenIds.current()+_number)<=MINT_MAX
'CentaurSwap: POOL_EXISTS'
// SPDX-License-Identifier: MIT pragma solidity =0.6.12; import './libraries/Ownable.sol'; import './interfaces/ICentaurFactory.sol'; import './interfaces/ICentaurPool.sol'; import './interfaces/ICentaurRouter.sol'; import './interfaces/ICloneFactory.sol'; import './CentaurSettlement.sol'; import './CentaurRouter.sol'; import './CentaurPool.sol'; contract CentaurFactory is ICentaurFactory, Ownable { uint public override poolFee; address public override poolLogic; address public override cloneFactory; address public override settlement; address payable public override router; // Base token => Pool mapping(address => address) public override getPool; address[] public override allPools; event PoolCreated(address indexed baseToken, address pool, uint); constructor(address _poolLogic, address _cloneFactory, address _WETH) public { } function allPoolsLength() external override view returns (uint) { } function isValidPool(address _pool) external view override returns (bool) { } function createPool(address _baseToken, address _oracle, uint _liquidityParameter) external onlyOwner override returns (address pool) { require(_baseToken != address(0) && _oracle != address(0), 'CentaurSwap: ZERO_ADDRESS'); require(<FILL_ME>) pool = ICloneFactory(cloneFactory).createClone(poolLogic); ICentaurPool(pool).init( address(this), _baseToken, _oracle, _liquidityParameter ); getPool[_baseToken] = pool; allPools.push(pool); emit PoolCreated(_baseToken, pool, allPools.length); } function addPool(address _pool) external onlyOwner override { } function removePool(address _pool) external onlyOwner override { } // Pool Functions function setPoolTradeEnabled(address _pool, bool _tradeEnabled) public onlyOwner override { } function setPoolDepositEnabled(address _pool, bool _depositEnabled) public onlyOwner override { } function setPoolWithdrawEnabled(address _pool, bool _withdrawEnabled) public onlyOwner override { } function setPoolLiquidityParameter(address _pool, uint _liquidityParameter) public onlyOwner override { } function setAllPoolsTradeEnabled(bool _tradeEnabled) external onlyOwner override { } function setAllPoolsDepositEnabled(bool _depositEnabled) external onlyOwner override { } function setAllPoolsWithdrawEnabled(bool _withdrawEnabled) external onlyOwner override { } function emergencyWithdrawFromPool(address _pool, address _token, uint _amount, address _to) external onlyOwner override { } // Router Functions function setRouterOnlyEOAEnabled(bool _onlyEOAEnabled) external onlyOwner override { } function setRouterContractWhitelist(address _address, bool _whitelist) external onlyOwner override { } // Settlement Functions function setSettlementDuration(uint _duration) external onlyOwner override { } // Helper Functions function setPoolFee(uint _poolFee) external onlyOwner override { } function setPoolLogic(address _poolLogic) external onlyOwner override { } function setCloneFactory(address _cloneFactory) external onlyOwner override { } function setSettlement(address _settlement) external onlyOwner override { } function setRouter(address payable _router) external onlyOwner override { } }
getPool[_baseToken]==address(0),'CentaurSwap: POOL_EXISTS'
277,102
getPool[_baseToken]==address(0)
'CentaurSwap: POOL_EXISTS'
// SPDX-License-Identifier: MIT pragma solidity =0.6.12; import './libraries/Ownable.sol'; import './interfaces/ICentaurFactory.sol'; import './interfaces/ICentaurPool.sol'; import './interfaces/ICentaurRouter.sol'; import './interfaces/ICloneFactory.sol'; import './CentaurSettlement.sol'; import './CentaurRouter.sol'; import './CentaurPool.sol'; contract CentaurFactory is ICentaurFactory, Ownable { uint public override poolFee; address public override poolLogic; address public override cloneFactory; address public override settlement; address payable public override router; // Base token => Pool mapping(address => address) public override getPool; address[] public override allPools; event PoolCreated(address indexed baseToken, address pool, uint); constructor(address _poolLogic, address _cloneFactory, address _WETH) public { } function allPoolsLength() external override view returns (uint) { } function isValidPool(address _pool) external view override returns (bool) { } function createPool(address _baseToken, address _oracle, uint _liquidityParameter) external onlyOwner override returns (address pool) { } function addPool(address _pool) external onlyOwner override { address baseToken = ICentaurPool(_pool).baseToken(); require(baseToken != address(0), 'CentaurSwap: ZERO_ADDRESS'); require(<FILL_ME>) getPool[baseToken] = _pool; allPools.push(_pool); } function removePool(address _pool) external onlyOwner override { } // Pool Functions function setPoolTradeEnabled(address _pool, bool _tradeEnabled) public onlyOwner override { } function setPoolDepositEnabled(address _pool, bool _depositEnabled) public onlyOwner override { } function setPoolWithdrawEnabled(address _pool, bool _withdrawEnabled) public onlyOwner override { } function setPoolLiquidityParameter(address _pool, uint _liquidityParameter) public onlyOwner override { } function setAllPoolsTradeEnabled(bool _tradeEnabled) external onlyOwner override { } function setAllPoolsDepositEnabled(bool _depositEnabled) external onlyOwner override { } function setAllPoolsWithdrawEnabled(bool _withdrawEnabled) external onlyOwner override { } function emergencyWithdrawFromPool(address _pool, address _token, uint _amount, address _to) external onlyOwner override { } // Router Functions function setRouterOnlyEOAEnabled(bool _onlyEOAEnabled) external onlyOwner override { } function setRouterContractWhitelist(address _address, bool _whitelist) external onlyOwner override { } // Settlement Functions function setSettlementDuration(uint _duration) external onlyOwner override { } // Helper Functions function setPoolFee(uint _poolFee) external onlyOwner override { } function setPoolLogic(address _poolLogic) external onlyOwner override { } function setCloneFactory(address _cloneFactory) external onlyOwner override { } function setSettlement(address _settlement) external onlyOwner override { } function setRouter(address payable _router) external onlyOwner override { } }
getPool[baseToken]==address(0),'CentaurSwap: POOL_EXISTS'
277,102
getPool[baseToken]==address(0)
'CentaurSwap: POOL_NOT_FOUND'
// SPDX-License-Identifier: MIT pragma solidity =0.6.12; import './libraries/Ownable.sol'; import './interfaces/ICentaurFactory.sol'; import './interfaces/ICentaurPool.sol'; import './interfaces/ICentaurRouter.sol'; import './interfaces/ICloneFactory.sol'; import './CentaurSettlement.sol'; import './CentaurRouter.sol'; import './CentaurPool.sol'; contract CentaurFactory is ICentaurFactory, Ownable { uint public override poolFee; address public override poolLogic; address public override cloneFactory; address public override settlement; address payable public override router; // Base token => Pool mapping(address => address) public override getPool; address[] public override allPools; event PoolCreated(address indexed baseToken, address pool, uint); constructor(address _poolLogic, address _cloneFactory, address _WETH) public { } function allPoolsLength() external override view returns (uint) { } function isValidPool(address _pool) external view override returns (bool) { } function createPool(address _baseToken, address _oracle, uint _liquidityParameter) external onlyOwner override returns (address pool) { } function addPool(address _pool) external onlyOwner override { } function removePool(address _pool) external onlyOwner override { address baseToken = ICentaurPool(_pool).baseToken(); require(baseToken != address(0), 'CentaurSwap: ZERO_ADDRESS'); require(<FILL_ME>) getPool[baseToken] = address(0); for (uint i = 0; i < allPools.length; i++) { if (allPools[i] == _pool) { allPools[i] = allPools[allPools.length - 1]; allPools.pop(); break; } } } // Pool Functions function setPoolTradeEnabled(address _pool, bool _tradeEnabled) public onlyOwner override { } function setPoolDepositEnabled(address _pool, bool _depositEnabled) public onlyOwner override { } function setPoolWithdrawEnabled(address _pool, bool _withdrawEnabled) public onlyOwner override { } function setPoolLiquidityParameter(address _pool, uint _liquidityParameter) public onlyOwner override { } function setAllPoolsTradeEnabled(bool _tradeEnabled) external onlyOwner override { } function setAllPoolsDepositEnabled(bool _depositEnabled) external onlyOwner override { } function setAllPoolsWithdrawEnabled(bool _withdrawEnabled) external onlyOwner override { } function emergencyWithdrawFromPool(address _pool, address _token, uint _amount, address _to) external onlyOwner override { } // Router Functions function setRouterOnlyEOAEnabled(bool _onlyEOAEnabled) external onlyOwner override { } function setRouterContractWhitelist(address _address, bool _whitelist) external onlyOwner override { } // Settlement Functions function setSettlementDuration(uint _duration) external onlyOwner override { } // Helper Functions function setPoolFee(uint _poolFee) external onlyOwner override { } function setPoolLogic(address _poolLogic) external onlyOwner override { } function setCloneFactory(address _cloneFactory) external onlyOwner override { } function setSettlement(address _settlement) external onlyOwner override { } function setRouter(address payable _router) external onlyOwner override { } }
getPool[baseToken]!=address(0),'CentaurSwap: POOL_NOT_FOUND'
277,102
getPool[baseToken]!=address(0)
"Exceed max supply"
// SPDX-License-Identifier: UNLICENSED /* __ _____ _ | | ___ ___ _ _ ___ | |___| |_ ___ | |__| .'| _| | | .'| | --| .'| _|_ -| |_____|__,|_| \_/|__,| |_____|__,|_| |___| */ pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract LarvaCats is ERC721,Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; uint public maxInTx = 10; bool public saleEnabled; uint256 public price; string public metadataBaseURL; uint256 public constant FREE_SUPPLY = 1111; uint256 public constant PAID_SUPPLY = 3333; uint256 public constant MAX_SUPPLY = FREE_SUPPLY + PAID_SUPPLY; constructor () ERC721("Larva Cats", "LCATS") { } function setBaseURI(string memory baseURL) public onlyOwner { } function setMaxInTx(uint num) public onlyOwner { } function toggleSaleStatus() public onlyOwner { } function setPrice(uint256 _price) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdraw() public onlyOwner { } function mintToAddress(address to) private onlyOwner { uint256 currentSupply = _tokenIdTracker.current(); require(<FILL_ME>) _safeMint(to, currentSupply + 1); _tokenIdTracker.increment(); } function reserve(uint num) public onlyOwner { } function totalSupply() public view virtual returns (uint256) { } function mint(uint256 numOfTokens) public payable { } function freeMint(uint256 numOfTokens) public payable { } }
(currentSupply+1)<=MAX_SUPPLY,"Exceed max supply"
277,215
(currentSupply+1)<=MAX_SUPPLY
"Exceed max supply"
// SPDX-License-Identifier: UNLICENSED /* __ _____ _ | | ___ ___ _ _ ___ | |___| |_ ___ | |__| .'| _| | | .'| | --| .'| _|_ -| |_____|__,|_| \_/|__,| |_____|__,|_| |___| */ pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract LarvaCats is ERC721,Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; uint public maxInTx = 10; bool public saleEnabled; uint256 public price; string public metadataBaseURL; uint256 public constant FREE_SUPPLY = 1111; uint256 public constant PAID_SUPPLY = 3333; uint256 public constant MAX_SUPPLY = FREE_SUPPLY + PAID_SUPPLY; constructor () ERC721("Larva Cats", "LCATS") { } function setBaseURI(string memory baseURL) public onlyOwner { } function setMaxInTx(uint num) public onlyOwner { } function toggleSaleStatus() public onlyOwner { } function setPrice(uint256 _price) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdraw() public onlyOwner { } function mintToAddress(address to) private onlyOwner { } function reserve(uint num) public onlyOwner { } function totalSupply() public view virtual returns (uint256) { } function mint(uint256 numOfTokens) public payable { require(saleEnabled, "Sale must be active."); require(<FILL_ME>) require(numOfTokens <= maxInTx, "Can't claim more than 10."); require((price * numOfTokens) <= msg.value, "Insufficient funds to claim."); for(uint256 i=0; i< numOfTokens; i++) { _safeMint(msg.sender, _tokenIdTracker.current() + 1); _tokenIdTracker.increment(); } } function freeMint(uint256 numOfTokens) public payable { } }
_tokenIdTracker.current()+numOfTokens<=MAX_SUPPLY,"Exceed max supply"
277,215
_tokenIdTracker.current()+numOfTokens<=MAX_SUPPLY
"Insufficient funds to claim."
// SPDX-License-Identifier: UNLICENSED /* __ _____ _ | | ___ ___ _ _ ___ | |___| |_ ___ | |__| .'| _| | | .'| | --| .'| _|_ -| |_____|__,|_| \_/|__,| |_____|__,|_| |___| */ pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract LarvaCats is ERC721,Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; uint public maxInTx = 10; bool public saleEnabled; uint256 public price; string public metadataBaseURL; uint256 public constant FREE_SUPPLY = 1111; uint256 public constant PAID_SUPPLY = 3333; uint256 public constant MAX_SUPPLY = FREE_SUPPLY + PAID_SUPPLY; constructor () ERC721("Larva Cats", "LCATS") { } function setBaseURI(string memory baseURL) public onlyOwner { } function setMaxInTx(uint num) public onlyOwner { } function toggleSaleStatus() public onlyOwner { } function setPrice(uint256 _price) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdraw() public onlyOwner { } function mintToAddress(address to) private onlyOwner { } function reserve(uint num) public onlyOwner { } function totalSupply() public view virtual returns (uint256) { } function mint(uint256 numOfTokens) public payable { require(saleEnabled, "Sale must be active."); require(_tokenIdTracker.current() + numOfTokens <= MAX_SUPPLY, "Exceed max supply"); require(numOfTokens <= maxInTx, "Can't claim more than 10."); require(<FILL_ME>) for(uint256 i=0; i< numOfTokens; i++) { _safeMint(msg.sender, _tokenIdTracker.current() + 1); _tokenIdTracker.increment(); } } function freeMint(uint256 numOfTokens) public payable { } }
(price*numOfTokens)<=msg.value,"Insufficient funds to claim."
277,215
(price*numOfTokens)<=msg.value
"Exceed max supply"
// SPDX-License-Identifier: UNLICENSED /* __ _____ _ | | ___ ___ _ _ ___ | |___| |_ ___ | |__| .'| _| | | .'| | --| .'| _|_ -| |_____|__,|_| \_/|__,| |_____|__,|_| |___| */ pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract LarvaCats is ERC721,Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; uint public maxInTx = 10; bool public saleEnabled; uint256 public price; string public metadataBaseURL; uint256 public constant FREE_SUPPLY = 1111; uint256 public constant PAID_SUPPLY = 3333; uint256 public constant MAX_SUPPLY = FREE_SUPPLY + PAID_SUPPLY; constructor () ERC721("Larva Cats", "LCATS") { } function setBaseURI(string memory baseURL) public onlyOwner { } function setMaxInTx(uint num) public onlyOwner { } function toggleSaleStatus() public onlyOwner { } function setPrice(uint256 _price) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdraw() public onlyOwner { } function mintToAddress(address to) private onlyOwner { } function reserve(uint num) public onlyOwner { } function totalSupply() public view virtual returns (uint256) { } function mint(uint256 numOfTokens) public payable { } function freeMint(uint256 numOfTokens) public payable { require(saleEnabled, "Sale must be active."); require(<FILL_ME>) require(numOfTokens <= maxInTx, "Can't claim more than 10."); for(uint256 i=0; i< numOfTokens; i++) { _safeMint(msg.sender, _tokenIdTracker.current() + 1); _tokenIdTracker.increment(); } } }
_tokenIdTracker.current()+numOfTokens<=FREE_SUPPLY,"Exceed max supply"
277,215
_tokenIdTracker.current()+numOfTokens<=FREE_SUPPLY
'UniswapV3Staker::createIncentive: start time too far into future'
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; pragma abicoder v2; import './interfaces/IUniswapV3Staker.sol'; import './libraries/IncentiveId.sol'; import './libraries/RewardMath.sol'; import './libraries/NFTPositionInfo.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import '@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol'; import '@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol'; import '@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol'; import '@uniswap/v3-periphery/contracts/base/Multicall.sol'; /// @title Uniswap V3 canonical staking interface contract UniswapV3Staker is IUniswapV3Staker, Multicall { /// @notice Represents a staking incentive struct Incentive { uint256 totalRewardUnclaimed; uint160 totalSecondsClaimedX128; uint96 numberOfStakes; } /// @notice Represents the deposit of a liquidity NFT struct Deposit { address owner; uint48 numberOfStakes; int24 tickLower; int24 tickUpper; } /// @notice Represents a staked liquidity NFT struct Stake { uint160 secondsPerLiquidityInsideInitialX128; uint96 liquidityNoOverflow; uint128 liquidityIfOverflow; } /// @inheritdoc IUniswapV3Staker IUniswapV3Factory public immutable override factory; /// @inheritdoc IUniswapV3Staker INonfungiblePositionManager public immutable override nonfungiblePositionManager; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveStartLeadTime; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveDuration; /// @dev bytes32 refers to the return value of IncentiveId.compute mapping(bytes32 => Incentive) public override incentives; /// @dev deposits[tokenId] => Deposit mapping(uint256 => Deposit) public override deposits; /// @dev stakes[tokenId][incentiveHash] => Stake mapping(uint256 => mapping(bytes32 => Stake)) private _stakes; /// @inheritdoc IUniswapV3Staker function stakes(uint256 tokenId, bytes32 incentiveId) public view override returns (uint160 secondsPerLiquidityInsideInitialX128, uint128 liquidity) { } /// @dev rewards[rewardToken][owner] => uint256 /// @inheritdoc IUniswapV3Staker mapping(IERC20Minimal => mapping(address => uint256)) public override rewards; /// @param _factory the Uniswap V3 factory /// @param _nonfungiblePositionManager the NFT position manager contract address /// @param _maxIncentiveStartLeadTime the max duration of an incentive in seconds /// @param _maxIncentiveDuration the max amount of seconds into the future the incentive startTime can be set constructor( IUniswapV3Factory _factory, INonfungiblePositionManager _nonfungiblePositionManager, uint256 _maxIncentiveStartLeadTime, uint256 _maxIncentiveDuration ) { } /// @inheritdoc IUniswapV3Staker function createIncentive(IncentiveKey memory key, uint256 reward) external override { require(reward > 0, 'UniswapV3Staker::createIncentive: reward must be positive'); require( block.timestamp <= key.startTime, 'UniswapV3Staker::createIncentive: start time must be now or in the future' ); require(<FILL_ME>) require(key.startTime < key.endTime, 'UniswapV3Staker::createIncentive: start time must be before end time'); require( key.endTime - key.startTime <= maxIncentiveDuration, 'UniswapV3Staker::createIncentive: incentive duration is too long' ); bytes32 incentiveId = IncentiveId.compute(key); incentives[incentiveId].totalRewardUnclaimed += reward; TransferHelper.safeTransferFrom(address(key.rewardToken), msg.sender, address(this), reward); emit IncentiveCreated(key.rewardToken, key.pool, key.startTime, key.endTime, key.refundee, reward); } /// @inheritdoc IUniswapV3Staker function endIncentive(IncentiveKey memory key) external override returns (uint256 refund) { } /// @notice Upon receiving a Uniswap V3 ERC721, creates the token deposit setting owner to `from`. Also stakes token /// in one or more incentives if properly formatted `data` has a length > 0. /// @inheritdoc IERC721Receiver function onERC721Received( address, address from, uint256 tokenId, bytes calldata data ) external override returns (bytes4) { } /// @inheritdoc IUniswapV3Staker function transferDeposit(uint256 tokenId, address to) external override { } /// @inheritdoc IUniswapV3Staker function withdrawToken( uint256 tokenId, address to, bytes memory data ) external override { } /// @inheritdoc IUniswapV3Staker function stakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function unstakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function claimReward( IERC20Minimal rewardToken, address to, uint256 amountRequested ) external override returns (uint256 reward) { } /// @inheritdoc IUniswapV3Staker function getRewardInfo(IncentiveKey memory key, uint256 tokenId) external view override returns (uint256 reward, uint160 secondsInsideX128) { } /// @dev Stakes a deposited token without doing an ownership check function _stakeToken(IncentiveKey memory key, uint256 tokenId) private { } }
key.startTime-block.timestamp<=maxIncentiveStartLeadTime,'UniswapV3Staker::createIncentive: start time too far into future'
277,359
key.startTime-block.timestamp<=maxIncentiveStartLeadTime
'UniswapV3Staker::createIncentive: incentive duration is too long'
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; pragma abicoder v2; import './interfaces/IUniswapV3Staker.sol'; import './libraries/IncentiveId.sol'; import './libraries/RewardMath.sol'; import './libraries/NFTPositionInfo.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import '@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol'; import '@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol'; import '@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol'; import '@uniswap/v3-periphery/contracts/base/Multicall.sol'; /// @title Uniswap V3 canonical staking interface contract UniswapV3Staker is IUniswapV3Staker, Multicall { /// @notice Represents a staking incentive struct Incentive { uint256 totalRewardUnclaimed; uint160 totalSecondsClaimedX128; uint96 numberOfStakes; } /// @notice Represents the deposit of a liquidity NFT struct Deposit { address owner; uint48 numberOfStakes; int24 tickLower; int24 tickUpper; } /// @notice Represents a staked liquidity NFT struct Stake { uint160 secondsPerLiquidityInsideInitialX128; uint96 liquidityNoOverflow; uint128 liquidityIfOverflow; } /// @inheritdoc IUniswapV3Staker IUniswapV3Factory public immutable override factory; /// @inheritdoc IUniswapV3Staker INonfungiblePositionManager public immutable override nonfungiblePositionManager; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveStartLeadTime; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveDuration; /// @dev bytes32 refers to the return value of IncentiveId.compute mapping(bytes32 => Incentive) public override incentives; /// @dev deposits[tokenId] => Deposit mapping(uint256 => Deposit) public override deposits; /// @dev stakes[tokenId][incentiveHash] => Stake mapping(uint256 => mapping(bytes32 => Stake)) private _stakes; /// @inheritdoc IUniswapV3Staker function stakes(uint256 tokenId, bytes32 incentiveId) public view override returns (uint160 secondsPerLiquidityInsideInitialX128, uint128 liquidity) { } /// @dev rewards[rewardToken][owner] => uint256 /// @inheritdoc IUniswapV3Staker mapping(IERC20Minimal => mapping(address => uint256)) public override rewards; /// @param _factory the Uniswap V3 factory /// @param _nonfungiblePositionManager the NFT position manager contract address /// @param _maxIncentiveStartLeadTime the max duration of an incentive in seconds /// @param _maxIncentiveDuration the max amount of seconds into the future the incentive startTime can be set constructor( IUniswapV3Factory _factory, INonfungiblePositionManager _nonfungiblePositionManager, uint256 _maxIncentiveStartLeadTime, uint256 _maxIncentiveDuration ) { } /// @inheritdoc IUniswapV3Staker function createIncentive(IncentiveKey memory key, uint256 reward) external override { require(reward > 0, 'UniswapV3Staker::createIncentive: reward must be positive'); require( block.timestamp <= key.startTime, 'UniswapV3Staker::createIncentive: start time must be now or in the future' ); require( key.startTime - block.timestamp <= maxIncentiveStartLeadTime, 'UniswapV3Staker::createIncentive: start time too far into future' ); require(key.startTime < key.endTime, 'UniswapV3Staker::createIncentive: start time must be before end time'); require(<FILL_ME>) bytes32 incentiveId = IncentiveId.compute(key); incentives[incentiveId].totalRewardUnclaimed += reward; TransferHelper.safeTransferFrom(address(key.rewardToken), msg.sender, address(this), reward); emit IncentiveCreated(key.rewardToken, key.pool, key.startTime, key.endTime, key.refundee, reward); } /// @inheritdoc IUniswapV3Staker function endIncentive(IncentiveKey memory key) external override returns (uint256 refund) { } /// @notice Upon receiving a Uniswap V3 ERC721, creates the token deposit setting owner to `from`. Also stakes token /// in one or more incentives if properly formatted `data` has a length > 0. /// @inheritdoc IERC721Receiver function onERC721Received( address, address from, uint256 tokenId, bytes calldata data ) external override returns (bytes4) { } /// @inheritdoc IUniswapV3Staker function transferDeposit(uint256 tokenId, address to) external override { } /// @inheritdoc IUniswapV3Staker function withdrawToken( uint256 tokenId, address to, bytes memory data ) external override { } /// @inheritdoc IUniswapV3Staker function stakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function unstakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function claimReward( IERC20Minimal rewardToken, address to, uint256 amountRequested ) external override returns (uint256 reward) { } /// @inheritdoc IUniswapV3Staker function getRewardInfo(IncentiveKey memory key, uint256 tokenId) external view override returns (uint256 reward, uint160 secondsInsideX128) { } /// @dev Stakes a deposited token without doing an ownership check function _stakeToken(IncentiveKey memory key, uint256 tokenId) private { } }
key.endTime-key.startTime<=maxIncentiveDuration,'UniswapV3Staker::createIncentive: incentive duration is too long'
277,359
key.endTime-key.startTime<=maxIncentiveDuration
'UniswapV3Staker::stakeToken: only owner can stake token'
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; pragma abicoder v2; import './interfaces/IUniswapV3Staker.sol'; import './libraries/IncentiveId.sol'; import './libraries/RewardMath.sol'; import './libraries/NFTPositionInfo.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import '@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol'; import '@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol'; import '@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol'; import '@uniswap/v3-periphery/contracts/base/Multicall.sol'; /// @title Uniswap V3 canonical staking interface contract UniswapV3Staker is IUniswapV3Staker, Multicall { /// @notice Represents a staking incentive struct Incentive { uint256 totalRewardUnclaimed; uint160 totalSecondsClaimedX128; uint96 numberOfStakes; } /// @notice Represents the deposit of a liquidity NFT struct Deposit { address owner; uint48 numberOfStakes; int24 tickLower; int24 tickUpper; } /// @notice Represents a staked liquidity NFT struct Stake { uint160 secondsPerLiquidityInsideInitialX128; uint96 liquidityNoOverflow; uint128 liquidityIfOverflow; } /// @inheritdoc IUniswapV3Staker IUniswapV3Factory public immutable override factory; /// @inheritdoc IUniswapV3Staker INonfungiblePositionManager public immutable override nonfungiblePositionManager; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveStartLeadTime; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveDuration; /// @dev bytes32 refers to the return value of IncentiveId.compute mapping(bytes32 => Incentive) public override incentives; /// @dev deposits[tokenId] => Deposit mapping(uint256 => Deposit) public override deposits; /// @dev stakes[tokenId][incentiveHash] => Stake mapping(uint256 => mapping(bytes32 => Stake)) private _stakes; /// @inheritdoc IUniswapV3Staker function stakes(uint256 tokenId, bytes32 incentiveId) public view override returns (uint160 secondsPerLiquidityInsideInitialX128, uint128 liquidity) { } /// @dev rewards[rewardToken][owner] => uint256 /// @inheritdoc IUniswapV3Staker mapping(IERC20Minimal => mapping(address => uint256)) public override rewards; /// @param _factory the Uniswap V3 factory /// @param _nonfungiblePositionManager the NFT position manager contract address /// @param _maxIncentiveStartLeadTime the max duration of an incentive in seconds /// @param _maxIncentiveDuration the max amount of seconds into the future the incentive startTime can be set constructor( IUniswapV3Factory _factory, INonfungiblePositionManager _nonfungiblePositionManager, uint256 _maxIncentiveStartLeadTime, uint256 _maxIncentiveDuration ) { } /// @inheritdoc IUniswapV3Staker function createIncentive(IncentiveKey memory key, uint256 reward) external override { } /// @inheritdoc IUniswapV3Staker function endIncentive(IncentiveKey memory key) external override returns (uint256 refund) { } /// @notice Upon receiving a Uniswap V3 ERC721, creates the token deposit setting owner to `from`. Also stakes token /// in one or more incentives if properly formatted `data` has a length > 0. /// @inheritdoc IERC721Receiver function onERC721Received( address, address from, uint256 tokenId, bytes calldata data ) external override returns (bytes4) { } /// @inheritdoc IUniswapV3Staker function transferDeposit(uint256 tokenId, address to) external override { } /// @inheritdoc IUniswapV3Staker function withdrawToken( uint256 tokenId, address to, bytes memory data ) external override { } /// @inheritdoc IUniswapV3Staker function stakeToken(IncentiveKey memory key, uint256 tokenId) external override { require(<FILL_ME>) _stakeToken(key, tokenId); } /// @inheritdoc IUniswapV3Staker function unstakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function claimReward( IERC20Minimal rewardToken, address to, uint256 amountRequested ) external override returns (uint256 reward) { } /// @inheritdoc IUniswapV3Staker function getRewardInfo(IncentiveKey memory key, uint256 tokenId) external view override returns (uint256 reward, uint160 secondsInsideX128) { } /// @dev Stakes a deposited token without doing an ownership check function _stakeToken(IncentiveKey memory key, uint256 tokenId) private { } }
deposits[tokenId].owner==msg.sender,'UniswapV3Staker::stakeToken: only owner can stake token'
277,359
deposits[tokenId].owner==msg.sender
'UniswapV3Staker::stakeToken: non-existent incentive'
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; pragma abicoder v2; import './interfaces/IUniswapV3Staker.sol'; import './libraries/IncentiveId.sol'; import './libraries/RewardMath.sol'; import './libraries/NFTPositionInfo.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import '@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol'; import '@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol'; import '@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol'; import '@uniswap/v3-periphery/contracts/base/Multicall.sol'; /// @title Uniswap V3 canonical staking interface contract UniswapV3Staker is IUniswapV3Staker, Multicall { /// @notice Represents a staking incentive struct Incentive { uint256 totalRewardUnclaimed; uint160 totalSecondsClaimedX128; uint96 numberOfStakes; } /// @notice Represents the deposit of a liquidity NFT struct Deposit { address owner; uint48 numberOfStakes; int24 tickLower; int24 tickUpper; } /// @notice Represents a staked liquidity NFT struct Stake { uint160 secondsPerLiquidityInsideInitialX128; uint96 liquidityNoOverflow; uint128 liquidityIfOverflow; } /// @inheritdoc IUniswapV3Staker IUniswapV3Factory public immutable override factory; /// @inheritdoc IUniswapV3Staker INonfungiblePositionManager public immutable override nonfungiblePositionManager; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveStartLeadTime; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveDuration; /// @dev bytes32 refers to the return value of IncentiveId.compute mapping(bytes32 => Incentive) public override incentives; /// @dev deposits[tokenId] => Deposit mapping(uint256 => Deposit) public override deposits; /// @dev stakes[tokenId][incentiveHash] => Stake mapping(uint256 => mapping(bytes32 => Stake)) private _stakes; /// @inheritdoc IUniswapV3Staker function stakes(uint256 tokenId, bytes32 incentiveId) public view override returns (uint160 secondsPerLiquidityInsideInitialX128, uint128 liquidity) { } /// @dev rewards[rewardToken][owner] => uint256 /// @inheritdoc IUniswapV3Staker mapping(IERC20Minimal => mapping(address => uint256)) public override rewards; /// @param _factory the Uniswap V3 factory /// @param _nonfungiblePositionManager the NFT position manager contract address /// @param _maxIncentiveStartLeadTime the max duration of an incentive in seconds /// @param _maxIncentiveDuration the max amount of seconds into the future the incentive startTime can be set constructor( IUniswapV3Factory _factory, INonfungiblePositionManager _nonfungiblePositionManager, uint256 _maxIncentiveStartLeadTime, uint256 _maxIncentiveDuration ) { } /// @inheritdoc IUniswapV3Staker function createIncentive(IncentiveKey memory key, uint256 reward) external override { } /// @inheritdoc IUniswapV3Staker function endIncentive(IncentiveKey memory key) external override returns (uint256 refund) { } /// @notice Upon receiving a Uniswap V3 ERC721, creates the token deposit setting owner to `from`. Also stakes token /// in one or more incentives if properly formatted `data` has a length > 0. /// @inheritdoc IERC721Receiver function onERC721Received( address, address from, uint256 tokenId, bytes calldata data ) external override returns (bytes4) { } /// @inheritdoc IUniswapV3Staker function transferDeposit(uint256 tokenId, address to) external override { } /// @inheritdoc IUniswapV3Staker function withdrawToken( uint256 tokenId, address to, bytes memory data ) external override { } /// @inheritdoc IUniswapV3Staker function stakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function unstakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function claimReward( IERC20Minimal rewardToken, address to, uint256 amountRequested ) external override returns (uint256 reward) { } /// @inheritdoc IUniswapV3Staker function getRewardInfo(IncentiveKey memory key, uint256 tokenId) external view override returns (uint256 reward, uint160 secondsInsideX128) { } /// @dev Stakes a deposited token without doing an ownership check function _stakeToken(IncentiveKey memory key, uint256 tokenId) private { require(block.timestamp >= key.startTime, 'UniswapV3Staker::stakeToken: incentive not started'); require(block.timestamp < key.endTime, 'UniswapV3Staker::stakeToken: incentive ended'); bytes32 incentiveId = IncentiveId.compute(key); require(<FILL_ME>) require( _stakes[tokenId][incentiveId].liquidityNoOverflow == 0, 'UniswapV3Staker::stakeToken: token already staked' ); (IUniswapV3Pool pool, int24 tickLower, int24 tickUpper, uint128 liquidity) = NFTPositionInfo.getPositionInfo(factory, nonfungiblePositionManager, tokenId); require(pool == key.pool, 'UniswapV3Staker::stakeToken: token pool is not the incentive pool'); require(liquidity > 0, 'UniswapV3Staker::stakeToken: cannot stake token with 0 liquidity'); deposits[tokenId].numberOfStakes++; incentives[incentiveId].numberOfStakes++; (, uint160 secondsPerLiquidityInsideX128, ) = pool.snapshotCumulativesInside(tickLower, tickUpper); if (liquidity >= type(uint96).max) { _stakes[tokenId][incentiveId] = Stake({ secondsPerLiquidityInsideInitialX128: secondsPerLiquidityInsideX128, liquidityNoOverflow: type(uint96).max, liquidityIfOverflow: liquidity }); } else { Stake storage stake = _stakes[tokenId][incentiveId]; stake.secondsPerLiquidityInsideInitialX128 = secondsPerLiquidityInsideX128; stake.liquidityNoOverflow = uint96(liquidity); } emit TokenStaked(tokenId, incentiveId, liquidity); } }
incentives[incentiveId].totalRewardUnclaimed>0,'UniswapV3Staker::stakeToken: non-existent incentive'
277,359
incentives[incentiveId].totalRewardUnclaimed>0
'UniswapV3Staker::stakeToken: token already staked'
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; pragma abicoder v2; import './interfaces/IUniswapV3Staker.sol'; import './libraries/IncentiveId.sol'; import './libraries/RewardMath.sol'; import './libraries/NFTPositionInfo.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol'; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import '@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol'; import '@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol'; import '@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol'; import '@uniswap/v3-periphery/contracts/base/Multicall.sol'; /// @title Uniswap V3 canonical staking interface contract UniswapV3Staker is IUniswapV3Staker, Multicall { /// @notice Represents a staking incentive struct Incentive { uint256 totalRewardUnclaimed; uint160 totalSecondsClaimedX128; uint96 numberOfStakes; } /// @notice Represents the deposit of a liquidity NFT struct Deposit { address owner; uint48 numberOfStakes; int24 tickLower; int24 tickUpper; } /// @notice Represents a staked liquidity NFT struct Stake { uint160 secondsPerLiquidityInsideInitialX128; uint96 liquidityNoOverflow; uint128 liquidityIfOverflow; } /// @inheritdoc IUniswapV3Staker IUniswapV3Factory public immutable override factory; /// @inheritdoc IUniswapV3Staker INonfungiblePositionManager public immutable override nonfungiblePositionManager; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveStartLeadTime; /// @inheritdoc IUniswapV3Staker uint256 public immutable override maxIncentiveDuration; /// @dev bytes32 refers to the return value of IncentiveId.compute mapping(bytes32 => Incentive) public override incentives; /// @dev deposits[tokenId] => Deposit mapping(uint256 => Deposit) public override deposits; /// @dev stakes[tokenId][incentiveHash] => Stake mapping(uint256 => mapping(bytes32 => Stake)) private _stakes; /// @inheritdoc IUniswapV3Staker function stakes(uint256 tokenId, bytes32 incentiveId) public view override returns (uint160 secondsPerLiquidityInsideInitialX128, uint128 liquidity) { } /// @dev rewards[rewardToken][owner] => uint256 /// @inheritdoc IUniswapV3Staker mapping(IERC20Minimal => mapping(address => uint256)) public override rewards; /// @param _factory the Uniswap V3 factory /// @param _nonfungiblePositionManager the NFT position manager contract address /// @param _maxIncentiveStartLeadTime the max duration of an incentive in seconds /// @param _maxIncentiveDuration the max amount of seconds into the future the incentive startTime can be set constructor( IUniswapV3Factory _factory, INonfungiblePositionManager _nonfungiblePositionManager, uint256 _maxIncentiveStartLeadTime, uint256 _maxIncentiveDuration ) { } /// @inheritdoc IUniswapV3Staker function createIncentive(IncentiveKey memory key, uint256 reward) external override { } /// @inheritdoc IUniswapV3Staker function endIncentive(IncentiveKey memory key) external override returns (uint256 refund) { } /// @notice Upon receiving a Uniswap V3 ERC721, creates the token deposit setting owner to `from`. Also stakes token /// in one or more incentives if properly formatted `data` has a length > 0. /// @inheritdoc IERC721Receiver function onERC721Received( address, address from, uint256 tokenId, bytes calldata data ) external override returns (bytes4) { } /// @inheritdoc IUniswapV3Staker function transferDeposit(uint256 tokenId, address to) external override { } /// @inheritdoc IUniswapV3Staker function withdrawToken( uint256 tokenId, address to, bytes memory data ) external override { } /// @inheritdoc IUniswapV3Staker function stakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function unstakeToken(IncentiveKey memory key, uint256 tokenId) external override { } /// @inheritdoc IUniswapV3Staker function claimReward( IERC20Minimal rewardToken, address to, uint256 amountRequested ) external override returns (uint256 reward) { } /// @inheritdoc IUniswapV3Staker function getRewardInfo(IncentiveKey memory key, uint256 tokenId) external view override returns (uint256 reward, uint160 secondsInsideX128) { } /// @dev Stakes a deposited token without doing an ownership check function _stakeToken(IncentiveKey memory key, uint256 tokenId) private { require(block.timestamp >= key.startTime, 'UniswapV3Staker::stakeToken: incentive not started'); require(block.timestamp < key.endTime, 'UniswapV3Staker::stakeToken: incentive ended'); bytes32 incentiveId = IncentiveId.compute(key); require( incentives[incentiveId].totalRewardUnclaimed > 0, 'UniswapV3Staker::stakeToken: non-existent incentive' ); require(<FILL_ME>) (IUniswapV3Pool pool, int24 tickLower, int24 tickUpper, uint128 liquidity) = NFTPositionInfo.getPositionInfo(factory, nonfungiblePositionManager, tokenId); require(pool == key.pool, 'UniswapV3Staker::stakeToken: token pool is not the incentive pool'); require(liquidity > 0, 'UniswapV3Staker::stakeToken: cannot stake token with 0 liquidity'); deposits[tokenId].numberOfStakes++; incentives[incentiveId].numberOfStakes++; (, uint160 secondsPerLiquidityInsideX128, ) = pool.snapshotCumulativesInside(tickLower, tickUpper); if (liquidity >= type(uint96).max) { _stakes[tokenId][incentiveId] = Stake({ secondsPerLiquidityInsideInitialX128: secondsPerLiquidityInsideX128, liquidityNoOverflow: type(uint96).max, liquidityIfOverflow: liquidity }); } else { Stake storage stake = _stakes[tokenId][incentiveId]; stake.secondsPerLiquidityInsideInitialX128 = secondsPerLiquidityInsideX128; stake.liquidityNoOverflow = uint96(liquidity); } emit TokenStaked(tokenId, incentiveId, liquidity); } }
_stakes[tokenId][incentiveId].liquidityNoOverflow==0,'UniswapV3Staker::stakeToken: token already staked'
277,359
_stakes[tokenId][incentiveId].liquidityNoOverflow==0
"Public sale not open"
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@0xsequence/sstore2/contracts/SSTORE2.sol"; import "./Interfaces/IPixelationsRenderer.sol"; /* β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘ β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•‘β–‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–‘β•šβ•β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β•šβ•β•β•β•β•β–‘β•šβ•β•β–‘β–‘β•šβ•β•β•β•šβ•β•β•β•β•β•β–‘ What are Pixelations? Pixelations are an NFT collection of 32x32 pixelated images. There are 3,232 Pixelations, each 100% stored and rendered on-chain. For this collection, we took a unique approach. Rather than designing the art ourselves, we are giving the minter the ability to provide the art. This image could be anything: an IRL photo, a painting, or a JPEG pulled off the internet. How does it work? Upon minting, we perform a number of image processing steps in order to viably store your image on chain, and also reduce minting gas fees as much as possible. At a high level we do the following off chain: 1. Convert the image into 32x32 pixels. 2. Extract the 32 colors that best represent the image via k-means clustering. 3. Compress the image via bit-packing since we now only need 5-bits to represent it's 32 colors. After these off chain steps, your image is roughly 700 bytes of data that we store in our custom ERC-721 smart contract. When sites like OpenSea attempt to fetch your Pixelation's metadata and image, our contract renders an SVG at run-time. ---------------------------------------------------------------------------- Special shoutout to Chainrunners and Blitmap for the inspiration and help. We used a lot of the same techniques in order to perform efficient rendering. */ contract Pixelations is ERC721Enumerable, Ownable, ReentrancyGuard { uint256 public MAX_TOKENS = 3232; address public renderingContractAddress; mapping(address => uint256) public earlyAccessMintsAllowed; mapping(address => uint256) public privateSaleMintsAllowed; uint256 private constant PRIVATE_SALE_MINT_PRICE = 0.025 ether; uint256 public publicSaleStartTimestamp; uint256 private constant PUBLIC_SALE_MINT_PRICE = 0.05 ether; uint256 public numberOfMints; uint256 private MAX_PIXEL_DATA_LENGTH = 640; uint256 private MAX_COLOR_DATA_LENGTH = 96; uint256 private MAX_TOKEN_DATA_LENGTH = MAX_PIXEL_DATA_LENGTH + MAX_COLOR_DATA_LENGTH; address[] private _tokenDatas; bool public mintingCompleteAndValid; constructor() ERC721("Pixelations", "PIX") {} modifier whenPublicSaleActive() { require(<FILL_ME>) _; } function isPublicSaleOpen() public view returns (bool) { } function setPublicSaleStartTimestamp(uint256 timestamp) external onlyOwner { } function mintEarlyAccess(bytes memory tokenData) external payable nonReentrant returns (uint256) { } function mintPrivateSale(bytes memory tokenData) external payable nonReentrant returns (uint256) { } function mintPublicSale(bytes memory tokenData) external payable nonReentrant whenPublicSaleActive returns (uint256) { } // Technically any set of bytes of length 736 is a valid Pixelation. // // The first 640 bytes represent each pixel's bitmap. There are 32 colors so we // represent each pixel as a 5 bit index into an array of 32 colors. // // The next 96 bytes represent 32 colors. Each color is a 3 byte RGB. function _mintNewToken(bytes memory tokenData) internal returns (uint256) { } function getRemainingEarlyAccessMints(address addr) public view returns (uint256) { } function addToEarlyAccessList(address[] memory toEarlyAccessList, uint256 mintsAllowed) external onlyOwner { } function getRemainingPrivateSaleMints(address addr) public view returns (uint256) { } function addToPrivateSaleList(address[] memory toPrivateSaleList, uint256 mintsAllowed) external onlyOwner { } // Hopefully we don't have to use this. But as a safeguard for if somebody needs to change their photo // we have the ability to override the token data. Once all tokens are minted and verified to be valid, we can close // off this functionality with: setMintingCompleteAndValid() function overwriteExistingTokenData( uint256 tokenId, bytes memory tokenData ) external onlyOwner { } function setMintingCompleteAndValid() external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Handy function for only rendering the svg. function tokenSVG(uint256 tokenId) public view returns (string memory) { } function tokenDataForToken(uint256 tokenId) public view returns (bytes memory) { } function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner { } receive() external payable {} function withdraw() public onlyOwner { } }
isPublicSaleOpen(),"Public sale not open"
277,453
isPublicSaleOpen()
"Address has no more early access mints remaining."
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@0xsequence/sstore2/contracts/SSTORE2.sol"; import "./Interfaces/IPixelationsRenderer.sol"; /* β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘ β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•‘β–‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–‘β•šβ•β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β•šβ•β•β•β•β•β–‘β•šβ•β•β–‘β–‘β•šβ•β•β•β•šβ•β•β•β•β•β•β–‘ What are Pixelations? Pixelations are an NFT collection of 32x32 pixelated images. There are 3,232 Pixelations, each 100% stored and rendered on-chain. For this collection, we took a unique approach. Rather than designing the art ourselves, we are giving the minter the ability to provide the art. This image could be anything: an IRL photo, a painting, or a JPEG pulled off the internet. How does it work? Upon minting, we perform a number of image processing steps in order to viably store your image on chain, and also reduce minting gas fees as much as possible. At a high level we do the following off chain: 1. Convert the image into 32x32 pixels. 2. Extract the 32 colors that best represent the image via k-means clustering. 3. Compress the image via bit-packing since we now only need 5-bits to represent it's 32 colors. After these off chain steps, your image is roughly 700 bytes of data that we store in our custom ERC-721 smart contract. When sites like OpenSea attempt to fetch your Pixelation's metadata and image, our contract renders an SVG at run-time. ---------------------------------------------------------------------------- Special shoutout to Chainrunners and Blitmap for the inspiration and help. We used a lot of the same techniques in order to perform efficient rendering. */ contract Pixelations is ERC721Enumerable, Ownable, ReentrancyGuard { uint256 public MAX_TOKENS = 3232; address public renderingContractAddress; mapping(address => uint256) public earlyAccessMintsAllowed; mapping(address => uint256) public privateSaleMintsAllowed; uint256 private constant PRIVATE_SALE_MINT_PRICE = 0.025 ether; uint256 public publicSaleStartTimestamp; uint256 private constant PUBLIC_SALE_MINT_PRICE = 0.05 ether; uint256 public numberOfMints; uint256 private MAX_PIXEL_DATA_LENGTH = 640; uint256 private MAX_COLOR_DATA_LENGTH = 96; uint256 private MAX_TOKEN_DATA_LENGTH = MAX_PIXEL_DATA_LENGTH + MAX_COLOR_DATA_LENGTH; address[] private _tokenDatas; bool public mintingCompleteAndValid; constructor() ERC721("Pixelations", "PIX") {} modifier whenPublicSaleActive() { } function isPublicSaleOpen() public view returns (bool) { } function setPublicSaleStartTimestamp(uint256 timestamp) external onlyOwner { } function mintEarlyAccess(bytes memory tokenData) external payable nonReentrant returns (uint256) { require(<FILL_ME>) earlyAccessMintsAllowed[msg.sender]--; return _mintNewToken(tokenData); } function mintPrivateSale(bytes memory tokenData) external payable nonReentrant returns (uint256) { } function mintPublicSale(bytes memory tokenData) external payable nonReentrant whenPublicSaleActive returns (uint256) { } // Technically any set of bytes of length 736 is a valid Pixelation. // // The first 640 bytes represent each pixel's bitmap. There are 32 colors so we // represent each pixel as a 5 bit index into an array of 32 colors. // // The next 96 bytes represent 32 colors. Each color is a 3 byte RGB. function _mintNewToken(bytes memory tokenData) internal returns (uint256) { } function getRemainingEarlyAccessMints(address addr) public view returns (uint256) { } function addToEarlyAccessList(address[] memory toEarlyAccessList, uint256 mintsAllowed) external onlyOwner { } function getRemainingPrivateSaleMints(address addr) public view returns (uint256) { } function addToPrivateSaleList(address[] memory toPrivateSaleList, uint256 mintsAllowed) external onlyOwner { } // Hopefully we don't have to use this. But as a safeguard for if somebody needs to change their photo // we have the ability to override the token data. Once all tokens are minted and verified to be valid, we can close // off this functionality with: setMintingCompleteAndValid() function overwriteExistingTokenData( uint256 tokenId, bytes memory tokenData ) external onlyOwner { } function setMintingCompleteAndValid() external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Handy function for only rendering the svg. function tokenSVG(uint256 tokenId) public view returns (string memory) { } function tokenDataForToken(uint256 tokenId) public view returns (bytes memory) { } function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner { } receive() external payable {} function withdraw() public onlyOwner { } }
getRemainingEarlyAccessMints(msg.sender)>0,"Address has no more early access mints remaining."
277,453
getRemainingEarlyAccessMints(msg.sender)>0
"Address has no more private sale mints remaining."
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@0xsequence/sstore2/contracts/SSTORE2.sol"; import "./Interfaces/IPixelationsRenderer.sol"; /* β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘ β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•‘β–‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–‘β•šβ•β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β•šβ•β•β•β•β•β–‘β•šβ•β•β–‘β–‘β•šβ•β•β•β•šβ•β•β•β•β•β•β–‘ What are Pixelations? Pixelations are an NFT collection of 32x32 pixelated images. There are 3,232 Pixelations, each 100% stored and rendered on-chain. For this collection, we took a unique approach. Rather than designing the art ourselves, we are giving the minter the ability to provide the art. This image could be anything: an IRL photo, a painting, or a JPEG pulled off the internet. How does it work? Upon minting, we perform a number of image processing steps in order to viably store your image on chain, and also reduce minting gas fees as much as possible. At a high level we do the following off chain: 1. Convert the image into 32x32 pixels. 2. Extract the 32 colors that best represent the image via k-means clustering. 3. Compress the image via bit-packing since we now only need 5-bits to represent it's 32 colors. After these off chain steps, your image is roughly 700 bytes of data that we store in our custom ERC-721 smart contract. When sites like OpenSea attempt to fetch your Pixelation's metadata and image, our contract renders an SVG at run-time. ---------------------------------------------------------------------------- Special shoutout to Chainrunners and Blitmap for the inspiration and help. We used a lot of the same techniques in order to perform efficient rendering. */ contract Pixelations is ERC721Enumerable, Ownable, ReentrancyGuard { uint256 public MAX_TOKENS = 3232; address public renderingContractAddress; mapping(address => uint256) public earlyAccessMintsAllowed; mapping(address => uint256) public privateSaleMintsAllowed; uint256 private constant PRIVATE_SALE_MINT_PRICE = 0.025 ether; uint256 public publicSaleStartTimestamp; uint256 private constant PUBLIC_SALE_MINT_PRICE = 0.05 ether; uint256 public numberOfMints; uint256 private MAX_PIXEL_DATA_LENGTH = 640; uint256 private MAX_COLOR_DATA_LENGTH = 96; uint256 private MAX_TOKEN_DATA_LENGTH = MAX_PIXEL_DATA_LENGTH + MAX_COLOR_DATA_LENGTH; address[] private _tokenDatas; bool public mintingCompleteAndValid; constructor() ERC721("Pixelations", "PIX") {} modifier whenPublicSaleActive() { } function isPublicSaleOpen() public view returns (bool) { } function setPublicSaleStartTimestamp(uint256 timestamp) external onlyOwner { } function mintEarlyAccess(bytes memory tokenData) external payable nonReentrant returns (uint256) { } function mintPrivateSale(bytes memory tokenData) external payable nonReentrant returns (uint256) { require(<FILL_ME>) require(PRIVATE_SALE_MINT_PRICE == msg.value, "Incorrect amount of ether sent."); privateSaleMintsAllowed[msg.sender]--; return _mintNewToken(tokenData); } function mintPublicSale(bytes memory tokenData) external payable nonReentrant whenPublicSaleActive returns (uint256) { } // Technically any set of bytes of length 736 is a valid Pixelation. // // The first 640 bytes represent each pixel's bitmap. There are 32 colors so we // represent each pixel as a 5 bit index into an array of 32 colors. // // The next 96 bytes represent 32 colors. Each color is a 3 byte RGB. function _mintNewToken(bytes memory tokenData) internal returns (uint256) { } function getRemainingEarlyAccessMints(address addr) public view returns (uint256) { } function addToEarlyAccessList(address[] memory toEarlyAccessList, uint256 mintsAllowed) external onlyOwner { } function getRemainingPrivateSaleMints(address addr) public view returns (uint256) { } function addToPrivateSaleList(address[] memory toPrivateSaleList, uint256 mintsAllowed) external onlyOwner { } // Hopefully we don't have to use this. But as a safeguard for if somebody needs to change their photo // we have the ability to override the token data. Once all tokens are minted and verified to be valid, we can close // off this functionality with: setMintingCompleteAndValid() function overwriteExistingTokenData( uint256 tokenId, bytes memory tokenData ) external onlyOwner { } function setMintingCompleteAndValid() external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Handy function for only rendering the svg. function tokenSVG(uint256 tokenId) public view returns (string memory) { } function tokenDataForToken(uint256 tokenId) public view returns (bytes memory) { } function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner { } receive() external payable {} function withdraw() public onlyOwner { } }
getRemainingPrivateSaleMints(msg.sender)>0,"Address has no more private sale mints remaining."
277,453
getRemainingPrivateSaleMints(msg.sender)>0
"You are not allowed to overwrite existing token data anymore."
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@0xsequence/sstore2/contracts/SSTORE2.sol"; import "./Interfaces/IPixelationsRenderer.sol"; /* β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘ β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•‘β–‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–‘β•šβ•β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β•šβ•β•β•β•β•β–‘β•šβ•β•β–‘β–‘β•šβ•β•β•β•šβ•β•β•β•β•β•β–‘ What are Pixelations? Pixelations are an NFT collection of 32x32 pixelated images. There are 3,232 Pixelations, each 100% stored and rendered on-chain. For this collection, we took a unique approach. Rather than designing the art ourselves, we are giving the minter the ability to provide the art. This image could be anything: an IRL photo, a painting, or a JPEG pulled off the internet. How does it work? Upon minting, we perform a number of image processing steps in order to viably store your image on chain, and also reduce minting gas fees as much as possible. At a high level we do the following off chain: 1. Convert the image into 32x32 pixels. 2. Extract the 32 colors that best represent the image via k-means clustering. 3. Compress the image via bit-packing since we now only need 5-bits to represent it's 32 colors. After these off chain steps, your image is roughly 700 bytes of data that we store in our custom ERC-721 smart contract. When sites like OpenSea attempt to fetch your Pixelation's metadata and image, our contract renders an SVG at run-time. ---------------------------------------------------------------------------- Special shoutout to Chainrunners and Blitmap for the inspiration and help. We used a lot of the same techniques in order to perform efficient rendering. */ contract Pixelations is ERC721Enumerable, Ownable, ReentrancyGuard { uint256 public MAX_TOKENS = 3232; address public renderingContractAddress; mapping(address => uint256) public earlyAccessMintsAllowed; mapping(address => uint256) public privateSaleMintsAllowed; uint256 private constant PRIVATE_SALE_MINT_PRICE = 0.025 ether; uint256 public publicSaleStartTimestamp; uint256 private constant PUBLIC_SALE_MINT_PRICE = 0.05 ether; uint256 public numberOfMints; uint256 private MAX_PIXEL_DATA_LENGTH = 640; uint256 private MAX_COLOR_DATA_LENGTH = 96; uint256 private MAX_TOKEN_DATA_LENGTH = MAX_PIXEL_DATA_LENGTH + MAX_COLOR_DATA_LENGTH; address[] private _tokenDatas; bool public mintingCompleteAndValid; constructor() ERC721("Pixelations", "PIX") {} modifier whenPublicSaleActive() { } function isPublicSaleOpen() public view returns (bool) { } function setPublicSaleStartTimestamp(uint256 timestamp) external onlyOwner { } function mintEarlyAccess(bytes memory tokenData) external payable nonReentrant returns (uint256) { } function mintPrivateSale(bytes memory tokenData) external payable nonReentrant returns (uint256) { } function mintPublicSale(bytes memory tokenData) external payable nonReentrant whenPublicSaleActive returns (uint256) { } // Technically any set of bytes of length 736 is a valid Pixelation. // // The first 640 bytes represent each pixel's bitmap. There are 32 colors so we // represent each pixel as a 5 bit index into an array of 32 colors. // // The next 96 bytes represent 32 colors. Each color is a 3 byte RGB. function _mintNewToken(bytes memory tokenData) internal returns (uint256) { } function getRemainingEarlyAccessMints(address addr) public view returns (uint256) { } function addToEarlyAccessList(address[] memory toEarlyAccessList, uint256 mintsAllowed) external onlyOwner { } function getRemainingPrivateSaleMints(address addr) public view returns (uint256) { } function addToPrivateSaleList(address[] memory toPrivateSaleList, uint256 mintsAllowed) external onlyOwner { } // Hopefully we don't have to use this. But as a safeguard for if somebody needs to change their photo // we have the ability to override the token data. Once all tokens are minted and verified to be valid, we can close // off this functionality with: setMintingCompleteAndValid() function overwriteExistingTokenData( uint256 tokenId, bytes memory tokenData ) external onlyOwner { require(tokenId >= 1, "Invalid tokenId."); require(tokenId <= numberOfMints, "Token hasn't been minted yet."); require(tokenData.length == MAX_TOKEN_DATA_LENGTH, "tokenData must be 736 bytes."); require(<FILL_ME>) uint256 tokenIndex = tokenId - 1; _tokenDatas[tokenIndex] = SSTORE2.write(tokenData); } function setMintingCompleteAndValid() external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Handy function for only rendering the svg. function tokenSVG(uint256 tokenId) public view returns (string memory) { } function tokenDataForToken(uint256 tokenId) public view returns (bytes memory) { } function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner { } receive() external payable {} function withdraw() public onlyOwner { } }
!mintingCompleteAndValid,"You are not allowed to overwrite existing token data anymore."
277,453
!mintingCompleteAndValid
null
pragma solidity ^0.8.0; contract SecretDriverClub is EIP712, ERC721, ERC721Enumerable, Ownable { using Strings for uint256; struct FeesWallets { address wallet; uint256 fees; } FeesWallets[] public feesWallets; bool public isBaseUrlFrozen = false; string public unrevealedTokenUri = "ipfs://QmRt4p5w47anQmVyuCkMqohZd5tzh4JWT4WJ7W5xYMatfo"; bool public isRevealed = false; uint256 public startingIndex = 0; bool public saleIsActive = false; bool public preSaleIsActive = false; uint256 public presaleSold = 0; bool public whitelistSaleIsActive = false; string private _baseURIextended; uint256 public tokenPrice = 0.06 ether; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_PUBLIC_MINT_PER_TRANSACTION = 10; string private constant SIGNING_DOMAIN = "SDC"; string private constant SIGNATURE_VERSION = "1"; mapping(address => uint256) public whitelistAmountMintedPerWallet; address private whiteListeSigner = 0xcccc97afd1f1a3c2656a926DbEF961890E572CCD; constructor() ERC721("SecretDriverClub", "SDRCL") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setTokenPrice(uint256 price_) external onlyOwner { } function setWhiteListSigner(address signer) external onlyOwner { } function freezeBaseUrl() external onlyOwner { } function reveal(string memory baseUrl_) external onlyOwner { } function setUnrevealedURI(string memory unrevealedTokenUri_) external onlyOwner { } function setBaseURI(string memory baseURI_) external onlyOwner { require(<FILL_ME>) _baseURIextended = baseURI_; } function setSaleState(bool newState) public onlyOwner { } function setPresaleState(bool newState) public onlyOwner { } function setWhitelisteSaleState(bool newState) public onlyOwner { } function addFeesWallet(address wallet, uint256 feesPercentageX100) public onlyOwner { } function withdraw() external onlyOwner { } function buyTokensPresale(uint256 numberOfTokens) public payable { } function airDropToken(address target, uint256 id) public onlyOwner { } function buyTokens(uint256 numberOfTokens) public payable { } function applyBuyToken(uint256 numberOfTokens, uint256 price) private { } function buyTokenWithWhiteList( uint256 numberOfTokens, uint256 price, bytes calldata signature ) public payable { } function verifyWhitelistSignature( bytes calldata signature, address targetWallet, uint256 price ) internal view { } function hashWhitelisteSignature(address targetWallet, uint256 price) internal view returns (bytes32) { } }
!isBaseUrlFrozen
277,551
!isBaseUrlFrozen
null
pragma solidity ^0.8.0; contract SecretDriverClub is EIP712, ERC721, ERC721Enumerable, Ownable { using Strings for uint256; struct FeesWallets { address wallet; uint256 fees; } FeesWallets[] public feesWallets; bool public isBaseUrlFrozen = false; string public unrevealedTokenUri = "ipfs://QmRt4p5w47anQmVyuCkMqohZd5tzh4JWT4WJ7W5xYMatfo"; bool public isRevealed = false; uint256 public startingIndex = 0; bool public saleIsActive = false; bool public preSaleIsActive = false; uint256 public presaleSold = 0; bool public whitelistSaleIsActive = false; string private _baseURIextended; uint256 public tokenPrice = 0.06 ether; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_PUBLIC_MINT_PER_TRANSACTION = 10; string private constant SIGNING_DOMAIN = "SDC"; string private constant SIGNATURE_VERSION = "1"; mapping(address => uint256) public whitelistAmountMintedPerWallet; address private whiteListeSigner = 0xcccc97afd1f1a3c2656a926DbEF961890E572CCD; constructor() ERC721("SecretDriverClub", "SDRCL") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setTokenPrice(uint256 price_) external onlyOwner { } function setWhiteListSigner(address signer) external onlyOwner { } function freezeBaseUrl() external onlyOwner { } function reveal(string memory baseUrl_) external onlyOwner { } function setUnrevealedURI(string memory unrevealedTokenUri_) external onlyOwner { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setSaleState(bool newState) public onlyOwner { } function setPresaleState(bool newState) public onlyOwner { } function setWhitelisteSaleState(bool newState) public onlyOwner { } function addFeesWallet(address wallet, uint256 feesPercentageX100) public onlyOwner { uint256 totalFees = 0; for (uint256 i = 0; i < feesWallets.length; i++) { totalFees += feesWallets[i].fees; } require(<FILL_ME>) feesWallets.push(FeesWallets(wallet, feesPercentageX100)); } function withdraw() external onlyOwner { } function buyTokensPresale(uint256 numberOfTokens) public payable { } function airDropToken(address target, uint256 id) public onlyOwner { } function buyTokens(uint256 numberOfTokens) public payable { } function applyBuyToken(uint256 numberOfTokens, uint256 price) private { } function buyTokenWithWhiteList( uint256 numberOfTokens, uint256 price, bytes calldata signature ) public payable { } function verifyWhitelistSignature( bytes calldata signature, address targetWallet, uint256 price ) internal view { } function hashWhitelisteSignature(address targetWallet, uint256 price) internal view returns (bytes32) { } }
totalFees+feesPercentageX100<10000
277,551
totalFees+feesPercentageX100<10000
"not enough supply"
pragma solidity ^0.8.0; contract SecretDriverClub is EIP712, ERC721, ERC721Enumerable, Ownable { using Strings for uint256; struct FeesWallets { address wallet; uint256 fees; } FeesWallets[] public feesWallets; bool public isBaseUrlFrozen = false; string public unrevealedTokenUri = "ipfs://QmRt4p5w47anQmVyuCkMqohZd5tzh4JWT4WJ7W5xYMatfo"; bool public isRevealed = false; uint256 public startingIndex = 0; bool public saleIsActive = false; bool public preSaleIsActive = false; uint256 public presaleSold = 0; bool public whitelistSaleIsActive = false; string private _baseURIextended; uint256 public tokenPrice = 0.06 ether; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_PUBLIC_MINT_PER_TRANSACTION = 10; string private constant SIGNING_DOMAIN = "SDC"; string private constant SIGNATURE_VERSION = "1"; mapping(address => uint256) public whitelistAmountMintedPerWallet; address private whiteListeSigner = 0xcccc97afd1f1a3c2656a926DbEF961890E572CCD; constructor() ERC721("SecretDriverClub", "SDRCL") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setTokenPrice(uint256 price_) external onlyOwner { } function setWhiteListSigner(address signer) external onlyOwner { } function freezeBaseUrl() external onlyOwner { } function reveal(string memory baseUrl_) external onlyOwner { } function setUnrevealedURI(string memory unrevealedTokenUri_) external onlyOwner { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setSaleState(bool newState) public onlyOwner { } function setPresaleState(bool newState) public onlyOwner { } function setWhitelisteSaleState(bool newState) public onlyOwner { } function addFeesWallet(address wallet, uint256 feesPercentageX100) public onlyOwner { } function withdraw() external onlyOwner { } function buyTokensPresale(uint256 numberOfTokens) public payable { } function airDropToken(address target, uint256 id) public onlyOwner { } function buyTokens(uint256 numberOfTokens) public payable { } function applyBuyToken(uint256 numberOfTokens, uint256 price) private { uint256 ts = totalSupply() + 1; require(msg.sender == tx.origin); require(<FILL_ME>) require(price * numberOfTokens <= msg.value, "invalid ethers sent"); require( numberOfTokens <= MAX_PUBLIC_MINT_PER_TRANSACTION, "too many token per transaction" ); for (uint256 i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, ts + i); } } function buyTokenWithWhiteList( uint256 numberOfTokens, uint256 price, bytes calldata signature ) public payable { } function verifyWhitelistSignature( bytes calldata signature, address targetWallet, uint256 price ) internal view { } function hashWhitelisteSignature(address targetWallet, uint256 price) internal view returns (bytes32) { } }
ts+numberOfTokens<=MAX_SUPPLY+1,"not enough supply"
277,551
ts+numberOfTokens<=MAX_SUPPLY+1
"10 max per wallet"
pragma solidity ^0.8.0; contract SecretDriverClub is EIP712, ERC721, ERC721Enumerable, Ownable { using Strings for uint256; struct FeesWallets { address wallet; uint256 fees; } FeesWallets[] public feesWallets; bool public isBaseUrlFrozen = false; string public unrevealedTokenUri = "ipfs://QmRt4p5w47anQmVyuCkMqohZd5tzh4JWT4WJ7W5xYMatfo"; bool public isRevealed = false; uint256 public startingIndex = 0; bool public saleIsActive = false; bool public preSaleIsActive = false; uint256 public presaleSold = 0; bool public whitelistSaleIsActive = false; string private _baseURIextended; uint256 public tokenPrice = 0.06 ether; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_PUBLIC_MINT_PER_TRANSACTION = 10; string private constant SIGNING_DOMAIN = "SDC"; string private constant SIGNATURE_VERSION = "1"; mapping(address => uint256) public whitelistAmountMintedPerWallet; address private whiteListeSigner = 0xcccc97afd1f1a3c2656a926DbEF961890E572CCD; constructor() ERC721("SecretDriverClub", "SDRCL") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setTokenPrice(uint256 price_) external onlyOwner { } function setWhiteListSigner(address signer) external onlyOwner { } function freezeBaseUrl() external onlyOwner { } function reveal(string memory baseUrl_) external onlyOwner { } function setUnrevealedURI(string memory unrevealedTokenUri_) external onlyOwner { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setSaleState(bool newState) public onlyOwner { } function setPresaleState(bool newState) public onlyOwner { } function setWhitelisteSaleState(bool newState) public onlyOwner { } function addFeesWallet(address wallet, uint256 feesPercentageX100) public onlyOwner { } function withdraw() external onlyOwner { } function buyTokensPresale(uint256 numberOfTokens) public payable { } function airDropToken(address target, uint256 id) public onlyOwner { } function buyTokens(uint256 numberOfTokens) public payable { } function applyBuyToken(uint256 numberOfTokens, uint256 price) private { } function buyTokenWithWhiteList( uint256 numberOfTokens, uint256 price, bytes calldata signature ) public payable { require(whitelistSaleIsActive, "whitelist sale not open"); verifyWhitelistSignature(signature, msg.sender, price); whitelistAmountMintedPerWallet[msg.sender] += numberOfTokens; require(<FILL_ME>) applyBuyToken(numberOfTokens, price); } function verifyWhitelistSignature( bytes calldata signature, address targetWallet, uint256 price ) internal view { } function hashWhitelisteSignature(address targetWallet, uint256 price) internal view returns (bytes32) { } }
whitelistAmountMintedPerWallet[msg.sender]<=10,"10 max per wallet"
277,551
whitelistAmountMintedPerWallet[msg.sender]<=10
"Exceeds maximum NFTs that can be created"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; /* β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–„β–„β–„β–ˆβ–ˆβ–€ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ β–€β–€β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ PIXELBEASTS https://www.pixelbeasts.xyz/ */ contract PixelBeasts is ERC721Enumerable, Ownable { using Strings for uint256; string _baseTokenURI; address addr_1 = 0x8CD7b7962b9753DB32A6E0FB47741A2fbBdea6D3; //reserved for giveaways uint256 private _reserved = 150; uint256 private _price = 0.045 ether; uint256 private _generatorPrice = 0.00 ether; uint256 public _generatorStartCount = 10000; bool public _paused = true; bool public _generatorPaused = true; constructor(string memory baseURI) ERC721("PixelBeasts", "PB") { } function purchase(uint256 num) public payable { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setGeneratorPrice(uint256 _newPrice) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function getPrice() public view returns (uint256){ } function getGeneratorPrice() public view returns (uint256){ } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function _generateProcess() private { require(<FILL_ME>) require( msg.value >= _generatorPrice, "Ether sent is not correct" ); _safeMint( msg.sender, _generatorStartCount + 1 ); _generatorStartCount = _generatorStartCount+1; } function sendGenerator(uint256 nft1, uint256 nft2) public { } function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) { } function pause(bool val) public onlyOwner { } function generatorPause(bool val) public onlyOwner { } function withdrawAll() public payable onlyOwner { } }
_generatorStartCount+1<15000,"Exceeds maximum NFTs that can be created"
277,636
_generatorStartCount+1<15000
"Generator is offline"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; /* β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–„β–„β–„β–ˆβ–ˆβ–€ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ β–€β–€β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ PIXELBEASTS https://www.pixelbeasts.xyz/ */ contract PixelBeasts is ERC721Enumerable, Ownable { using Strings for uint256; string _baseTokenURI; address addr_1 = 0x8CD7b7962b9753DB32A6E0FB47741A2fbBdea6D3; //reserved for giveaways uint256 private _reserved = 150; uint256 private _price = 0.045 ether; uint256 private _generatorPrice = 0.00 ether; uint256 public _generatorStartCount = 10000; bool public _paused = true; bool public _generatorPaused = true; constructor(string memory baseURI) ERC721("PixelBeasts", "PB") { } function purchase(uint256 num) public payable { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setGeneratorPrice(uint256 _newPrice) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function getPrice() public view returns (uint256){ } function getGeneratorPrice() public view returns (uint256){ } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function _generateProcess() private { } function sendGenerator(uint256 nft1, uint256 nft2) public { require(<FILL_ME>) require(_exists(nft1), "sendGenerator: NFT 1 does not exist."); require(_exists(nft2), "sendGenerator: NFT 2 does not exist."); require(ownerOf(nft1) == _msgSender(), "sendGenerator: NFT 1 caller is not token owner."); require(ownerOf(nft2) == _msgSender(), "sendGenerator: NFT 2 caller is not token owner."); require( nft1 <= 10000, "NFT 1 is not a genesis NFT" ); require( nft2 <= 10000, "NFT 2 is not a genesis NFT" ); require(nft1 != nft2, "Both NFTs can't be the same "); _burn(nft1); _burn(nft2); _generateProcess(); } function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) { } function pause(bool val) public onlyOwner { } function generatorPause(bool val) public onlyOwner { } function withdrawAll() public payable onlyOwner { } }
!_generatorPaused,"Generator is offline"
277,636
!_generatorPaused
"sendGenerator: NFT 1 does not exist."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; /* β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–„β–„β–„β–ˆβ–ˆβ–€ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ β–€β–€β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ PIXELBEASTS https://www.pixelbeasts.xyz/ */ contract PixelBeasts is ERC721Enumerable, Ownable { using Strings for uint256; string _baseTokenURI; address addr_1 = 0x8CD7b7962b9753DB32A6E0FB47741A2fbBdea6D3; //reserved for giveaways uint256 private _reserved = 150; uint256 private _price = 0.045 ether; uint256 private _generatorPrice = 0.00 ether; uint256 public _generatorStartCount = 10000; bool public _paused = true; bool public _generatorPaused = true; constructor(string memory baseURI) ERC721("PixelBeasts", "PB") { } function purchase(uint256 num) public payable { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setGeneratorPrice(uint256 _newPrice) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function getPrice() public view returns (uint256){ } function getGeneratorPrice() public view returns (uint256){ } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function _generateProcess() private { } function sendGenerator(uint256 nft1, uint256 nft2) public { require( !_generatorPaused, "Generator is offline" ); require(<FILL_ME>) require(_exists(nft2), "sendGenerator: NFT 2 does not exist."); require(ownerOf(nft1) == _msgSender(), "sendGenerator: NFT 1 caller is not token owner."); require(ownerOf(nft2) == _msgSender(), "sendGenerator: NFT 2 caller is not token owner."); require( nft1 <= 10000, "NFT 1 is not a genesis NFT" ); require( nft2 <= 10000, "NFT 2 is not a genesis NFT" ); require(nft1 != nft2, "Both NFTs can't be the same "); _burn(nft1); _burn(nft2); _generateProcess(); } function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) { } function pause(bool val) public onlyOwner { } function generatorPause(bool val) public onlyOwner { } function withdrawAll() public payable onlyOwner { } }
_exists(nft1),"sendGenerator: NFT 1 does not exist."
277,636
_exists(nft1)
"sendGenerator: NFT 2 does not exist."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; /* β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–„β–„β–„β–ˆβ–ˆβ–€ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ β–€β–€β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ PIXELBEASTS https://www.pixelbeasts.xyz/ */ contract PixelBeasts is ERC721Enumerable, Ownable { using Strings for uint256; string _baseTokenURI; address addr_1 = 0x8CD7b7962b9753DB32A6E0FB47741A2fbBdea6D3; //reserved for giveaways uint256 private _reserved = 150; uint256 private _price = 0.045 ether; uint256 private _generatorPrice = 0.00 ether; uint256 public _generatorStartCount = 10000; bool public _paused = true; bool public _generatorPaused = true; constructor(string memory baseURI) ERC721("PixelBeasts", "PB") { } function purchase(uint256 num) public payable { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setGeneratorPrice(uint256 _newPrice) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function getPrice() public view returns (uint256){ } function getGeneratorPrice() public view returns (uint256){ } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function _generateProcess() private { } function sendGenerator(uint256 nft1, uint256 nft2) public { require( !_generatorPaused, "Generator is offline" ); require(_exists(nft1), "sendGenerator: NFT 1 does not exist."); require(<FILL_ME>) require(ownerOf(nft1) == _msgSender(), "sendGenerator: NFT 1 caller is not token owner."); require(ownerOf(nft2) == _msgSender(), "sendGenerator: NFT 2 caller is not token owner."); require( nft1 <= 10000, "NFT 1 is not a genesis NFT" ); require( nft2 <= 10000, "NFT 2 is not a genesis NFT" ); require(nft1 != nft2, "Both NFTs can't be the same "); _burn(nft1); _burn(nft2); _generateProcess(); } function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) { } function pause(bool val) public onlyOwner { } function generatorPause(bool val) public onlyOwner { } function withdrawAll() public payable onlyOwner { } }
_exists(nft2),"sendGenerator: NFT 2 does not exist."
277,636
_exists(nft2)
"sendGenerator: NFT 1 caller is not token owner."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; /* β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–„β–„β–„β–ˆβ–ˆβ–€ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ β–€β–€β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ PIXELBEASTS https://www.pixelbeasts.xyz/ */ contract PixelBeasts is ERC721Enumerable, Ownable { using Strings for uint256; string _baseTokenURI; address addr_1 = 0x8CD7b7962b9753DB32A6E0FB47741A2fbBdea6D3; //reserved for giveaways uint256 private _reserved = 150; uint256 private _price = 0.045 ether; uint256 private _generatorPrice = 0.00 ether; uint256 public _generatorStartCount = 10000; bool public _paused = true; bool public _generatorPaused = true; constructor(string memory baseURI) ERC721("PixelBeasts", "PB") { } function purchase(uint256 num) public payable { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setGeneratorPrice(uint256 _newPrice) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function getPrice() public view returns (uint256){ } function getGeneratorPrice() public view returns (uint256){ } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function _generateProcess() private { } function sendGenerator(uint256 nft1, uint256 nft2) public { require( !_generatorPaused, "Generator is offline" ); require(_exists(nft1), "sendGenerator: NFT 1 does not exist."); require(_exists(nft2), "sendGenerator: NFT 2 does not exist."); require(<FILL_ME>) require(ownerOf(nft2) == _msgSender(), "sendGenerator: NFT 2 caller is not token owner."); require( nft1 <= 10000, "NFT 1 is not a genesis NFT" ); require( nft2 <= 10000, "NFT 2 is not a genesis NFT" ); require(nft1 != nft2, "Both NFTs can't be the same "); _burn(nft1); _burn(nft2); _generateProcess(); } function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) { } function pause(bool val) public onlyOwner { } function generatorPause(bool val) public onlyOwner { } function withdrawAll() public payable onlyOwner { } }
ownerOf(nft1)==_msgSender(),"sendGenerator: NFT 1 caller is not token owner."
277,636
ownerOf(nft1)==_msgSender()
"sendGenerator: NFT 2 caller is not token owner."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; /* β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–„β–„β–„β–ˆβ–ˆβ–€ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ β–€β–€β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ PIXELBEASTS https://www.pixelbeasts.xyz/ */ contract PixelBeasts is ERC721Enumerable, Ownable { using Strings for uint256; string _baseTokenURI; address addr_1 = 0x8CD7b7962b9753DB32A6E0FB47741A2fbBdea6D3; //reserved for giveaways uint256 private _reserved = 150; uint256 private _price = 0.045 ether; uint256 private _generatorPrice = 0.00 ether; uint256 public _generatorStartCount = 10000; bool public _paused = true; bool public _generatorPaused = true; constructor(string memory baseURI) ERC721("PixelBeasts", "PB") { } function purchase(uint256 num) public payable { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setGeneratorPrice(uint256 _newPrice) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function getPrice() public view returns (uint256){ } function getGeneratorPrice() public view returns (uint256){ } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function _generateProcess() private { } function sendGenerator(uint256 nft1, uint256 nft2) public { require( !_generatorPaused, "Generator is offline" ); require(_exists(nft1), "sendGenerator: NFT 1 does not exist."); require(_exists(nft2), "sendGenerator: NFT 2 does not exist."); require(ownerOf(nft1) == _msgSender(), "sendGenerator: NFT 1 caller is not token owner."); require(<FILL_ME>) require( nft1 <= 10000, "NFT 1 is not a genesis NFT" ); require( nft2 <= 10000, "NFT 2 is not a genesis NFT" ); require(nft1 != nft2, "Both NFTs can't be the same "); _burn(nft1); _burn(nft2); _generateProcess(); } function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) { } function pause(bool val) public onlyOwner { } function generatorPause(bool val) public onlyOwner { } function withdrawAll() public payable onlyOwner { } }
ownerOf(nft2)==_msgSender(),"sendGenerator: NFT 2 caller is not token owner."
277,636
ownerOf(nft2)==_msgSender()