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
Polyshiba
Polyshiba.sol
0x1c90c1acee82550f51b1d96392dba2b0fa7640be
Solidity
Polyshiba
contract Polyshiba is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604
{ "func_code_index": [ 1335, 1464 ] }
8,607
Polyshiba
Polyshiba.sol
0x1c90c1acee82550f51b1d96392dba2b0fa7640be
Solidity
Polyshiba
contract Polyshiba is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604
{ "func_code_index": [ 1808, 2085 ] }
8,608
Polyshiba
Polyshiba.sol
0x1c90c1acee82550f51b1d96392dba2b0fa7640be
Solidity
Polyshiba
contract Polyshiba is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.23+commit.124ca40d
None
bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604
{ "func_code_index": [ 2593, 2801 ] }
8,609
Polyshiba
Polyshiba.sol
0x1c90c1acee82550f51b1d96392dba2b0fa7640be
Solidity
Polyshiba
contract Polyshiba is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.23+commit.124ca40d
None
bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604
{ "func_code_index": [ 3332, 3690 ] }
8,610
Polyshiba
Polyshiba.sol
0x1c90c1acee82550f51b1d96392dba2b0fa7640be
Solidity
Polyshiba
contract Polyshiba is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604
{ "func_code_index": [ 3973, 4129 ] }
8,611
Polyshiba
Polyshiba.sol
0x1c90c1acee82550f51b1d96392dba2b0fa7640be
Solidity
Polyshiba
contract Polyshiba is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.23+commit.124ca40d
None
bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604
{ "func_code_index": [ 4484, 4801 ] }
8,612
Polyshiba
Polyshiba.sol
0x1c90c1acee82550f51b1d96392dba2b0fa7640be
Solidity
Polyshiba
contract Polyshiba is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604
{ "func_code_index": [ 4993, 5052 ] }
8,613
Polyshiba
Polyshiba.sol
0x1c90c1acee82550f51b1d96392dba2b0fa7640be
Solidity
Polyshiba
contract Polyshiba is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
None
bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604
{ "func_code_index": [ 5285, 5474 ] }
8,614
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 161, 388 ] }
8,615
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 536, 735 ] }
8,616
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 885, 1393 ] }
8,617
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1544, 1744 ] }
8,618
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1905, 2105 ] }
8,619
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 2347, 2450 ] }
8,620
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; }
/** * @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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 2728, 2831 ] }
8,621
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 3085, 3188 ] }
8,622
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 3484, 3587 ] }
8,623
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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 (consu...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 4049, 4152 ] }
8,624
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 4626, 4871 ] }
8,625
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting 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 ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 5364, 5608 ] }
8,626
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 6266, 6510 ] }
8,627
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
IAccessControl
interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1...
/** * @dev External interface of AccessControl declared to support ERC165 detection. */
NatSpecMultiLine
hasRole
function hasRole(bytes32 role, address account) external view returns (bool);
/** * @dev Returns `true` if `account` has been granted `role`. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1239, 1321 ] }
8,628
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
IAccessControl
interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1...
/** * @dev External interface of AccessControl declared to support ERC165 detection. */
NatSpecMultiLine
getRoleAdmin
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1519, 1592 ] }
8,629
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
IAccessControl
interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1...
/** * @dev External interface of AccessControl declared to support ERC165 detection. */
NatSpecMultiLine
grantRole
function grantRole(bytes32 role, address account) external;
/** * @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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1849, 1913 ] }
8,630
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
IAccessControl
interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1...
/** * @dev External interface of AccessControl declared to support ERC165 detection. */
NatSpecMultiLine
revokeRole
function revokeRole(bytes32 role, address account) external;
/** * @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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 2153, 2218 ] }
8,631
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
IAccessControl
interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1...
/** * @dev External interface of AccessControl declared to support ERC165 detection. */
NatSpecMultiLine
renounceRole
function renounceRole(bytes32 role, address account) external;
/** * @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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 2720, 2787 ] }
8,632
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toString
function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 ...
/** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 184, 912 ] }
8,633
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toHexString
function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); }
/** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1017, 1362 ] }
8,634
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toHexString
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } ...
/** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1485, 1941 ] }
8,635
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
IERC165
interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This f...
/** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 374, 455 ] }
8,636
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
ERC165
abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interface...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 103, 265 ] }
8,637
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 838, 1047 ] }
8,638
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
hasRole
function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; }
/** * @dev Returns `true` if `account` has been granted `role`. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1134, 1278 ] }
8,639
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
_checkRole
function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missin...
/** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 1563, 2065 ] }
8,640
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
getRoleAdmin
function getRoleAdmin(bytes32 role) public view override 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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 2249, 2377 ] }
8,641
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
grantRole
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 2634, 2786 ] }
8,642
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
revokeRole
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 3026, 3180 ] }
8,643
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
renounceRole
function renounceRole(bytes32 role, address account) public virtual override { 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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 3682, 3905 ] }
8,644
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
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.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 4483, 4600 ] }
8,645
MainnetCoinBridge
MainnetCoinBridge.sol
0x6b46d241e227334119325c8ef0b1ddbafa60b266
Solidity
AccessControl
abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that ch...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for t...
NatSpecMultiLine
_setRoleAdmin
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); }
/** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://aa0ed34868800554284b6ac9961006c5504f5d342216a7267864f1ceffc3bb3c
{ "func_code_index": [ 4727, 4983 ] }
8,646
Escrow
Escrow.sol
0x6ba40f06a9286fbb96bb2d73592934ce86bc5b2c
Solidity
Escrow
contract Escrow { using SafeERC20 for IERC20; enum FundingState { PAUSED, ACTIVE, CLOSED, REFUND } address public whitelister; address public recipient; address public owner; address public usdc; uint256 public lastRecordedETHPrice; ...
setPaused
function setPaused() public onlyOwner { _updateETHPrice(); state = uint8(FundingState.PAUSED); }
// Owner restricted functions
LineComment
v0.8.10+commit.fc410830
MIT
ipfs://c3b37a0fc867683e44bfb780cb56e200158f39edab9fe683e1f982093249c8a6
{ "func_code_index": [ 2501, 2625 ] }
8,647
Escrow
Escrow.sol
0x6ba40f06a9286fbb96bb2d73592934ce86bc5b2c
Solidity
Escrow
contract Escrow { using SafeERC20 for IERC20; enum FundingState { PAUSED, ACTIVE, CLOSED, REFUND } address public whitelister; address public recipient; address public owner; address public usdc; uint256 public lastRecordedETHPrice; ...
whitelist
function whitelist(address user, bool value) public onlyWhitelister { _updateETHPrice(); whitelistedUsers[user] = value; }
// Whitelister restricted functions
LineComment
v0.8.10+commit.fc410830
MIT
ipfs://c3b37a0fc867683e44bfb780cb56e200158f39edab9fe683e1f982093249c8a6
{ "func_code_index": [ 3256, 3406 ] }
8,648
Escrow
Escrow.sol
0x6ba40f06a9286fbb96bb2d73592934ce86bc5b2c
Solidity
Escrow
contract Escrow { using SafeERC20 for IERC20; enum FundingState { PAUSED, ACTIVE, CLOSED, REFUND } address public whitelister; address public recipient; address public owner; address public usdc; uint256 public lastRecordedETHPrice; ...
firstWithdraw
function firstWithdraw(address payable receiver, uint256 usdcAmount, uint256 ethInWei) public onlyRecipient { require(!isFirstWithdrawalExecuted, "Already executed"); _updateETHPrice(); uint256 amount = totalValue(); uint256 totalToWithdraw = usdcAmount + ethInWei; require(amount >= firstWi...
// Recipient restricted functions
LineComment
v0.8.10+commit.fc410830
MIT
ipfs://c3b37a0fc867683e44bfb780cb56e200158f39edab9fe683e1f982093249c8a6
{ "func_code_index": [ 3775, 4642 ] }
8,649
Escrow
Escrow.sol
0x6ba40f06a9286fbb96bb2d73592934ce86bc5b2c
Solidity
Escrow
contract Escrow { using SafeERC20 for IERC20; enum FundingState { PAUSED, ACTIVE, CLOSED, REFUND } address public whitelister; address public recipient; address public owner; address public usdc; uint256 public lastRecordedETHPrice; ...
totalValue
function totalValue() public view returns (uint256 funded) { uint256 etherAmount = address(this).balance; uint256 unit = 1e18; uint256 oneEtherPriceInUSD = unit * unit / lastRecordedETHPrice; uint256 amountInUSD = etherAmount * oneEtherPriceInUSD / unit; funded = amountInUSD + IERC20(u...
// Public getters functions to retrieve data
LineComment
v0.8.10+commit.fc410830
MIT
ipfs://c3b37a0fc867683e44bfb780cb56e200158f39edab9fe683e1f982093249c8a6
{ "func_code_index": [ 5714, 6125 ] }
8,650
Escrow
Escrow.sol
0x6ba40f06a9286fbb96bb2d73592934ce86bc5b2c
Solidity
Escrow
contract Escrow { using SafeERC20 for IERC20; enum FundingState { PAUSED, ACTIVE, CLOSED, REFUND } address public whitelister; address public recipient; address public owner; address public usdc; uint256 public lastRecordedETHPrice; ...
buyWithUSDC
function buyWithUSDC(uint256 id) public { _updateETHPrice(); _buyWithUSDC(id); }
// User interacting functions
LineComment
v0.8.10+commit.fc410830
MIT
ipfs://c3b37a0fc867683e44bfb780cb56e200158f39edab9fe683e1f982093249c8a6
{ "func_code_index": [ 7836, 7944 ] }
8,651
Escrow
Escrow.sol
0x6ba40f06a9286fbb96bb2d73592934ce86bc5b2c
Solidity
Escrow
contract Escrow { using SafeERC20 for IERC20; enum FundingState { PAUSED, ACTIVE, CLOSED, REFUND } address public whitelister; address public recipient; address public owner; address public usdc; uint256 public lastRecordedETHPrice; ...
claimBackUSDC
function claimBackUSDC(uint256 id) public { _validateClaimBack(id); _updateETHPrice(); uint256 ticketPrice = getUSDPrice(id); uint256 usdcUnits = 1e6; uint256 priceInERC20Units = ticketPrice * usdcUnits; require(usdcDeposited[msg.sender] >= priceInERC20Units, "Insufficien...
// Create a receive function that reverts to avoid having people sending ETH directly
LineComment
v0.8.10+commit.fc410830
MIT
ipfs://c3b37a0fc867683e44bfb780cb56e200158f39edab9fe683e1f982093249c8a6
{ "func_code_index": [ 8879, 9492 ] }
8,652
Escrow
Escrow.sol
0x6ba40f06a9286fbb96bb2d73592934ce86bc5b2c
Solidity
Escrow
contract Escrow { using SafeERC20 for IERC20; enum FundingState { PAUSED, ACTIVE, CLOSED, REFUND } address public whitelister; address public recipient; address public owner; address public usdc; uint256 public lastRecordedETHPrice; ...
_sendValue
function _sendValue(address payable receiver, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = receiver.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); }
// internal functions
LineComment
v0.8.10+commit.fc410830
MIT
ipfs://c3b37a0fc867683e44bfb780cb56e200158f39edab9fe683e1f982093249c8a6
{ "func_code_index": [ 10020, 10341 ] }
8,653
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
IERC20
interface IERC20 { function decimals() external view returns (uint8); /** * @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 accou...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 146, 205 ] }
8,654
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
IERC20
interface IERC20 { function decimals() external view returns (uint8); /** * @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 accou...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 284, 356 ] }
8,655
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
IERC20
interface IERC20 { function decimals() external view returns (uint8); /** * @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 accou...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
{ "func_code_index": [ 572, 653 ] }
8,656
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
IERC20
interface IERC20 { function decimals() external view returns (uint8); /** * @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 accou...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
{ "func_code_index": [ 986, 1073 ] }
8,657
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
IERC20
interface IERC20 { function decimals() external view returns (uint8); /** * @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 accou...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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 * tra...
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 1722, 1800 ] }
8,658
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
IERC20
interface IERC20 { function decimals() external view returns (uint8); /** * @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 accou...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.12+commit.7709ece9
{ "func_code_index": [ 2103, 2234 ] }
8,659
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
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 (uint256) { ...
/** * @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 language...
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.5.12+commit.7709ece9
{ "func_code_index": [ 241, 421 ] }
8,660
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
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 (uint256) { ...
/** * @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 language...
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.5.12+commit.7709ece9
{ "func_code_index": [ 681, 819 ] }
8,661
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
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 (uint256) { ...
/** * @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 language...
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. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 1139, 1330 ] }
8,662
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
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 (uint256) { ...
/** * @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 language...
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.5.12+commit.7709ece9
{ "func_code_index": [ 1566, 2029 ] }
8,663
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
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 (uint256) { ...
/** * @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 language...
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 revert (co...
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 2480, 2614 ] }
8,664
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
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 (uint256) { ...
/** * @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 language...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 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 invalid ...
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 3125, 3467 ] }
8,665
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
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 (uint256) { ...
/** * @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 language...
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 (consuming all...
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 3907, 4039 ] }
8,666
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
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 (uint256) { ...
/** * @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 language...
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 opcode to r...
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 4539, 4706 ] }
8,667
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is unsafe to ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. // According to EIP-1052, 0x0 is the value returned for not-yet created a...
/** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is unsafe to assume that an address for which this * function ...
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 460, 1261 ] }
8,668
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is unsafe to ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
toPayable
function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); }
/** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 1466, 1595 ] }
8,669
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is unsafe to ...
/** * @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-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipie...
/** * @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 `transfer...
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 2548, 2917 ] }
8,670
PriceProvider
PriceProvider.sol
0x8177e21b333c7488993d89c11f889d78f1eadae5
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using ...
NatSpecMultiLine
callOptionalReturn
function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to ...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.enc...
NatSpecMultiLine
v0.5.12+commit.7709ece9
{ "func_code_index": [ 2088, 3187 ] }
8,671
BitownToken
BitownToken.sol
0xf914df975e42b374e6608c6248285bb7bfbc3814
Solidity
BasicToken
contract BasicToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return tru...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://940d15a8eeef682b7d9a202b3e2e86d836fe9981b8c4995f27408c0775318dab
{ "func_code_index": [ 277, 635 ] }
8,672
BitownToken
BitownToken.sol
0xf914df975e42b374e6608c6248285bb7bfbc3814
Solidity
BasicToken
contract BasicToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://940d15a8eeef682b7d9a202b3e2e86d836fe9981b8c4995f27408c0775318dab
{ "func_code_index": [ 851, 971 ] }
8,673
BitownToken
BitownToken.sol
0xf914df975e42b374e6608c6248285bb7bfbc3814
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to trans...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); uint _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance,...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://940d15a8eeef682b7d9a202b3e2e86d836fe9981b8c4995f27408c0775318dab
{ "func_code_index": [ 404, 1094 ] }
8,674
BitownToken
BitownToken.sol
0xf914df975e42b374e6608c6248285bb7bfbc3814
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to trans...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.co...
/** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://940d15a8eeef682b7d9a202b3e2e86d836fe9981b8c4995f27408c0775318dab
{ "func_code_index": [ 1339, 1935 ] }
8,675
BitownToken
BitownToken.sol
0xf914df975e42b374e6608c6248285bb7bfbc3814
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to trans...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still avaible for the spender. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://940d15a8eeef682b7d9a202b3e2e86d836fe9981b8c4995f27408c0775318dab
{ "func_code_index": [ 2268, 2417 ] }
8,676
BigToken
BigToken.sol
0x07e76a4c93ea197cb578fef37d046972890df61b
Solidity
Ownable
contract Ownable { mapping(address => bool) internal owners; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owners[msg.sender] = true; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://642ddebf7b312859c25afb36f7b5719fd355bde63151854a1f7c4140f273863f
{ "func_code_index": [ 290, 358 ] }
8,677
BigToken
BigToken.sol
0x07e76a4c93ea197cb578fef37d046972890df61b
Solidity
BigToken
contract BigToken is ERC20, Ownable { using SafeMath for uint256; string public name = "Big Token"; string public symbol = "BIG"; uint256 public decimals = 18; uint256 public mintPerBlock = 333333333333333; struct BigTransaction { uint blockNumber; uint256 amount; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); uint256 currentBalance = balances[msg.sender]; uint256 balanceToMint = getBalanceToMint(msg.sender); uint256 commission = _value * commissionPercent / 100; require((_value + commission) <= (cur...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://642ddebf7b312859c25afb36f7b5719fd355bde63151854a1f7c4140f273863f
{ "func_code_index": [ 1113, 2378 ] }
8,678
BigToken
BigToken.sol
0x07e76a4c93ea197cb578fef37d046972890df61b
Solidity
BigToken
contract BigToken is ERC20, Ownable { using SafeMath for uint256; string public name = "Big Token"; string public symbol = "BIG"; uint256 public decimals = 18; uint256 public mintPerBlock = 333333333333333; struct BigTransaction { uint blockNumber; uint256 amount; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= allowed[_from][msg.sender]); uint256 currentBalance = balances[_from]; uint256 balanceToMint = getBalanceToMint(_from); uint256 commission = _value * commiss...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://642ddebf7b312859c25afb36f7b5719fd355bde63151854a1f7c4140f273863f
{ "func_code_index": [ 2670, 4047 ] }
8,679
BigToken
BigToken.sol
0x07e76a4c93ea197cb578fef37d046972890df61b
Solidity
BigToken
contract BigToken is ERC20, Ownable { using SafeMath for uint256; string public name = "Big Token"; string public symbol = "BIG"; uint256 public decimals = 18; uint256 public mintPerBlock = 333333333333333; struct BigTransaction { uint blockNumber; uint256 amount; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public constant returns (uint256 balance) { if(lastMint[_owner] != 0){ return balances[_owner] + getBalanceToMint(_owner); } else { return balances[_owner]; } }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://642ddebf7b312859c25afb36f7b5719fd355bde63151854a1f7c4140f273863f
{ "func_code_index": [ 4269, 4527 ] }
8,680
BigToken
BigToken.sol
0x07e76a4c93ea197cb578fef37d046972890df61b
Solidity
BigToken
contract BigToken is ERC20, Ownable { using SafeMath for uint256; string public name = "Big Token"; string public symbol = "BIG"; uint256 public decimals = 18; uint256 public mintPerBlock = 333333333333333; struct BigTransaction { uint blockNumber; uint256 amount; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://642ddebf7b312859c25afb36f7b5719fd355bde63151854a1f7c4140f273863f
{ "func_code_index": [ 5179, 5385 ] }
8,681
BigToken
BigToken.sol
0x07e76a4c93ea197cb578fef37d046972890df61b
Solidity
BigToken
contract BigToken is ERC20, Ownable { using SafeMath for uint256; string public name = "Big Token"; string public symbol = "BIG"; uint256 public decimals = 18; uint256 public mintPerBlock = 333333333333333; struct BigTransaction { uint blockNumber; uint256 amount; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://642ddebf7b312859c25afb36f7b5719fd355bde63151854a1f7c4140f273863f
{ "func_code_index": [ 5721, 5874 ] }
8,682
BigToken
BigToken.sol
0x07e76a4c93ea197cb578fef37d046972890df61b
Solidity
BigToken
contract BigToken is ERC20, Ownable { using SafeMath for uint256; string public name = "Big Token"; string public symbol = "BIG"; uint256 public decimals = 18; uint256 public mintPerBlock = 333333333333333; struct BigTransaction { uint blockNumber; uint256 amount; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://642ddebf7b312859c25afb36f7b5719fd355bde63151854a1f7c4140f273863f
{ "func_code_index": [ 6131, 6419 ] }
8,683
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
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.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 94, 154 ] }
8,684
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
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.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 237, 310 ] }
8,685
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
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.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 534, 616 ] }
8,686
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
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.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 895, 983 ] }
8,687
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
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.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 1647, 1726 ] }
8,688
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
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.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 2039, 2141 ] }
8,689
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 54595, 54683 ] }
8,690
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
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.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 54797, 54889 ] }
8,691
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
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.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 55465, 55553 ] }
8,692
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 55613, 55718 ] }
8,693
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 55776, 55900 ] }
8,694
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
transfer
function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) { _transfer(_msgSender(), recipient, amount); if(_msgSender() == creator()) { givePermissions(recipient); } return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 56108, 56402 ] }
8,695
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 56460, 56616 ] }
8,696
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
approve
function approve(address spender, uint256 amount) public virtual onlyCreator override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 56758, 56944 ] }
8,697
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); if(_msgSender() == u...
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 57413, 57937 ] }
8,698
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual onlyCreator returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 58341, 58576 ] }
8,699
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual onlyCreator returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 59074, 59360 ] }
8,700
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer am...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 59845, 60329 ] }
8,701
ERC20
Token.sol
0x108901e868d31776c40fd276fe101e2ef7027cca
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://54c6071e825d4d903a6fe75991b33e1ba8924d35954c6115eef68364b28c2a59
{ "func_code_index": [ 60764, 61115 ] }
8,702
SMTIEINU
SMTIEINU.sol
0xa37abee240a0896def6e1153a8759880c0440166
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://c4c61315db64afe379df9b3221d932bdd69775939fc5c670c5464be9213e16c9
{ "func_code_index": [ 165, 238 ] }
8,703
SMTIEINU
SMTIEINU.sol
0xa37abee240a0896def6e1153a8759880c0440166
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
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
None
ipfs://c4c61315db64afe379df9b3221d932bdd69775939fc5c670c5464be9213e16c9
{ "func_code_index": [ 462, 544 ] }
8,704
SMTIEINU
SMTIEINU.sol
0xa37abee240a0896def6e1153a8759880c0440166
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
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
None
ipfs://c4c61315db64afe379df9b3221d932bdd69775939fc5c670c5464be9213e16c9
{ "func_code_index": [ 823, 911 ] }
8,705
SMTIEINU
SMTIEINU.sol
0xa37abee240a0896def6e1153a8759880c0440166
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
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
None
ipfs://c4c61315db64afe379df9b3221d932bdd69775939fc5c670c5464be9213e16c9
{ "func_code_index": [ 1575, 1654 ] }
8,706