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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
VapenApes2981 | vapenapes-contract-main/src/contracts/impl/ERC721.sol | 0x826f34dee336885b58a2db3d7a4c3e664ced0e85 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _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 | {
"func_code_index": [
7507,
7749
]
} | 7,700 | ||
VapenApes2981 | vapenapes-contract-main/src/contracts/impl/ERC721.sol | 0x826f34dee336885b58a2db3d7a4c3e664ced0e85 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _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 Transfer(address(0), to, token... | /**
* @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 | {
"func_code_index": [
8031,
8365
]
} | 7,701 | ||
VapenApes2981 | vapenapes-contract-main/src/contracts/impl/ERC721.sol | 0x826f34dee336885b58a2db3d7a4c3e664ced0e85 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _burn | function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.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 | {
"func_code_index": [
8548,
8852
]
} | 7,702 | ||
VapenApes2981 | vapenapes-contract-main/src/contracts/impl/ERC721.sol | 0x826f34dee336885b58a2db3d7a4c3e664ced0e85 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.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 approvals from the previ... | /**
* @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 | {
"func_code_index": [
9139,
9622
]
} | 7,703 | ||
VapenApes2981 | vapenapes-contract-main/src/contracts/impl/ERC721.sol | 0x826f34dee336885b58a2db3d7a4c3e664ced0e85 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _approve | function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
9714,
9871
]
} | 7,704 | ||
VapenApes2981 | vapenapes-contract-main/src/contracts/impl/ERC721.sol | 0x826f34dee336885b58a2db3d7a4c3e664ced0e85 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
... | /**
* @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
* @pa... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
10390,
10974
]
} | 7,705 | ||
VapenApes2981 | vapenapes-contract-main/src/contracts/impl/ERC721.sol | 0x826f34dee336885b58a2db3d7a4c3e664ced0e85 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/ | NatSpecMultiLine | _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... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
11484,
11586
]
} | 7,706 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
94,
154
]
} | 7,707 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
237,
310
]
} | 7,708 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
534,
616
]
} | 7,709 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
895,
983
]
} | 7,710 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
1647,
1726
]
} | 7,711 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
2039,
2141
]
} | 7,712 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
259,
445
]
} | 7,713 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
723,
864
]
} | 7,714 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
1162,
1359
]
} | 7,715 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
1613,
2089
]
} | 7,716 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
2560,
2697
]
} | 7,717 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
3188,
3471
]
} | 7,718 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
3931,
4066
]
} | 7,719 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
4546,
4717
]
} | 7,720 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | 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) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @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.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
606,
1230
]
} | 7,721 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | 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");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @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.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
2160,
2562
]
} | 7,722 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | 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.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
3318,
3496
]
} | 7,723 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | 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.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
3721,
3922
]
} | 7,724 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | 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.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
4292,
4523
]
} | 7,725 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | 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");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @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.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
4774,
5095
]
} | 7,726 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
497,
581
]
} | 7,727 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = 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.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
1139,
1292
]
} | 7,728 | ||
AkitaCash | AkitaCash.sol | 0x80409a47b1b7cb948ce08ff96cd86d5de1203562 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://b88fbc2051b86f90d1e27025d5238edca12261c731a90218ca513b87940c8b15 | {
"func_code_index": [
1442,
1691
]
} | 7,729 | ||
WithdrawMigration | contracts/src/common/libs/Decimals.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | Decimals | library Decimals {
using SafeMath for uint256;
uint120 private constant basisValue = 1000000000000000000;
/**
* Returns the ratio of the first argument to the second argument.
*/
function outOf(uint256 _a, uint256 _b)
internal
pure
returns (uint256 result)
{
if (_a == 0) {
return 0;
... | /**
* Library for emulating calculations involving decimals.
*/ | NatSpecMultiLine | outOf | function outOf(uint256 _a, uint256 _b)
internal
pure
returns (uint256 result)
{
if (_a == 0) {
return 0;
}
uint256 a = _a.mul(basisValue);
if (a < _b) {
return 0;
}
return (a.div(_b));
}
| /**
* Returns the ratio of the first argument to the second argument.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
194,
421
]
} | 7,730 |
WithdrawMigration | contracts/src/common/libs/Decimals.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | Decimals | library Decimals {
using SafeMath for uint256;
uint120 private constant basisValue = 1000000000000000000;
/**
* Returns the ratio of the first argument to the second argument.
*/
function outOf(uint256 _a, uint256 _b)
internal
pure
returns (uint256 result)
{
if (_a == 0) {
return 0;
... | /**
* Library for emulating calculations involving decimals.
*/ | NatSpecMultiLine | mulBasis | function mulBasis(uint256 _a) internal pure returns (uint256) {
return _a.mul(basisValue);
}
| /**
* Returns multiplied the number by 10^18.
* This is used when there is a very large difference between the two numbers passed to the `outOf` function.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
593,
692
]
} | 7,731 |
WithdrawMigration | contracts/src/common/libs/Decimals.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | Decimals | library Decimals {
using SafeMath for uint256;
uint120 private constant basisValue = 1000000000000000000;
/**
* Returns the ratio of the first argument to the second argument.
*/
function outOf(uint256 _a, uint256 _b)
internal
pure
returns (uint256 result)
{
if (_a == 0) {
return 0;
... | /**
* Library for emulating calculations involving decimals.
*/ | NatSpecMultiLine | divBasis | function divBasis(uint256 _a) internal pure returns (uint256) {
return _a.div(basisValue);
}
| /**
* Returns by changing the numerical value being emulated to the original number of digits.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
801,
900
]
} | 7,732 |
WithdrawMigration | contracts/src/common/config/UsingConfig.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | UsingConfig | contract UsingConfig {
AddressConfig private _config;
/**
* Initialize the argument as AddressConfig address.
*/
constructor(address _addressConfig) public {
_config = AddressConfig(_addressConfig);
}
/**
* Returns the latest AddressConfig instance.
*/
function config() internal view retu... | /**
* Module for using AddressConfig contracts.
*/ | NatSpecMultiLine | config | function config() internal view returns (AddressConfig) {
return _config;
}
| /**
* Returns the latest AddressConfig instance.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
283,
365
]
} | 7,733 |
WithdrawMigration | contracts/src/common/config/UsingConfig.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | UsingConfig | contract UsingConfig {
AddressConfig private _config;
/**
* Initialize the argument as AddressConfig address.
*/
constructor(address _addressConfig) public {
_config = AddressConfig(_addressConfig);
}
/**
* Returns the latest AddressConfig instance.
*/
function config() internal view retu... | /**
* Module for using AddressConfig contracts.
*/ | NatSpecMultiLine | configAddress | function configAddress() external view returns (address) {
return address(_config);
}
| /**
* Returns the latest AddressConfig address.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
427,
519
]
} | 7,734 |
WithdrawMigration | contracts/src/common/storage/UsingStorage.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | UsingStorage | contract UsingStorage is Ownable {
address private _storage;
/**
* Modifier to verify that EternalStorage is set.
*/
modifier hasStorage() {
require(_storage != address(0), "storage is not set");
_;
}
/**
* Returns the set EternalStorage instance.
*/
function eternalStorage()
intern... | /**
* Module for contrast handling EternalStorage.
*/ | NatSpecMultiLine | eternalStorage | function eternalStorage()
internal
view
hasStorage
returns (EternalStorage)
{
return EternalStorage(_storage);
}
| /**
* Returns the set EternalStorage instance.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
284,
417
]
} | 7,735 |
WithdrawMigration | contracts/src/common/storage/UsingStorage.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | UsingStorage | contract UsingStorage is Ownable {
address private _storage;
/**
* Modifier to verify that EternalStorage is set.
*/
modifier hasStorage() {
require(_storage != address(0), "storage is not set");
_;
}
/**
* Returns the set EternalStorage instance.
*/
function eternalStorage()
intern... | /**
* Module for contrast handling EternalStorage.
*/ | NatSpecMultiLine | getStorageAddress | function getStorageAddress() external view hasStorage returns (address) {
return _storage;
}
| /**
* Returns the set EternalStorage address.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
477,
576
]
} | 7,736 |
WithdrawMigration | contracts/src/common/storage/UsingStorage.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | UsingStorage | contract UsingStorage is Ownable {
address private _storage;
/**
* Modifier to verify that EternalStorage is set.
*/
modifier hasStorage() {
require(_storage != address(0), "storage is not set");
_;
}
/**
* Returns the set EternalStorage instance.
*/
function eternalStorage()
intern... | /**
* Module for contrast handling EternalStorage.
*/ | NatSpecMultiLine | createStorage | function createStorage() external onlyOwner {
require(_storage == address(0), "storage is set");
EternalStorage tmp = new EternalStorage();
_storage = address(tmp);
}
| /**
* Create a new EternalStorage contract.
* This function call will fail if the EternalStorage contract is already set.
* Also, only the owner can execute it.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
757,
936
]
} | 7,737 |
WithdrawMigration | contracts/src/common/storage/UsingStorage.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | UsingStorage | contract UsingStorage is Ownable {
address private _storage;
/**
* Modifier to verify that EternalStorage is set.
*/
modifier hasStorage() {
require(_storage != address(0), "storage is not set");
_;
}
/**
* Returns the set EternalStorage instance.
*/
function eternalStorage()
intern... | /**
* Module for contrast handling EternalStorage.
*/ | NatSpecMultiLine | setStorage | function setStorage(address _storageAddress) external onlyOwner {
_storage = _storageAddress;
}
| /**
* Assigns the EternalStorage contract that has already been created.
* Only the owner can execute this function.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
1070,
1172
]
} | 7,738 |
WithdrawMigration | contracts/src/common/storage/UsingStorage.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | UsingStorage | contract UsingStorage is Ownable {
address private _storage;
/**
* Modifier to verify that EternalStorage is set.
*/
modifier hasStorage() {
require(_storage != address(0), "storage is not set");
_;
}
/**
* Returns the set EternalStorage instance.
*/
function eternalStorage()
intern... | /**
* Module for contrast handling EternalStorage.
*/ | NatSpecMultiLine | changeOwner | function changeOwner(address newOwner) external onlyOwner {
EternalStorage(_storage).changeOwner(newOwner);
}
| /**
* Delegates the owner of the current EternalStorage contract.
* Only the owner can execute this function.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
1299,
1415
]
} | 7,739 |
WithdrawMigration | contracts/src/common/validate/AddressValidator.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | AddressValidator | contract AddressValidator {
string constant errorMessage = "this is illegal address";
/**
* Validates passed address is not a zero address.
*/
function validateIllegalAddress(address _addr) external pure {
require(_addr != address(0), errorMessage);
}
/**
* Validates passed address is included... | /**
* A module that provides common validations patterns.
*/ | NatSpecMultiLine | validateIllegalAddress | function validateIllegalAddress(address _addr) external pure {
require(_addr != address(0), errorMessage);
}
| /**
* Validates passed address is not a zero address.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
156,
271
]
} | 7,740 |
WithdrawMigration | contracts/src/common/validate/AddressValidator.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | AddressValidator | contract AddressValidator {
string constant errorMessage = "this is illegal address";
/**
* Validates passed address is not a zero address.
*/
function validateIllegalAddress(address _addr) external pure {
require(_addr != address(0), errorMessage);
}
/**
* Validates passed address is included... | /**
* A module that provides common validations patterns.
*/ | NatSpecMultiLine | validateGroup | function validateGroup(address _addr, address _groupAddr) external view {
require(IGroup(_groupAddr).isGroup(_addr), errorMessage);
}
| /**
* Validates passed address is included in an address set.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
347,
487
]
} | 7,741 |
WithdrawMigration | contracts/src/common/validate/AddressValidator.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | AddressValidator | contract AddressValidator {
string constant errorMessage = "this is illegal address";
/**
* Validates passed address is not a zero address.
*/
function validateIllegalAddress(address _addr) external pure {
require(_addr != address(0), errorMessage);
}
/**
* Validates passed address is included... | /**
* A module that provides common validations patterns.
*/ | NatSpecMultiLine | validateGroups | function validateGroups(
address _addr,
address _groupAddr1,
address _groupAddr2
) external view {
if (IGroup(_groupAddr1).isGroup(_addr)) {
return;
}
require(IGroup(_groupAddr2).isGroup(_addr), errorMessage);
}
| /**
* Validates passed address is included in two address sets.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
565,
804
]
} | 7,742 |
WithdrawMigration | contracts/src/common/validate/AddressValidator.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | AddressValidator | contract AddressValidator {
string constant errorMessage = "this is illegal address";
/**
* Validates passed address is not a zero address.
*/
function validateIllegalAddress(address _addr) external pure {
require(_addr != address(0), errorMessage);
}
/**
* Validates passed address is included... | /**
* A module that provides common validations patterns.
*/ | NatSpecMultiLine | validateAddress | function validateAddress(address _addr, address _target) external pure {
require(_addr == _target, errorMessage);
}
| /**
* Validates that the address of the first argument is equal to the address of the second argument.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
921,
1043
]
} | 7,743 |
WithdrawMigration | contracts/src/common/validate/AddressValidator.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | AddressValidator | contract AddressValidator {
string constant errorMessage = "this is illegal address";
/**
* Validates passed address is not a zero address.
*/
function validateIllegalAddress(address _addr) external pure {
require(_addr != address(0), errorMessage);
}
/**
* Validates passed address is included... | /**
* A module that provides common validations patterns.
*/ | NatSpecMultiLine | validateAddresses | function validateAddresses(
address _addr,
address _target1,
address _target2
) external pure {
if (_addr == _target1) {
return;
}
require(_addr == _target2, errorMessage);
}
| /**
* Validates passed address equals to the two addresses.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
1117,
1319
]
} | 7,744 |
WithdrawMigration | contracts/src/common/validate/AddressValidator.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | AddressValidator | contract AddressValidator {
string constant errorMessage = "this is illegal address";
/**
* Validates passed address is not a zero address.
*/
function validateIllegalAddress(address _addr) external pure {
require(_addr != address(0), errorMessage);
}
/**
* Validates passed address is included... | /**
* A module that provides common validations patterns.
*/ | NatSpecMultiLine | validate3Addresses | function validate3Addresses(
address _addr,
address _target1,
address _target2,
address _target3
) external pure {
if (_addr == _target1) {
return;
}
if (_addr == _target2) {
return;
}
require(_addr == _target3, errorMessage);
}
| /**
* Validates passed address equals to the three addresses.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
1395,
1664
]
} | 7,745 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
retur... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
908,
1327
]
} | 7,746 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element f... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1498,
3047
]
} | 7,747 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3128,
3262
]
} | 7,748 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3343,
3457
]
} | 7,749 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3796,
4005
]
} | 7,750 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
4254,
4384
]
} | 7,751 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
4555,
4691
]
} | 7,752 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
4772,
4917
]
} | 7,753 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
4998,
5120
]
} | 7,754 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
5459,
5595
]
} | 7,755 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
5844,
5992
]
} | 7,756 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
6163,
6317
]
} | 7,757 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
6398,
6561
]
} | 7,758 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
6642,
6764
]
} | 7,759 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
7103,
7257
]
} | 7,760 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
7498,
7634
]
} | 7,761 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
7805,
7947
]
} | 7,762 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
8028,
8179
]
} | 7,763 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
8260,
8379
]
} | 7,764 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
8718,
8860
]
} | 7,765 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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;
// solhint-disable-next-line no-inline-assembly
... | /**
* @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.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
606,
1033
]
} | 7,766 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @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.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1963,
2365
]
} | 7,767 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3121,
3299
]
} | 7,768 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3524,
3724
]
} | 7,769 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
4094,
4325
]
} | 7,770 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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");
// solhint-disa... | /**
* @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.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
4576,
5111
]
} | 7,771 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
5291,
5495
]
} | 7,772 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.stat... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
5682,
6109
]
} | 7,773 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | hasRole | function hasRole(bytes32 role, address account) public view returns (bool) {
return _roles[role].members.contains(account);
}
| /**
* @dev Returns `true` if `account` has been granted `role`.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1546,
1690
]
} | 7,774 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | getRoleMemberCount | function getRoleMemberCount(bytes32 role) public view returns (uint256) {
return _roles[role].members.length();
}
| /**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1859,
1991
]
} | 7,775 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | getRoleMember | function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
return _roles[role].members.at(index);
}
| /**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make ... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
2585,
2728
]
} | 7,776 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | getRoleAdmin | function getRoleAdmin(bytes32 role) public view returns (bytes32) {
return _roles[role].adminRole;
}
| /**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
2912,
3031
]
} | 7,777 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | grantRole | function grantRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");
_grantRole(role, account);
}
| /**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3288,
3520
]
} | 7,778 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | revokeRole | function revokeRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");
_revokeRole(role, account);
}
| /**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3760,
3995
]
} | 7,779 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | renounceRole | function renounceRole(bytes32 role, address account) public virtual {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
| /**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
4497,
4711
]
} | 7,780 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | _setupRole | function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
| /**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor w... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
5289,
5406
]
} | 7,781 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | AccessControl | abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant D... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
... | NatSpecMultiLine | _setRoleAdmin | function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
_roles[role].adminRole = adminRole;
}
| /**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
5533,
5737
]
} | 7,782 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
94,
154
]
} | 7,783 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
237,
310
]
} | 7,784 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
534,
616
]
} | 7,785 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
895,
983
]
} | 7,786 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1647,
1726
]
} | 7,787 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
2039,
2141
]
} | 7,788 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
259,
445
]
} | 7,789 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
723,
864
]
} | 7,790 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1162,
1359
]
} | 7,791 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1613,
2089
]
} | 7,792 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
2560,
2697
]
} | 7,793 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3188,
3471
]
} | 7,794 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
3931,
4066
]
} | 7,795 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
4546,
4717
]
} | 7,796 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
867,
955
]
} | 7,797 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1069,
1161
]
} | 7,798 |
xTSM | xTSM.sol | 0xf330c5d3ff3806298da095d8c8067c74b2994dbf | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | ipfs://1f4c05d0344ba392163709f98a7a8ae3f25800bd65a348778ed89d9471f61d86 | {
"func_code_index": [
1794,
1882
]
} | 7,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.