contract_name stringlengths 1 61 | file_path stringlengths 5 50.4k | contract_address stringlengths 42 42 | language stringclasses 1
value | class_name stringlengths 1 61 | class_code stringlengths 4 330k | class_documentation stringlengths 0 29.1k | class_documentation_type stringclasses 6
values | func_name stringlengths 0 62 | func_code stringlengths 1 303k | func_documentation stringlengths 2 14.9k | func_documentation_type stringclasses 4
values | compiler_version stringlengths 15 42 | license_type stringclasses 14
values | swarm_source stringlengths 0 71 | meta dict | __index_level_0__ int64 0 60.4k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
//u... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
10425,
10892
]
} | 29,300 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
11296,
11516
]
} | 29,301 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
//unchecked {
_approve(_msgSender(), spender,... | /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
12014,
12436
]
} | 29,302 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 sende... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
12921,
13570
]
} | 29,303 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
13852,
14195
]
} | 29,304 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds ba... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
14523,
15062
]
} | 29,305 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero a... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
15495,
15846
]
} | 29,306 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | EFIToken | contract EFIToken is IERC20, Ownable {
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
constructor(string memory name_, string memory symbol_, bool progressivePrice_, uint256 sal... | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
16444,
16541
]
} | 29,307 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | add | function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate, uint256 _poolReward) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
poolInfo.push(PoolInfo({
lpToken: _... | // Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
3794,
4332
]
} | 29,308 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | set | function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate, uint256 _poolReward) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
poolInfo[_pid].p... | // Update the given pool's EFI allocation point. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
4422,
4804
]
} | 29,309 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | getMultiplier | function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
if (_to <= bonusEndBlock) {
return _to.sub(_from).mul(BONUS_MULTIPLIER);
} else if (_from >= bonusEndBlock) {
return _to.sub(_from);
} else {
return bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER)... | // Return reward multiplier over the given _from to _to block. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
4876,
5304
]
} | 29,310 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | pendingEFI | function pendingEFI(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 _tokenMultiplier = 1;
if (userMultiActive[msg.sender][_pid]) {
_tokenMultiplier = tokenMultiplier[msg... | // View function to see pending EFIs on frontend. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
5362,
6338
]
} | 29,311 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | massUpdatePools | function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| // Update reward vairables for all pools. Be careful of gas spending! | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
6416,
6601
]
} | 29,312 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | updatePool | function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.number <= pool.lastRewardBlock) {
return;
}
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
6862,
7555
]
} | 29,313 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | deposit | function deposit(uint256 _pid, uint256 _amount, uint256 _lockPeriod) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
uint256 _tokenMultiplier = 1;
if (userMultiActive[msg.sender][_pid]) {
_tokenMultiplier = to... | // Deposit LP tokens to eBOND for EFI allocation. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
7613,
8928
]
} | 29,314 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | withdraw | function withdraw(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(block.timestamp >= user.unlockTime, "Your Liquidity is locked.");
require(user.amount >= _amount, "withdraw: inadequate funds");
... | // Withdraw LP tokens from eBOND. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
8970,
9816
]
} | 29,315 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | emergencyWithdraw | function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(block.timestamp >= user.unlockTime, "Your Liquidity is locked.");
pool.lpToken.safeTransfer(address(msg.sender), user.amount);
emit Emergency... | // Withdraw without caring about rewards. EMERGENCY ONLY. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
9882,
10330
]
} | 29,316 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | safeEFITransfer | function safeEFITransfer(address _to, uint256 _amount) internal {
uint256 EFIBal = EFI.balanceOf(address(this));
if (_amount > EFIBal) {
EFI.transfer(_to, EFIBal);
} else {
EFI.transfer(_to, _amount);
}
}
| // Safe EFI transfer function, just in case if rounding error causes pool to not have enough EFI. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
10436,
10712
]
} | 29,317 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | dev | function dev(address _devaddr) public onlyOwner{
devaddr = _devaddr;
}
| // Update dev address by the previous dev. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
10763,
10852
]
} | 29,318 | ||
eBOND | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x2a1699ecacd500082b211510ee4dd4d5321fd9e5 | Solidity | eBOND | contract eBOND is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping (address => mapping(uint256 => uint256)) public tokenMultiplier;
mapping (address => mapping(uint256 => bool)) public userMultiActive;
// Info of each user.
struct UserInfo {
uint256 ... | setSponsor | function setSponsor(address _sponsorAddr) public onlyOwner{
sponsor1 = _sponsorAddr;
}
| // Update dev address by the previous dev. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://50b6b3b108bbf93cffdbd94c047192e8bb70f0c12a52960058bdf92daff4b203 | {
"func_code_index": [
10904,
11009
]
} | 29,319 | ||
NervousNFT | contracts/NervousNFT.sol | 0xb8b364464b1a6f22fdf67272356f19caab17c8b6 | Solidity | NervousNFT | contract NervousNFT is ERC721, ERC721Enumerable, PaymentSplitter, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public MAX_TOKENS = 5555;
uint256 public tokenPrice = 25000000000000000; //gwei
bool public hasSaleStarted = false;
string public baseURI;... | // nervous.eth
//
// ██╗██╗ ██╗██╗ ██████╗███████╗ ██████╗██████╗ ███████╗██╗ ██╗
// ██║██║ ██║██║██╔════╝██╔════╝ ██╔════╝██╔══██╗██╔════╝██║ ██║
// ██║██║ ██║██║██║ █████╗ ██║ ██████╔╝█████╗ ██║ █╗ ██║
// ██ ██║██║ ██║██║██║ ██╔══╝ ██║ ██╔══██╗██... | LineComment | magicGift | function magicGift(address[] calldata receivers) external onlyOwner {
require(
_tokenIds.current() + receivers.length <= MAX_TOKENS,
"Exceeds maximum token supply"
);
require(
numberOfGifts + receivers.length <= MAX_GIFTS,
"Exceeds maximum allowed gifts"
);
for (uint... | /* Magic */ | Comment | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1969,
2507
]
} | 29,320 | |
NervousNFT | contracts/NervousNFT.sol | 0xb8b364464b1a6f22fdf67272356f19caab17c8b6 | Solidity | NervousNFT | contract NervousNFT is ERC721, ERC721Enumerable, PaymentSplitter, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public MAX_TOKENS = 5555;
uint256 public tokenPrice = 25000000000000000; //gwei
bool public hasSaleStarted = false;
string public baseURI;... | // nervous.eth
//
// ██╗██╗ ██╗██╗ ██████╗███████╗ ██████╗██████╗ ███████╗██╗ ██╗
// ██║██║ ██║██║██╔════╝██╔════╝ ██╔════╝██╔══██╗██╔════╝██║ ██║
// ██║██║ ██║██║██║ █████╗ ██║ ██████╔╝█████╗ ██║ █╗ ██║
// ██ ██║██║ ██║██║██║ ██╔══╝ ██║ ██╔══██╗██... | LineComment | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| /* URIs */ | Comment | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
3026,
3136
]
} | 29,321 | |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | SigUtils | library SigUtils {
/**
@dev Recovers address who signed the message
@param _hash operation ethereum signed message hash
@param _signature message `hash` signature
*/
function ecrecover2 (
bytes32 _hash,
bytes memory _signature
) internal pure returns (addre... | ecrecover2 | function ecrecover2 (
bytes32 _hash,
bytes memory _signature
) internal pure returns (address) {
bytes32 r;
bytes32 s;
uint8 v;
assembly {
r := mload(add(_signature, 32))
s := mload(add(_signature, 64))
v := and(mload(add(_signature, 65)), 255)
}
... | /**
@dev Recovers address who signed the message
@param _hash operation ethereum signed message hash
@param _signature message `hash` signature
*/ | NatSpecMultiLine | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
201,
735
]
} | 29,322 | ||
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | init | function init(address _signer) external payable {
address signer;
bytes32 signerSlot = SIGNER_SLOT;
assembly { signer := sload(signerSlot) }
require(signer == address(0), "Signer already defined");
assembly { sstore(signerSlot, _signer) }
}
| // Inits the wallet, any address can Init
// it must be called using another contract | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
705,
1000
]
} | 29,323 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | signer | function signer() public view returns (address _signer) {
bytes32 signerSlot = SIGNER_SLOT;
assembly { _signer := sload(signerSlot) }
}
| // Signer of the Marmo wallet
// can perform transactions by signing Intents | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1090,
1254
]
} | 29,324 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | relayedBy | function relayedBy(bytes32 _id) external view returns (address _relayer) {
(,,_relayer) = _decodeReceipt(intentReceipt[_id]);
}
| // Address that relayed the `_id` intent
// address(0) if the intent was not relayed | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1352,
1498
]
} | 29,325 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | relayedAt | function relayedAt(bytes32 _id) external view returns (uint256 _block) {
(,_block,) = _decodeReceipt(intentReceipt[_id]);
}
| // Block when the intent was relayed
// 0 if the intent was not relayed | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1583,
1725
]
} | 29,326 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | isCanceled | function isCanceled(bytes32 _id) external view returns (bool _canceled) {
(_canceled,,) = _decodeReceipt(intentReceipt[_id]);
}
| // True if the intent was canceled
// An executed intent can't be canceled and
// a Canceled intent can't be executed | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1861,
2007
]
} | 29,327 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | relay | function relay(
address _implementation,
bytes calldata _data,
bytes calldata _signature
) external payable returns (
bytes memory result
) {
// Calculate ID from
// (this, _implementation, data)
// Any change in _data results in a different ID
bytes32 id = keccak256(
... | // Relay a signed intent
//
// The implementation receives data containing the id of the 'intent' and its data,
// and it will perform all subsequent calls.
//
// The same _implementation and _data combination can only be relayed once
//
// Returns the result of the 'delegatecall' execution | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
2342,
4618
]
} | 29,328 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | cancel | function cancel(bytes32 _id) external {
require(msg.sender == address(this), "Only wallet can cancel txs");
if (intentReceipt[_id] != bytes32(0)) {
(bool canceled, , address relayer) = _decodeReceipt(intentReceipt[_id]);
require(relayer == address(0), "Intent already relayed");
re... | // Cancels a not executed Intent '_id'
// a canceled intent can't be executed | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
4709,
5248
]
} | 29,329 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | _encodeReceipt | function _encodeReceipt(
bool _canceled,
uint256 _block,
address _relayer
) internal pure returns (bytes32 _receipt) {
assembly {
_receipt := or(shl(255, _canceled), or(shl(160, _block), _relayer))
}
}
| // Encodes an Intent receipt
// into a single bytes32
// canceled (1 bit) + block (95 bits) + relayer (160 bits)
// notice: Does not validate the _block length,
// a _block overflow would not corrupt the wallet state | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
5493,
5767
]
} | 29,330 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | _decodeReceipt | function _decodeReceipt(bytes32 _receipt) internal pure returns (
bool _canceled,
uint256 _block,
address _relayer
) {
assembly {
_canceled := shr(255, _receipt)
_block := and(shr(160, _receipt), 0x7fffffffffffffffffffffff)
_relayer := and(_receipt, 0xffffffffffffffffffff... | // Decodes an Intent receipt
// reverse of _encodeReceipt(bool,uint256,address) | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
5864,
6260
]
} | 29,331 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Marmo | contract Marmo {
event Relayed(bytes32 indexed _id, address _implementation, bytes _data);
event Canceled(bytes32 indexed _id);
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab000000000000000000000000... | /*
Marmo wallet
It has a signer, and it accepts signed messages ´Intents´ (Meta-Txs)
all messages are composed by an interpreter and a ´data´ field.
*/ | Comment | onERC721Received | function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) {
return bytes4(0x150b7a02);
}
| // Used to receive ERC721 tokens | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
6301,
6450
]
} | 29,332 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | concat | function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
| // Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net> | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
108,
305
]
} | 29,333 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | concat | function concat(bytes memory _a, bytes1 _b) internal pure returns (bytes memory _out) {
return concat(_a, abi.encodePacked(_b));
}
| // Concatenates a bytes array and a bytes1 | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
356,
505
]
} | 29,334 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | concat | function concat(
bytes memory _a,
bytes memory _b,
bytes memory _c,
bytes memory _d,
bytes memory _e,
bytes memory _f
) internal pure returns (bytes memory) {
return abi.encodePacked(
_a,
_b,
_c,
_d,
_e,
_f
);
}
| // Concatenates 6 bytes arrays | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
544,
920
]
} | 29,335 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | toBytes | function toBytes(bytes1 _a) internal pure returns (bytes memory) {
return abi.encodePacked(_a);
}
| // Transforms a bytes1 into bytes | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
962,
1078
]
} | 29,336 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | toBytes1 | function toBytes1(uint256 _a) internal pure returns (bytes1 c) {
assembly { c := shl(248, _a) }
}
| // Transform a uint256 into bytes (last 8 bits) | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1134,
1250
]
} | 29,337 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | plus | function plus(bytes1 _a, uint256 _b) internal pure returns (bytes1 c) {
c = toBytes1(_b);
assembly { c := add(_a, c) }
}
| // Adds a bytes1 and the last 8 bits of a uint256 | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1308,
1456
]
} | 29,338 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | toAddress | function toAddress(bytes memory _a) internal pure returns (address payable b) {
require(_a.length <= 20);
assembly {
b := shr(mul(sub(32, mload(_a)), 8), mload(add(_a, 32)))
}
}
| // Transforms a bytes into an array
// it fails if _a has more than 20 bytes | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1546,
1773
]
} | 29,339 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | mostSignificantBit | function mostSignificantBit(uint256 x) internal pure returns (uint256) {
uint8 o = 0;
uint8 h = 255;
while (h > o) {
uint8 m = uint8 ((uint16 (o) + uint16 (h)) >> 1);
uint256 t = x >> m;
if (t == 0) h = m - 1;
else if (t > 1) o = m + 1;
else ... | // Returns the most significant bit of a given uint256 | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1836,
2249
]
} | 29,340 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | Bytes | library Bytes {
// Concadenates two bytes array
// Author: Gonçalo Sá <goncalo.sa@consensys.net>
function concat(
bytes memory _preBytes,
bytes memory _postBytes
) internal pure returns (bytes memory) {
return abi.encodePacked(_preBytes, _postBytes);
}
// Conca... | // Bytes library to concat and transform
// bytes arrays | LineComment | shrink | function shrink(address _a) internal pure returns (bytes memory b) {
uint256 abits = mostSignificantBit(uint256(_a)) + 1;
uint256 abytes = abits / 8 + (abits % 8 == 0 ? 0 : 1);
assembly {
b := 0x0
mstore(0x0, abytes)
mstore(0x20, shl(mul(sub(32, abytes), 8), _a))
}
}
| // Shrinks a given address to the minimal representation in a bytes array | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
2331,
2685
]
} | 29,341 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | MinimalProxy | library MinimalProxy {
using Bytes for bytes1;
using Bytes for bytes;
// Minimal proxy contract
// by Agusx1211
bytes constant CODE1 = hex"60"; // + <size> // Copy code to memory
bytes constant CODE2 = hex"80600b6000396000f3"; ... | build | function build(address _address) internal pure returns (bytes memory initCode) {
return build(Bytes.shrink(_address));
}
| // Returns the Init code to create a
// Minimal proxy pointing to a given address | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
918,
1057
]
} | 29,342 | ||
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | MarmoStork | contract MarmoStork {
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab00000000000000000000000039bD955c9);
// Prefix of create2 address formula (EIP-1014)
bytes1 private constant CREATE2_PREFIX = byte(... | // MarmoStork creates all Marmo wallets
// every address has a designated marmo wallet
// and can send transactions by signing Meta-Tx (Intents)
//
// All wallets are proxies pointing to a single
// source contract, to make deployment costs viable | LineComment | marmoOf | function marmoOf(address _signer) external view returns (address) {
// CREATE2 address
return address(
uint256(
keccak256(
abi.encodePacked(
CREATE2_PREFIX,
address(this),
bytes32(uint256(_signer)),
... | // Calculates the Marmo wallet for a given signer
// the wallet contract will be deployed in a deterministic manner | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
1593,
2046
]
} | 29,343 |
MarmoStork | MarmoStork.sol | 0x4e755da96e10bcc07d52717052eb9cefba686ad3 | Solidity | MarmoStork | contract MarmoStork {
// Random Invalid signer address
// Intents signed with this address are invalid
address private constant INVALID_ADDRESS = address(0x9431Bab00000000000000000000000039bD955c9);
// Prefix of create2 address formula (EIP-1014)
bytes1 private constant CREATE2_PREFIX = byte(... | // MarmoStork creates all Marmo wallets
// every address has a designated marmo wallet
// and can send transactions by signing Meta-Tx (Intents)
//
// All wallets are proxies pointing to a single
// source contract, to make deployment costs viable | LineComment | reveal | function reveal(address _signer) external payable {
// Load init code from storage
bytes memory proxyCode = bytecode;
// Create wallet proxy using CREATE2
// use _signer as salt
Marmo p;
assembly {
p := create2(0, add(proxyCode, 0x20), mload(proxyCode), _signer)
}
//... | // Deploys the Marmo wallet of a given _signer
// all ETH sent will be forwarded to the wallet | LineComment | v0.5.5+commit.47a71e8f | MIT | bzzr://2ae3ee2a0635db2e7fae7aff10c135602ff8c5c5d15d79a9d25a131ea92140c7 | {
"func_code_index": [
2154,
2633
]
} | 29,344 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| //@dev Returns the number of tokens in ``owner``'s account. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
643,
722
]
} | 29,345 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
868,
945
]
} | 29,346 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | safeTransferFrom | function safeTransferFrom(address from,address to,uint256 tokenId) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token mus... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
1657,
1738
]
} | 29,347 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | transferFrom | function transferFrom(address from, address to, uint256 tokenId) external;
| /**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If th... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
2264,
2343
]
} | 29,348 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | approve | function approve(address to, uint256 tokenId) external;
| /**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
2816,
2876
]
} | 29,349 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | getApproved | function getApproved(uint256 tokenId) external view returns (address operator);
| /**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
3030,
3114
]
} | 29,350 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | setApprovalForAll | function setApprovalForAll(address operator, bool _approved) external;
| /**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
3433,
3508
]
} | 29,351 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | isApprovedForAll | function isApprovedForAll(address owner, address operator) external view returns (bool);
| //@dev Returns if the `operator` is allowed to manage all of the assets of `owner`. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
3600,
3693
]
} | 29,352 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721 | interface IERC721 is IERC165 {
//@dev Emitted when `tokenId` token is transferred from `from` to `to`.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
//@dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
event Approval(address indexed own... | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {appro... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
4270,
4374
]
} | 29,353 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
//@dev Returns the token collection name.
function name() external view returns (string memory);
//@dev Returns the token collection symbol.
function symbol() external view returns (string memory);
//@dev Returns the Uniform Resource Identifier (URI) f... | name | function name() external view returns (string memory);
| //@dev Returns the token collection name. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
87,
146
]
} | 29,354 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
//@dev Returns the token collection name.
function name() external view returns (string memory);
//@dev Returns the token collection symbol.
function symbol() external view returns (string memory);
//@dev Returns the Uniform Resource Identifier (URI) f... | symbol | function symbol() external view returns (string memory);
| //@dev Returns the token collection symbol. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
198,
259
]
} | 29,355 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
//@dev Returns the token collection name.
function name() external view returns (string memory);
//@dev Returns the token collection symbol.
function symbol() external view returns (string memory);
//@dev Returns the Uniform Resource Identifier (URI) f... | tokenURI | function tokenURI(uint256 tokenId) external view returns (string memory);
| //@dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
341,
419
]
} | 29,356 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | IERC721Receiver | interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other valu... | onERC721Received | function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
528,
655
]
} | 29,357 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | isContract | function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
606,
998
]
} | 29,358 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
| /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
1928,
2250
]
} | 29,359 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
3007,
3187
]
} | 29,360 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
3412,
3646
]
} | 29,361 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
4016,
4281
]
} | 29,362 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");... | /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
4532,
5048
]
} | 29,363 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
5228,
5432
]
} | 29,364 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionStaticCall | function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallR... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
5619,
6020
]
} | 29,365 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionDelegateCall | function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
6202,
6407
]
} | 29,366 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionDelegateCall | function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCall... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
6596,
6998
]
} | 29,367 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
399,
491
]
} | 29,368 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
1050,
1149
]
} | 29,369 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
1299,
1496
]
} | 29,370 | ||
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
interfaceId == type(IERC165).interfaceId ||
interfaceId == Chameleon.onERC721Re... | //@dev See {IERC165-supportsInterface}. Interfaces Supported by this Standard | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
2047,
2411
]
} | 29,371 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | withdraw | function withdraw() external onlyOwner {
uint256 sendAmount = address(this).balance;
address cmanager = payable(0x543874CeA651a5Dd4CDF88B2Ed9B92aF57b8507E);
address founder = payable(0xF561266D093c73F67c7CAA2Ab74CC71a43554e57);
address coo = payable(0xa4D4FeA9799... | // Standard Withdraw function for the owner to pull the contract | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
2488,
3990
]
} | 29,372 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | ownerMint | function ownerMint(address _to, uint256 qty) external onlyOwner {
require((numberMinted + qty) > numberMinted, "Math overflow error");
require((numberMinted + qty) < totalTokens, "Cannot fill order");
uint256 mintSeedValue = numberMinted; //Store the starting value of the mint batch
if (re... | /*
function withdraw() external {
require (approvedRecipients)
sendAmount = whatever was calculated
(bool success, ) = msg.sender.call{value: sendAmount}("");
require(success, "Transaction Unsuccessful");
}
*/ | Comment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
4337,
5001
]
} | 29,373 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | addDiscountContract | function addDiscountContract(address newContract) external onlyOwner {
_contractList.push(ERC721(newContract));
}
| //////////////////////////////////////////////////////////////
//////////////////// Setters and Getters /////////////////////
////////////////////////////////////////////////////////////// | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
9030,
9162
]
} | 29,374 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | balanceOf | function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
| /**
* @dev See {IERC721-balanceOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
11691,
11904
]
} | 29,375 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | ownerOf | function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
| /**
* @dev See {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
11961,
12205
]
} | 29,376 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | approve | function approve(address to, uint256 tokenId) public virtual override {
address owner = ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
msg.sender == owner || isApprovedForAll(owner, msg.sender),
"ERC721: approve caller is not owner nor approved f... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
12262,
12667
]
} | 29,377 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | getApproved | function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
12728,
12954
]
} | 29,378 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != msg.sender, "ERC721: approve to caller");
_operatorApprovals[msg.sender][operator] = approved;
emit ApprovalForAll(msg.sender, operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
13021,
13315
]
} | 29,379 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | isApprovedForAll | function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
13381,
13550
]
} | 29,380 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(msg.sender, tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
| /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
13612,
13954
]
} | 29,381 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
14020,
14210
]
} | 29,382 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(msg.sender, tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
14276,
14607
]
} | 29,383 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _safeTransfer | function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is eq... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
15484,
15804
]
} | 29,384 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _exists | function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
| /**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
16112,
16244
]
} | 29,385 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _isApprovedOrOwner | function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)... | /**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
16406,
16752
]
} | 29,386 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _safeMint | function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
| /**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
17089,
17204
]
} | 29,387 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _safeMint | function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
| /**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
17426,
17752
]
} | 29,388 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _mint | function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Tra... | /**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
18083,
18470
]
} | 29,389 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _burn | function _burn(uint256 tokenId) internal virtual {
address owner = ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
... | /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
18694,
19052
]
} | 29,390 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear ... | /**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
19384,
19960
]
} | 29,391 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _approve | function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ownerOf(tokenId), to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
20073,
20245
]
} | 29,392 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _checkOnERC721Received | function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Re... | /**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param to... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
20805,
21611
]
} | 29,393 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | onERC721Received | function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data) external returns(bytes4) {
//InterfaceID=0x150b7a02
return this.onERC721Received.selector;
}
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
22194,
22414
]
} | 29,394 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
| /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
22981,
23112
]
} | 29,395 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | name | function name() external view returns (string memory){
return _name;
}
| // **************************************** Metadata Standard Functions **********
//@dev Returns the token collection name. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
23250,
23339
]
} | 29,396 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | symbol | function symbol() external view returns (string memory){
return _symbol;
}
| //@dev Returns the token collection symbol. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
23391,
23484
]
} | 29,397 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | tokenURI | function tokenURI(uint256 tokenId) external view returns (string memory){
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory tokenuri;
if (_hideTokens) {
//redirect to mystery box
tokenuri = string(abi.encodePacked(_baseURI, "... | //@dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
23566,
24165
]
} | 29,398 |
Chameleon | Chameleon.sol | 0xfd3c3717164831916e6d2d7cdde9904dd793ec84 | Solidity | Chameleon | contract Chameleon is IERC721, Ownable, Functional {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// URI Root Location for Json Files
string private _baseURI;
// Mapping from token ID to owner address
... | // ******************************************************************************************************************************
// ************************************************** Start of Main Contract ***************************************************
// *********************************************************... | LineComment | // ******************************************************************************* | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://252c9952df7d20ce4a510862471ac946e2faaf9f4446c691f3c20d7cf2c3ef9b | {
"func_code_index": [
24407,
24441
]
} | 29,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.